diff --git a/pom.xml b/pom.xml index 591b9133d..97425ae42 100644 --- a/pom.xml +++ b/pom.xml @@ -9,7 +9,7 @@ 4.0.0 manage - 2.3.73 + 2.3.74 UTF-8 2.4.0 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..b6b9d3025 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" }, @@ -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) { @@ -169,7 +289,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 +341,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 +763,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 +794,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 +816,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 +869,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 +893,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 +929,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 +1004,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 +1048,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 +1080,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 +1175,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 +1185,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 +1202,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 +1241,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 +1251,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 +1268,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 +1285,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 +1303,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 +1320,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 +1338,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 +1348,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 +1363,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 +1375,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 +1390,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 +1407,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 +1420,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 +1429,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 +1438,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 +1453,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 +1465,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 +1478,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 +1490,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 +1503,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 +1514,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 +1527,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 +1547,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 +1574,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 +1610,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 +1624,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 +1636,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 +1680,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 +1732,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 +1754,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 +1783,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 +1793,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 +1803,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 +1842,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 +1868,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 +1892,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 +1923,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 +1938,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 +1967,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 +1981,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 +2013,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 +2025,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 +2048,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 +2070,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 +2095,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 +2114,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 +2179,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 +2200,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 +2223,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 +2238,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 +2270,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 +2288,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 +2307,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 +2326,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 +2344,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 +2362,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 +2380,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 +2398,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 +2416,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 +2434,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 +2493,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 +2508,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 +2525,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 +2544,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 +2563,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 +2578,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 +2609,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 +2647,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 +2667,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 +2686,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 +2708,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 +2727,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 +2740,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 +2788,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 +2803,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 +2836,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 +2844,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 +2853,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 +2862,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 +2891,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 +2905,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 +2934,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 +3021,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 +3052,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 +3098,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 +3172,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 +3192,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 +3203,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 +3250,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 +3258,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','$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; } else { - $scope.partner = {timezone: 'Australia/Melbourne'}; + $scope.partner = { timezone: 'Australia/Melbourne' }; } $scope.initMerchantCode = function () { $http.get('/sys/partners/init/merchant_code').then(function (response) { @@ -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) { @@ -3333,7 +3471,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,10 +3486,23 @@ 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; } + 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; @@ -3454,19 +3605,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 +3628,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 +3650,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 +3677,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 +3758,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 +3838,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 +3910,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 +3939,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 +4007,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 +4024,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 +4046,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 +4097,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 +4210,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 +4225,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 +4248,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 +4284,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 +4301,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 +4312,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 +4329,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 +4340,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 +4357,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 +4369,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 +4386,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 +4398,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 +4415,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 +4428,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 +4442,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 +4473,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 +4488,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 +4517,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 +4526,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 +4539,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 +4549,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 +4562,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 +4572,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 +4585,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 +4595,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 +4608,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 +4618,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 +4631,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 +4641,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 +4654,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 +4664,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 +4677,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 +4687,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 +4700,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 +4710,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 +4723,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 +4733,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 +4746,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 +4779,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 +4792,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 +4802,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 +4837,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 +4858,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 +4897,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 +4911,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 +4928,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 +4954,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 +4971,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 +4983,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 +5000,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 +5026,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 +5040,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 +5089,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) { @@ -5187,7 +5338,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 +5355,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 +5366,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 +5431,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 +5638,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 +5656,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 +5664,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 +5676,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 +5728,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 +5809,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 +5818,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 +5830,113 @@ 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"; + $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 +5977,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 +6036,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); @@ -5817,21 +6218,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 +6368,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 +6393,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 +6580,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 +6730,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 +6755,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 +6827,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 +6842,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 +6924,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 +6938,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 +6948,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 +6980,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' }); }) } 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/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/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_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}">(已禁用)