diff --git a/src/main/ui/static/payment/partner/partner-apply.js b/src/main/ui/static/payment/partner/partner-apply.js index af664bd1c..27d14ff23 100644 --- a/src/main/ui/static/payment/partner/partner-apply.js +++ b/src/main/ui/static/payment/partner/partner-apply.js @@ -46,8 +46,6 @@ define(['angular', 'static/commons/commons', 'uiBootstrap', 'uiRouter', 'ngBootS $scope.states = stateMap.configs(); $scope.countries = countryMap.configs(); $scope.params = {}; - $scope.merchantIsValid = false; - $scope.merchantCodeChecked = false; $scope.loadPartners = function (page) { var params = angular.copy($scope.params); @@ -57,27 +55,21 @@ define(['angular', 'static/commons/commons', 'uiBootstrap', 'uiRouter', 'ngBootS $scope.pagination = resp.data.pagination; }); }; + $scope.linkButton = function (obj) { var partner = angular.copy(obj); - $http.get('/sys/partners/init/merchant_code').then(function (response) { - partner.client_moniker = response.data.partner_code; - console.log('partner.client_moniker',partner.client_moniker) - console.log('partner',partner) - $scope.merchantCodeChecked = true; - $scope.merchantIsValid = true; - partner.link = true; - $uibModal.open({ - templateUrl: '/static/payment/partner/templates/partner_application_pass.html', - controller: 'passApplicationCtrl', - resolve: { - partner: partner - } - }).result.then(function () { - commonDialog.alert({title: 'Success', content: '关联成功!', type: 'success'}); - $state.reload(); - // $state.go('partner_application.detail', {client_apply_id: obj.client_apply_id}, {reload: true}); - }) - }); + partner.link = true; + $uibModal.open({ + templateUrl: '/static/payment/partner/templates/partner_application_pass.html', + controller: 'passApplicationCtrl', + resolve: { + partner: partner + } + }).result.then(function () { + commonDialog.alert({title: 'Success', content: '关联成功!', type: 'success'}); + $state.reload(); + // $state.go('partner_application.detail', {client_apply_id: obj.client_apply_id}, {reload: true}); + }) }; $scope.loadPartners(1); @@ -162,12 +154,36 @@ define(['angular', 'static/commons/commons', 'uiBootstrap', 'uiRouter', 'ngBootS commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'}) }); }; - $scope.pass = function (obj) { - $uibModal.open({ + $scope.pass = function (partner) { + + $http.get('/sys/partners/init/merchant_code').then(function (response) { + partner.client_moniker = response.data.partner_code; + console.log('partner.client_moniker',partner.client_moniker) + console.log('partner',partner) + $scope.merchantCodeChecked = true; + $scope.merchantIsValid = true; + $uibModal.open({ + templateUrl: '/static/payment/partner/templates/partner_application_pass.html', + controller: 'passApplicationCtrl', + resolve: { + partner: partner + } + }).result.then(function () { + commonDialog.alert({ + title: 'Success', + content: 'Pass Successfully ! 您成功建立了新的商户,请及时完善信息。', + type: 'success' + }); + // $state.go('partner_application.detail', {client_apply_id: obj.client_apply_id}, {reload: true}); + }) + }); + + /*$uibModal.open({ templateUrl: '/static/payment/partner/templates/partner_application_pass.html', controller: 'passApplicationCtrl', resolve: { - partner: obj + partner: obj, + isPass:true } }).result.then(function () { commonDialog.alert({ @@ -176,7 +192,10 @@ define(['angular', 'static/commons/commons', 'uiBootstrap', 'uiRouter', 'ngBootS type: 'success' }); // $state.go('partner_application.detail', {client_apply_id: obj.client_apply_id}, {reload: true}); - }) + })*/ + + + }; $scope.updateRemark = function () { var obj = angular.copy($scope.partner); diff --git a/src/main/ui/static/payment/partner/templates/partner_application_pass.html b/src/main/ui/static/payment/partner/templates/partner_application_pass.html index 92e1e9b72..e644e1236 100644 --- a/src/main/ui/static/payment/partner/templates/partner_application_pass.html +++ b/src/main/ui/static/payment/partner/templates/partner_application_pass.html @@ -10,7 +10,11 @@