From fd8e739c7a011a50627d8de415af1a08e2495fd3 Mon Sep 17 00:00:00 2001 From: AlanFenng Date: Tue, 15 Dec 2020 18:44:00 +0800 Subject: [PATCH 1/6] start developing version 2.3.74-SNAPSHOT --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 591b9133d..cc021aba4 100644 --- a/pom.xml +++ b/pom.xml @@ -9,7 +9,7 @@ 4.0.0 manage - 2.3.73 + 2.3.74-SNAPSHOT UTF-8 2.4.0 From 564a822f0e8211a2fa3b26010583561ebe584b2e Mon Sep 17 00:00:00 2001 From: "xiao.tang" Date: Thu, 24 Dec 2020 09:48:04 +0800 Subject: [PATCH 2/6] =?UTF-8?q?=E2=9C=A8feat(royalpay):=20MID=20Management?= =?UTF-8?q?=E4=BB=BB=E5=8A=A1=E5=88=9D=E6=AD=A5=E5=AE=8C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../static/payment/partner/partner-manage.js | 1229 ++++++++++------- .../partner/templates/md_sub_merchant_id.html | 23 + .../templates/partner_payment_info.html | 304 ++-- .../templates/sub_merchant_detail.html | 107 ++ .../templates/sub_merchant_id_apply.html | 594 +++++--- 5 files changed, 1462 insertions(+), 795 deletions(-) create mode 100644 src/main/ui/static/payment/partner/templates/md_sub_merchant_id.html create mode 100644 src/main/ui/static/payment/partner/templates/sub_merchant_detail.html diff --git a/src/main/ui/static/payment/partner/partner-manage.js b/src/main/ui/static/payment/partner/partner-manage.js index 47a6c12e8..1ca66ae37 100644 --- a/src/main/ui/static/payment/partner/partner-manage.js +++ b/src/main/ui/static/payment/partner/partner-manage.js @@ -26,9 +26,9 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter "value": "Melbourne" }]; var partnerRoles = [ - {code: 1, label: 'Admin'}, - {code: 2, label: 'Manager'}, - {code: 3, label: 'Cashier'} + { code: 1, label: 'Admin' }, + { code: 2, label: 'Manager' }, + { code: 3, label: 'Cashier' } ]; // var wxMerchantIndustries = [ // { @@ -129,7 +129,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter { "label": "Other trade industry", "value": "494" - },{ + }, { "label": "Overseas Education", "value": "528" }, @@ -169,7 +169,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter url: '/partners', templateUrl: '/static/payment/partner/templates/partners.html', controller: 'partnerListCtrl', - data: {label: '商户列表'} + data: { label: '商户列表' } }).state('businessCompliance', { url: '/partners/compliance', templateUrl: '/static/payment/partner/templates/partner_compliance.html', @@ -221,7 +221,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter controller: 'partnerDeviceCtrl' }).state('partners.detail.files', { url: '/files', - params: {commitType: "cross-border"}, + params: { commitType: "cross-border" }, templateUrl: '/static/payment/partner/templates/partner_auth_files.html', controller: 'partnerAuthFileCtrl' }).state('partners.detail.files.CP_files', { @@ -643,27 +643,27 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter } $scope.updateMerchantLocation(); $scope.loadPartners(); - $state.go('^.detail', {clientMoniker: $scope.partner.client_moniker}, {reload: true}); + $state.go('^.detail', { clientMoniker: $scope.partner.client_moniker }, { reload: true }); }, function (resp) { - commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'}) + commonDialog.alert({ title: 'Error', content: resp.data.message, type: 'error' }) }); }; $scope.uploadLogo = function (file) { if (file != null) { if (file.size > 1 * 1024 * 1024) { - commonDialog.alert({title: 'Error', content: '文件大小不能超过1MB,请压缩后重试', type: 'error'}) + commonDialog.alert({ title: 'Error', content: '文件大小不能超过1MB,请压缩后重试', type: 'error' }) } else { - $scope.logoProgress = {value: 0}; + $scope.logoProgress = { value: 0 }; Upload.upload({ url: '/attachment/files', - data: {file: file} + data: { file: file } }).then(function (resp) { delete $scope.logoProgress; $scope.partner.logo_id = resp.data.fileid; $scope.partner.logo_url = resp.data.url; }, function (resp) { delete $scope.logoProgress; - commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'}) + commonDialog.alert({ title: 'Upload Failed', content: resp.data.message, type: 'error' }) }, function (evt) { $scope.logoProgress.value = parseInt(100 * evt.loaded / evt.total); }) @@ -674,18 +674,18 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter $scope.uploadShopPhoto = function (file) { if (file != null) { if (file.size > 2 * 1024 * 1024) { - commonDialog.alert({title: 'Error', content: '文件大小不能超过2MB,请压缩后重试', type: 'error'}) + commonDialog.alert({ title: 'Error', content: '文件大小不能超过2MB,请压缩后重试', type: 'error' }) } else { - $scope.shopPhotoProgress = {value: 0}; + $scope.shopPhotoProgress = { value: 0 }; Upload.upload({ url: '/attachment/files', - data: {file: file} + data: { file: file } }).then(function (resp) { delete $scope.shopPhotoProgress; $scope.partner.company_photo = resp.data.url; }, function (resp) { delete $scope.shopPhotoProgress; - commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'}) + commonDialog.alert({ title: 'Upload Failed', content: resp.data.message, type: 'error' }) }, function (evt) { $scope.shopPhotoProgress.value = parseInt(100 * evt.loaded / evt.total); }) @@ -696,18 +696,18 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter $scope.uploadStorePhoto = function (file) { if (file != null) { if (file.size > 2 * 1024 * 1024) { - commonDialog.alert({title: 'Error', content: '文件大小不能超过2MB,请压缩后重试', type: 'error'}) + commonDialog.alert({ title: 'Error', content: '文件大小不能超过2MB,请压缩后重试', type: 'error' }) } else { - $scope.storePhotoProgress = {value: 0}; + $scope.storePhotoProgress = { value: 0 }; Upload.upload({ url: '/attachment/files', - data: {file: file} + data: { file: file } }).then(function (resp) { delete $scope.storePhotoProgress; $scope.partner.store_photo = resp.data.url; }, function (resp) { delete $scope.storePhotoProgress; - commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'}) + commonDialog.alert({ title: 'Upload Failed', content: resp.data.message, type: 'error' }) }, function (evt) { $scope.storePhotoProgress.value = parseInt(100 * evt.loaded / evt.total); }) @@ -749,7 +749,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter $scope.business_structures = businessStructuresMap.configs(); $scope.clean_days = angular.copy(clean_days_map); $scope.bd_citys = angular.copy(bd_city_map); - $scope.params = {textType: 'all', org_name: 'ALL', industry: "0"}; + $scope.params = { textType: 'all', org_name: 'ALL', industry: "0" }; $scope.loadRoyalpayindustry = function () { $http.get('/static/data/royalpayindustry.json').then(function (resp) { $scope.royalpayindustry = resp.data; @@ -773,7 +773,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter $scope.loadPartners = function (page) { var params = angular.copy($scope.params); params.page = page || $scope.pagination.page || 1; - $http.get('/sys/partners', {params: params}).then(function (resp) { + $http.get('/sys/partners', { params: params }).then(function (resp) { $scope.partners = resp.data.data; $scope.pagination = resp.data.pagination; }); @@ -809,14 +809,14 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter if (($scope.currentUser.role & parseInt('1000011', 2)) > 0 && !$scope.currentUser.org_id) { $scope.showOrg = 'Organization'; - $http.get('/sys/orgs/list_all_Org', {params: {}}).then(function (resp) { + $http.get('/sys/orgs/list_all_Org', { params: {} }).then(function (resp) { $scope.orgs = resp.data; }); } $scope.loadOrgs = function () { var params = angular.copy($scope.params); - $http.get('/sys/orgs/orgChild', {params: params}).then(function (resp) { + $http.get('/sys/orgs/orgChild', { params: params }).then(function (resp) { $scope.orgs_child = resp.data; }) }; @@ -884,13 +884,13 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter $scope.business_structures = businessStructuresMap.configs(); $scope.clean_days = angular.copy(clean_days_map); $scope.bd_citys = angular.copy(bd_city_map); - $scope.params = {textType: 'all', org_name: 'ALL', approving_flag: false, card_approving_flag: false}; + $scope.params = { textType: 'all', org_name: 'ALL', approving_flag: false, card_approving_flag: false }; $scope.loadPartners = function (page) { $scope.validAndCleanApproveStatus(); var params = angular.copy($scope.params); params.page = page || $scope.pagination.page || 1; - $http.get('/sys/partners/compliance', {params: params}).then(function (resp) { + $http.get('/sys/partners/compliance', { params: params }).then(function (resp) { $scope.partners = resp.data.data; $scope.pagination = resp.data.pagination; }); @@ -928,14 +928,14 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter if (($scope.currentUser.role & parseInt('1000011', 2)) > 0 && !$scope.currentUser.org_id) { $scope.showOrg = 'Organization'; - $http.get('/sys/orgs/list_all_Org', {params: {}}).then(function (resp) { + $http.get('/sys/orgs/list_all_Org', { params: {} }).then(function (resp) { $scope.orgs = resp.data; }); } $scope.loadOrgs = function () { var params = angular.copy($scope.params); - $http.get('/sys/orgs/orgChild', {params: params}).then(function (resp) { + $http.get('/sys/orgs/orgChild', { params: params }).then(function (resp) { $scope.orgs_child = resp.data; }) }; @@ -960,14 +960,14 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter }]); app.controller('partnerDetailCtrl', ['$scope', '$http', '$state', '$uibModal', '$rootScope', 'Upload', 'commonDialog', 'partner', '$sce', function ($scope, $http, $state, $uibModal, $rootScope, Upload, commonDialog, partner, $sce) { - $scope.init = {wechat_compliance: false, local_merchant: false}; + $scope.init = { wechat_compliance: false, local_merchant: false }; $scope.partner = partner.data; $scope.isComplianceOfCompanyName = false; $scope.isComplianceOfShortName = false; $scope.isComplianceOfBusinessStructure = false; $scope.cardPromotionaparams = {}; - if($scope.partner.mc_code ){ - $scope.partner.mc_code=parseInt($scope.partner.mc_code); + if ($scope.partner.mc_code) { + $scope.partner.mc_code = parseInt($scope.partner.mc_code); } var website = partner.data.company_website; if (website != null) { @@ -1055,8 +1055,8 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter } title = 'Warning'; contentHtml = $sce.trustAsHtml('本次提交的商户[' + $scope.partner.company_name + '],' + info.toString() + '存在微信渠道不合规信息'); - choises = [{label: '取消', className: 'btn-danger', key: '2', dismiss: true}, - {label: '确认提交', className: 'btn-success', key: '1'}]; + choises = [{ label: '取消', className: 'btn-danger', key: '2', dismiss: true }, + { label: '确认提交', className: 'btn-success', key: '1' }]; content = ''; } commonDialog.confirm({ @@ -1065,7 +1065,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter choises: choises, contentHtml: contentHtml }).then(function () { - $http.put('/sys/partners/' + $scope.partner.client_moniker + '/audit', {pass: 1}).then(function () { + $http.put('/sys/partners/' + $scope.partner.client_moniker + '/audit', { pass: 1 }).then(function () { if ($scope.partner.approve_result == 2 && ($scope.partner.source == 1 || $scope.partner.source == 2)) { commonDialog.alert({ title: 'Success', @@ -1082,7 +1082,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter delete $rootScope.complianceCheck; $state.reload(); }, function (resp) { - commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'}); + commonDialog.alert({ title: 'Error', content: resp.data.message, type: 'error' }); }) }); }; @@ -1121,8 +1121,8 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter } title = 'Warning'; contentHtml = $sce.trustAsHtml('本次提交的商户[' + $scope.partner.company_name + '],' + info.toString() + '存在微信渠道不合规信息'); - choises = [{label: '取消', className: 'btn-danger', key: '2', dismiss: true}, - {label: '确认提交', className: 'btn-success', key: '1'}]; + choises = [{ label: '取消', className: 'btn-danger', key: '2', dismiss: true }, + { label: '确认提交', className: 'btn-success', key: '1' }]; content = ''; } commonDialog.confirm({ @@ -1131,7 +1131,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter choises: choises, contentHtml: contentHtml }).then(function () { - $http.put('/sys/partners/' + $scope.partner.client_moniker + '/card_audit', {pass: 1}).then(function () { + $http.put('/sys/partners/' + $scope.partner.client_moniker + '/card_audit', { pass: 1 }).then(function () { if ($scope.partner.approve_result == 2 && ($scope.partner.source == 1 || $scope.partner.source == 2)) { commonDialog.alert({ title: 'Success', @@ -1148,7 +1148,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter delete $rootScope.complianceCheck; $state.reload(); }, function (resp) { - commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'}); + commonDialog.alert({ title: 'Error', content: resp.data.message, type: 'error' }); }) }); }; @@ -1165,7 +1165,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter }); $state.reload(); }, function (resp) { - commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'}); + commonDialog.alert({ title: 'Error', content: resp.data.message, type: 'error' }); }) }) }; @@ -1183,7 +1183,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter }, function (resp) { $scope.showBg = false; $state.reload(); - commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'}); + commonDialog.alert({ title: 'Error', content: resp.data.message, type: 'error' }); }); }; @@ -1200,7 +1200,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter }, function (resp) { $scope.showBg = false; $state.reload(); - commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'}); + commonDialog.alert({ title: 'Error', content: resp.data.message, type: 'error' }); }); }; @@ -1218,7 +1218,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter }, function (resp) { $scope.showBg = false; $state.reload(); - commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'}); + commonDialog.alert({ title: 'Error', content: resp.data.message, type: 'error' }); }); } $scope.Export = function () { @@ -1228,14 +1228,14 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter $scope.uploadAgreeFile = function (file) { if (file != null) { if (file.size > 2 * 1024 * 1024) { - commonDialog.alert({title: 'Error', content: '文件大小不能超过2MB,请压缩后重试', type: 'error'}) + commonDialog.alert({ title: 'Error', content: '文件大小不能超过2MB,请压缩后重试', type: 'error' }) } else { Upload.upload({ url: '/attachment/files', - data: {file: file} + data: { file: file } }).then(function (resp) { $scope.agree_file_import = resp.data.url; - $http.put('/sys/partners/' + $scope.partner.client_moniker + '/import/agreepdf', {source_agree_file: $scope.agree_file_import}).then(function () { + $http.put('/sys/partners/' + $scope.partner.client_moniker + '/import/agreepdf', { source_agree_file: $scope.agree_file_import }).then(function () { commonDialog.alert({ title: 'Success', content: 'Succeed Imported! Please notify BD', @@ -1243,10 +1243,10 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter }); $state.reload(); }, function (resp) { - commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'}); + commonDialog.alert({ title: 'Error', content: resp.data.message, type: 'error' }); }) }, function (resp) { - commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'}) + commonDialog.alert({ title: 'Upload Failed', content: resp.data.message, type: 'error' }) }) } } @@ -1255,14 +1255,14 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter $scope.uploadCardAgreeFile = function (file) { if (file != null) { if (file.size > 2 * 1024 * 1024) { - commonDialog.alert({title: 'Error', content: '文件大小不能超过2MB,请压缩后重试', type: 'error'}) + commonDialog.alert({ title: 'Error', content: '文件大小不能超过2MB,请压缩后重试', type: 'error' }) } else { Upload.upload({ url: '/attachment/files', - data: {file: file} + data: { file: file } }).then(function (resp) { $scope.agree_file_import = resp.data.url; - $http.put('/sys/partners/' + $scope.partner.client_moniker + '/import/agreepdf', {source_agree_file: $scope.agree_file_import}).then(function () { + $http.put('/sys/partners/' + $scope.partner.client_moniker + '/import/agreepdf', { source_agree_file: $scope.agree_file_import }).then(function () { commonDialog.alert({ title: 'Success', content: 'Succeed Imported! Please notify BD', @@ -1270,10 +1270,10 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter }); $state.reload(); }, function (resp) { - commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'}); + commonDialog.alert({ title: 'Error', content: resp.data.message, type: 'error' }); }) }, function (resp) { - commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'}) + commonDialog.alert({ title: 'Upload Failed', content: resp.data.message, type: 'error' }) }) } } @@ -1287,7 +1287,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter }); $state.reload(); }, function (resp) { - commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'}); + commonDialog.alert({ title: 'Upload Failed', content: resp.data.message, type: 'error' }); }); }; @@ -1300,7 +1300,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter }); $state.reload(); }, function (resp) { - commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'}); + commonDialog.alert({ title: 'Upload Failed', content: resp.data.message, type: 'error' }); }); }; @@ -1309,8 +1309,8 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter } $scope.refuse = function () { - commonDialog.inputText({title: 'refuse cause'}).then(function (text) { - $http.put('/sys/partners/' + $scope.partner.client_moniker + '/audit/refuse', {refuse_remark: text}).then(function () { + commonDialog.inputText({ title: 'refuse cause' }).then(function (text) { + $http.put('/sys/partners/' + $scope.partner.client_moniker + '/audit/refuse', { refuse_remark: text }).then(function () { commonDialog.alert({ title: 'Success', content: 'Audit application has been refused.', @@ -1318,14 +1318,14 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter }); $state.reload(); }, function (resp) { - commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'}); + commonDialog.alert({ title: 'Error', content: resp.data.message, type: 'error' }); }) }) }; $scope.cardRefuse = function () { - commonDialog.inputText({title: 'refuse cause'}).then(function (text) { - $http.put('/sys/partners/' + $scope.partner.client_moniker + '/card_audit/refuse', {refuse_remark: text}).then(function () { + commonDialog.inputText({ title: 'refuse cause' }).then(function (text) { + $http.put('/sys/partners/' + $scope.partner.client_moniker + '/card_audit/refuse', { refuse_remark: text }).then(function () { commonDialog.alert({ title: 'Success', content: 'Card Audit application has been refused.', @@ -1333,7 +1333,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter }); $state.reload(); }, function (resp) { - commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'}); + commonDialog.alert({ title: 'Error', content: resp.data.message, type: 'error' }); }) }) } @@ -1345,9 +1345,9 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter }).then(function () { $http.delete('/sys/partners/' + $scope.partner.client_moniker).then(function () { $state.go('^'); - commonDialog.alert({title: 'Delete', content: 'Partner Already Disabled', type: 'error'}); + commonDialog.alert({ title: 'Delete', content: 'Partner Already Disabled', type: 'error' }); }, function (resp) { - commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'}); + commonDialog.alert({ title: 'Error', content: resp.data.message, type: 'error' }); }) }) }; @@ -1358,9 +1358,9 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter }).then(function () { $http.put('/sys/partners/' + $scope.partner.client_moniker + '/revert').then(function () { $state.go('^'); - commonDialog.alert({title: 'Revert', content: 'Partner Already Revert', type: 'success'}); + commonDialog.alert({ title: 'Revert', content: 'Partner Already Revert', type: 'success' }); }, function (resp) { - commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'}); + commonDialog.alert({ title: 'Error', content: resp.data.message, type: 'error' }); }) }) }; @@ -1370,8 +1370,8 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter title: 'Commit to Compliance', content: 'Are you sure to commit ' + $scope.partner.company_name + ' to compliance?', choises: [ - {label: 'Submit', className: 'btn-success', key: 1}, - {label: 'Cancel', className: 'btn-warning', key: 0, dismiss: true} + { label: 'Submit', className: 'btn-success', key: 1 }, + { label: 'Cancel', className: 'btn-warning', key: 0, dismiss: true } ] }).then(function (choice) { if (choice == 1) { @@ -1383,7 +1383,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter }); $state.reload(); }, function (resp) { - commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'}); + commonDialog.alert({ title: 'Error', content: resp.data.message, type: 'error' }); }) } }) @@ -1394,8 +1394,8 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter title: 'Commit to Compliance', content: 'Are you sure to commit ' + $scope.partner.company_name + ' to compliance?', choises: [ - {label: 'Submit', className: 'btn-success', key: 1}, - {label: 'Cancel', className: 'btn-warning', key: 0, dismiss: true} + { label: 'Submit', className: 'btn-success', key: 1 }, + { label: 'Cancel', className: 'btn-warning', key: 0, dismiss: true } ] }).then(function (choice) { if (choice == 1) { @@ -1407,7 +1407,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter }); $state.reload(); }, function (resp) { - commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'}); + commonDialog.alert({ title: 'Error', content: resp.data.message, type: 'error' }); }) } }) @@ -1427,15 +1427,15 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter return; } $http.get('/sys/partners/' + $scope.partner.client_moniker + '/make_agree_file').then(function () { - commonDialog.alert({ - title: 'Success!', - content: '已提交制作合同!', - type: 'success' - }); - $state.reload(); - }, function (resp) { - commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'}); - } + commonDialog.alert({ + title: 'Success!', + content: '已提交制作合同!', + type: 'success' + }); + $state.reload(); + }, function (resp) { + commonDialog.alert({ title: 'Error', content: resp.data.message, type: 'error' }); + } ); }; @@ -1454,26 +1454,26 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter return; } $http.get('/sys/partners/' + $scope.partner.client_moniker + '/make_card_agree_file').then(function () { + commonDialog.alert({ + title: 'Success!', + content: '已提交制作合同!', + type: 'success' + }); + $state.reload(); + }, function (resp) { + if (String(resp.data.message).match("No Rate Config")) { commonDialog.alert({ - title: 'Success!', - content: '已提交制作合同!', - type: 'success' + title: 'Error!', + content: '商户卡支付签约费率未配置,请添加商户卡支付签约费率!', + type: 'error' }); - $state.reload(); - }, function (resp) { - if (String(resp.data.message).match("No Rate Config")) { - commonDialog.alert({ - title: 'Error!', - content: '商户卡支付签约费率未配置,请添加商户卡支付签约费率!', - type: 'error' - }); - $state.go('partners.detail.rates', { - clientMoniker: $scope.partner.client_moniker - }); - } else { - commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'}); - } + $state.go('partners.detail.rates', { + clientMoniker: $scope.partner.client_moniker + }); + } else { + commonDialog.alert({ title: 'Error', content: resp.data.message, type: 'error' }); } + } ); }; @@ -1490,7 +1490,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter }); $state.reload(); }, function (resp) { - commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'}); + commonDialog.alert({ title: 'Error', content: resp.data.message, type: 'error' }); }) }) @@ -1504,7 +1504,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter $http.put('/sys/partners/' + $scope.partner.client_moniker + '/audit/email_sending_status').then(function () { $state.reload(); }, function (resp) { - commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'}); + commonDialog.alert({ title: 'Error', content: resp.data.message, type: 'error' }); }) }) }; @@ -1516,7 +1516,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter $http.put('/sys/partners/' + $scope.partner.client_moniker + '/audit/send_email?type=' + type).then(function () { $state.reload(); }, function (resp) { - commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'}); + commonDialog.alert({ title: 'Error', content: resp.data.message, type: 'error' }); }) }) }; @@ -1560,8 +1560,8 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter }; $scope.configMasterMerchant = function () { - commonDialog.inputText({title: 'Input Master Merchant Code'}).then(function (text) { - $http.put('/sys/partners/' + $scope.partner.client_moniker + '/master_configuration', {master_merchant: text}).then(function () { + commonDialog.inputText({ title: 'Input Master Merchant Code' }).then(function (text) { + $http.put('/sys/partners/' + $scope.partner.client_moniker + '/master_configuration', { master_merchant: text }).then(function () { commonDialog.alert({ title: 'Success', content: "Master Merchant Code:" + text, @@ -1612,7 +1612,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter $scope.init.wechat_compliance = true; return; } - $http.put('/sys/partners/' + $scope.partner.client_moniker + '/wechat_compliance_permission', {allow: $scope.partner.wechat_compliance}).then(function () { + $http.put('/sys/partners/' + $scope.partner.client_moniker + '/wechat_compliance_permission', { allow: $scope.partner.wechat_compliance }).then(function () { }, function (resp) { commonDialog.alert({ @@ -1634,7 +1634,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter $scope.init.local_merchant = true; return; } - $http.put('/sys/partners/' + $scope.partner.client_moniker + '/local_merchant_permission', {allow: $scope.partner.local_merchant}).then(function () { + $http.put('/sys/partners/' + $scope.partner.client_moniker + '/local_merchant_permission', { allow: $scope.partner.local_merchant }).then(function () { }, function (resp) { commonDialog.alert({ @@ -1663,9 +1663,9 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter e.select(); var successful = document.execCommand("Copy"); if (successful) { - commonDialog.alert({title: 'Success', content: '已复制到剪切板!', type: 'success'}); + commonDialog.alert({ title: 'Success', content: '已复制到剪切板!', type: 'success' }); } else { - commonDialog.alert({title: 'Error', content: '您的浏览器不支持!', type: 'error'}); + commonDialog.alert({ title: 'Error', content: '您的浏览器不支持!', type: 'error' }); } }; $scope.copyYeepayLink = function () { @@ -1673,9 +1673,9 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter e.select(); var successful = document.execCommand("Copy"); if (successful) { - commonDialog.alert({title: 'Success', content: '已复制到剪切板!', type: 'success'}); + commonDialog.alert({ title: 'Success', content: '已复制到剪切板!', type: 'success' }); } else { - commonDialog.alert({title: 'Error', content: '您的浏览器不支持!', type: 'error'}); + commonDialog.alert({ title: 'Error', content: '您的浏览器不支持!', type: 'error' }); } }; $scope.copyCBBankPayLink = function () { @@ -1683,9 +1683,9 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter e.select(); var successful = document.execCommand("Copy"); if (successful) { - commonDialog.alert({title: 'Success', content: '已复制到剪切板!', type: 'success'}); + commonDialog.alert({ title: 'Success', content: '已复制到剪切板!', type: 'success' }); } else { - commonDialog.alert({title: 'Error', content: '您的浏览器不支持!', type: 'error'}); + commonDialog.alert({ title: 'Error', content: '您的浏览器不支持!', type: 'error' }); } }; $scope.loadPartnerPaymentInfo = function () { @@ -1722,9 +1722,9 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter } return paramList; }; - $scope.qrConfig = {currency: 'AUD'}; + $scope.qrConfig = { currency: 'AUD' }; $scope.reloadQRCode = function () { - $http.get('/sys/partners/' + $scope.partner.client_moniker + '/qrcode', {params: $scope.qrConfig}).then(function (resp) { + $http.get('/sys/partners/' + $scope.partner.client_moniker + '/qrcode', { params: $scope.qrConfig }).then(function (resp) { $scope.qrcode = resp.data; }); }; @@ -1748,19 +1748,19 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter $scope.saveMaxOrderAmount = function (limit) { if (limit != null && isNaN(limit)) { - commonDialog.alert({title: 'Error', content: 'Your input is not a number!', type: 'error'}); + commonDialog.alert({ title: 'Error', content: 'Your input is not a number!', type: 'error' }); return; } - $http.put('/sys/partners/' + $scope.partner.client_moniker + '/max_order_amount', {limit: limit}).then(function (resp) { + $http.put('/sys/partners/' + $scope.partner.client_moniker + '/max_order_amount', { limit: limit }).then(function (resp) { $scope.loadPartnerPaymentInfo(); }, function (resp) { - commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'}); + commonDialog.alert({ title: 'Error', content: resp.data.message, type: 'error' }); }) }; $scope.saveCustomerSurchargeRate = function (cofig) { if (cofig != null && isNaN(cofig)) { - commonDialog.alert({title: 'Error', content: 'Your input is not a number!', type: 'error'}); + commonDialog.alert({ title: 'Error', content: 'Your input is not a number!', type: 'error' }); return; } if (!$scope.paymentInfo.rate_value) { @@ -1772,30 +1772,30 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter return; } if (cofig > 3 || cofig < parseFloat(Decimal.add($scope.paymentInfo.rate_value, 0.1).toFixed(2))) { - commonDialog.alert({title: 'Error', content: 'Not in the valid range', type: 'error'}); + commonDialog.alert({ title: 'Error', content: 'Not in the valid range', type: 'error' }); return; } - $http.put('/sys/partners/' + $scope.partner.client_moniker + '/customer_surcharge_rate', {customer_surcharge_rate: cofig}).then(function (resp) { + $http.put('/sys/partners/' + $scope.partner.client_moniker + '/customer_surcharge_rate', { customer_surcharge_rate: cofig }).then(function (resp) { $scope.loadPartnerPaymentInfo(); $scope.ctrl.editCustomerSurchargeRate = false; }, function (resp) { - commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'}); + commonDialog.alert({ title: 'Error', content: resp.data.message, type: 'error' }); }) }; $scope.saveOrderExpiryConfig = function (config) { - $http.put('/sys/partners/' + $scope.partner.client_moniker + '/order_expiry_config', {order_expiry_config: config}).then(function () { + $http.put('/sys/partners/' + $scope.partner.client_moniker + '/order_expiry_config', { order_expiry_config: config }).then(function () { $scope.loadPartnerPaymentInfo(); }, function (resp) { - commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'}); + commonDialog.alert({ title: 'Error', content: resp.data.message, type: 'error' }); }) }; $scope.resetRefundPwd = function (config) { - $http.put('/sys/partners/' + $scope.partner.client_moniker + '/reset/refund_pwd', {new_refund_password: config}).then(function () { + $http.put('/sys/partners/' + $scope.partner.client_moniker + '/reset/refund_pwd', { new_refund_password: config }).then(function () { $scope.loadPartnerPaymentInfo(); }, function (resp) { - commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'}); + commonDialog.alert({ title: 'Error', content: resp.data.message, type: 'error' }); }) }; @@ -1803,10 +1803,10 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter if (!$scope.paymentInfo) { return; } - $http.put('/sys/partners/' + $scope.partner.client_moniker + '/refund_credit_line', {refund_credit_line: $scope.paymentInfo.refund_credit_line}).then(function (resp) { + $http.put('/sys/partners/' + $scope.partner.client_moniker + '/refund_credit_line', { refund_credit_line: $scope.paymentInfo.refund_credit_line }).then(function (resp) { $scope.loadPartnerPaymentInfo(); }, function (resp) { - commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'}) + commonDialog.alert({ title: 'Error', content: resp.data.message, type: 'error' }) }); }; @@ -1818,17 +1818,17 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter $scope.init.qrcode_surcharge = true; return; } - $http.put('/sys/partners/' + $scope.partner.client_moniker + '/qrcode_surcharge', {qrcode_surcharge: $scope.paymentInfo.qrcode_surcharge}).then(function (resp) { + $http.put('/sys/partners/' + $scope.partner.client_moniker + '/qrcode_surcharge', { qrcode_surcharge: $scope.paymentInfo.qrcode_surcharge }).then(function (resp) { $scope.loadPartnerPaymentInfo(); }, function () { - commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'}) + commonDialog.alert({ title: 'Error', content: resp.data.message, type: 'error' }) }); }; $scope.updateClientCBBankPaySurCharge = function () { if (!$scope.paymentInfo) { return; } - $http.put('/sys/partners/' + $scope.partner.client_moniker + '/cbbank_surcharge', {cbbank_surcharge: $scope.paymentInfo.cbbank_surcharge}).then(function () { + $http.put('/sys/partners/' + $scope.partner.client_moniker + '/cbbank_surcharge', { cbbank_surcharge: $scope.paymentInfo.cbbank_surcharge }).then(function () { // $scope.loadPartnerPaymentInfo(); }, function (resp) { commonDialog.alert({ @@ -1847,10 +1847,10 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter $scope.init.api_surcharge = true; return; } - $http.put('/sys/partners/' + $scope.partner.client_moniker + '/api_surcharge', {api_surcharge: $scope.paymentInfo.api_surcharge}).then(function (resp) { + $http.put('/sys/partners/' + $scope.partner.client_moniker + '/api_surcharge', { api_surcharge: $scope.paymentInfo.api_surcharge }).then(function (resp) { $scope.loadPartnerPaymentInfo(); }, function () { - commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'}) + commonDialog.alert({ title: 'Error', content: resp.data.message, type: 'error' }) }); }; $scope.updateClientRetailPaySurCharge = function () { @@ -1861,31 +1861,31 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter $scope.init.retail_surcharge = true; return; } - $http.put('/sys/partners/' + $scope.partner.client_moniker + '/retail_surcharge', {retail_surcharge: $scope.paymentInfo.retail_surcharge}).then(function (resp) { + $http.put('/sys/partners/' + $scope.partner.client_moniker + '/retail_surcharge', { retail_surcharge: $scope.paymentInfo.retail_surcharge }).then(function (resp) { $scope.loadPartnerPaymentInfo(); }, function () { - commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'}) + commonDialog.alert({ title: 'Error', content: resp.data.message, type: 'error' }) }); }; $scope.ctrl = {}; $scope.saveSubMerchantId = function () { - $http.put('/sys/partners/' + $scope.partner.client_moniker + '/payment_config', {sub_merchant_id: $scope.paymentInfo.sub_merchant_id}).then(function (resp) { + $http.put('/sys/partners/' + $scope.partner.client_moniker + '/payment_config', { sub_merchant_id: $scope.paymentInfo.sub_merchant_id }).then(function (resp) { $scope.refreshWechatInstitutionMerchantId(); $scope.ctrl.editSubMerchant = false; }, function (resp) { - commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'}) + commonDialog.alert({ title: 'Error', content: resp.data.message, type: 'error' }) }); }; $scope.refreshWechatInstitutionMerchantId = function () { - $http.put('/sys/partners/' + $scope.partner.client_moniker + '/wechat_institution_merchant_id', {wechat_institution_merchant_id: $scope.paymentInfo.wechat_institution_merchant_id}).then(function (resp) { + $http.put('/sys/partners/' + $scope.partner.client_moniker + '/wechat_institution_merchant_id', { wechat_institution_merchant_id: $scope.paymentInfo.wechat_institution_merchant_id }).then(function (resp) { $scope.loadPartnerPaymentInfo(); }, function (resp) { - commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'}) + commonDialog.alert({ title: 'Error', content: resp.data.message, type: 'error' }) }); }; $scope.saveAliSubMerchantId = function () { - $http.put('/sys/partners/' + $scope.partner.client_moniker + '/ali_sub_merchant_id', {ali_sub_merchant_id: $scope.paymentInfo.ali_sub_merchant_id}).then(function (resp) { + $http.put('/sys/partners/' + $scope.partner.client_moniker + '/ali_sub_merchant_id', { ali_sub_merchant_id: $scope.paymentInfo.ali_sub_merchant_id }).then(function (resp) { commonDialog.alert({ title: 'Success', content: 'Modify Ali Sub Merchant ID successfully', @@ -1893,7 +1893,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter }); $scope.loadPartnerPaymentInfo(); }, function (resp) { - commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'}) + commonDialog.alert({ title: 'Error', content: resp.data.message, type: 'error' }) }); }; $scope.submitAlipaySubId = function () { @@ -1905,18 +1905,18 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter json: $scope.alipay_gms_json }).then(function () { $http.post('/sys/partners/' + $scope.partner.client_moniker + '/register/alipay_gms').then(function () { - commonDialog.alert({title: 'Success', content: 'Alipay进件成功', type: 'success'}); + commonDialog.alert({ title: 'Success', content: 'Alipay进件成功', type: 'success' }); }, function (resp) { - commonDialog.alert({title: 'Error', content: "进件失败:" + resp.data.message, type: 'error'}); + commonDialog.alert({ title: 'Error', content: "进件失败:" + resp.data.message, type: 'error' }); }) }); }) }; $scope.queryAlipayGms = function () { $http.get('/sys/partners/' + $scope.partner.client_moniker + '/query/alipay_gms').then(function (resp) { - commonDialog.alert({title: 'Success', content: resp.data.result_status, type: 'success'}); + commonDialog.alert({ title: 'Success', content: resp.data.result_status, type: 'success' }); }, function (resp) { - commonDialog.alert({title: 'Error', content: "查询失败:" + resp.data.message, type: 'error'}); + commonDialog.alert({ title: 'Error', content: "查询失败:" + resp.data.message, type: 'error' }); }) }; $scope.submitAlipayOnlineSubId = function () { @@ -1928,18 +1928,18 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter json: $scope.alipayOnline_gms_json }).then(function () { $http.post('/sys/partners/' + $scope.partner.client_moniker + '/register/alipayOnline_gms').then(function () { - commonDialog.alert({title: 'Success', content: '提示:AlipayOnline进件成功', type: 'success'}); + commonDialog.alert({ title: 'Success', content: '提示:AlipayOnline进件成功', type: 'success' }); }, function (resp) { - commonDialog.alert({title: 'Error', content: "进件失败:" + resp.data.message, type: 'error'}); + commonDialog.alert({ title: 'Error', content: "进件失败:" + resp.data.message, type: 'error' }); }); }) }); }; $scope.queryAlipayOnlineGms = function () { $http.get('/sys/partners/' + $scope.partner.client_moniker + '/query/alipayOnline_gms').then(function (resp) { - commonDialog.alert({title: 'Success', content: resp.data.result_status, type: 'success'}); + commonDialog.alert({ title: 'Success', content: resp.data.result_status, type: 'success' }); }, function (resp) { - commonDialog.alert({title: 'Error', content: "查询失败:" + resp.data.message, type: 'error'}); + commonDialog.alert({ title: 'Error', content: "查询失败:" + resp.data.message, type: 'error' }); }) } $scope.refreshCredential = function () { @@ -1950,7 +1950,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter $http.put('/sys/partners/' + $scope.partner.client_moniker + '/credential_code').then(function () { $state.reload(); }, function (resp) { - commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'}) + commonDialog.alert({ title: 'Error', content: resp.data.message, type: 'error' }) }) }) }; @@ -1975,7 +1975,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter $scope.init.common_sub_merchant_id = true; return; } - $http.put('/sys/partners/' + $scope.partner.client_moniker + '/common_sub_merchant_id', {allow: $scope.paymentInfo.common_sub_merchant_id}).then(function () { + $http.put('/sys/partners/' + $scope.partner.client_moniker + '/common_sub_merchant_id', { allow: $scope.paymentInfo.common_sub_merchant_id }).then(function () { $scope.loadPartnerPaymentInfo(); }, function (resp) { commonDialog.alert({ @@ -1994,7 +1994,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter $scope.init.sub_manage = true; return; } - $http.put('/sys/partners/' + $scope.partner.client_moniker + '/sub_manage', {allow: $scope.paymentInfo.sub_manage}).then(function () { + $http.put('/sys/partners/' + $scope.partner.client_moniker + '/sub_manage', { allow: $scope.paymentInfo.sub_manage }).then(function () { $scope.loadPartnerPaymentInfo(); }, function (resp) { commonDialog.alert({ @@ -2059,7 +2059,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter info = []; }; $scope.saveChannel = function (channel) { - $http.put('/sys/partners/' + $scope.partner.client_moniker + '/channels/' + channel + '/permission', {allow: $scope.paymentInfo['enable_' + channel]}).then(function () { + $http.put('/sys/partners/' + $scope.partner.client_moniker + '/channels/' + channel + '/permission', { allow: $scope.paymentInfo['enable_' + channel] }).then(function () { $scope.loadPartnerPaymentInfo(); }, function (resp) { commonDialog.alert({ @@ -2080,7 +2080,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter $scope.init.hf_Link = true; return; } - $http.put('/sys/partners/' + $scope.partner.client_moniker + '/hf', {allow: $scope.paymentInfo.enable_link}).then(function () { + $http.put('/sys/partners/' + $scope.partner.client_moniker + '/hf', { allow: $scope.paymentInfo.enable_link }).then(function () { $scope.loadPartnerPaymentInfo(); }, function (resp) { commonDialog.alert({ @@ -2103,7 +2103,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter $scope.init[channelLink] = true; return; } - $http.put('/sys/partners/' + $scope.partner.client_moniker + '/' + channel, {allow: $scope.paymentInfo[channelLink]}).then(function () { + $http.put('/sys/partners/' + $scope.partner.client_moniker + '/' + channel, { allow: $scope.paymentInfo[channelLink] }).then(function () { $scope.loadPartnerPaymentInfo(); }, function (resp) { commonDialog.alert({ @@ -2118,7 +2118,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter if (!$scope.paymentInfo) { return; } - $http.put('/sys/partners/' + $scope.partner.client_moniker + '/cb_bankpay', {allow: $scope.paymentInfo.enable_cb_bankpay_link}).then(function () { + $http.put('/sys/partners/' + $scope.partner.client_moniker + '/cb_bankpay', { allow: $scope.paymentInfo.enable_cb_bankpay_link }).then(function () { $scope.loadPartnerPaymentInfo(); }, function (resp) { commonDialog.alert({ @@ -2150,11 +2150,11 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter title: 'Confirm', content: content }).then(function () { - $http.put('/sys/partners/' + $scope.partner.client_moniker + '/cb_bankpay/' + key + '/channel_id', {channel_id: channel}).then(function (resp) { - commonDialog.alert({type: 'success', title: 'Success', content: '修改成功'}); + $http.put('/sys/partners/' + $scope.partner.client_moniker + '/cb_bankpay/' + key + '/channel_id', { channel_id: channel }).then(function (resp) { + commonDialog.alert({ type: 'success', title: 'Success', content: '修改成功' }); $scope.loadPartnerPaymentInfo(); }, function (resp) { - commonDialog.alert({type: 'error', title: 'Error', content: resp.data.message}); + commonDialog.alert({ type: 'error', title: 'Error', content: resp.data.message }); $scope.loadPartnerPaymentInfo(); }); }) @@ -2168,7 +2168,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter $scope.init[channelNotice] = true; return; } - $http.put('/sys/partners/' + $scope.partner.client_moniker + '/' + channel + '/email_notice', {allow: $scope.paymentInfo[channelNotice]}).then(function () { + $http.put('/sys/partners/' + $scope.partner.client_moniker + '/' + channel + '/email_notice', { allow: $scope.paymentInfo[channelNotice] }).then(function () { $scope.loadPartnerPaymentInfo(); }, function (resp) { commonDialog.alert({ @@ -2187,7 +2187,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter $scope.init.enable_hf_email_notice = true; return; } - $http.put('/sys/partners/' + $scope.partner.client_moniker + '/hf/email_notice', {allow: $scope.paymentInfo.enable_hf_email_notice}).then(function () { + $http.put('/sys/partners/' + $scope.partner.client_moniker + '/hf/email_notice', { allow: $scope.paymentInfo.enable_hf_email_notice }).then(function () { $scope.loadPartnerPaymentInfo(); }, function (resp) { commonDialog.alert({ @@ -2206,7 +2206,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter $scope.init.jsapi = true; return; } - $http.put('/sys/partners/' + $scope.partner.client_moniker + '/jsapi_permission', {allow: $scope.paymentInfo.enable_jsapi}).then(function () { + $http.put('/sys/partners/' + $scope.partner.client_moniker + '/jsapi_permission', { allow: $scope.paymentInfo.enable_jsapi }).then(function () { $scope.loadPartnerPaymentInfo(); }, function (resp) { commonDialog.alert({ @@ -2224,7 +2224,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter $scope.init.gateway = true; return; } - $http.put('/sys/partners/' + $scope.partner.client_moniker + '/gateway_permission', {allow: $scope.paymentInfo.enable_gateway}).then(function () { + $http.put('/sys/partners/' + $scope.partner.client_moniker + '/gateway_permission', { allow: $scope.paymentInfo.enable_gateway }).then(function () { $scope.loadPartnerPaymentInfo(); }, function (resp) { commonDialog.alert({ @@ -2242,7 +2242,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter $scope.init.gateway_upgrade = true; return; } - $http.put('/sys/partners/' + $scope.partner.client_moniker + '/gateway_upgrade', {gateway_upgrade: $scope.paymentInfo.gateway_upgrade}).then(function () { + $http.put('/sys/partners/' + $scope.partner.client_moniker + '/gateway_upgrade', { gateway_upgrade: $scope.paymentInfo.gateway_upgrade }).then(function () { $scope.loadPartnerPaymentInfo(); }, function (resp) { commonDialog.alert({ @@ -2260,7 +2260,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter $scope.init.gateway_alipay_online = true; return; } - $http.put('/sys/partners/' + $scope.partner.client_moniker + '/gateway_alipay_online', {gateway_alipay_online: $scope.paymentInfo.gateway_alipay_online}).then(function () { + $http.put('/sys/partners/' + $scope.partner.client_moniker + '/gateway_alipay_online', { gateway_alipay_online: $scope.paymentInfo.gateway_alipay_online }).then(function () { $scope.loadPartnerPaymentInfo(); }, function (resp) { commonDialog.alert({ @@ -2278,7 +2278,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter $scope.init.enable_refund = true; return; } - $http.put('/sys/partners/' + $scope.partner.client_moniker + '/refund_permission', {allow: $scope.paymentInfo.enable_refund}).then(function () { + $http.put('/sys/partners/' + $scope.partner.client_moniker + '/refund_permission', { allow: $scope.paymentInfo.enable_refund }).then(function () { $scope.loadPartnerPaymentInfo(); }, function (resp) { commonDialog.alert({ @@ -2296,7 +2296,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter $scope.init.enable_pre_refund = true; return; } - $http.put('/sys/partners/' + $scope.partner.client_moniker + '/pre_refund_permission', {allow: $scope.paymentInfo.enable_pre_refund}).then(function () { + $http.put('/sys/partners/' + $scope.partner.client_moniker + '/pre_refund_permission', { allow: $scope.paymentInfo.enable_pre_refund }).then(function () { $scope.loadPartnerPaymentInfo(); }, function (resp) { commonDialog.alert({ @@ -2314,7 +2314,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter $scope.init.offline = true; return; } - $http.put('/sys/partners/' + $scope.partner.client_moniker + '/offline_permission', {allow: $scope.paymentInfo.enable_retail}).then(function () { + $http.put('/sys/partners/' + $scope.partner.client_moniker + '/offline_permission', { allow: $scope.paymentInfo.enable_retail }).then(function () { $scope.loadPartnerPaymentInfo(); }, function (resp) { commonDialog.alert({ @@ -2373,7 +2373,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter if (!$scope.paymentInfo) { return; } - $http.put('/sys/partners/' + $scope.partner.client_moniker + '/payment_page_version', {paypad_version: $scope.paymentInfo.paypad_version}).then(function () { + $http.put('/sys/partners/' + $scope.partner.client_moniker + '/payment_page_version', { paypad_version: $scope.paymentInfo.paypad_version }).then(function () { $scope.loadPartnerPaymentInfo(); }, function (resp) { commonDialog.alert({ @@ -2388,7 +2388,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter if (!$scope.paymentInfo) { return; } - $http.put('/sys/partners/' + $scope.partner.client_moniker + '/cbbank_payment_page_version', {cbbank_paypad_version: $scope.paymentInfo.cbbank_paypad_version}).then(function () { + $http.put('/sys/partners/' + $scope.partner.client_moniker + '/cbbank_payment_page_version', { cbbank_paypad_version: $scope.paymentInfo.cbbank_paypad_version }).then(function () { $scope.loadPartnerPaymentInfo(); }, function (resp) { commonDialog.alert({ @@ -2405,7 +2405,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter if (!$scope.paymentInfo) { return; } - $http.put('/sys/partners/' + $scope.partner.client_moniker + '/paysuccess_version', {paysuccess_version: $scope.paymentInfo.paysuccess_version}).then(function () { + $http.put('/sys/partners/' + $scope.partner.client_moniker + '/paysuccess_version', { paysuccess_version: $scope.paymentInfo.paysuccess_version }).then(function () { $scope.loadPartnerPaymentInfo(); }, function (resp) { commonDialog.alert({ @@ -2424,7 +2424,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter $scope.init.require_custinfo = true; return; } - $http.post('/sys/partners/' + $scope.partner.client_moniker + '/requireCustinfo', {allow: $scope.paymentInfo.require_custinfo}).then(function () { + $http.post('/sys/partners/' + $scope.partner.client_moniker + '/requireCustinfo', { allow: $scope.paymentInfo.require_custinfo }).then(function () { $scope.loadPartnerPaymentInfo(); }, function (resp) { commonDialog.alert({ @@ -2443,7 +2443,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter $scope.init.require_remark = true; return; } - $http.post('/sys/partners/' + $scope.partner.client_moniker + '/requireRemark', {allow: $scope.paymentInfo.require_remark}).then(function () { + $http.post('/sys/partners/' + $scope.partner.client_moniker + '/requireRemark', { allow: $scope.paymentInfo.require_remark }).then(function () { $scope.loadPartnerPaymentInfo(); }, function (resp) { commonDialog.alert({ @@ -2458,7 +2458,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter if (!$scope.paymentInfo) { return; } - $http.post('/sys/partners/' + $scope.partner.client_moniker + '/selectBillVersion', {version: $scope.paymentInfo.billcode_version}).then(function () { + $http.post('/sys/partners/' + $scope.partner.client_moniker + '/selectBillVersion', { version: $scope.paymentInfo.billcode_version }).then(function () { $scope.loadPartnerPaymentInfo(); }, function (resp) { commonDialog.alert({ @@ -2489,9 +2489,9 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter $scope.queryWechatSubMerchantIdStatus = function () { $scope.paymentInfo.sub_merchant_id - $http.get('/sys/partners/'+$scope.paymentInfo.client_moniker+'/get_merchant_ids/'+$scope.paymentInfo.sub_merchant_id+'/status').then(function (resp) { + $http.get('/sys/partners/' + $scope.paymentInfo.client_moniker + '/get_merchant_ids/' + $scope.paymentInfo.sub_merchant_id + '/status').then(function (resp) { commonDialog.alert({ - title: 'Wechat Apply Status('+resp.data.apply_status+")", + title: 'Wechat Apply Status(' + resp.data.apply_status + ")", content: resp.data.response_str, type: 'info' }) @@ -2527,7 +2527,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter $scope.loadSubClients = function (page) { var params = {}; params.page = page || $scope.pagination.page || 1; - $http.get('/sys/partners/' + $scope.partner.client_moniker + '/sub_clients/page', {params: params}).then(function (resp) { + $http.get('/sys/partners/' + $scope.partner.client_moniker + '/sub_clients/page', { params: params }).then(function (resp) { $scope.subPartners = resp.data.data; $scope.pagination = resp.data.pagination; }); @@ -2547,7 +2547,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter if (!$scope.paymentInfo) { return; } - $http.put('/sys/partners/' + $scope.partner.client_moniker + '/sub_manage', {allow: $scope.partner.sub_manage}).then(function () { + $http.put('/sys/partners/' + $scope.partner.client_moniker + '/sub_manage', { allow: $scope.partner.sub_manage }).then(function () { //$scope.loadPartnerPaymentInfo(); }, function (resp) { commonDialog.alert({ @@ -2566,7 +2566,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter $scope.init.child_each_refund = true; return; } - $http.put('/sys/partners/' + $scope.partner.client_moniker + '/child_each_refund', {allow: $scope.partner.child_each_refund}).then(function () { + $http.put('/sys/partners/' + $scope.partner.client_moniker + '/child_each_refund', { allow: $scope.partner.child_each_refund }).then(function () { $scope.loadPartnerPaymentInfo(); }, function (resp) { commonDialog.alert({ @@ -2588,7 +2588,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter }]); app.controller('partnerRatesCtrl', ['$scope', '$rootScope', '$http', '$uibModal', 'commonDialog', '$sce', '$state', function ($scope, $rootScope, $http, $uibModal, commonDialog, $sce, $state) { - $scope.bankCtrl = {edit: true, rate_name: 'Wechat', modify_min_settle: false}; + $scope.bankCtrl = { edit: true, rate_name: 'Wechat', modify_min_settle: false }; $scope.init = { skip_clearing: false, tax_in_surcharge: false, @@ -2607,12 +2607,12 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter title: 'Warning', content: '启用收支分离模式清算将使消费者支付手续费模式失效,请确认是否切换?' }).then(function () { - $http.put('/sys/partners/' + $scope.partner.client_moniker + '/surcharge_mode', {surcharge_mode: 'distributed'}).then(function () { - commonDialog.alert({title: 'Success', content: '已切换为收支分离模式', type: 'success'}); + $http.put('/sys/partners/' + $scope.partner.client_moniker + '/surcharge_mode', { surcharge_mode: 'distributed' }).then(function () { + commonDialog.alert({ title: 'Success', content: '已切换为收支分离模式', type: 'success' }); $scope.partner.surcharge_mode = 'distributed'; $scope.getBalance(); }, function (resp) { - commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'}); + commonDialog.alert({ title: 'Error', content: resp.data.message, type: 'error' }); }) }) } else { @@ -2620,21 +2620,21 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter title: 'Warning', content: '请确认是否切换成净值清算模式?' }).then(function () { - $http.put('/sys/partners/' + $scope.partner.client_moniker + '/surcharge_mode', {surcharge_mode: 'balance'}).then(function () { - commonDialog.alert({title: 'Success', content: '已切换为净值清算模式', type: 'success'}); + $http.put('/sys/partners/' + $scope.partner.client_moniker + '/surcharge_mode', { surcharge_mode: 'balance' }).then(function () { + commonDialog.alert({ title: 'Success', content: '已切换为净值清算模式', type: 'success' }); $scope.partner.surcharge_mode = 'balance'; }, function (resp) { - commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'}); + commonDialog.alert({ title: 'Error', content: resp.data.message, type: 'error' }); }) }) } }; $scope.modifyMinSettle = function () { - $http.put('/sys/partners/' + $scope.partner.client_moniker + '/min_settle', {min_settle: $scope.partner.min_settle}).then(function () { - commonDialog.alert({title: 'Success', content: '修改起结金额成功', type: 'success'}); + $http.put('/sys/partners/' + $scope.partner.client_moniker + '/min_settle', { min_settle: $scope.partner.min_settle }).then(function () { + commonDialog.alert({ title: 'Success', content: '修改起结金额成功', type: 'success' }); $scope.bankCtrl.modify_min_settle = false; }, function (resp) { - commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'}); + commonDialog.alert({ title: 'Error', content: resp.data.message, type: 'error' }); }) }; $scope.getBalance = function () { @@ -2668,7 +2668,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter title: 'Warning', content: 'This operation will switch skip clearing status. Are you sure?' }).then(function () { - commonDialog.inputText({title: '请输入跳过清算的原因'}).then(function (text) { + commonDialog.inputText({ title: '请输入跳过清算的原因' }).then(function (text) { $http.put('/sys/partners/' + $scope.partner.client_moniker + '/skip_clearing', { skip_clearing: skipClearing, remark: text @@ -2683,7 +2683,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter content: 'This operation will switch skip clearing status. Are you sure?', // contentHtml: $sce.trustAsHtml('This operation will switch skip clearing status. Are you sure?') }).then(function () { - $http.put('/sys/partners/' + $scope.partner.client_moniker + '/skip_clearing', {skip_clearing: skipClearing}).then(function (resp) { + $http.put('/sys/partners/' + $scope.partner.client_moniker + '/skip_clearing', { skip_clearing: skipClearing }).then(function (resp) { $scope.getBankAccount(); }); }) @@ -2716,7 +2716,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter $scope.init.allow_surcharge_credit = true; return; } - $http.put('/sys/partners/' + $scope.partner.client_moniker + '/allow_surcharge_credit', {allow_surcharge_credit: allowSurchargeCredit}).then(function (resp) { + $http.put('/sys/partners/' + $scope.partner.client_moniker + '/allow_surcharge_credit', { allow_surcharge_credit: allowSurchargeCredit }).then(function (resp) { }) }; $scope.taxInSurcharge = function (taxInSurcharge) { @@ -2724,7 +2724,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter $scope.init.tax_in_surcharge = true; return; } - $http.put('/sys/partners/' + $scope.partner.client_moniker + '/tax_in_surcharge', {tax_in_surcharge: taxInSurcharge}).then(function (resp) { + $http.put('/sys/partners/' + $scope.partner.client_moniker + '/tax_in_surcharge', { tax_in_surcharge: taxInSurcharge }).then(function (resp) { $scope.getBankAccount(); }) }; @@ -2733,7 +2733,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter $scope.init.enable_presettle = true; return; } - $http.put('/sys/partners/' + $scope.partner.client_moniker + '/presettle', {enable_presettle: presettle}).then(function (resp) { + $http.put('/sys/partners/' + $scope.partner.client_moniker + '/presettle', { enable_presettle: presettle }).then(function (resp) { $scope.getBankAccount(); }) }; @@ -2742,19 +2742,19 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter $scope.init.customer_tax_free = true; return; } - $http.put('/sys/partners/' + $scope.partner.client_moniker + '/customer_tax_free', {customer_tax_free: customerTaxFree}).then(function (resp) { + $http.put('/sys/partners/' + $scope.partner.client_moniker + '/customer_tax_free', { customer_tax_free: customerTaxFree }).then(function (resp) { $scope.getBankAccount(); }) }; - $scope.settleHours = [{value: undefined, label: 'Default(24:00, GMT+10)'}]; + $scope.settleHours = [{ value: undefined, label: 'Default(24:00, GMT+10)' }]; for (var h = 24; h > 0; h--) { - $scope.settleHours.push({value: h, label: ('00' + h).substr(-2) + ':00, ' + $scope.partner.timezone}); + $scope.settleHours.push({ value: h, label: ('00' + h).substr(-2) + ':00, ' + $scope.partner.timezone }); } $scope.settleHourConfig = function () { - $http.put('/sys/partners/' + $scope.partner.client_moniker + '/settle_hour', {hour: $scope.partner.settle_hour || null}).then(function () { - commonDialog.alert({type: 'success', title: 'OK', content: 'Settle Hour configured'}) + $http.put('/sys/partners/' + $scope.partner.client_moniker + '/settle_hour', { hour: $scope.partner.settle_hour || null }).then(function () { + commonDialog.alert({ type: 'success', title: 'OK', content: 'Settle Hour configured' }) }, function (resp) { - commonDialog.alert({type: 'error', title: 'Error', content: resp.data.message}) + commonDialog.alert({ type: 'error', title: 'Error', content: resp.data.message }) }); }; $scope.getBankInfo = function (bsb_no) { @@ -2771,7 +2771,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter }); } else { - commonDialog.alert({title: 'Error', content: "请先填写BSB No", type: 'error'}) + commonDialog.alert({ title: 'Error', content: "请先填写BSB No", type: 'error' }) } }; @@ -2785,7 +2785,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter $http.put('/sys/partners/' + $scope.partner.client_moniker + '/bank_account', $scope.bankaccount).then(function () { $scope.getBankAccount(); }, function (resp) { - commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'}) + commonDialog.alert({ title: 'Error', content: resp.data.message, type: 'error' }) }) }; $scope.newCardPaymentRates = function () { @@ -2814,7 +2814,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter controller: 'newRateDialogCtrl', resolve: { rate: function () { - return {rate_name: name, clean_days: 3}; + return { rate_name: name, clean_days: 3 }; }, sys_common_rate: function () { return $http.get('/sys/partners/sys_rates'); @@ -2901,7 +2901,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter $scope.canAddDetail = false; $scope.params = {}; }, function (resp) { - commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'}); + commonDialog.alert({ title: 'Error', content: resp.data.message, type: 'error' }); }); } @@ -2932,7 +2932,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter } }; $scope.sysRateConfig = angular.copy(sys_common_rate.data); - $scope.ctrl = {sending: false}; + $scope.ctrl = { sending: false }; $scope.saveRate = function (form) { if (form.$invalid) { angular.forEach(form, function (item, key) { @@ -2978,7 +2978,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter app.controller('newRateDialogCtrl', ['$scope', '$http', 'rate', 'sys_common_rate', 'clientMoniker', function ($scope, $http, rate, sys_common_rate, clientMoniker) { $scope.rate = angular.copy(rate); $scope.sysRateConfig = angular.copy(sys_common_rate.data); - $scope.ctrl = {sending: false}; + $scope.ctrl = { sending: false }; $scope.saveRate = function (form) { if (form.$invalid) { angular.forEach(form, function (item, key) { @@ -3052,9 +3052,9 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter }) }; $scope.updateAccountRole = function (account) { - $http.put('/sys/partners/' + $scope.partner.client_moniker + '/accounts/' + account.account_id + '/role', {role: account.role}).then(function () { + $http.put('/sys/partners/' + $scope.partner.client_moniker + '/accounts/' + account.account_id + '/role', { role: account.role }).then(function () { }, function (resp) { - commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'}) + commonDialog.alert({ title: 'Error', content: resp.data.message, type: 'error' }) }) }; $scope.resetPwd = function (account) { @@ -3072,7 +3072,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter } } }).result.then(function () { - commonDialog.alert({title: 'Success!', content: 'Password Changed Successfully', type: 'success'}) + commonDialog.alert({ title: 'Success!', content: 'Password Changed Successfully', type: 'success' }) }) }; $scope.disableAccount = function (account) { @@ -3083,13 +3083,13 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter $http.delete('/sys/partners/' + $scope.partner.client_moniker + '/accounts/' + account.account_id).then(function () { $scope.loadPartnerAccounts(); }, function (resp) { - commonDialog.alert({title: 'Fail!', content: resp.data.message, type: 'error'}) + commonDialog.alert({ title: 'Fail!', content: resp.data.message, type: 'error' }) }) }) }; }]); app.controller('partnerAddAccountDialogCtrl', ['$scope', '$http', 'partner', function ($scope, $http, partner) { - $scope.account = {role: 1}; + $scope.account = { role: 1 }; $scope.partnerRoles = partnerRoles; $scope.account.nation_code = 61; $scope.saveAccount = function (form) { @@ -3130,7 +3130,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter $scope.errmsg = 'The password needs to consist of 8-16 digits and letters !'; return; } - $http.put('/sys/partners/' + partner.client_moniker + '/accounts/' + account.account_id + '/pwd', {pwd: $scope.reset.pwd}).then(function () { + $http.put('/sys/partners/' + partner.client_moniker + '/accounts/' + account.account_id + '/pwd', { pwd: $scope.reset.pwd }).then(function () { $scope.$close(); }, function (resp) { $scope.errmsg = resp.data.message; @@ -3138,13 +3138,13 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter } }]); app.controller('partnerNewSubPartnerDialogCtrl', ['$rootScope', '$scope', '$http', '$state', 'Upload', 'commonDialog', 'timezone', - 'clientMoniker', 'industryMap', 'businessStructuresMap', 'stateMap', 'countryMap','wechatGoodMcc', - function ($rootScope, $scope, $http, $state, Upload, commonDialog, timezone, clientMoniker, industryMap, businessStructuresMap, stateMap, countryMap,wechatGoodMcc) { + 'clientMoniker', 'industryMap', 'businessStructuresMap', 'stateMap', 'countryMap', 'wechatGoodMcc', + function ($rootScope, $scope, $http, $state, Upload, commonDialog, timezone, clientMoniker, industryMap, businessStructuresMap, stateMap, countryMap, wechatGoodMcc) { if ($scope.partner_application) { $scope.partner = angular.copy($scope.partner_application); delete $rootScope.partner_application; } else { - $scope.partner = {timezone: 'Australia/Melbourne'}; + $scope.partner = { timezone: 'Australia/Melbourne' }; } $scope.initMerchantCode = function () { $http.get('/sys/partners/init/merchant_code').then(function (response) { @@ -3333,7 +3333,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter $scope.merchantIsValid = false; return; } - $http.get('/sys/partners/init/check_code_isvalid', {params: {clientMoniker: code}}).then(function (response) { + $http.get('/sys/partners/init/check_code_isvalid', { params: { clientMoniker: code } }).then(function (response) { $scope.merchantIsValid = response.data; $scope.merchantCodeChecked = true; }); @@ -3348,7 +3348,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter return; } $scope.errmsg = null; - if (!$scope.partner.business_structure||$scope.partner.business_structure == '') { + if (!$scope.partner.business_structure || $scope.partner.business_structure == '') { alert('Please select the business structure'); return; } @@ -3454,19 +3454,19 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter $scope.uploadLogo = function (file) { if (file != null) { if (file.size > 1 * 1024 * 1024) { - commonDialog.alert({title: 'Error', content: '文件大小不能超过1MB,请压缩后重试', type: 'error'}) + commonDialog.alert({ title: 'Error', content: '文件大小不能超过1MB,请压缩后重试', type: 'error' }) } else { - $scope.logoProgress = {value: 0}; + $scope.logoProgress = { value: 0 }; Upload.upload({ url: '/attachment/files', - data: {file: file} + data: { file: file } }).then(function (resp) { delete $scope.logoProgress; $scope.partner.logo_id = resp.data.fileid; $scope.partner.logo_url = resp.data.url; }, function (resp) { delete $scope.logoProgress; - commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'}) + commonDialog.alert({ title: 'Upload Failed', content: resp.data.message, type: 'error' }) }, function (evt) { $scope.logoProgress.value = parseInt(100 * evt.loaded / evt.total); }) @@ -3477,18 +3477,18 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter $scope.uploadShopPhoto = function (file) { if (file != null) { if (file.size > 2 * 1024 * 1024) { - commonDialog.alert({title: 'Error', content: '文件大小不能超过2MB,请压缩后重试', type: 'error'}) + commonDialog.alert({ title: 'Error', content: '文件大小不能超过2MB,请压缩后重试', type: 'error' }) } else { - $scope.shopPhotoProgress = {value: 0}; + $scope.shopPhotoProgress = { value: 0 }; Upload.upload({ url: '/attachment/files', - data: {file: file} + data: { file: file } }).then(function (resp) { delete $scope.shopPhotoProgress; $scope.partner.company_photo = resp.data.url; }, function (resp) { delete $scope.shopPhotoProgress; - commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'}) + commonDialog.alert({ title: 'Upload Failed', content: resp.data.message, type: 'error' }) }, function (evt) { $scope.shopPhotoProgress.value = parseInt(100 * evt.loaded / evt.total); }) @@ -3499,18 +3499,18 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter $scope.uploadStorePhoto = function (file) { if (file != null) { if (file.size > 2 * 1024 * 1024) { - commonDialog.alert({title: 'Error', content: '文件大小不能超过2MB,请压缩后重试', type: 'error'}) + commonDialog.alert({ title: 'Error', content: '文件大小不能超过2MB,请压缩后重试', type: 'error' }) } else { - $scope.storePhotoProgress = {value: 0}; + $scope.storePhotoProgress = { value: 0 }; Upload.upload({ url: '/attachment/files', - data: {file: file} + data: { file: file } }).then(function (resp) { delete $scope.storePhotoProgress; $scope.partner.store_photo = resp.data.url; }, function (resp) { delete $scope.storePhotoProgress; - commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'}) + commonDialog.alert({ title: 'Upload Failed', content: resp.data.message, type: 'error' }) }, function (evt) { $scope.storePhotoProgress.value = parseInt(100 * evt.loaded / evt.total); }) @@ -3526,7 +3526,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter } }]); app.controller('partnerPayLogCtrl', ['$scope', '$http', '$filter', 'refunder', 'orderService', function ($scope, $http, $filter, refunder, orderService) { - $scope.params = {status: 'PAID', channel: 'ALL', textType: 'all', datefrom: new Date(), dateto: new Date()}; + $scope.params = { status: 'PAID', channel: 'ALL', textType: 'all', datefrom: new Date(), dateto: new Date() }; $scope.pagination = {}; $scope.isAll = true; $scope.isLevel3All = true; @@ -3607,7 +3607,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter if ($scope.isAll) { delete params.client_ids; } - $http.get('/sys/partners/' + $scope.partner.client_moniker + '/trade_logs', {params: params}).then(function (resp) { + $http.get('/sys/partners/' + $scope.partner.client_moniker + '/trade_logs', { params: params }).then(function (resp) { $scope.tradeLogs = resp.data.data; $scope.pagination = resp.data.pagination; $scope.analysis = resp.data.analysis; @@ -3687,7 +3687,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter $scope.subSearchText = subSearchText; params.searchText = subSearchText; } - $http.get('/sys/partners/' + $scope.partner.client_moniker + '/sub_clients/page', {params: params}).then(function (resp) { + $http.get('/sys/partners/' + $scope.partner.client_moniker + '/sub_clients/page', { params: params }).then(function (resp) { var clientList = resp.data.data; $scope.subClientPagination = resp.data.pagination; clientList.forEach(function (client) { @@ -3759,7 +3759,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter $scope.listDevices = function (page) { var params = angular.copy($scope.devsearch) || {}; params.page = page || $scope.pagination.page || 1; - $http.get('/sys/partners/' + $scope.partner.client_moniker + '/devices', {params: params}).then(function (resp) { + $http.get('/sys/partners/' + $scope.partner.client_moniker + '/devices', { params: params }).then(function (resp) { $scope.pagination = resp.data.pagination; $scope.devices = resp.data.data; }) @@ -3788,26 +3788,26 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter $scope.listOrders(1); }; $scope.modifyRemark = function (dev) { - commonDialog.inputText({title: 'Input New Remark of device'}).then(function (text) { - $http.put('/sys/partners/' + $scope.partner.client_moniker + '/devices/' + dev.dev_id, {remark: text}).then(function () { + commonDialog.inputText({ title: 'Input New Remark of device' }).then(function (text) { + $http.put('/sys/partners/' + $scope.partner.client_moniker + '/devices/' + dev.dev_id, { remark: text }).then(function () { $scope.listDevices(); }, function (resp) { - commonDialog.alert({title: 'Update remark failed', content: resp.data.message, type: 'error'}); + commonDialog.alert({ title: 'Update remark failed', content: resp.data.message, type: 'error' }); }) }) }; $scope.disableDevice = function (dev) { - $http.put('/sys/partners/' + $scope.partner.client_moniker + '/devices/' + dev.dev_id + '/enable', {enable: false}).then(function () { + $http.put('/sys/partners/' + $scope.partner.client_moniker + '/devices/' + dev.dev_id + '/enable', { enable: false }).then(function () { $scope.listDevices() }, function (resp) { - commonDialog.alert({title: 'Failed to disable device', content: resp.data.message, type: 'error'}); + commonDialog.alert({ title: 'Failed to disable device', content: resp.data.message, type: 'error' }); }); }; $scope.enableDevice = function (dev) { - $http.put('/sys/partners/' + $scope.partner.client_moniker + '/devices/' + dev.dev_id + '/enable', {enable: true}).then(function () { + $http.put('/sys/partners/' + $scope.partner.client_moniker + '/devices/' + dev.dev_id + '/enable', { enable: true }).then(function () { $scope.listDevices() }, function (resp) { - commonDialog.alert({title: 'Failed to enable device', content: resp.data.message, type: 'error'}); + commonDialog.alert({ title: 'Failed to enable device', content: resp.data.message, type: 'error' }); }); }; $scope.orderPagination = {}; @@ -3856,7 +3856,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter } params.gateway = [0, 1]; params.page = page || $scope.orderPagination.page || 1; - $http.get('/sys/partners/' + $scope.partner.client_moniker + '/trade_logs', {params: params}).then(function (resp) { + $http.get('/sys/partners/' + $scope.partner.client_moniker + '/trade_logs', { params: params }).then(function (resp) { $scope.orders = resp.data.data; $scope.orderPagination = resp.data.pagination; $scope.analysis = resp.data.analysis; @@ -3873,7 +3873,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter app.controller('partnerRedpackConfigDialogCtrl', ['$scope', '$http', 'partner', 'config', function ($scope, $http, partner, config) { $scope.config = config.data; if (!Object.keys($scope.config).length) { - $scope.config = {min_payment: 0, min_amount: 1, max_amount: 1, daily_limit: 1, enabled: false}; + $scope.config = { min_payment: 0, min_amount: 1, max_amount: 1, daily_limit: 1, enabled: false }; } $scope.saveRedpackConfig = function (form) { $scope.errmsg = null; @@ -3895,7 +3895,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter }]); app.controller('rateConfigDialogCtrl', ['$scope', '$http', 'rate', 'clientMoniker', function ($scope, $http, rate, clientMoniker) { $scope.rate = angular.copy(rate); - $scope.ctrl = {sending: false}; + $scope.ctrl = { sending: false }; $scope.saveRate = function () { $scope.errmsg = null; $scope.ctrl.sending = true; @@ -3946,14 +3946,14 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter $scope.chooseOrg.org_name = null; if (($scope.currentUser.role & parseInt('1000011', 2)) > 0 && !$scope.currentUser.org_id) { /* $scope.showOrg = 'Organization';*/ - $http.get('/sys/orgs', {params: {}}).then(function (resp) { + $http.get('/sys/orgs', { params: {} }).then(function (resp) { $scope.orgs = resp.data; }); } $scope.loadOrgs = function () { var params = angular.copy($scope.params); - $http.get('/sys/orgs/orgChild', {params: params}).then(function (resp) { + $http.get('/sys/orgs/orgChild', { params: params }).then(function (resp) { $scope.orgs_child = resp.data; }) }; @@ -4059,7 +4059,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter $scope.listRedpackLogs = function (page) { var params = angular.copy($scope.queryParams); params.page = page || $scope.pagination.page || 1; - $http.get('/sys/redpack/partners/' + partner.client_moniker + '/logs', {params: params}).then(function (resp) { + $http.get('/sys/redpack/partners/' + partner.client_moniker + '/logs', { params: params }).then(function (resp) { $scope.logs = resp.data.data; $scope.pagination = resp.data.pagination; }) @@ -4074,18 +4074,18 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter } }]); app.controller('partnerCPAuthFileCtrl', ['$scope', '$http', '$rootScope', 'commonDialog', '$state', 'Upload', 'file', function ($scope, $http, $rootScope, commonDialog, $state, Upload, file) { - $scope.id_info_form = {edit: false}; + $scope.id_info_form = { edit: false }; $scope.file = file.data || {}; //audit files $scope.uploadBankFile = function (file) { if (file != null) { if (file.size > 3 * 1024 * 1024) { - commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB,请压缩后重试', type: 'error'}) + commonDialog.alert({ title: 'Error', content: '文件大小不能超过3MB,请压缩后重试', type: 'error' }) } else { - $scope.bankFileProgress = {value: 0}; + $scope.bankFileProgress = { value: 0 }; Upload.upload({ url: '/attachment/files', - data: {file: file} + data: { file: file } }).then(function (resp) { delete $scope.bankFileProgress; $scope.file.file_bank_info = resp.data.url; @@ -4097,7 +4097,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter } }, function (resp) { delete $scope.bankFileProgress; - commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'}) + commonDialog.alert({ title: 'Upload Failed', content: resp.data.message, type: 'error' }) }, function (evt) { $scope.bankFileProgress.value = parseInt(100 * evt.loaded / evt.total); }) @@ -4133,12 +4133,12 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter $scope.uploadBillFile = function (file) { if (file != null) { if (file.size > 3 * 1024 * 1024) { - commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB,请压缩后重试', type: 'error'}) + commonDialog.alert({ title: 'Error', content: '文件大小不能超过3MB,请压缩后重试', type: 'error' }) } else { - $scope.billFileProgress = {value: 0}; + $scope.billFileProgress = { value: 0 }; Upload.upload({ url: '/attachment/files', - data: {file: file} + data: { file: file } }).then(function (resp) { delete $scope.billFileProgress; $scope.file.utility_bill_info = resp.data.url; @@ -4150,7 +4150,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter } }, function (resp) { delete $scope.billFileProgress; - commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'}) + commonDialog.alert({ title: 'Upload Failed', content: resp.data.message, type: 'error' }) }, function (evt) { $scope.billFileProgress.value = parseInt(100 * evt.loaded / evt.total); }) @@ -4161,12 +4161,12 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter $scope.uploadCompanyFile = function (file) { if (file != null) { if (file.size > 3 * 1024 * 1024) { - commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB,请压缩后重试', type: 'error'}) + commonDialog.alert({ title: 'Error', content: '文件大小不能超过3MB,请压缩后重试', type: 'error' }) } else { - $scope.companyFileProgress = {value: 0}; + $scope.companyFileProgress = { value: 0 }; Upload.upload({ url: '/attachment/files', - data: {file: file} + data: { file: file } }).then(function (resp) { delete $scope.companyFileProgress; $scope.file.file_company_info = resp.data.url; @@ -4178,7 +4178,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter } }, function (resp) { delete $scope.companyFileProgress; - commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'}) + commonDialog.alert({ title: 'Upload Failed', content: resp.data.message, type: 'error' }) }, function (evt) { $scope.companyFileProgress.value = parseInt(100 * evt.loaded / evt.total); }) @@ -4189,12 +4189,12 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter $scope.uploadIDFile = function (file) { if (file != null) { if (file.size > 3 * 1024 * 1024) { - commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB,请压缩后重试', type: 'error'}) + commonDialog.alert({ title: 'Error', content: '文件大小不能超过3MB,请压缩后重试', type: 'error' }) } else { - $scope.idFileProgress = {value: 0}; + $scope.idFileProgress = { value: 0 }; Upload.upload({ url: '/attachment/files', - data: {file: file} + data: { file: file } }).then(function (resp) { delete $scope.idFileProgress; $scope.file.file_id_info = resp.data.url; @@ -4206,7 +4206,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter } }, function (resp) { delete $scope.idFileProgress; - commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'}) + commonDialog.alert({ title: 'Upload Failed', content: resp.data.message, type: 'error' }) }, function (evt) { $scope.idFileProgress.value = parseInt(100 * evt.loaded / evt.total); }) @@ -4218,12 +4218,12 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter $scope.uploadAgreementFile = function (file) { if (file != null) { if (file.size > 10 * 1024 * 1024) { - commonDialog.alert({title: 'Error', content: '文件大小不能超过10MB,请压缩后重试', type: 'error'}) + commonDialog.alert({ title: 'Error', content: '文件大小不能超过10MB,请压缩后重试', type: 'error' }) } else { - $scope.agreementFileProgress = {value: 0}; + $scope.agreementFileProgress = { value: 0 }; Upload.upload({ url: '/attachment/files', - data: {file: file} + data: { file: file } }).then(function (resp) { delete $scope.agreementFileProgress; $scope.file.file_agreement_info = resp.data.url; @@ -4235,7 +4235,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter } }, function (resp) { delete $scope.agreementFileProgress; - commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'}) + commonDialog.alert({ title: 'Upload Failed', content: resp.data.message, type: 'error' }) }, function (evt) { $scope.agreementFileProgress.value = parseInt(100 * evt.loaded / evt.total); }) @@ -4247,12 +4247,12 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter $scope.uploadApplyFile = function (file) { if (file != null) { if (file.size > 3 * 1024 * 1024) { - commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB,请压缩后重试', type: 'error'}) + commonDialog.alert({ title: 'Error', content: '文件大小不能超过3MB,请压缩后重试', type: 'error' }) } else { - $scope.applyFileProgress = {value: 0}; + $scope.applyFileProgress = { value: 0 }; Upload.upload({ url: '/attachment/files', - data: {file: file} + data: { file: file } }).then(function (resp) { delete $scope.applyFileProgress; $scope.file.file_apply_info = resp.data.url; @@ -4264,7 +4264,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter } }, function (resp) { delete $scope.applyFileProgress; - commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'}) + commonDialog.alert({ title: 'Upload Failed', content: resp.data.message, type: 'error' }) }, function (evt) { $scope.applyFileProgress.value = parseInt(100 * evt.loaded / evt.total); }) @@ -4277,12 +4277,12 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter }; $scope.saveIdInfo = function () { if (!$scope.file.id_type) { - commonDialog.alert({title: 'Error', content: '请选择ID Type', type: 'error'}); + commonDialog.alert({ title: 'Error', content: '请选择ID Type', type: 'error' }); return; } if ($scope.file.beneficiary_id_title != "Ultimate beneficiary owner") { if (!$scope.file.other_id_title_desc) { - commonDialog.alert({title: 'Error', content: '请简要告知为何无法提供受益股东的资料', type: 'error'}); + commonDialog.alert({ title: 'Error', content: '请简要告知为何无法提供受益股东的资料', type: 'error' }); return; } } @@ -4291,10 +4291,10 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter config.beneficiary_id_title = $scope.file.beneficiary_id_title; config.other_id_title_desc = $scope.file.other_id_title_desc; $http.put('/sys/partners/' + $scope.partner.client_moniker + '/id_info', config).then(function (resp) { - commonDialog.alert({title: 'Success', content: 'Id Info Updated', type: 'success'}) + commonDialog.alert({ title: 'Success', content: 'Id Info Updated', type: 'success' }) $state.reload(); }, function (resp) { - commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'}) + commonDialog.alert({ title: 'Error', content: resp.data.message, type: 'error' }) $state.reload(); }); }; @@ -4322,7 +4322,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter }); $state.reload(); }, function (resp) { - commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'}); + commonDialog.alert({ title: 'Error', content: resp.data.message, type: 'error' }); }) }) }; @@ -4337,7 +4337,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter }); $state.reload(); }, function (resp) { - commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'}); + commonDialog.alert({ title: 'Error', content: resp.data.message, type: 'error' }); }) } @@ -4366,7 +4366,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter }]); app.controller('partnerMWAuthFileCtrl', ['$scope', '$http', '$rootScope', 'commonDialog', '$state', 'Upload', 'file', function ($scope, $http, $rootScope, commonDialog, $state, Upload, file) { - $scope.id_info_form = {edit: false}; + $scope.id_info_form = { edit: false }; $scope.file = file.data || {}; $scope.uploadFile = {}; $scope.file.upay_risk_level = $scope.partner.upay_risk_level; @@ -4375,12 +4375,12 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter $scope.uploadApplicationFile = function (file) { if (file != null) { if (file.size > 3 * 1024 * 1024) { - commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB,请压缩后重试', type: 'error'}) + commonDialog.alert({ title: 'Error', content: '文件大小不能超过3MB,请压缩后重试', type: 'error' }) } else { - $scope.applicationFileProgress = {value: 0}; + $scope.applicationFileProgress = { value: 0 }; Upload.upload({ url: '/attachment/files', - data: {file: file} + data: { file: file } }).then(function (resp) { $scope.uploadFile = {}; delete $scope.applicationFileProgress; @@ -4388,7 +4388,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter $scope.updateFile(); }, function (resp) { delete $scope.applicationFileProgress; - commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'}) + commonDialog.alert({ title: 'Upload Failed', content: resp.data.message, type: 'error' }) }, function (evt) { $scope.applicationFileProgress.value = parseInt(100 * evt.loaded / evt.total); }) @@ -4398,12 +4398,12 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter $scope.uploadBankFile = function (file) { if (file != null) { if (file.size > 3 * 1024 * 1024) { - commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB,请压缩后重试', type: 'error'}) + commonDialog.alert({ title: 'Error', content: '文件大小不能超过3MB,请压缩后重试', type: 'error' }) } else { - $scope.bankFileProgress = {value: 0}; + $scope.bankFileProgress = { value: 0 }; Upload.upload({ url: '/attachment/files', - data: {file: file} + data: { file: file } }).then(function (resp) { $scope.uploadFile = {}; delete $scope.bankFileProgress; @@ -4411,7 +4411,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter $scope.updateFile(); }, function (resp) { delete $scope.bankFileProgress; - commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'}) + commonDialog.alert({ title: 'Upload Failed', content: resp.data.message, type: 'error' }) }, function (evt) { $scope.bankFileProgress.value = parseInt(100 * evt.loaded / evt.total); }) @@ -4421,12 +4421,12 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter $scope.uploadASICFile = function (file) { if (file != null) { if (file.size > 3 * 1024 * 1024) { - commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB,请压缩后重试', type: 'error'}) + commonDialog.alert({ title: 'Error', content: '文件大小不能超过3MB,请压缩后重试', type: 'error' }) } else { - $scope.ASICProgress = {value: 0}; + $scope.ASICProgress = { value: 0 }; Upload.upload({ url: '/attachment/files', - data: {file: file} + data: { file: file } }).then(function (resp) { $scope.uploadFile = {}; delete $scope.ASICProgress; @@ -4434,7 +4434,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter $scope.updateFile(); }, function (resp) { delete $scope.ASICProgress; - commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'}) + commonDialog.alert({ title: 'Upload Failed', content: resp.data.message, type: 'error' }) }, function (evt) { $scope.ASICProgress.value = parseInt(100 * evt.loaded / evt.total); }) @@ -4444,12 +4444,12 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter $scope.uploadIdFile = function (file) { if (file != null) { if (file.size > 3 * 1024 * 1024) { - commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB,请压缩后重试', type: 'error'}) + commonDialog.alert({ title: 'Error', content: '文件大小不能超过3MB,请压缩后重试', type: 'error' }) } else { - $scope.idProgress = {value: 0}; + $scope.idProgress = { value: 0 }; Upload.upload({ url: '/attachment/files', - data: {file: file} + data: { file: file } }).then(function (resp) { $scope.uploadFile = {}; delete $scope.idProgress; @@ -4457,7 +4457,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter $scope.updateFile(); }, function (resp) { delete $scope.idProgress; - commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'}) + commonDialog.alert({ title: 'Upload Failed', content: resp.data.message, type: 'error' }) }, function (evt) { $scope.idProgress.value = parseInt(100 * evt.loaded / evt.total); }) @@ -4467,12 +4467,12 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter $scope.uploadResidenceFile = function (file) { if (file != null) { if (file.size > 3 * 1024 * 1024) { - commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB,请压缩后重试', type: 'error'}) + commonDialog.alert({ title: 'Error', content: '文件大小不能超过3MB,请压缩后重试', type: 'error' }) } else { - $scope.residenceFileProgress = {value: 0}; + $scope.residenceFileProgress = { value: 0 }; Upload.upload({ url: '/attachment/files', - data: {file: file} + data: { file: file } }).then(function (resp) { $scope.uploadFile = {}; delete $scope.residenceFileProgress; @@ -4480,7 +4480,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter $scope.updateFile(); }, function (resp) { delete $scope.residenceFileProgress; - commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'}) + commonDialog.alert({ title: 'Upload Failed', content: resp.data.message, type: 'error' }) }, function (evt) { $scope.residenceFileProgress.value = parseInt(100 * evt.loaded / evt.total); }) @@ -4490,12 +4490,12 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter $scope.uploadRefundPolicyFile = function (file) { if (file != null) { if (file.size > 3 * 1024 * 1024) { - commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB,请压缩后重试', type: 'error'}) + commonDialog.alert({ title: 'Error', content: '文件大小不能超过3MB,请压缩后重试', type: 'error' }) } else { - $scope.refundPolicyFileProgress = {value: 0}; + $scope.refundPolicyFileProgress = { value: 0 }; Upload.upload({ url: '/attachment/files', - data: {file: file} + data: { file: file } }).then(function (resp) { $scope.uploadFile = {}; delete $scope.refundPolicyFileProgress; @@ -4503,7 +4503,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter $scope.updateFile(); }, function (resp) { delete $scope.refundPolicyFileProgress; - commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'}) + commonDialog.alert({ title: 'Upload Failed', content: resp.data.message, type: 'error' }) }, function (evt) { $scope.refundPolicyFileProgress.value = parseInt(100 * evt.loaded / evt.total); }) @@ -4513,12 +4513,12 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter $scope.uploadPrivacyPolicyFile = function (file) { if (file != null) { if (file.size > 3 * 1024 * 1024) { - commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB,请压缩后重试', type: 'error'}) + commonDialog.alert({ title: 'Error', content: '文件大小不能超过3MB,请压缩后重试', type: 'error' }) } else { - $scope.privacyFileProgress = {value: 0}; + $scope.privacyFileProgress = { value: 0 }; Upload.upload({ url: '/attachment/files', - data: {file: file} + data: { file: file } }).then(function (resp) { $scope.uploadFile = {}; delete $scope.privacyFileProgress; @@ -4526,7 +4526,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter $scope.updateFile(); }, function (resp) { delete $scope.privacyFileProgress; - commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'}) + commonDialog.alert({ title: 'Upload Failed', content: resp.data.message, type: 'error' }) }, function (evt) { $scope.privacyFileProgress.value = parseInt(100 * evt.loaded / evt.total); }) @@ -4536,12 +4536,12 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter $scope.uploadCardPolicyFile = function (file) { if (file != null) { if (file.size > 3 * 1024 * 1024) { - commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB,请压缩后重试', type: 'error'}) + commonDialog.alert({ title: 'Error', content: '文件大小不能超过3MB,请压缩后重试', type: 'error' }) } else { - $scope.cardFileProgress = {value: 0}; + $scope.cardFileProgress = { value: 0 }; Upload.upload({ url: '/attachment/files', - data: {file: file} + data: { file: file } }).then(function (resp) { $scope.uploadFile = {}; delete $scope.cardFileProgress; @@ -4549,7 +4549,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter $scope.updateFile(); }, function (resp) { delete $scope.cardFileProgress; - commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'}) + commonDialog.alert({ title: 'Upload Failed', content: resp.data.message, type: 'error' }) }, function (evt) { $scope.cardFileProgress.value = parseInt(100 * evt.loaded / evt.total); }) @@ -4559,12 +4559,12 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter $scope.uploadLetterOfOfferFile = function (file) { if (file != null) { if (file.size > 3 * 1024 * 1024) { - commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB,请压缩后重试', type: 'error'}) + commonDialog.alert({ title: 'Error', content: '文件大小不能超过3MB,请压缩后重试', type: 'error' }) } else { - $scope.letterFileProgress = {value: 0}; + $scope.letterFileProgress = { value: 0 }; Upload.upload({ url: '/attachment/files', - data: {file: file} + data: { file: file } }).then(function (resp) { $scope.uploadFile = {}; delete $scope.letterFileProgress; @@ -4572,7 +4572,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter $scope.updateFile(); }, function (resp) { delete $scope.letterFileProgress; - commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'}) + commonDialog.alert({ title: 'Upload Failed', content: resp.data.message, type: 'error' }) }, function (evt) { $scope.letterFileProgress.value = parseInt(100 * evt.loaded / evt.total); }) @@ -4582,12 +4582,12 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter $scope.uploadPromotionalFile = function (file) { if (file != null) { if (file.size > 3 * 1024 * 1024) { - commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB,请压缩后重试', type: 'error'}) + commonDialog.alert({ title: 'Error', content: '文件大小不能超过3MB,请压缩后重试', type: 'error' }) } else { - $scope.promotionalFileProgress = {value: 0}; + $scope.promotionalFileProgress = { value: 0 }; Upload.upload({ url: '/attachment/files', - data: {file: file} + data: { file: file } }).then(function (resp) { $scope.uploadFile = {}; delete $scope.promotionalFileProgress; @@ -4595,7 +4595,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter $scope.updateFile(); }, function (resp) { delete $scope.promotionalFileProgress; - commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'}) + commonDialog.alert({ title: 'Upload Failed', content: resp.data.message, type: 'error' }) }, function (evt) { $scope.promotionalFileProgress.value = parseInt(100 * evt.loaded / evt.total); }) @@ -4628,12 +4628,12 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter $scope.uploadDescFile = function (file) { if (file != null) { if (file.size > 3 * 1024 * 1024) { - commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB,请压缩后重试', type: 'error'}) + commonDialog.alert({ title: 'Error', content: '文件大小不能超过3MB,请压缩后重试', type: 'error' }) } else { - $scope.descFileProgress = {value: 0}; + $scope.descFileProgress = { value: 0 }; Upload.upload({ url: '/attachment/files', - data: {file: file} + data: { file: file } }).then(function (resp) { $scope.uploadFile = {}; delete $scope.descFileProgress; @@ -4641,7 +4641,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter $scope.updateFile(); }, function (resp) { delete $scope.descFileProgress; - commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'}) + commonDialog.alert({ title: 'Upload Failed', content: resp.data.message, type: 'error' }) }, function (evt) { $scope.descFileProgress.value = parseInt(100 * evt.loaded / evt.total); }) @@ -4651,17 +4651,17 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter $scope.saveIdInfo = function () { if (!$scope.file.upay_risk_level) { - commonDialog.alert({title: 'Error', content: '请选择商户风险等级', type: 'error'}); + commonDialog.alert({ title: 'Error', content: '请选择商户风险等级', type: 'error' }); return; } var config = {}; config.upay_risk_level = $scope.file.upay_risk_level; config.upay_risk_remark = $scope.file.upay_risk_remark; $http.put('/sys/partners/' + $scope.partner.client_moniker + '/mw_risk_info', config).then(function (resp) { - commonDialog.alert({title: 'Success', content: 'Risk Info Updated', type: 'success'}) + commonDialog.alert({ title: 'Success', content: 'Risk Info Updated', type: 'success' }) $state.reload(); }, function (resp) { - commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'}) + commonDialog.alert({ title: 'Error', content: resp.data.message, type: 'error' }) $state.reload(); }); }; @@ -4686,9 +4686,9 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter $state.go('partners.detail.files', { clientMoniker: $scope.partner.client_moniker, commitType: "card-payment" - }, {reload: true}); + }, { reload: true }); }, function (resp) { - commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'}); + commonDialog.alert({ title: 'Error', content: resp.data.message, type: 'error' }); }) } @@ -4707,19 +4707,19 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter $rootScope.complianceCheck.client_id = $scope.partner.client_id; if ($scope.file.upay_application_form == null || $scope.file.upay_application_form == '') { - commonDialog.alert({type: 'error', title: 'Error', content: '请补充商户申请表合规文件'}) + commonDialog.alert({ type: 'error', title: 'Error', content: '请补充商户申请表合规文件' }) $rootScope.complianceCheck.authFile = false; } else if ($scope.file.client_bank_file == null || $scope.file.client_bank_file == '') { - commonDialog.alert({type: 'error', title: 'Error', content: '请补六个月银行对账单合规文件'}) + commonDialog.alert({ type: 'error', title: 'Error', content: '请补六个月银行对账单合规文件' }) $rootScope.complianceCheck.authFile = false; } else if ($scope.file.client_company_file == null || $scope.file.client_company_file == '') { - commonDialog.alert({type: 'error', title: 'Error', content: '请补充当前公司信息摘录合规文件'}) + commonDialog.alert({ type: 'error', title: 'Error', content: '请补充当前公司信息摘录合规文件' }) $rootScope.complianceCheck.authFile = false; } else if ($scope.file.upay_driver_license == null || $scope.file.upay_driver_license == '') { - commonDialog.alert({type: 'error', title: 'Error', content: '请补充法人身份证明合规文件'}) + commonDialog.alert({ type: 'error', title: 'Error', content: '请补充法人身份证明合规文件' }) $rootScope.complianceCheck.authFile = false; } else if ($scope.file.kyc_utility_bill_file == null || $scope.file.kyc_utility_bill_file == '') { - commonDialog.alert({type: 'error', title: 'Error', content: '请补充家庭住址证明 (一个水电煤网账单)合规文件'}) + commonDialog.alert({ type: 'error', title: 'Error', content: '请补充家庭住址证明 (一个水电煤网账单)合规文件' }) $rootScope.complianceCheck.authFile = false; } @@ -4746,7 +4746,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter }); $state.reload(); }, function (resp) { - commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'}); + commonDialog.alert({ title: 'Error', content: resp.data.message, type: 'error' }); }) }) }; @@ -4760,12 +4760,12 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter $scope.uploadCompanyFile = function (file) { if (file != null) { if (file.size > 3 * 1024 * 1024) { - commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB,请压缩后重试', type: 'error'}) + commonDialog.alert({ title: 'Error', content: '文件大小不能超过3MB,请压缩后重试', type: 'error' }) } else { - $scope.bankFileProgress = {value: 0}; + $scope.bankFileProgress = { value: 0 }; Upload.upload({ url: '/attachment/files', - data: {file: file} + data: { file: file } }).then(function (resp) { delete $scope.bankFileProgress; $scope.file.file_company_info = resp.data.url; @@ -4777,7 +4777,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter } }, function (resp) { delete $scope.bankFileProgress; - commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'}) + commonDialog.alert({ title: 'Upload Failed', content: resp.data.message, type: 'error' }) }, function (evt) { $scope.bankFileProgress.value = parseInt(100 * evt.loaded / evt.total); }) @@ -4803,12 +4803,12 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter $scope.uploadIDFile = function (file) { if (file != null) { if (file.size > 3 * 1024 * 1024) { - commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB,请压缩后重试', type: 'error'}) + commonDialog.alert({ title: 'Error', content: '文件大小不能超过3MB,请压缩后重试', type: 'error' }) } else { - $scope.idFileProgress = {value: 0}; + $scope.idFileProgress = { value: 0 }; Upload.upload({ url: '/attachment/files', - data: {file: file} + data: { file: file } }).then(function (resp) { delete $scope.idFileProgress; $scope.file.file_id_info = resp.data.url; @@ -4820,7 +4820,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter } }, function (resp) { delete $scope.idFileProgress; - commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'}) + commonDialog.alert({ title: 'Upload Failed', content: resp.data.message, type: 'error' }) }, function (evt) { $scope.idFileProgress.value = parseInt(100 * evt.loaded / evt.total); }) @@ -4832,12 +4832,12 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter $scope.uploadBillFile = function (file) { if (file != null) { if (file.size > 3 * 1024 * 1024) { - commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB,请压缩后重试', type: 'error'}) + commonDialog.alert({ title: 'Error', content: '文件大小不能超过3MB,请压缩后重试', type: 'error' }) } else { - $scope.billFileProgress = {value: 0}; + $scope.billFileProgress = { value: 0 }; Upload.upload({ url: '/attachment/files', - data: {file: file} + data: { file: file } }).then(function (resp) { delete $scope.billFileProgress; $scope.file.utility_bill_info = resp.data.url; @@ -4849,7 +4849,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter } }, function (resp) { delete $scope.billFileProgress; - commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'}) + commonDialog.alert({ title: 'Upload Failed', content: resp.data.message, type: 'error' }) }, function (evt) { $scope.billFileProgress.value = parseInt(100 * evt.loaded / evt.total); }) @@ -4875,7 +4875,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter }); $state.reload(); }, function (resp) { - commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'}); + commonDialog.alert({ title: 'Error', content: resp.data.message, type: 'error' }); }) }) }; @@ -4889,7 +4889,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter }); $state.reload(); }, function (resp) { - commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'}); + commonDialog.alert({ title: 'Error', content: resp.data.message, type: 'error' }); }) } @@ -4938,7 +4938,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter $scope.subSearchText = subSearchText; params.searchText = subSearchText; } - $http.get('/sys/partners/' + $scope.partner.client_moniker + '/sub_clients/page', {params: params}).then(function (resp) { + $http.get('/sys/partners/' + $scope.partner.client_moniker + '/sub_clients/page', { params: params }).then(function (resp) { var clientList = resp.data.data; $scope.subClientPagination = resp.data.pagination; clientList.forEach(function (client) { @@ -5071,7 +5071,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter if ($scope.isAll) { delete params.client_ids; } - $http.get('/sys/partners/' + clientMoniker + '/lists_settlements', {params: params}).then(function (resp) { + $http.get('/sys/partners/' + clientMoniker + '/lists_settlements', { params: params }).then(function (resp) { $scope.settlementLogs = resp.data.data; $scope.padding = resp.data.padding; $scope.pagination = resp.data.pagination; @@ -5187,7 +5187,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter $scope.chooseLast7Days(); }]); app.controller('managerSettlementDetailCtrl', ['$scope', 'detail', 'detail_id', '$http', function ($scope, detail, detail_id, $http) { - $scope.ctrl = {channel: null}; + $scope.ctrl = { channel: null }; $scope.show = true; $scope.report = detail.data; $scope.report.total_charge = Decimal.add($scope.report.total_charge, $scope.report.tax_amount).toFixed(2); @@ -5204,7 +5204,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter $scope.channelAndDayOfAnalysis(1); }]); app.controller('managerSettlementDetailOfMergeSettleCtrl', ['$scope', 'detail', 'client_id', '$http', function ($scope, detail, client_id, $http) { - $scope.ctrl = {channel: null}; + $scope.ctrl = { channel: null }; $scope.show = true; $scope.report = detail.data; $scope.report.total_charge = Decimal.add($scope.report.total_charge, $scope.report.tax_amount).toFixed(2); @@ -5215,7 +5215,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter app.controller('productCtrl', ['$scope', '$http', '$uibModal', 'commonDialog', '$state', 'Upload', 'wechatGoodMcc', function ($scope, $http, $uibModal, commonDialog, $state, Upload, wechatGoodMcc) { $scope.importShow = 0; $scope.pagination = {}; - $scope.params = {text_type: 'all', search_text: null}; + $scope.params = { text_type: 'all', search_text: null }; $scope.wechatMccIndustries = wechatGoodMcc.configs(); $scope.loadProducts = function () { $http.get('/sys/product/' + $scope.partner.client_moniker + '/list').then(function (resp) { @@ -5280,13 +5280,200 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter } } }]); + // Merchant Id Management app.controller('subMerchantIdApplicaitonsCtrl', ['$scope', '$http', '$uibModal', '$state', 'commonDialog', '$sce', function ($scope, $http, $uibModal, $state, commonDialog, $sce) { + $scope.loadPartnerInfo = function () { + $http.get('/sys/partners/' + $scope.partner.client_moniker).then(function (resp) { + $scope.partnerInfo = resp.data; + $scope.doSwitchCommonSubMerchantId(); + }) + }; + $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 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) { + commonDialog.alert({ + title: 'Wechat Apply Status(' + resp.data.apply_status + ")", + content: resp.data.response_str, + type: 'info' + }) + $scope.loadPartnerInfo(); + }) + } + // history + $scope.showSubMerchantLogs = function () { + $uibModal.open({ + templateUrl: '/static/payment/partner/templates/client_sub_merchant_id_log.html', + controller: 'clientSubMerchantIdLogCtrl', + size: 'lg', + resolve: { + logs: ['$http', function ($http) { + return $http.get('/sys/partners/' + $scope.partner.client_moniker + '/get_sub_merchant_id_logs'); + }] + } + }) + }; + // 刷新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() + }, function (resp) { + commonDialog.alert({ title: 'Error', content: resp.data.message, type: 'error' }) + }); + }; + // switch开关 + $scope.doSwitchCommonSubMerchantId = function () { + $("input[name='switch']").bootstrapSwitch({ + onText: "ON", + offText: "OFF", + size: 'mini', + state: $scope.partnerInfo.common_sub_merchant_id, + onSwitchChange: function (event, state) { + //监听switch change事件,可以根据状态把相应的业务逻辑代码写在这里 + $http.put('/sys/partners/' + $scope.partner.client_moniker + '/common_sub_merchant_id', { allow: state }).then(function () { + $scope.loadPartnerInfo(); + }, function (resp) { + commonDialog.alert({ + title: 'Failed to change common_sub_merchant_id permission status', + content: resp.data.message, + type: 'error' + }) + }) + } + }) + }; + // Alipay保存名称修改 + $scope.saveAliSubMerchantId = function () { + $http.put('/sys/partners/' + $scope.partner.client_moniker + '/ali_sub_merchant_id', { ali_sub_merchant_id: $scope.partnerInfo.ali_sub_merchant_id }).then(function (resp) { + commonDialog.alert({ + title: 'Success', + content: 'Modify Ali Sub Merchant ID successfully', + type: 'success' + }); + $scope.loadPartnerInfo(); + }, function (resp) { + commonDialog.alert({ title: 'Error', content: resp.data.message, type: 'error' }) + }); + }; + // 刷新Alipay + $scope.queryAlipayGms = function () { + $http.get('/sys/partners/' + $scope.partner.client_moniker + '/query/alipay_gms').then(function (resp) { + commonDialog.alert({ title: 'Success', content: resp.data.result_status, type: 'success' }); + }, function (resp) { + commonDialog.alert({ title: 'Error', content: "查询失败:" + resp.data.message, type: 'error' }); + }) + }; + // 刷新AlipayOnline + $scope.queryAlipayOnlineGms = function () { + $http.get('/sys/partners/' + $scope.partner.client_moniker + '/query/alipayOnline_gms').then(function (resp) { + commonDialog.alert({ title: 'Success', content: resp.data.result_status, type: 'success' }); + }, function (resp) { + commonDialog.alert({ title: 'Error', content: "查询失败:" + resp.data.message, type: 'error' }); + }) + } + // Alipay进件 + $scope.submitAlipaySubId = function () { + $http.get('/sys/partners/' + $scope.partner.client_moniker + '/query/alipay_gms_json').then(function (resp) { + $scope.alipay_gms_json = resp.data; + commonDialog.confirm({ + title: 'Warning', + content: '是否使用该商户的现有信息进件?', + json: $scope.alipay_gms_json + }).then(function () { + $http.post('/sys/partners/' + $scope.partner.client_moniker + '/register/alipay_gms').then(function () { + commonDialog.alert({ title: 'Success', content: 'Alipay进件成功', type: 'success' }); + }, function (resp) { + commonDialog.alert({ title: 'Error', content: "进件失败:" + resp.data.message, type: 'error' }); + }) + }); + }) + }; + // AlipayOnline进件 + $scope.submitAlipayOnlineSubId = function () { + $http.get('/sys/partners/' + $scope.partner.client_moniker + '/query/alipayOnline_gms_json').then(function (resp) { + $scope.alipayOnline_gms_json = resp.data; + commonDialog.confirm({ + title: 'Warning', + content: '是否使用该商户的现有信息进件?', + json: $scope.alipayOnline_gms_json + }).then(function () { + $http.post('/sys/partners/' + $scope.partner.client_moniker + '/register/alipayOnline_gms').then(function () { + commonDialog.alert({ title: 'Success', content: '提示:AlipayOnline进件成功', type: 'success' }); + }, function (resp) { + commonDialog.alert({ title: 'Error', content: "进件失败:" + resp.data.message, type: 'error' }); + }); + }) + }); + }; + // use sub_merchant_id + $scope.useSubMerchantId = function (sub_merchant_id) { + $http.put('/sys/partners/' + $scope.partner.client_moniker + '/payment_config', { sub_merchant_id: sub_merchant_id }).then(function (resp) { + commonDialog.alert({ + title: 'Success', + content: 'Modify Wechat Sub Merchant ID successfully', + type: 'success' + }); + $state.reload(); + }, function (resp) { + commonDialog.alert({ title: 'Error', content: resp.data.message, type: 'error' }) + }); + } + // 查看sub_merchant_id详情 + $scope.checkDetail = function (merchantInfo, channel) { + $uibModal.open({ + templateUrl: '/static/payment/partner/templates/sub_merchant_detail.html', + controller: 'subMerchantDetailCtrl', + resolve: { + subMerchantInfo: function () { + return merchantInfo + }, + channel: function () { + return channel + } + } + }) + } + // 修改sub_merchant_id + $scope.modifySubMerchantId = function (subMerchantId, channel) { + $uibModal.open({ + templateUrl: '/static/payment/partner/templates/md_sub_merchant_id.html', + controller: 'ModifysubMerchantIdCtrl', + resolve: { + clientMoniker: function () { + return $scope.partner.client_moniker + }, + merchantId: function () { + return subMerchantId + }, + channel: function () { + return channel + } + } + }).result.then(function () { + $scope.loadPartnerInfo() + commonDialog.alert({ + title: 'Success', + content: 'Modify successfully', + type: 'success' + }); + }) + } + $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) { + $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) { @@ -5300,29 +5487,17 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter $scope.partner.cardInfo = resp.data; }); }; - $scope.useSubMerchantId = function (sub_merchant_id) { - $http.put('/sys/partners/' + $scope.partner.client_moniker + '/payment_config', {sub_merchant_id: sub_merchant_id}).then(function (resp) { - commonDialog.alert({ - title: 'Success', - content: 'Modify Wechat Sub Merchant ID successfully', - type: 'success' - }); - $state.reload(); - }, function (resp) { - commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'}) - }); - } - $scope.updateSubMerchantId = function(merchant_app_id){ + $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) { + 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); + return $http.get('/sys/partners/' + $scope.partner.client_moniker + '/get_merchant_ids/' + merchant_app_id); }] } }).result.then(function () { @@ -5330,7 +5505,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter }) } $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) { + $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', @@ -5338,11 +5513,11 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter }); $state.reload(); }, function (resp) { - commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'}) + 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) { + $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', @@ -5350,7 +5525,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter }); $state.reload(); }, function (resp) { - commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'}) + commonDialog.alert({ title: 'Error', content: resp.data.message, type: 'error' }) }); } /*$scope.applyWxSubMerchantId = function () { @@ -5402,7 +5577,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter }); $scope.partner.cardInfo = res.data; }, function (resp) { - commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'}); + commonDialog.alert({ title: 'Error', content: resp.data.message, type: 'error' }); }) }) }); @@ -5483,8 +5658,8 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter $scope.apply_sub_merchant_id = resp.data; $scope.$close(); if (subMerchantInfo.sub_merchant_id != null) { - commonDialog.confirm({title: 'Confirm', content: '已申请成功,是否确认使用'}).then(function () { - $http.put('/sys/partners/' + $scope.subMerchantInfo.client_moniker + '/payment_config', {sub_merchant_id: $scope.apply_sub_merchant_id}).then(function (resp) { + commonDialog.confirm({ title: 'Confirm', content: '已申请成功,是否确认使用' }).then(function () { + $http.put('/sys/partners/' + $scope.subMerchantInfo.client_moniker + '/payment_config', { sub_merchant_id: $scope.apply_sub_merchant_id }).then(function (resp) { commonDialog.alert({ title: 'Success', content: 'Modify Wechat Sub Merchant ID successfully', @@ -5492,11 +5667,11 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter }); $state.reload(); }, function (resp) { - commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'}) + commonDialog.alert({ title: 'Error', content: resp.data.message, type: 'error' }) }); }) } else { - $http.put('/sys/partners/' + $scope.subMerchantInfo.client_moniker + '/payment_config', {sub_merchant_id: $scope.apply_sub_merchant_id}).then(function (resp) { + $http.put('/sys/partners/' + $scope.subMerchantInfo.client_moniker + '/payment_config', { sub_merchant_id: $scope.apply_sub_merchant_id }).then(function (resp) { commonDialog.alert({ title: 'Success', content: 'Apply Success And Modify Wechat Sub Merchant ID successfully', @@ -5504,47 +5679,83 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter }); $state.reload(); }, function (resp) { - commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'}) + commonDialog.alert({ title: 'Error', content: resp.data.message, type: 'error' }) }); } }, function (resp) { - commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'}) + commonDialog.alert({ title: 'Error', content: resp.data.message, type: 'error' }) }) } }]); - app.controller('newApplyWxSubMerchantIdCtrl', ['$scope', '$http', '$uibModal', '$state', 'subMerchantInfo', '$filter', 'merchantIds', 'commonDialog','wechatGoodMcc','businessTypesMap', function ($scope, $http, $uibModal, $state, subMerchantInfo, $filter, merchantIds, commonDialog,wechatGoodMcc,businessTypesMap) { + // 展示信息 + app.controller('subMerchantDetailCtrl', ['$scope', '$http', '$uibModal', '$state', 'commonDialog', 'subMerchantInfo', 'channel', function ($scope, $http, $uibModal, $state, commonDialog, subMerchantInfo, channel) { + $scope.channel = channel + $scope.subMerchantInfo = subMerchantInfo + }]); + // 修改sub_merchant_id + app.controller('ModifysubMerchantIdCtrl', ['$scope', '$http', '$uibModal', '$state', 'commonDialog', 'clientMoniker', 'merchantId', 'channel', function ($scope, $http, $uibModal, $state, commonDialog, clientMoniker, merchantId, channel) { + console.log(merchantId, channel); + $scope.merchantId = merchantId + $scope.flag = false + $scope.confirm = function () { + $scope.flag = true + if (channel === 'Wechat') { + $http.put('/sys/partners/' + clientMoniker + '/payment_config', { sub_merchant_id: merchantId }).then(function (resp) { + $scope.$close(); + }, function (resp) { + $scope.flag = false + commonDialog.alert({ title: 'Error', content: resp.data.message, type: 'error' }) + }); + } else if (channel === 'Alipay') { + $http.put('/sys/partners/' + clientMoniker + '/ali_sub_merchant_id', { ali_sub_merchant_id: merchantId }).then(function (resp) { + $scope.$close(); + }, function (resp) { + $scope.flag = false + commonDialog.alert({ title: 'Error', content: resp.data.message, type: 'error' }) + }); + } else if (channel = 'AlipayOnline') { + $http.put('/sys/partners/' + clientMoniker + '/ali_sub_merchant_id', { ali_sub_merchant_id: merchantId }).then(function (resp) { + $scope.$close(); + }, function (resp) { + $scope.flag = false + commonDialog.alert({ title: 'Error', content: resp.data.message, type: 'error' }) + }); + } + } + }]); + app.controller('newApplyWxSubMerchantIdCtrl', ['$scope', '$http', '$uibModal', '$state', 'subMerchantInfo', '$filter', 'merchantIds', 'commonDialog', 'wechatGoodMcc', 'businessTypesMap', function ($scope, $http, $uibModal, $state, subMerchantInfo, $filter, merchantIds, commonDialog, wechatGoodMcc, businessTypesMap) { $scope.wxIndustries = angular.copy(wxMerchantIndustries); $scope.subMerchantInfo = angular.copy(subMerchantInfo); - $scope.subMerchantInfo.company_register_no=subMerchantInfo.abn?subMerchantInfo.abn:subMerchantInfo.acn; + $scope.subMerchantInfo.company_register_no = subMerchantInfo.abn ? subMerchantInfo.abn : subMerchantInfo.acn; $scope.wechatMccIndustries = wechatGoodMcc.configs(); $scope.merchantIds = merchantIds.data; - $scope.businessTypesMap=businessTypesMap.configs(); + $scope.businessTypesMap = businessTypesMap.configs(); if ($scope.subMerchantInfo.client_pay_type) { - if ($scope.subMerchantInfo.client_pay_type.indexOf('1') >= 0&&$scope.subMerchantInfo.client_pay_type.indexOf('2') >= 0) { - $scope.subMerchantInfo.business_type='BOTH'; + if ($scope.subMerchantInfo.client_pay_type.indexOf('1') >= 0 && $scope.subMerchantInfo.client_pay_type.indexOf('2') >= 0) { + $scope.subMerchantInfo.business_type = 'BOTH'; } else if ($scope.subMerchantInfo.client_pay_type.indexOf('1') >= 0) { - $scope.subMerchantInfo.business_type='ONLINE'; + $scope.subMerchantInfo.business_type = 'ONLINE'; } - else if ($scope.subMerchantInfo.client_pay_type.indexOf('2') >= 0) { - $scope.subMerchantInfo.business_type='OFFLINE'; + else if ($scope.subMerchantInfo.client_pay_type.indexOf('2') >= 0) { + $scope.subMerchantInfo.business_type = 'OFFLINE'; } - }else{ - $scope.subMerchantInfo.business_type='BOTH'; + } else { + $scope.subMerchantInfo.business_type = 'BOTH'; } - if($scope.subMerchantInfo.industry) { + if ($scope.subMerchantInfo.industry) { $scope.subMerchantInfo.industry = $filter('newWxMerchantsFilter')($scope.subMerchantInfo.industry); } - if($scope.subMerchantInfo.mc_code) { - $scope.subMerchantInfo.mcc_code =$scope.subMerchantInfo. mc_code; + if ($scope.subMerchantInfo.mc_code) { + $scope.subMerchantInfo.mcc_code = $scope.subMerchantInfo.mc_code; } - if(subMerchantInfo.certificat_expire_date) { - var datestr = subMerchantInfo.certificat_expire_date.replace(/-/g, '/'); - $scope.subMerchantInfo.certificat_expire_date=new Date(datestr); + if (subMerchantInfo.certificat_expire_date) { + var datestr = subMerchantInfo.certificat_expire_date.replace(/-/g, '/'); + $scope.subMerchantInfo.certificat_expire_date = new Date(datestr); } - if($scope.subMerchantInfo.business_structure ){ - $scope.subMerchantInfo.merchant_type=$scope.subMerchantInfo.business_structure == 'Company'? "ENTERPRISE":"INDIVIDUAL"; + if ($scope.subMerchantInfo.business_structure) { + $scope.subMerchantInfo.merchant_type = $scope.subMerchantInfo.business_structure == 'Company' ? "ENTERPRISE" : "INDIVIDUAL"; } $scope.saveAppliy = function (form) { $scope.errmsg = null; @@ -5558,37 +5769,37 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter } // var merchant_type = $scope.subMerchantInfo.business_structure == 'Company'? 1:2; var params = { - company_name : $scope.subMerchantInfo.company_name, - merchant_id : $scope.subMerchantInfo.merchant_id, - short_name : $scope.subMerchantInfo.short_name, - office_phone : $scope.subMerchantInfo.office_phone, - contact_person : $scope.subMerchantInfo.contact_person, - contact_phone : $scope.subMerchantInfo.contact_phone, - company_phone : $scope.subMerchantInfo.company_phone, - contact_email : $scope.subMerchantInfo.contact_email, - industry : $scope.subMerchantInfo.industry, - company_website : $scope.subMerchantInfo.company_website, + company_name: $scope.subMerchantInfo.company_name, + merchant_id: $scope.subMerchantInfo.merchant_id, + short_name: $scope.subMerchantInfo.short_name, + office_phone: $scope.subMerchantInfo.office_phone, + contact_person: $scope.subMerchantInfo.contact_person, + contact_phone: $scope.subMerchantInfo.contact_phone, + company_phone: $scope.subMerchantInfo.company_phone, + contact_email: $scope.subMerchantInfo.contact_email, + industry: $scope.subMerchantInfo.industry, + company_website: $scope.subMerchantInfo.company_website, merchant_type: $scope.subMerchantInfo.merchant_type, - mcc_code : $scope.subMerchantInfo.mcc_code, + mcc_code: $scope.subMerchantInfo.mcc_code, address: $scope.subMerchantInfo.address, - business_type:$scope.subMerchantInfo.business_type + business_type: $scope.subMerchantInfo.business_type }; - if(params.business_type=='ONLINE'){ - params.address=null; + if (params.business_type == 'ONLINE') { + params.address = null; } - else if(params.business_type=='OFFLINE'){ - params.company_website=null; + else if (params.business_type == 'OFFLINE') { + params.company_website = null; } - if(params.merchant_type == 'ENTERPRISE'){ + if (params.merchant_type == 'ENTERPRISE') { params.director_name = $scope.subMerchantInfo.director_name; params.director_id_number = $scope.subMerchantInfo.director_id_number; params.company_register_no = $scope.subMerchantInfo.company_register_no; params.certificat_expire_date = $scope.subMerchantInfo.certificat_expire_date; - if($scope.subMerchantInfo.certificat_expire_date) { - params.certificat_expire_date = $filter('dateConversionStr')($scope.subMerchantInfo.certificat_expire_date) + if ($scope.subMerchantInfo.certificat_expire_date) { + params.certificat_expire_date = $filter('dateConversionStr')($scope.subMerchantInfo.certificat_expire_date) } - }else{ + } else { params.principal_name = $scope.subMerchantInfo.principal_name; params.principal_id_number = $scope.subMerchantInfo.principal_id_number; } @@ -5597,8 +5808,8 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter $scope.apply_sub_merchant_id = resp.data; $scope.$close(); if (subMerchantInfo.sub_merchant_id != null) { - commonDialog.confirm({title: 'Confirm', content: '已申请成功,是否确认使用'}).then(function () { - $http.put('/sys/partners/' + $scope.subMerchantInfo.client_moniker + '/payment_config', {sub_merchant_id: $scope.apply_sub_merchant_id}).then(function (resp) { + commonDialog.confirm({ title: 'Confirm', content: '已申请成功,是否确认使用' }).then(function () { + $http.put('/sys/partners/' + $scope.subMerchantInfo.client_moniker + '/payment_config', { sub_merchant_id: $scope.apply_sub_merchant_id }).then(function (resp) { commonDialog.alert({ title: 'Success', content: 'Modify Wechat Sub Merchant ID successfully', @@ -5606,11 +5817,11 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter }); $state.reload(); }, function (resp) { - commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'}) + commonDialog.alert({ title: 'Error', content: resp.data.message, type: 'error' }) }); }) } else { - $http.put('/sys/partners/' + $scope.subMerchantInfo.client_moniker + '/payment_config', {sub_merchant_id: $scope.apply_sub_merchant_id}).then(function (resp) { + $http.put('/sys/partners/' + $scope.subMerchantInfo.client_moniker + '/payment_config', { sub_merchant_id: $scope.apply_sub_merchant_id }).then(function (resp) { commonDialog.alert({ title: 'Success', content: 'Apply Success And Modify Wechat Sub Merchant ID successfully', @@ -5618,35 +5829,35 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter }); $state.reload(); }, function (resp) { - commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'}) + commonDialog.alert({ title: 'Error', content: resp.data.message, type: 'error' }) }); } }, function (resp) { - commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'}) + commonDialog.alert({ title: 'Error', content: resp.data.message, type: 'error' }) }) } }]); - app.controller('updateApplyWxSubMerchantIdCtrl', ['$scope', '$http', '$uibModal', '$state', 'subMerchantInfo', '$filter', 'merchantIds', 'commonDialog','wechatGoodMcc','merchantInfo', 'businessTypesMap',function ($scope, $http, $uibModal, $state, subMerchantInfo, $filter, merchantIds, commonDialog,wechatGoodMcc,merchantInfo,businessTypesMap) { + app.controller('updateApplyWxSubMerchantIdCtrl', ['$scope', '$http', '$uibModal', '$state', 'subMerchantInfo', '$filter', 'merchantIds', 'commonDialog', 'wechatGoodMcc', 'merchantInfo', 'businessTypesMap', function ($scope, $http, $uibModal, $state, subMerchantInfo, $filter, merchantIds, commonDialog, wechatGoodMcc, merchantInfo, businessTypesMap) { $scope.wxIndustries = angular.copy(wxMerchantIndustries); $scope.subMerchantInfo = angular.copy(subMerchantInfo.data); $scope.merchantInfo = angular.copy(merchantInfo); $scope.wechatMccIndustries = wechatGoodMcc.configs(); $scope.merchantIds = merchantIds.data; - $scope.businessTypesMap=businessTypesMap.configs(); + $scope.businessTypesMap = businessTypesMap.configs(); - if($scope.subMerchantInfo.business_structure ){ - $scope.subMerchantInfo.merchant_type=$scope.subMerchantInfo.business_structure == 'Company'? "ENTERPRISE":"INDIVIDUAL"; + if ($scope.subMerchantInfo.business_structure) { + $scope.subMerchantInfo.merchant_type = $scope.subMerchantInfo.business_structure == 'Company' ? "ENTERPRISE" : "INDIVIDUAL"; } - if($scope.subMerchantInfo.industry) { + if ($scope.subMerchantInfo.industry) { $scope.subMerchantInfo.industry = $filter('newWxMerchantsFilter')($scope.subMerchantInfo.industry); } - if($scope.subMerchantInfo.mcc_code ){ - $scope.subMerchantInfo.mcc_code=parseInt($scope.subMerchantInfo.mcc_code); + if ($scope.subMerchantInfo.mcc_code) { + $scope.subMerchantInfo.mcc_code = parseInt($scope.subMerchantInfo.mcc_code); } - if($scope.subMerchantInfo.certificat_expire_date) { + if ($scope.subMerchantInfo.certificat_expire_date) { // var datestr = subMerchantInfo.certificat_expire_date.replace(/-/g, '/'); - $scope.subMerchantInfo.certificat_expire_date=new Date($scope.subMerchantInfo.certificat_expire_date); + $scope.subMerchantInfo.certificat_expire_date = new Date($scope.subMerchantInfo.certificat_expire_date); } $scope.updateApply = function (form) { $scope.errmsg = null; @@ -5659,44 +5870,44 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter return; } var params = { - company_name : $scope.subMerchantInfo.company_name, - merchant_id : $scope.subMerchantInfo.merchant_id, - short_name : $scope.subMerchantInfo.short_name, - office_phone : $scope.subMerchantInfo.office_phone, - contact_person : $scope.subMerchantInfo.contact_person, - contact_phone : $scope.subMerchantInfo.contact_phone, - company_phone : $scope.subMerchantInfo.company_phone, - contact_email : $scope.subMerchantInfo.contact_email, - industry : $scope.subMerchantInfo.industry, - company_website : $scope.subMerchantInfo.company_website, + company_name: $scope.subMerchantInfo.company_name, + merchant_id: $scope.subMerchantInfo.merchant_id, + short_name: $scope.subMerchantInfo.short_name, + office_phone: $scope.subMerchantInfo.office_phone, + contact_person: $scope.subMerchantInfo.contact_person, + contact_phone: $scope.subMerchantInfo.contact_phone, + company_phone: $scope.subMerchantInfo.company_phone, + contact_email: $scope.subMerchantInfo.contact_email, + industry: $scope.subMerchantInfo.industry, + company_website: $scope.subMerchantInfo.company_website, merchant_type: $scope.subMerchantInfo.merchant_type, - mcc_code : $scope.subMerchantInfo.mcc_code, + mcc_code: $scope.subMerchantInfo.mcc_code, address: $scope.subMerchantInfo.address, - business_type:$scope.subMerchantInfo.business_type + business_type: $scope.subMerchantInfo.business_type }; - if(params.business_type=='ONLINE'){ - params.address=null; + if (params.business_type == 'ONLINE') { + params.address = null; } - else if(params.business_type=='OFFLINE'){ - params.company_website=null; + else if (params.business_type == 'OFFLINE') { + params.company_website = null; } - if($scope.subMerchantInfo.merchant_type == 'ENTERPRISE'){ + if ($scope.subMerchantInfo.merchant_type == 'ENTERPRISE') { params.director_name = $scope.subMerchantInfo.director_name; params.director_id_number = $scope.subMerchantInfo.director_id_number; params.company_register_no = $scope.subMerchantInfo.company_register_no; params.certificat_expire_date = $scope.subMerchantInfo.certificat_expire_date; - if($scope.subMerchantInfo.certificat_expire_date) { - params.certificat_expire_date = $filter('dateConversionStr')($scope.subMerchantInfo.certificat_expire_date) + if ($scope.subMerchantInfo.certificat_expire_date) { + params.certificat_expire_date = $filter('dateConversionStr')($scope.subMerchantInfo.certificat_expire_date) } - }else{ + } else { params.principal_name = $scope.subMerchantInfo.principal_name; params.principal_id_number = $scope.subMerchantInfo.principal_id_number; } - $http.put('/sys/partners/' + $scope.merchantInfo.client_moniker + '/get_merchant_ids/'+$scope.subMerchantInfo.merchant_app_id, params).then(function (resp) { + $http.put('/sys/partners/' + $scope.merchantInfo.client_moniker + '/get_merchant_ids/' + $scope.subMerchantInfo.merchant_app_id, params).then(function (resp) { $scope.apply_sub_merchant_id = resp.data; $scope.$close(); - commonDialog.confirm({title: 'Confirm', content: '微信商户进件已修改成功!'}) + commonDialog.confirm({ title: 'Confirm', content: '微信商户进件已修改成功!' }) }); } }]); @@ -5817,21 +6028,21 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter $scope.uploadBusinessLicence = function (file) { if (file != null) { if (file.size > 3 * 1024 * 1024) { - commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB,请压缩后重试', type: 'error'}) + commonDialog.alert({ title: 'Error', content: '文件大小不能超过3MB,请压缩后重试', type: 'error' }) } else { - $scope.businessLicenceProgress = {value: 0}; + $scope.businessLicenceProgress = { value: 0 }; Upload.upload({ url: '/attachment/yeepayFiles', - data: {file: file} + data: { file: file } }).then(function (resp) { delete $scope.businessLicenceProgress; $scope.businessLicence = resp.data.path; merchantInfo['business_licence'] = resp.data.path; merchantId = resp.data.merchantId; - commonDialog.alert({title: 'Upload Success', content: 'Upload Success', type: 'success'}) + commonDialog.alert({ title: 'Upload Success', content: 'Upload Success', type: 'success' }) }, function (resp) { delete $scope.businessLicenceProgress; - commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'}) + commonDialog.alert({ title: 'Upload Failed', content: resp.data.message, type: 'error' }) }, function (evt) { $scope.businessLicenceProgress.value = parseInt(100 * evt.loaded / evt.total); }) @@ -5967,21 +6178,21 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter $scope.uploadDirectorPassport = function (file) { if (file != null) { if (file.size > 3 * 1024 * 1024) { - commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB,请压缩后重试', type: 'error'}) + commonDialog.alert({ title: 'Error', content: '文件大小不能超过3MB,请压缩后重试', type: 'error' }) } else { - $scope.directorPassportProgress = {value: 0}; + $scope.directorPassportProgress = { value: 0 }; Upload.upload({ url: '/attachment/yeepayFiles', - data: {file: file} + data: { file: file } }).then(function (resp) { delete $scope.directorPassportProgress; $scope.directorPassport = resp.data.path; $scope.directors.filePath = resp.data.path; merchantId = resp.data.merchantId; - commonDialog.alert({title: 'Upload Success', content: 'Upload Success', type: 'success'}) + commonDialog.alert({ title: 'Upload Success', content: 'Upload Success', type: 'success' }) }, function (resp) { delete $scope.directorPassportProgress; - commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'}) + commonDialog.alert({ title: 'Upload Failed', content: resp.data.message, type: 'error' }) }, function (evt) { $scope.directorPassportProgress.value = parseInt(100 * evt.loaded / evt.total); }) @@ -5992,21 +6203,21 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter $scope.uploadExecutivePassport = function (file) { if (file != null) { if (file.size > 3 * 1024 * 1024) { - commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB,请压缩后重试', type: 'error'}) + commonDialog.alert({ title: 'Error', content: '文件大小不能超过3MB,请压缩后重试', type: 'error' }) } else { - $scope.executivePassportProgress = {value: 0}; + $scope.executivePassportProgress = { value: 0 }; Upload.upload({ url: '/attachment/yeepayFiles', - data: {file: file} + data: { file: file } }).then(function (resp) { delete $scope.executivePassportProgress; $scope.executivePassport = resp.data.path; $scope.executives.filePath = resp.data.path; merchantId = resp.data.merchantId; - commonDialog.alert({title: 'Upload Success', content: 'Upload Success', type: 'success'}) + commonDialog.alert({ title: 'Upload Success', content: 'Upload Success', type: 'success' }) }, function (resp) { delete $scope.executivePassportProgress; - commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'}) + commonDialog.alert({ title: 'Upload Failed', content: resp.data.message, type: 'error' }) }, function (evt) { $scope.executivePassportProgress.value = parseInt(100 * evt.loaded / evt.total); }) @@ -6179,21 +6390,21 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter $scope.uploadBusinessLicence = function (file) { if (file != null) { if (file.size > 3 * 1024 * 1024) { - commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB,请压缩后重试', type: 'error'}) + commonDialog.alert({ title: 'Error', content: '文件大小不能超过3MB,请压缩后重试', type: 'error' }) } else { - $scope.businessLicenceProgress = {value: 0}; + $scope.businessLicenceProgress = { value: 0 }; Upload.upload({ url: '/attachment/yeepayFiles', - data: {file: file} + data: { file: file } }).then(function (resp) { delete $scope.businessLicenceProgress; $scope.businessLicence = resp.data.path; merchantInfo['business_licence'] = resp.data.path; merchantId = resp.data.merchantId; - commonDialog.alert({title: 'Upload Success', content: 'Upload Success', type: 'success'}) + commonDialog.alert({ title: 'Upload Success', content: 'Upload Success', type: 'success' }) }, function (resp) { delete $scope.businessLicenceProgress; - commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'}) + commonDialog.alert({ title: 'Upload Failed', content: resp.data.message, type: 'error' }) }, function (evt) { $scope.businessLicenceProgress.value = parseInt(100 * evt.loaded / evt.total); }) @@ -6329,21 +6540,21 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter $scope.uploadDirectorPassport = function (file) { if (file != null) { if (file.size > 3 * 1024 * 1024) { - commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB,请压缩后重试', type: 'error'}) + commonDialog.alert({ title: 'Error', content: '文件大小不能超过3MB,请压缩后重试', type: 'error' }) } else { - $scope.directorPassportProgress = {value: 0}; + $scope.directorPassportProgress = { value: 0 }; Upload.upload({ url: '/attachment/yeepayFiles', - data: {file: file} + data: { file: file } }).then(function (resp) { delete $scope.directorPassportProgress; $scope.directorPassport = resp.data.path; $scope.directors.filePath = resp.data.path; merchantId = resp.data.merchantId; - commonDialog.alert({title: 'Upload Success', content: 'Upload Success', type: 'success'}) + commonDialog.alert({ title: 'Upload Success', content: 'Upload Success', type: 'success' }) }, function (resp) { delete $scope.directorPassportProgress; - commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'}) + commonDialog.alert({ title: 'Upload Failed', content: resp.data.message, type: 'error' }) }, function (evt) { $scope.directorPassportProgress.value = parseInt(100 * evt.loaded / evt.total); }) @@ -6354,21 +6565,21 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter $scope.uploadExecutivePassport = function (file) { if (file != null) { if (file.size > 3 * 1024 * 1024) { - commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB,请压缩后重试', type: 'error'}) + commonDialog.alert({ title: 'Error', content: '文件大小不能超过3MB,请压缩后重试', type: 'error' }) } else { - $scope.executivePassportProgress = {value: 0}; + $scope.executivePassportProgress = { value: 0 }; Upload.upload({ url: '/attachment/yeepayFiles', - data: {file: file} + data: { file: file } }).then(function (resp) { delete $scope.executivePassportProgress; $scope.executivePassport = resp.data.path; $scope.executives.filePath = resp.data.path; merchantId = resp.data.merchantId; - commonDialog.alert({title: 'Upload Success', content: 'Upload Success', type: 'success'}) + commonDialog.alert({ title: 'Upload Success', content: 'Upload Success', type: 'success' }) }, function (resp) { delete $scope.executivePassportProgress; - commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'}) + commonDialog.alert({ title: 'Upload Failed', content: resp.data.message, type: 'error' }) }, function (evt) { $scope.executivePassportProgress.value = parseInt(100 * evt.loaded / evt.total); }) @@ -6426,13 +6637,13 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter } }]); app.controller('permissionClientCtrl', ['$scope', '$http', '$uibModal', '$state', '$filter', 'commonDialog', function ($scope, $http, $uibModal, $state, $filter, commonDialog) { - $scope.clientPermission = {client_moniker: $scope.partner.client_moniker}; + $scope.clientPermission = { client_moniker: $scope.partner.client_moniker }; $scope.loadPermissionList = function () { var params = angular.copy($scope.clientPermission); - $http.get('/sys/permission/list', {params: params}).then(function (resp) { + $http.get('/sys/permission/list', { params: params }).then(function (resp) { $scope.permissionList = resp.data; }, function (resp) { - commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'}) + commonDialog.alert({ title: 'Error', content: resp.data.message, type: 'error' }) }); }; $scope.loadPermissionList(1); @@ -6441,15 +6652,15 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter var params = angular.copy($scope.clientPermission); $http.post('/sys/permission/' + permission.id, params).then(function (resp) { }, function (resp) { - commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'}) + commonDialog.alert({ title: 'Error', content: resp.data.message, type: 'error' }) }) }; $scope.init = function () { - var params = {client_moniker: $scope.partner.client_moniker}; + var params = { client_moniker: $scope.partner.client_moniker }; $http.post('/sys/permission/init', params).then(function (resp) { }, function (resp) { - commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'}) + commonDialog.alert({ title: 'Error', content: resp.data.message, type: 'error' }) }) }; @@ -6523,8 +6734,8 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter title: 'Update ' + service.channel + ' Incremental Service Status', content: 'Are you sure update ' + service.channel + ' status?', choises: [ - {label: 'Submit', className: 'btn-success', key: 1}, - {label: 'Cancel', className: 'btn-warning', key: 0, dismiss: true} + { label: 'Submit', className: 'btn-success', key: 1 }, + { label: 'Cancel', className: 'btn-warning', key: 0, dismiss: true } ] }).then(function (choice) { if (choice == 1) { @@ -6537,7 +6748,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter }); $scope.initData(); }, function (resp) { - commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'}); + commonDialog.alert({ title: 'Error', content: resp.data.message, type: 'error' }); $scope.initData(); }) } @@ -6547,7 +6758,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter }]); app.controller('incrementalServiceDialogCtrl', ['$scope', '$http', 'params', 'commonDialog', function ($scope, $http, params, commonDialog) { $scope.model = {}; - $scope.ctrl = {sending: false}; + $scope.ctrl = { sending: false }; $scope.isCreate = true; $scope.initData = function () { $scope.isCreate = angular.copy(params.isCreate); @@ -6579,7 +6790,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter $scope.$close(); }, function (resp) { $scope.ctrl.sending = false; - commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'}); + commonDialog.alert({ title: 'Error', content: resp.data.message, type: 'error' }); }) } @@ -6740,7 +6951,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter } }); - app.filter('wechatMcc',['wechatGoodMcc', function (wechatGoodMcc) { + app.filter('wechatMcc', ['wechatGoodMcc', function (wechatGoodMcc) { return function (values) { var industry = ''; angular.forEach(wechatGoodMcc.configs(), function (wxMerchant) { @@ -6785,22 +6996,22 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter return value + (tail || ' …'); }; }); - app.filter('dateConversionStr',function () { + app.filter('dateConversionStr', function () { - return function (date) { - var year = date.getFullYear(); //获取完整的年份(4位,1970-????) - var month =date.getMonth() + 1; //获取当前月份(0-11,0代表1月) - var day = date.getDate(); //获取当前日(1-31) - if (month < 10) { - month = "0" + month; - } - if (day < 10) { - day = "0" + day; - } - var dateString = year + "-" + month + "-" + day; - return dateString; - }; - } + return function (date) { + var year = date.getFullYear(); //获取完整的年份(4位,1970-????) + var month = date.getMonth() + 1; //获取当前月份(0-11,0代表1月) + var day = date.getDate(); //获取当前日(1-31) + if (month < 10) { + month = "0" + month; + } + if (day < 10) { + day = "0" + day; + } + var dateString = year + "-" + month + "-" + day; + return dateString; + }; + } ); return app; }); diff --git a/src/main/ui/static/payment/partner/templates/md_sub_merchant_id.html b/src/main/ui/static/payment/partner/templates/md_sub_merchant_id.html new file mode 100644 index 000000000..aaee60327 --- /dev/null +++ b/src/main/ui/static/payment/partner/templates/md_sub_merchant_id.html @@ -0,0 +1,23 @@ + + + + \ No newline at end of file diff --git a/src/main/ui/static/payment/partner/templates/partner_payment_info.html b/src/main/ui/static/payment/partner/templates/partner_payment_info.html index ba38a51d2..ee507d95d 100644 --- a/src/main/ui/static/payment/partner/templates/partner_payment_info.html +++ b/src/main/ui/static/payment/partner/templates/partner_payment_info.html @@ -4,28 +4,33 @@
-
+
@@ -102,19 +114,22 @@
AUD
+ title="Max Order Amount">
-
-
-
@@ -126,15 +141,18 @@

{{paymentInfo.customer_surcharge_rate||'Not Configure'}} - +

+ title="Customer Surcharge Rate" max="{{paymentInfo.max_customer_surcharge_rate}}" + min="{{paymentInfo.min_customer_surcharge_rate}}" name="customer_surcharge_rate">
%
-
@@ -144,12 +162,15 @@
-
-

valid range({{paymentInfo.min_customer_surcharge_rate}}%~{{paymentInfo.max_customer_surcharge_rate}}%)

+

valid + range({{paymentInfo.min_customer_surcharge_rate}}%~{{paymentInfo.max_customer_surcharge_rate}}%) +

@@ -158,13 +179,15 @@

{{paymentInfo.order_expiry_config||'Not Configure'}} - +

+ title="Prevent not enough refund">
-
@@ -177,10 +200,10 @@
- - - - + + + +
@@ -194,32 +217,37 @@
- +
- +
- +
- +
- +
@@ -239,7 +267,8 @@
- +
@@ -255,13 +284,13 @@ Pre Authorization + uib-tooltip="Pre Authorize means this bill will not be settled until completion">

@@ -271,26 +300,29 @@
@@ -306,28 +338,33 @@
+ switch-change="toggleGateway()">
- +
- +
- +

- If client have already attached surcharge in their own system, ignore this choice.
- It is recommended to notice customers about they will pay addition money as surcharge in the payment page.
+ If client have already attached surcharge in their own system, ignore + this choice.
+ It is recommended to notice customers about they will pay addition + money as surcharge in the payment page.
如果商户已有系统已经自动添加了手续费,请忽略本选项
建议使用此功能的商户在自有系统支付页中提示用户将会支付额外的手续费

@@ -401,25 +438,30 @@
- +
-
@@ -427,20 +469,22 @@
- @@ -448,8 +492,10 @@
- - + +
@@ -467,14 +513,14 @@
+ switch-change="switchInternationalCard()">
+ switch-change="switchThreeDS()">
@@ -490,13 +536,14 @@
+ switch-change="toggleOffline()">
- +
@@ -511,7 +558,7 @@
+ switch-change="toggleRefund()">
@@ -519,7 +566,7 @@
+ switch-change="togglePreRefund()">
@@ -534,10 +581,9 @@

+ ng-model="paymentInfo.refund_credit_line">
-
@@ -558,10 +604,10 @@ class="fa fa-edit">

- +
-
@@ -586,14 +632,14 @@
+ switch-change="toggleRequireCustInfo()">
+ switch-change="toggleRequireRemark()">
@@ -602,23 +648,24 @@
Ext Config
-
-
+
+
+ ng-change="extChangeParam(param.name,param.value)">

{{param.value}} - +

+ title="Prevent not enough refund">
-
+
\ No newline at end of file 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 new file mode 100644 index 000000000..0fc613ac1 --- /dev/null +++ b/src/main/ui/static/payment/partner/templates/sub_merchant_detail.html @@ -0,0 +1,107 @@ +
+
+
    +
  • + Sub Merchant Id + {{subMerchantInfo.sub_merchant_id}} +
  • +
  • + Apply Time + +
  • +
  • + Merchant Short Name + {{subMerchantInfo.merchant_shortname | cut:true:20:'...'}} +
  • +
  • + Business Category + {{subMerchantInfo.business_category | newWxMerchants}} +
  • +
  • + Mcc Code + {{subMerchantInfo.mcc_code | wechatMcc }} +
  • +
  • + Operator + +
  • +
+
    +
  • + Sub Merchant Id + {{subMerchantInfo.cardInfo.rpMerchantId}} +
  • +
  • + Name + +
  • +
  • + Company Name + {{subMerchantInfo.cardInfo.company_name}} +
  • +
  • + Address + {{subMerchantInfo.cardInfo.address | newWxMerchants}} +
  • +
  • + Suburb + {{subMerchantInfo.cardInfo.suburb}} +
  • +
  • + Postcode + +
  • +
  • + State + +
  • +
  • + Abn + +
  • +
  • + Email + +
  • +
  • + Contact Name + +
  • +
  • + Phone + +
  • +
  • + BSB + +
  • +
  • + Account No + +
  • +
  • + Account Name + +
  • +
  • + Website + +
  • +
  • + Timezone + +
  • +
  • + Category + +
  • +
+
+
+ + \ No newline at end of file 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 54ac0ab8c..17aa0d0b0 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 @@ -1,19 +1,21 @@ -
-
-
-
-
-
-

- Wechat Sub Merchant Id : none - -

- +
+ +
+
+
+
+
+
+
+
+ +
+ Wechat : + none + +
+ + +
+ +
+ + + +
+
+
+
+ + + Merchant ID : + {{partnerInfo.merchant_id | choose_merchant_id}} + + + + + history + + + +
+
+ Wechat Institution Merchant Id : + + {{partnerInfo.wechat_institution_merchant_id||'初始化'}} + + +
+ + Common Sub Merchant Id : + + +
+
    +
  • + Sub Merchant Id : {{id_apply.sub_merchant_id}} + (当前使用) + + + use + detail + +
  • +
+ +
-
-
-

List of Sub Merchant Id

-
-
-
    -
  • - Sub Merchant Id - (当前使用){{id_apply.sub_merchant_id}} -
  • -
  • - Apply Time - -
  • -
  • - Merchant Short Name - {{id_apply.merchant_shortname | cut:true:20:' ...'}} -
  • -
  • - Business Category - {{id_apply.business_category | newWxMerchants}} -
  • -
  • - Mcc Code - {{id_apply.mcc_code | wechatMcc }} -
  • -
  • - Operator - -
  • -
-
-
- - - - - +
+
+
+ +
+
+
+
+
+
+
+
+ +
+ Alipay : + none +
+ + +
+
+ + + +
+
+
+
+
+ No Data
@@ -91,108 +246,225 @@
-
+ +
+
+
+
+
+
+
+
+ +
+ AlipayOnline : + none +
+ + +
+
-
-
-
-
-
-
-

- Merchant Warrior Sub Merchant Id : - - 审核通过 - 审核中 - 打回 - ({{partner.cardInfo.rpMerchantId}}) - 未申请 -

- + + + +
+
+
+
+
+ No Data +
+
-
-
-
    -
  • - Sub Merchant Id - - {{partner.cardInfo.rpMerchantId}} -
  • -
  • - Name - -
  • -
  • - Company Name - {{partner.cardInfo.company_name}} -
  • -
  • - Address - {{partner.cardInfo.address}} -
  • -
  • - Suburb - {{partner.cardInfo.suburb}} -
  • -
  • - Postcode - -
  • -
  • - More..... -
  • -
  • - State - -
  • -
  • - Abn - -
  • -
  • - Email - -
  • -
  • - Contact Name - -
  • -
  • - Phone - -
  • -
  • - BSB - -
  • -
  • - Account No - -
  • -
  • - Account Name - -
  • -
  • - Website - -
  • -
  • - Timezone - -
  • -
  • - Category - -
  • -
  • - Hide..... +
+
+
+
+ +
+
+
+
+
+
+
+ Rpay+ Institution Merchant Id : + none +
+
+
+
+ No Data +
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+ +
+ Merchant Warrior : + + 审核通过 + 审核中 + 打回 + ({{partner.cardInfo.rpMerchantId}}) + 未申请 +
+
+ +
+
+
+
+ No Data +
+ +
    +
  • + Sub Merchant Id : {{partner.cardInfo.rpMerchantId}} + detail
+ +
@@ -332,4 +604,4 @@ -
+
\ No newline at end of file From 5c052715bfda430ad0318f4d8223b255113087df Mon Sep 17 00:00:00 2001 From: "xiao.tang" Date: Thu, 24 Dec 2020 10:23:00 +0800 Subject: [PATCH 3/6] =?UTF-8?q?=E2=9C=A8feat(royalpay):=20=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E5=AD=90=E7=9B=AE=E5=BD=95=E5=90=8D=E7=A7=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../partner/templates/partner_detail.html | 402 +++++++++--------- 1 file changed, 197 insertions(+), 205 deletions(-) diff --git a/src/main/ui/static/payment/partner/templates/partner_detail.html b/src/main/ui/static/payment/partner/templates/partner_detail.html index 3ae25b0cf..7433fc47d 100644 --- a/src/main/ui/static/payment/partner/templates/partner_detail.html +++ b/src/main/ui/static/payment/partner/templates/partner_detail.html @@ -36,7 +36,7 @@ .btn-default:active, .btn-default.active, - .open > .dropdown-toggle.btn-default { + .open>.dropdown-toggle.btn-default { color: #333; background-color: #f7bf90; border-color: #adadad; @@ -44,12 +44,13 @@

- (Gateway API) + (Gateway API) (已禁用) + ng-class="{pass_timeout:partner.is_valid==0}">(已禁用)

+ ng-class="{'box-warning':partner.approve_result!=5,'box-danger':partner.approve_result==5}">

Operation - (Refused - :{{partner.refuse_remark}} - )(The Partner Using Green Channel Now!) + (Refused + :{{partner.refuse_remark}} + )(The Partner Using Green Channel Now!) 【目前状态】- 暂未提交申请 待审核(合同制作中) @@ -184,15 +184,14 @@

- 下载合同 + 下载合同
+ class="btn-group pull-right" role="group" aria-label="...">
@@ -241,10 +240,11 @@

+ src="/static/images/card_payment_sign.png"> Card Payment Compliance (Refused - :{{partner.upay_refuse_remark}}) + :{{partner.upay_refuse_remark}}) 【目前状态】- @@ -265,38 +265,38 @@ (已禁用)

+ class="btn btn-success" ng-click="exportCardAgreegatePDF()"> 制作Card Payment合同
-
下载Letter Of Offer合同 - - - + + + + ng-click="cardNotifyBD()"> Notify BD -
- -
+
+ +

@@ -310,11 +310,11 @@
@@ -325,14 +325,14 @@
+ ng-class="{'box-warning':partner.upay_approve_result!=5,'box-danger':partner.upay_approve_result==5}">

Operation - (Refused - :{{partner.upay_refuse_remark}} - )(The Partner Using Green Channel Now!) + (Refused + :{{partner.upay_refuse_remark}} + )(The Partner Using Green Channel Now!) 【目前状态】- 暂未提交申请 待审核(合同制作中) @@ -346,8 +346,8 @@

下载Letter Of Offer合同 - - - - - - - + + + + + + + - - - - - - - + + + + + + +
Start DateEnd DateBD NameProportion - Operation -
Start DateEnd DateBD NameProportion + Operation +
- - - -
+ + + +
@@ -730,44 +728,43 @@ Merchant Payment Scenario Type
-
+
@@ -775,26 +772,26 @@
+ ng-class="{'has-error':partnerForm.client_offline.$invalid && partnerForm.client_offline.$dirty}">
@@ -803,51 +800,51 @@
+ ng-class="{'has-error':partnerForm.client_offline.$invalid && partnerForm.client_offline.$dirty}">
@@ -855,12 +852,12 @@
+ ng-if="partner.company_website!='' && partner.company_website.length>0">
+ href="{{partner.company_website}}">
@@ -869,7 +866,7 @@
1:  @@ -965,7 +962,7 @@

+ ng-bind="partner.same_phone">

-
+
Legal Representative
@@ -1027,7 +1022,7 @@

+ ng-bind="partner.representativeInfo.representative_person ">

@@ -1035,15 +1030,15 @@

+ ng-bind="partner.representativeInfo.legal_representative_wechatid">

-

+

+

@@ -1069,7 +1064,7 @@
-
+
Marketing Person
@@ -1078,7 +1073,7 @@

+ ng-bind="partner.representativeInfo.marketing_person">

@@ -1086,7 +1081,7 @@

+ ng-bind="partner.representativeInfo.marketing_wechatid">

@@ -1094,7 +1089,7 @@

+ ng-bind="partner.representativeInfo.marketing_phone">

@@ -1121,11 +1116,11 @@
-
Registered Office Address
+
Registered Office Address
- - + +
@@ -1133,16 +1128,16 @@
-

+

+

-

+

+

@@ -1150,20 +1145,20 @@

+ ng-bind="partner.representativeInfo.postcode">

-

+

+

-
+
@@ -1177,7 +1172,7 @@

+ ng-bind="partner.same_address">

@@ -1210,7 +1205,7 @@
-
+
@@ -1232,7 +1227,7 @@
+ src="one_locations.html">
@@ -1307,9 +1302,9 @@

+ ng-bind="partner.royalpayindustry|partner_royalpay_industry">

+ ng-if="$root.complianceCheck.clientInfo">
@@ -1318,9 +1313,9 @@

+ ng-bind="partner.industry|partner_industry">

+ ng-if="$root.complianceCheck.clientInfo">
@@ -1328,7 +1323,7 @@
+ switch-change="changeWechatCompliance()">
@@ -1354,7 +1349,7 @@    ({{partner.alipayindustry}})

+ ng-if="$root.complianceCheck.clientInfo">
@@ -1364,32 +1359,29 @@ {{partner.mw_industry}}

+ ng-if="$root.complianceCheck.clientInfo">
- - - - - + + + + +
@@ -1398,9 +1390,9 @@
Destroy + ng-click="deleteClient()">Destroy check + ng-if="('10'|withRole)" ng-click="complianceCheck()">check
@@ -1416,4 +1408,4 @@ - + \ No newline at end of file From a1d914418e491fcb7792c530c56ab2704e1a8fc4 Mon Sep 17 00:00:00 2001 From: "xiao.tang" Date: Thu, 24 Dec 2020 16:15:26 +0800 Subject: [PATCH 4/6] =?UTF-8?q?=E2=9C=A8feat(royalpay):=20=E4=BF=AE?= =?UTF-8?q?=E6=94=B9panel=E9=A2=9C=E8=89=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../partner/templates/sub_merchant_id_apply.html | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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 17aa0d0b0..1ab198d45 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 @@ -52,7 +52,7 @@
-
+
@@ -193,7 +193,7 @@
-
+
@@ -251,7 +251,7 @@
-
+
@@ -312,7 +312,7 @@
-
+
Rpay+ Institution Merchant Id : @@ -334,7 +334,7 @@
-
+
From 8ba52a1513f8b21fc23fde5727e12cbc712c33be Mon Sep 17 00:00:00 2001 From: dalong306 <304592994@qq.com> Date: Thu, 24 Dec 2020 16:17:00 +0800 Subject: [PATCH 5/6] =?UTF-8?q?=E5=95=86=E6=88=B7=E8=B5=84=E6=96=99=20?= =?UTF-8?q?=E6=97=A5=E6=9C=9F=E5=A4=9A=E7=A7=8D=E9=80=89=E6=8B=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/db/modify.sql | 5 + .../merchants/beans/ClientRegisterInfo.java | 6 +- .../ui/static/commons/services/industryMap.js | 120 +++++++++++ .../ui/static/payment/partner/add-partner.js | 91 +++++++- .../static/payment/partner/partner-manage.js | 204 +++++++++++++++++- .../partner/templates/add_partner.html | 31 +-- .../templates/add_sub_partner_dialog.html | 29 +-- .../new_apply_wx_sub_merchant_id.html | 21 +- .../partner/templates/partner_edit.html | 32 +-- .../templates/sub_merchant_id_apply.html | 3 +- 10 files changed, 475 insertions(+), 67 deletions(-) diff --git a/src/db/modify.sql b/src/db/modify.sql index 2053b4215..52d9dbccf 100644 --- a/src/db/modify.sql +++ b/src/db/modify.sql @@ -771,3 +771,8 @@ alter table sys_wx_merchant_apply ALTER TABLE `sys_clients` ADD COLUMN certificat_expire_date date DEFAULT NULL COMMENT '注册证书过期时间'; + + +-- 商户表 日期类型改为varchar 2020.12.23 +ALTER TABLE `sys_clients` + modify COLUMN certificat_expire_date varchar(20) DEFAULT NULL COMMENT '注册证书过期时间'; diff --git a/src/main/java/au/com/royalpay/payment/manage/merchants/beans/ClientRegisterInfo.java b/src/main/java/au/com/royalpay/payment/manage/merchants/beans/ClientRegisterInfo.java index e5cea877e..a2db2971f 100644 --- a/src/main/java/au/com/royalpay/payment/manage/merchants/beans/ClientRegisterInfo.java +++ b/src/main/java/au/com/royalpay/payment/manage/merchants/beans/ClientRegisterInfo.java @@ -134,7 +134,7 @@ public class ClientRegisterInfo { private String director_id_number; private String principal_name; private String principal_id_number; - private Date certificat_expire_date;//注册证书过期时间 + private String certificat_expire_date;//注册证书过期时间 private String mc_code;//微信mccode @@ -675,11 +675,11 @@ public class ClientRegisterInfo { this.principal_id_number = principal_id_number; } - public Date getCertificat_expire_date() { + public String getCertificat_expire_date() { return certificat_expire_date; } - public void setCertificat_expire_date(Date certificat_expire_date) { + public void setCertificat_expire_date(String certificat_expire_date) { this.certificat_expire_date = certificat_expire_date; } diff --git a/src/main/ui/static/commons/services/industryMap.js b/src/main/ui/static/commons/services/industryMap.js index 75aad7d3c..56c927b9c 100644 --- a/src/main/ui/static/commons/services/industryMap.js +++ b/src/main/ui/static/commons/services/industryMap.js @@ -158,6 +158,126 @@ define(['../app'], function (app) { { "label": "Medical Service", "value": "533" + }, + { + "label": "Online games (Top-up)", + "value": "644" + }, + { + "label": "Online Shopping Mall", + "value": "648" + }, + { + "label": "Supermarket", + "value": "649" + }, + { + "label": "Convenience Store", + "value": "651" + }, + { + "label": "Duty-free Shop", + "value": "652" + }, + { + "label": "Pharmacy", + "value": "653" + }, + { + "label": "Vending Machine", + "value": "654" + }, + { + "label": "Department Store /Shopping Centre", + "value": "655" + }, + { + "label": "Food/Beverages", + "value": "656" + }, + { + "label": "Catering Services", + "value": "657" + }, + { + "label": "Furniture/Household Products", + "value": "658" + }, + { + "label": "Home Appliances/Camera Equipment/Office Equipment", + "value": "659" + }, + { + "label": "Beauty/Personal Care Products", + "value": "660" + }, + { + "label": "Flowers/Plants/Interior Decorations/Decorations", + "value": "661" + }, + { + "label": "Nursery Products/Toys", + "value": "662" + }, + { + "label": "Clothing/Shoes/Other Accessories", + "value": "663" + }, + { + "label": "Sports/Fitness Equipment/Security", + "value": "664" + }, + { + "label": "Watches/Eyewear/Jewellery", + "value": "665" + }, + { + "label": "Outdoor Products /Travel Products", + "value": "666" + }, + { + "label": "Books / Records / Stationery / Musical Instruments", + "value": "667" + }, + { + "label": "Flight ticket/ticketing agent", + "value": "668" + }, + { + "label": "Sightseeing Passes", + "value": "669" + }, + { + "label": "Hotel/Resort", + "value": "670" + }, + { + "label": "Online Books/Video/Music", + "value": "671" + }, + { + "label": "Online games (Download)", + "value": "672" + }, + { + "label": "University Education", + "value": "677" + }, + { + "label": "Public hospitals/Medical Institutions", + "value": "679" + }, + { + "label": "Private hospitals/Clinics/Medical institutions", + "value": "678" + }, + { + "label": "Public transit", + "value": "680" + }, + { + "label": "Logistics/ Courier Service", + "value": "684" } ]; app.factory('industryMap', function () { diff --git a/src/main/ui/static/payment/partner/add-partner.js b/src/main/ui/static/payment/partner/add-partner.js index b8ead9fef..3b28d185f 100644 --- a/src/main/ui/static/payment/partner/add-partner.js +++ b/src/main/ui/static/payment/partner/add-partner.js @@ -32,7 +32,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter } }) }]); - app.controller('addPartnerCtrl', ['$rootScope', '$scope', '$http', '$state', 'Upload', 'commonDialog', 'timezone', 'businessStructuresMap', 'upayIndustryMap', 'industryMap', 'stateMap', 'sectorMap', 'countryMap','wechatGoodMcc', function ($rootScope, $scope, $http, $state, Upload, commonDialog, timezone, businessStructuresMap, upayIndustryMap, industryMap, stateMap, sectorMap, countryMap,wechatGoodMcc) { + app.controller('addPartnerCtrl', ['$rootScope', '$scope', '$http', '$state', 'Upload', 'commonDialog', 'timezone', 'businessStructuresMap', 'upayIndustryMap', 'industryMap', 'stateMap', 'sectorMap', 'countryMap','wechatGoodMcc','$filter', function ($rootScope, $scope, $http, $state, Upload, commonDialog, timezone, businessStructuresMap, upayIndustryMap, industryMap, stateMap, sectorMap, countryMap,wechatGoodMcc,$filter) { if ($scope.partner_application) { $scope.partner = angular.copy($scope.partner_application); delete $rootScope.partner_application; @@ -57,7 +57,25 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter $scope.partner.contact_phone_c = 61; $scope.partner.client_pay_type = []; $scope.partner.client_pay_desc = []; - + $scope.checkExpriedate=function (value) { + if(value){ + $scope.partner.certificat_expire_date_premanent=false; + $scope.partner.certificat_expire_date_NA=false; + } + } + $scope.checkExpriedateOther=function (value) { + if(value=='PERMANENT'){ + if($scope.partner.certificat_expire_date_premanent){ + $scope.partner.certificat_expire_date_NA=false; + $scope.partner.certificat_expire_date_d=null; + } + }else if(value=='N/A'){ + if($scope.partner.certificat_expire_date_NA){ + $scope.partner.certificat_expire_date_premanent=false; + $scope.partner.certificat_expire_date_d=null; + } + } + } var resetClientPayDescByTpey = function (type) { type = parseInt(type); if (type == 1) { @@ -232,6 +250,19 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter alert('Please select the business structure'); return; } + if ($scope.partner.business_structure!='Registered body(Sole Trader)') { + if ($scope.partner.certificat_expire_date_d) { + $scope.partner.certificat_expire_date = $filter('dateConversionStr')($scope.partner.certificat_expire_date_d) + } else if ($scope.partner.certificat_expire_date_premanent) { + $scope.partner.certificat_expire_date = "PERMANENT"; + } + else if ($scope.partner.certificat_expire_date_NA) { + $scope.partner.certificat_expire_date = "N/A"; + } else { + alert("Certificate expiration time is required"); + return; + } + } if (!$scope.partner.enable_cross_payment && !$scope.partner.enable_card_payment) { alert("商户至少开通一种支付方式,请检查是否选择了跨境支付或卡支付!"); return; @@ -441,16 +472,45 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter } } }]); - app.controller('partnerEditCtrl2', ['$scope', '$http', '$state', 'Upload', 'commonDialog', 'timezone', 'partner','upayIndustryMap','wechatGoodMcc', - function ($scope, $http, $state, Upload, commonDialog, timezone, partner,upayIndustryMap,wechatGoodMcc) { + app.controller('partnerEditCtrl2', ['$scope', '$http', '$state', 'Upload', 'commonDialog', 'timezone', 'partner','upayIndustryMap','wechatGoodMcc','$filter', + function ($scope, $http, $state, Upload, commonDialog, timezone, partner,upayIndustryMap,wechatGoodMcc,$filter) { $scope.upayIndustrys = upayIndustryMap.configs(); $scope.timezones = timezone.configs(); $scope.wechatMccIndustries = wechatGoodMcc.configs(); $scope.partner = partner.data; + // if(partner.data.certificat_expire_date) { + // var datestr = partner.data.certificat_expire_date.replace(/-/g, '/'); + // $scope.partner.certificat_expire_date=new Date(datestr); + // } if(partner.data.certificat_expire_date) { - var datestr = partner.data.certificat_expire_date.replace(/-/g, '/'); - $scope.partner.certificat_expire_date=new Date(datestr); + if( $scope.partner.certificat_expire_date=="PERMANENT"){ + $scope.partner.certificat_expire_date_premanent=true; + }else if( $scope.partner.certificat_expire_date=="N/A"){ + $scope.partner.certificat_expire_date_NA=true; + }else { + var datestr = $scope.partner.certificat_expire_date.replace(/-/g, '/'); + $scope.partner.certificat_expire_date_d = new Date(datestr); + } + } + $scope.checkExpriedate=function (value) { + if(value){ + $scope.partner.certificat_expire_date_premanent=false; + $scope.partner.certificat_expire_date_NA=false; + } + } + $scope.checkExpriedateOther=function (value) { + if(value=='PERMANENT'){ + if($scope.partner.certificat_expire_date_premanent){ + $scope.partner.certificat_expire_date_NA=false; + $scope.partner.certificat_expire_date_d=null; + } + }else if(value=='N/A'){ + if($scope.partner.certificat_expire_date_NA){ + $scope.partner.certificat_expire_date_premanent=false; + $scope.partner.certificat_expire_date_d=null; + } + } } if($scope.partner.mc_code ){ $scope.partner.mc_code=parseInt($scope.partner.mc_code); @@ -664,7 +724,23 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter }); return; } - + if (!$scope.partner.business_structure||$scope.partner.business_structure == '') { + alert('Please select the business structure'); + return; + } + if ($scope.partner.business_structure!='Registered body(Sole Trader)') { + if ($scope.partner.certificat_expire_date_d) { + $scope.partner.certificat_expire_date = $filter('dateConversionStr')($scope.partner.certificat_expire_date_d) + } else if ($scope.partner.certificat_expire_date_premanent) { + $scope.partner.certificat_expire_date = "PERMANENT"; + } + else if ($scope.partner.certificat_expire_date_NA) { + $scope.partner.certificat_expire_date = "N/A"; + } else { + alert("Certificate expiration time is required"); + return; + } + } if ($scope.partner.company_name.indexOf("Migration") != -1) { alert("Company Name包含敏感词汇,请检查后重新提交!"); return; @@ -705,6 +781,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter } }) } + var content = ''; if (!origin_referrer_id && $scope.partner.referrer_id) { content = 'Update partner info successfully,But You Had add new Referrer,Please Change the BD Commission Proportion!'; diff --git a/src/main/ui/static/payment/partner/partner-manage.js b/src/main/ui/static/payment/partner/partner-manage.js index 47a6c12e8..5106cadeb 100644 --- a/src/main/ui/static/payment/partner/partner-manage.js +++ b/src/main/ui/static/payment/partner/partner-manage.js @@ -152,6 +152,126 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter { "label": "Medical Service", "value": "533" + }, + { + "label": "Online games (Top-up)", + "value": "644" + }, + { + "label": "Online Shopping Mall", + "value": "648" + }, + { + "label": "Supermarket", + "value": "649" + }, + { + "label": "Convenience Store", + "value": "651" + }, + { + "label": "Duty-free Shop", + "value": "652" + }, + { + "label": "Pharmacy", + "value": "653" + }, + { + "label": "Vending Machine", + "value": "654" + }, + { + "label": "Department Store /Shopping Centre", + "value": "655" + }, + { + "label": "Food/Beverages", + "value": "656" + }, + { + "label": "Catering Services", + "value": "657" + }, + { + "label": "Furniture/Household Products", + "value": "658" + }, + { + "label": "Home Appliances/Camera Equipment/Office Equipment", + "value": "659" + }, + { + "label": "Beauty/Personal Care Products", + "value": "660" + }, + { + "label": "Flowers/Plants/Interior Decorations/Decorations", + "value": "661" + }, + { + "label": "Nursery Products/Toys", + "value": "662" + }, + { + "label": "Clothing/Shoes/Other Accessories", + "value": "663" + }, + { + "label": "Sports/Fitness Equipment/Security", + "value": "664" + }, + { + "label": "Watches/Eyewear/Jewellery", + "value": "665" + }, + { + "label": "Outdoor Products /Travel Products", + "value": "666" + }, + { + "label": "Books / Records / Stationery / Musical Instruments", + "value": "667" + }, + { + "label": "Flight ticket/ticketing agent", + "value": "668" + }, + { + "label": "Sightseeing Passes", + "value": "669" + }, + { + "label": "Hotel/Resort", + "value": "670" + }, + { + "label": "Online Books/Video/Music", + "value": "671" + }, + { + "label": "Online games (Download)", + "value": "672" + }, + { + "label": "University Education", + "value": "677" + }, + { + "label": "Public hospitals/Medical Institutions", + "value": "679" + }, + { + "label": "Private hospitals/Clinics/Medical institutions", + "value": "678" + }, + { + "label": "Public transit", + "value": "680" + }, + { + "label": "Logistics/ Courier Service", + "value": "684" } ]; var removeClientPayDesc = function (items, key) { @@ -3138,8 +3258,8 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter } }]); app.controller('partnerNewSubPartnerDialogCtrl', ['$rootScope', '$scope', '$http', '$state', 'Upload', 'commonDialog', 'timezone', - 'clientMoniker', 'industryMap', 'businessStructuresMap', 'stateMap', 'countryMap','wechatGoodMcc', - function ($rootScope, $scope, $http, $state, Upload, commonDialog, timezone, clientMoniker, industryMap, businessStructuresMap, stateMap, countryMap,wechatGoodMcc) { + 'clientMoniker', 'industryMap', 'businessStructuresMap', 'stateMap', 'countryMap','wechatGoodMcc','$filter', + function ($rootScope, $scope, $http, $state, Upload, commonDialog, timezone, clientMoniker, industryMap, businessStructuresMap, stateMap, countryMap,wechatGoodMcc,$filter) { if ($scope.partner_application) { $scope.partner = angular.copy($scope.partner_application); delete $rootScope.partner_application; @@ -3161,7 +3281,25 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter $scope.merchantIsValid = false; $scope.merchantCodeChecked = false; $scope.wechatMccIndustries = wechatGoodMcc.configs(); - + $scope.checkExpriedate=function (value) { + if(value){ + $scope.partner.certificat_expire_date_premanent=false; + $scope.partner.certificat_expire_date_NA=false; + } + } + $scope.checkExpriedateOther=function (value) { + if(value=='PERMANENT'){ + if($scope.partner.certificat_expire_date_premanent){ + $scope.partner.certificat_expire_date_NA=false; + $scope.partner.certificat_expire_date_d=null; + } + }else if(value=='N/A'){ + if($scope.partner.certificat_expire_date_NA){ + $scope.partner.certificat_expire_date_premanent=false; + $scope.partner.certificat_expire_date_d=null; + } + } + } var resetClientPayDescByTpey = function (type) { type = parseInt(type); if (type == 1) { @@ -3352,6 +3490,19 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter alert('Please select the business structure'); return; } + if ($scope.partner.business_structure!='Registered body(Sole Trader)') { + if ($scope.partner.certificat_expire_date_d) { + $scope.partner.certificat_expire_date = $filter('dateConversionStr')($scope.partner.certificat_expire_date_d) + } else if ($scope.partner.certificat_expire_date_premanent) { + $scope.partner.certificat_expire_date = "PERMANENT"; + } + else if ($scope.partner.certificat_expire_date_NA) { + $scope.partner.certificat_expire_date = "N/A"; + } else { + alert("Certificate expiration time is required"); + return; + } + } if ($scope.partner.company_name.indexOf("Migration") != -1) { alert("Company Name包含敏感词汇,请检查后重新提交!"); return; @@ -5544,7 +5695,37 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter $scope.subMerchantInfo.certificat_expire_date=new Date(datestr); } if($scope.subMerchantInfo.business_structure ){ - $scope.subMerchantInfo.merchant_type=$scope.subMerchantInfo.business_structure == 'Company'? "ENTERPRISE":"INDIVIDUAL"; + $scope.subMerchantInfo.merchant_type=$scope.subMerchantInfo.business_structure != 'Registered body(Sole Trader)'? "ENTERPRISE":"INDIVIDUAL"; + } + if(subMerchantInfo.certificat_expire_date) { + if(subMerchantInfo.certificat_expire_date=="PERMANENT"){ + $scope.subMerchantInfo.certificat_expire_date_premanent=true; + }else if(subMerchantInfo.certificat_expire_date=="N/A"){ + $scope.subMerchantInfo.certificat_expire_date_NA=true; + }else { + var datestr = subMerchantInfo.certificat_expire_date.replace(/-/g, '/'); + $scope.subMerchantInfo.certificat_expire_date_d = new Date(datestr); + } + } + + $scope.checkExpriedate=function (value) { + if(value){ + $scope.subMerchantInfo.certificat_expire_date_premanent=false; + $scope.subMerchantInfo.certificat_expire_date_NA=false; + } + } + $scope.checkExpriedateOther=function (value) { + if(value=='PERMANENT'){ + if($scope.subMerchantInfo.certificat_expire_date_premanent){ + $scope.subMerchantInfo.certificat_expire_date_NA=false; + $scope.subMerchantInfo.certificat_expire_date_d=null; + } + }else if(value=='N/A'){ + if($scope.subMerchantInfo.certificat_expire_date_NA){ + $scope.subMerchantInfo.certificat_expire_date_premanent=false; + $scope.subMerchantInfo.certificat_expire_date_d=null; + } + } } $scope.saveAppliy = function (form) { $scope.errmsg = null; @@ -5585,8 +5766,17 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter params.director_id_number = $scope.subMerchantInfo.director_id_number; params.company_register_no = $scope.subMerchantInfo.company_register_no; params.certificat_expire_date = $scope.subMerchantInfo.certificat_expire_date; - if($scope.subMerchantInfo.certificat_expire_date) { - params.certificat_expire_date = $filter('dateConversionStr')($scope.subMerchantInfo.certificat_expire_date) + + if($scope.subMerchantInfo.certificat_expire_date_d) { + params.certificat_expire_date = $filter('dateConversionStr')($scope.subMerchantInfo.certificat_expire_date_d) + }else if($scope.subMerchantInfo.certificat_expire_date_premanent){ + params.certificat_expire_date="PERMANENT"; + } + else if($scope.subMerchantInfo.certificat_expire_date_NA){ + params.certificat_expire_date="N/A"; + }else{ + alert("Certificate expiration time is required"); + return; } }else{ params.principal_name = $scope.subMerchantInfo.principal_name; @@ -5635,7 +5825,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter $scope.businessTypesMap=businessTypesMap.configs(); if($scope.subMerchantInfo.business_structure ){ - $scope.subMerchantInfo.merchant_type=$scope.subMerchantInfo.business_structure == 'Company'? "ENTERPRISE":"INDIVIDUAL"; + $scope.subMerchantInfo.merchant_type=$scope.subMerchantInfo.business_structure != 'Registered body(Sole Trader)'? "ENTERPRISE":"INDIVIDUAL"; } if($scope.subMerchantInfo.industry) { $scope.subMerchantInfo.industry = $filter('newWxMerchantsFilter')($scope.subMerchantInfo.industry); diff --git a/src/main/ui/static/payment/partner/templates/add_partner.html b/src/main/ui/static/payment/partner/templates/add_partner.html index 1e4a08256..95308a108 100644 --- a/src/main/ui/static/payment/partner/templates/add_partner.html +++ b/src/main/ui/static/payment/partner/templates/add_partner.html @@ -309,25 +309,28 @@
-
-
- -
-
-

Required Field

-
+   + + +

PERMANENT

+
+ +

N/A

+ +
-
-
- -
-
-

Required Field

-
+   + +

PERMANENT

+
+ +

N/A

+
diff --git a/src/main/ui/static/payment/partner/templates/new_apply_wx_sub_merchant_id.html b/src/main/ui/static/payment/partner/templates/new_apply_wx_sub_merchant_id.html index 9b8971dbe..71120fbf9 100644 --- a/src/main/ui/static/payment/partner/templates/new_apply_wx_sub_merchant_id.html +++ b/src/main/ui/static/payment/partner/templates/new_apply_wx_sub_merchant_id.html @@ -228,18 +228,25 @@ ng-class="{'has-error':subForm.certificat_expire_date.$invalid && subForm.certificat_expire_date.$dirty}">
- -
-

Required Field

-

Length is more than 50

-
+   + + +

PERMANENT

+ +
+ + +

N/A

+ +
diff --git a/src/main/ui/static/payment/partner/templates/partner_edit.html b/src/main/ui/static/payment/partner/templates/partner_edit.html index 562860fa3..6804d3cf0 100644 --- a/src/main/ui/static/payment/partner/templates/partner_edit.html +++ b/src/main/ui/static/payment/partner/templates/partner_edit.html @@ -330,25 +330,29 @@
-
-
- -
-
-

Required Field

-
+   + + +

PERMANENT

+ +
+ + +

N/A

+
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 54ac0ab8c..b616b0c7b 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 @@ -67,7 +67,8 @@
  • Mcc Code - {{id_apply.mcc_code | wechatMcc }} + {{id_apply.mcc_code | wechatMcc }} +
  • Operator From fbeda072f817039ddbc20e1de620fce3c7337bb5 Mon Sep 17 00:00:00 2001 From: AlanFenng Date: Thu, 24 Dec 2020 17:58:37 +0800 Subject: [PATCH 6/6] release 2.3.74 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index cc021aba4..97425ae42 100644 --- a/pom.xml +++ b/pom.xml @@ -9,7 +9,7 @@ 4.0.0 manage - 2.3.74-SNAPSHOT + 2.3.74 UTF-8 2.4.0