From fcbadc0502f369d41f6b668e8865f734f3ba88a3 Mon Sep 17 00:00:00 2001 From: "xiao.tang" Date: Thu, 7 Jan 2021 10:37:59 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8feat(royalpay):=20=E8=B0=83=E6=95=B4?= =?UTF-8?q?=E9=83=A8=E5=88=86=E4=BB=A3=E7=A0=81=E6=A0=BC=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../static/payment/partner/partner-manage.js | 328 +++++++++--------- .../templates/sub_merchant_detail.html | 34 +- .../templates/sub_merchant_id_apply.html | 209 +---------- 3 files changed, 200 insertions(+), 371 deletions(-) diff --git a/src/main/ui/static/payment/partner/partner-manage.js b/src/main/ui/static/payment/partner/partner-manage.js index f587fbdd6..18762a628 100644 --- a/src/main/ui/static/payment/partner/partner-manage.js +++ b/src/main/ui/static/payment/partner/partner-manage.js @@ -5431,24 +5431,65 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter } } }]); - // Merchant Id Management + // MID Management app.controller('subMerchantIdApplicaitonsCtrl', ['$scope', '$http', '$uibModal', '$state', 'commonDialog', '$sce', function ($scope, $http, $uibModal, $state, commonDialog, $sce) { + // 初始化子商户 + $scope.loadSubMerchantInfos = function () { + $http.get('/sys/partners/' + $scope.partner.client_moniker + '/list_sub_applices', { params: {} }).then(function (resp) { + $scope.subMerchantInfos = resp.data; + }); + // $http.get('/sys/partners/' + $scope.partner.client_moniker + '/list_rpay_sub_applices', {params: {}}).then(function (resp) { + // $scope.subRpayMerchantInfos = resp.data; + // }); + // + // $http.get('/sys/partners/' + $scope.partner.client_moniker + '/list_yeepay_sub_applices', {params: {}}).then(function (resp) { + // $scope.subYeepayMerchantInfos = resp.data; + // }); + // $http.get('/sys/partners/' + $scope.partner.client_moniker + '/queryMWMerchantIdStatus').then(function (resp) { + // $scope.partner.cardInfo = resp.data; + // }); + }; + $scope.loadSubMerchantInfos(); + // 加载卡支付信息 + $scope.loadCardInfos = function () { + $http.get('/sys/partners/' + $scope.partner.client_moniker + '/queryMWMerchantIdStatus').then(function (resp) { + $scope.cardInfo = resp.data; + }); + } + $scope.loadCardInfos(); + // 初始化信息 $scope.loadPartnerInfo = function () { $http.get('/sys/partners/' + $scope.partner.client_moniker).then(function (resp) { $scope.partnerInfo = resp.data; $scope.doSwitchCommonSubMerchantId(); }) }; - $scope.loadPartnerInfo() + $scope.loadPartnerInfo(); // 编辑Wechat Sub Merchant Id $scope.saveSubMerchantId = function () { $http.put('/sys/partners/' + $scope.partner.client_moniker + '/payment_config', { sub_merchant_id: $scope.partnerInfo.sub_merchant_id }).then(function (resp) { $scope.loadPartnerInfo(); - $scope.ctrl.editSubMerchant = false; }, function (resp) { commonDialog.alert({ title: 'Error', content: resp.data.message, type: 'error' }) }); }; + // Wechat-applay + $scope.applyWxSubMerchantId = function () { + $uibModal.open({ + templateUrl: '/static/payment/partner/templates/new_apply_wx_sub_merchant_id.html', + controller: 'newApplyWxSubMerchantIdCtrl', + resolve: { + subMerchantInfo: function () { + return $scope.partner; + }, + merchantIds: ['$http', '$stateParams', function ($http) { + return $http.get('/sys/partners/' + $scope.partner.client_moniker + '/get_merchant_ids'); + }] + } + }).result.then(function () { + $scope.loadSubMerchantInfos(); + }) + }; // 刷新Wechat Sub Merchant Id $scope.queryWechatSubMerchantIdStatus = function () { $http.get('/sys/partners/' + $scope.partner.client_moniker + '/get_merchant_ids/' + $scope.partnerInfo.sub_merchant_id + '/status').then(function (resp) { @@ -5458,6 +5499,8 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter type: 'info' }) $scope.loadPartnerInfo(); + }, function (resp) { + commonDialog.alert({ title: 'Error', content: resp.data.message, type: 'error' }) }) } // history @@ -5476,7 +5519,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter // 刷新Wechat Institution Merchant Id $scope.refreshWechatInstitutionMerchantId = function () { $http.put('/sys/partners/' + $scope.partner.client_moniker + '/wechat_institution_merchant_id', { wechat_institution_merchant_id: $scope.partnerInfo.wechat_institution_merchant_id }).then(function (resp) { - $scope.loadPartnerInfo() + $scope.loadPartnerInfo(); }, function (resp) { commonDialog.alert({ title: 'Error', content: resp.data.message, type: 'error' }) }); @@ -5542,6 +5585,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter }).then(function () { $http.post('/sys/partners/' + $scope.partner.client_moniker + '/register/alipay_gms').then(function () { commonDialog.alert({ title: 'Success', content: 'Alipay进件成功', type: 'success' }); + $scope.loadPartnerInfo(); }, function (resp) { commonDialog.alert({ title: 'Error', content: "进件失败:" + resp.data.message, type: 'error' }); }) @@ -5559,6 +5603,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter }).then(function () { $http.post('/sys/partners/' + $scope.partner.client_moniker + '/register/alipayOnline_gms').then(function () { commonDialog.alert({ title: 'Success', content: '提示:AlipayOnline进件成功', type: 'success' }); + $scope.loadPartnerInfo(); }, function (resp) { commonDialog.alert({ title: 'Error', content: "进件失败:" + resp.data.message, type: 'error' }); }); @@ -5573,7 +5618,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter content: 'Modify Wechat Sub Merchant ID successfully', type: 'success' }); - $state.reload(); + $scope.loadPartnerInfo(); }, function (resp) { commonDialog.alert({ title: 'Error', content: resp.data.message, type: 'error' }) }); @@ -5610,109 +5655,15 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter } } }).result.then(function () { - $state.reload(); commonDialog.alert({ title: 'Success', content: 'Modify successfully', type: 'success' }); + $scope.loadPartnerInfo(); }) } - - $scope.showMoreMerchantInfo = false; - $scope.hideMerchantInfo = function () { - $scope.showMoreMerchantInfo = !$scope.showMoreMerchantInfo; - }; - $scope.loadSubMerchantInfos = function () { - $http.get('/sys/partners/' + $scope.partner.client_moniker + '/list_sub_applices', { params: {} }).then(function (resp) { - $scope.subMerchantInfos = resp.data; - }); - // $http.get('/sys/partners/' + $scope.partner.client_moniker + '/list_rpay_sub_applices', {params: {}}).then(function (resp) { - // $scope.subRpayMerchantInfos = resp.data; - // }); - // - // $http.get('/sys/partners/' + $scope.partner.client_moniker + '/list_yeepay_sub_applices', {params: {}}).then(function (resp) { - // $scope.subYeepayMerchantInfos = resp.data; - // }); - $http.get('/sys/partners/' + $scope.partner.client_moniker + '/queryMWMerchantIdStatus').then(function (resp) { - $scope.partner.cardInfo = resp.data; - }); - }; - $scope.updateSubMerchantId = function (merchant_app_id) { - $uibModal.open({ - templateUrl: '/static/payment/partner/templates/update_apply_wx_sub_merchant_id.html', - controller: 'updateApplyWxSubMerchantIdCtrl', - resolve: { - merchantInfo: $scope.partner, - merchantIds: ['$http', '$stateParams', function ($http) { - return $http.get('/sys/partners/' + $scope.partner.client_moniker + '/get_merchant_ids'); - }], - subMerchantInfo: ['$http', '$stateParams', function ($http) { - return $http.get('/sys/partners/' + $scope.partner.client_moniker + '/get_merchant_ids/' + merchant_app_id); - }] - } - }).result.then(function () { - $scope.loadSubMerchantInfos(); - }) - } - $scope.useRpaySubMerchantId = function (sub_merchant_id) { - $http.put('/sys/partners/' + $scope.partner.client_moniker + '/rpay_payment_config', { rpay_enterprise_id: sub_merchant_id }).then(function (resp) { - commonDialog.alert({ - title: 'Success', - content: 'Modify Rpay+ Sub Merchant ID successfully', - type: 'success' - }); - $state.reload(); - }, function (resp) { - commonDialog.alert({ title: 'Error', content: resp.data.message, type: 'error' }) - }); - } - $scope.useYeepaySubMerchantId = function (sub_merchant_id) { - $http.put('/sys/partners/' + $scope.partner.client_moniker + '/yeepay_payment_config', { yeepay_sub_merchant_id: sub_merchant_id }).then(function (resp) { - commonDialog.alert({ - title: 'Success', - content: 'Modify Yeepay Sub Merchant ID successfully', - type: 'success' - }); - $state.reload(); - }, function (resp) { - commonDialog.alert({ title: 'Error', content: resp.data.message, type: 'error' }) - }); - } - /*$scope.applyWxSubMerchantId = function () { - $uibModal.open({ - templateUrl: '/static/payment/partner/templates/apply_wx_sub_merchant_id.html', - controller: 'applyWxSubMerchantIdCtrl', - resolve: { - subMerchantInfo: function () { - return $scope.partner; - }, - merchantIds: ['$http', '$stateParams', function ($http) { - return $http.get('/sys/partners/' + $scope.partner.client_moniker + '/get_merchant_ids'); - }] - } - }).result.then(function () { - $scope.loadSubMerchantInfos(); - }) - };*/ - - $scope.applyWxSubMerchantId = function () { - $uibModal.open({ - templateUrl: '/static/payment/partner/templates/new_apply_wx_sub_merchant_id.html', - controller: 'newApplyWxSubMerchantIdCtrl', - resolve: { - subMerchantInfo: function () { - return $scope.partner; - }, - merchantIds: ['$http', '$stateParams', function ($http) { - return $http.get('/sys/partners/' + $scope.partner.client_moniker + '/get_merchant_ids'); - }] - } - }).result.then(function () { - $scope.loadSubMerchantInfos(); - }) - }; - + // 卡支付apply $scope.applyMWSubMerchantId = function () { $http.get('/sys/partners/' + $scope.partner.client_moniker + '/query/mw_info').then(function (resp) { commonDialog.confirm({ @@ -5726,69 +5677,130 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter content: 'Apply Merchant Warrior Sub Merchant ID successfully', type: 'success' }); - $scope.partner.cardInfo = res.data; + $scope.cardInfo = res.data; }, function (resp) { commonDialog.alert({ title: 'Error', content: resp.data.message, type: 'error' }); }) }) }); }; - $scope.applyRpaySubMerchantId = function () { - $uibModal.open({ - templateUrl: '/static/payment/partner/templates/apply_rpay_sub_merchant_id.html', - controller: 'applyRpaySubMerchantIdCtrl', - resolve: { - subMerchantInfo: function () { - return $scope.partner; - } - } - }).result.then(function () { - $scope.loadSubMerchantInfos(); - }) - }; - $scope.applyYeepaySubMerchantId = function () { - $uibModal.open({ - templateUrl: '/static/payment/partner/templates/apply_yeepay_sub_merchant_id.html', - controller: 'applyYeepaySubMerchantIdCtrl', - resolve: { - subMerchantInfo: function () { - return $scope.partner; - } - } - }).result.then(function () { - $scope.loadSubMerchantInfos(); - }) - }; - $scope.addYeepaySubMerchantId = function () { - $uibModal.open({ - templateUrl: '/static/payment/partner/templates/add_yeepay_sub_merchant_id.html', - controller: 'addYeepaySubMerchantIdCtrl', - resolve: { - subMerchantInfo: function () { - return $scope.partner; - } - } - }).result.then(function () { - $scope.loadSubMerchantInfos(); - }) - }; - $scope.updateYeepaySubMerchantId = function (sub_merchant_id) { - $uibModal.open({ - templateUrl: '/static/payment/partner/templates/update_yeepay_sub_merchant_id.html', - controller: 'updateYeepaySubMerchantIdCtrl', - resolve: { - subMerchantInfo: function () { - return $scope.partner; - }, - subMerchantId: function () { - return sub_merchant_id; - } - } - }).result.then(function () { - $scope.loadSubMerchantInfos(); - }) - }; - $scope.loadSubMerchantInfos(); + + // $scope.showMoreMerchantInfo = false; + // $scope.hideMerchantInfo = function () { + // $scope.showMoreMerchantInfo = !$scope.showMoreMerchantInfo; + // }; + // $scope.updateSubMerchantId = function (merchant_app_id) { + // $uibModal.open({ + // templateUrl: '/static/payment/partner/templates/update_apply_wx_sub_merchant_id.html', + // controller: 'updateApplyWxSubMerchantIdCtrl', + // resolve: { + // merchantInfo: $scope.partner, + // merchantIds: ['$http', '$stateParams', function ($http) { + // return $http.get('/sys/partners/' + $scope.partner.client_moniker + '/get_merchant_ids'); + // }], + // subMerchantInfo: ['$http', '$stateParams', function ($http) { + // return $http.get('/sys/partners/' + $scope.partner.client_moniker + '/get_merchant_ids/' + merchant_app_id); + // }] + // } + // }).result.then(function () { + // $scope.loadSubMerchantInfos(); + // }) + // } + // $scope.useRpaySubMerchantId = function (sub_merchant_id) { + // $http.put('/sys/partners/' + $scope.partner.client_moniker + '/rpay_payment_config', { rpay_enterprise_id: sub_merchant_id }).then(function (resp) { + // commonDialog.alert({ + // title: 'Success', + // content: 'Modify Rpay+ Sub Merchant ID successfully', + // type: 'success' + // }); + // $state.reload(); + // }, function (resp) { + // commonDialog.alert({ title: 'Error', content: resp.data.message, type: 'error' }) + // }); + // } + // $scope.useYeepaySubMerchantId = function (sub_merchant_id) { + // $http.put('/sys/partners/' + $scope.partner.client_moniker + '/yeepay_payment_config', { yeepay_sub_merchant_id: sub_merchant_id }).then(function (resp) { + // commonDialog.alert({ + // title: 'Success', + // content: 'Modify Yeepay Sub Merchant ID successfully', + // type: 'success' + // }); + // $state.reload(); + // }, function (resp) { + // commonDialog.alert({ title: 'Error', content: resp.data.message, type: 'error' }) + // }); + // } + // $scope.applyWxSubMerchantId = function () { + // $uibModal.open({ + // templateUrl: '/static/payment/partner/templates/apply_wx_sub_merchant_id.html', + // controller: 'applyWxSubMerchantIdCtrl', + // resolve: { + // subMerchantInfo: function () { + // return $scope.partner; + // }, + // merchantIds: ['$http', '$stateParams', function ($http) { + // return $http.get('/sys/partners/' + $scope.partner.client_moniker + '/get_merchant_ids'); + // }] + // } + // }).result.then(function () { + // $scope.loadSubMerchantInfos(); + // }) + // }; + // $scope.applyRpaySubMerchantId = function () { + // $uibModal.open({ + // templateUrl: '/static/payment/partner/templates/apply_rpay_sub_merchant_id.html', + // controller: 'applyRpaySubMerchantIdCtrl', + // resolve: { + // subMerchantInfo: function () { + // return $scope.partner; + // } + // } + // }).result.then(function () { + // $scope.loadSubMerchantInfos(); + // }) + // }; + // $scope.applyYeepaySubMerchantId = function () { + // $uibModal.open({ + // templateUrl: '/static/payment/partner/templates/apply_yeepay_sub_merchant_id.html', + // controller: 'applyYeepaySubMerchantIdCtrl', + // resolve: { + // subMerchantInfo: function () { + // return $scope.partner; + // } + // } + // }).result.then(function () { + // $scope.loadSubMerchantInfos(); + // }) + // }; + // $scope.addYeepaySubMerchantId = function () { + // $uibModal.open({ + // templateUrl: '/static/payment/partner/templates/add_yeepay_sub_merchant_id.html', + // controller: 'addYeepaySubMerchantIdCtrl', + // resolve: { + // subMerchantInfo: function () { + // return $scope.partner; + // } + // } + // }).result.then(function () { + // $scope.loadSubMerchantInfos(); + // }) + // }; + // $scope.updateYeepaySubMerchantId = function (sub_merchant_id) { + // $uibModal.open({ + // templateUrl: '/static/payment/partner/templates/update_yeepay_sub_merchant_id.html', + // controller: 'updateYeepaySubMerchantIdCtrl', + // resolve: { + // subMerchantInfo: function () { + // return $scope.partner; + // }, + // subMerchantId: function () { + // return sub_merchant_id; + // } + // } + // }).result.then(function () { + // $scope.loadSubMerchantInfos(); + // }) + // }; }]); app.controller('applyWxSubMerchantIdCtrl', ['$scope', '$http', '$uibModal', '$state', 'subMerchantInfo', '$filter', 'merchantIds', 'commonDialog', function ($scope, $http, $uibModal, $state, subMerchantInfo, $filter, merchantIds, commonDialog) { $scope.wxIndustries = angular.copy(wxMerchantIndustries); diff --git a/src/main/ui/static/payment/partner/templates/sub_merchant_detail.html b/src/main/ui/static/payment/partner/templates/sub_merchant_detail.html index 0fc613ac1..38f862a07 100644 --- a/src/main/ui/static/payment/partner/templates/sub_merchant_detail.html +++ b/src/main/ui/static/payment/partner/templates/sub_merchant_detail.html @@ -29,71 +29,71 @@ diff --git a/src/main/ui/static/payment/partner/templates/sub_merchant_id_apply.html b/src/main/ui/static/payment/partner/templates/sub_merchant_id_apply.html index 8ffe9468c..eb2493d70 100644 --- a/src/main/ui/static/payment/partner/templates/sub_merchant_id_apply.html +++ b/src/main/ui/static/payment/partner/templates/sub_merchant_id_apply.html @@ -82,22 +82,6 @@ -
@@ -147,7 +131,7 @@ -
@@ -220,22 +164,6 @@ -
@@ -323,8 +235,8 @@
- Rpay+ Institution Merchant Id : - none + Rpay+ Institution Merchant Id : + none
@@ -349,14 +261,14 @@
Merchant Warrior : - - 审核通过 - + 审核通过 + 审核中 - 打回 - ({{partner.cardInfo.rpMerchantId}}) - 未申请 + ({{cardInfo.rpMerchantId}}) + 未申请
-
+
No Data
-
    +
    • - Sub Merchant Id : {{partner.cardInfo.rpMerchantId}} - detail + Sub Merchant Id : {{cardInfo.rpMerchantId}} + detail
    -