diff --git a/src/main/ui/static/payment/partner/partner-manage.js b/src/main/ui/static/payment/partner/partner-manage.js index 75ab6ce26..138388d1f 100644 --- a/src/main/ui/static/payment/partner/partner-manage.js +++ b/src/main/ui/static/payment/partner/partner-manage.js @@ -404,6 +404,10 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter } }) } + if(!window.frames['merchant_detail'].merchant_location){ + alert("Please Locate Merchant's Location"); + return; + } $http.post('/sys/partners', $scope.partner).then(function (resp) { commonDialog.alert({title: 'Success', content: 'Register new partner successfully', type: 'success'}); $scope.updateMerchantLocation(); @@ -473,8 +477,6 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter if (params) { $http.put('/sys/partners/modify/' + $scope.partner.client_moniker + '/location', params).then(function () { }); - } else { - alert("Please Locate Merchant's Location"); } } }]); @@ -954,11 +956,14 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter } }) } - $scope.updateMerchantLocation(); 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!'; } + if(!window.frames['merchant_detail'].merchant_location){ + alert("Please Locate Merchant Location!"); + return; + } $http.put('/sys/partners/' + $scope.partner.client_moniker, $scope.partner).then(function () { if (content != '') { commonDialog.alert({ @@ -973,6 +978,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter type: 'success' }); } + $scope.updateMerchantLocation(); $scope.loadPartners(); $state.go('^.detail', {clientMoniker: $scope.partner.client_moniker}, {reload: true}); }, function (resp) { @@ -1046,12 +1052,6 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter if (params) { $http.put('/sys/partners/modify/' + $scope.partner.client_moniker + '/location', params).then(function () { }); - } else { - commonDialog.alert({ - title: 'Warning', - content: 'Please Locate Merchant Location', - type: 'error' - }); } } }]); @@ -1495,6 +1495,10 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter }; $scope.getRates(); $scope.saveBankAccount = function () { + if(isNaN($scope.bankaccount.account_no)){ + alert("Account No应输入数字!"); + return; + }; $http.put('/sys/partners/' + $scope.partner.client_moniker + '/bank_account', $scope.bankaccount).then(function () { $scope.getBankAccount(); }, function (resp) { @@ -1823,6 +1827,24 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter return; } } + if (!$scope.partner.logo_url) { + alert("Logo is necessary!"); + return; + } + if($scope.partner.partner_type == 'photo'){ + if (!$scope.partner.company_photo) { + alert('Shop Photo1 is necessary'); + return; + } + if (!$scope.partner.store_photo) { + alert('Shop Photo2 is necessary'); + return; + } + } + if(!window.frames['merchant_detail'].merchant_location){ + alert("Please Locate Merchant Location!"); + return; + } $http.post('/sys/partners/' + clientMoniker + '/sub_clients', $scope.partner).then(function () { $scope.updateMerchantLocation(); $scope.$close(); @@ -1851,18 +1873,36 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter $scope.uploadShopPhoto = function (file) { if (file != null) { - $scope.photoProgress = {value: 0}; + $scope.shopPhotoProgress = {value: 0}; Upload.upload({ url: '/attachment/files', data: {file: file} }).then(function (resp) { - delete $scope.photoProgress; + delete $scope.shopPhotoProgress; $scope.partner.company_photo = resp.data.url; }, function (resp) { - delete $scope.photoProgress; + delete $scope.shopPhotoProgress; commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'}) }, function (evt) { - $scope.photoProgress.value = parseInt(100 * evt.loaded / evt.total); + $scope.shopPhotoProgress.value = parseInt(100 * evt.loaded / evt.total); + }) + } + }; + + $scope.uploadStorePhoto = function (file) { + if (file != null) { + $scope.storePhotoProgress = {value: 0}; + Upload.upload({ + url: '/attachment/files', + 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'}) + }, function (evt) { + $scope.storePhotoProgress.value = parseInt(100 * evt.loaded / evt.total); }) } }; @@ -1871,12 +1911,6 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter if (params) { $http.put('/sys/partners/modify/' + $scope.partner.client_moniker + '/location', params).then(function () { }); - } else { - commonDialog.alert({ - title: 'Warning', - content: 'Please Locate Merchant Location', - 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 65c491856..df9fa4b0f 100644 --- a/src/main/ui/static/payment/partner/templates/add_partner.html +++ b/src/main/ui/static/payment/partner/templates/add_partner.html @@ -1,6 +1,6 @@ @@ -237,7 +237,7 @@ - +
2:  @@ -249,7 +249,7 @@
- +
@@ -372,7 +372,7 @@
-
Alipay Information
+
Alipay Information  (Optional)
@@ -402,7 +402,8 @@
- + +

eg:https://www.baidu.com

diff --git a/src/main/ui/static/payment/partner/templates/add_sub_partner_dialog.html b/src/main/ui/static/payment/partner/templates/add_sub_partner_dialog.html index 64d9f7be1..9976059e9 100644 --- a/src/main/ui/static/payment/partner/templates/add_sub_partner_dialog.html +++ b/src/main/ui/static/payment/partner/templates/add_sub_partner_dialog.html @@ -1,3 +1,9 @@ + @@ -169,6 +175,8 @@

If the partner is a offline shop then a photo of shop is required while an online store shall choose companyWebsite

+

+ 只要有可能产生线下交易(商户静态码、POS),就必须上传照片,否则支付宝会禁止交易

Required Field

@@ -177,16 +185,29 @@
-
-
+
+
1:  + +
+ + +
+
+
2: 
- - + +
+
+
Alipay Information  (Optional)
+
+
+
+ +
+ +

+ eg:Monday-Friday 09:00-20:00,Saturday-Sunday 10:00-22:00

+
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +

eg:https://www.baidu.com

+
+
+
+
+
+
Contact Information
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 0fd091ad1..7b9717ead 100644 --- a/src/main/ui/static/payment/partner/templates/partner_detail.html +++ b/src/main/ui/static/payment/partner/templates/partner_detail.html @@ -308,7 +308,7 @@
- +
@@ -454,7 +454,7 @@
-
Alipay Information
+
Alipay Information  (Optional)
diff --git a/src/main/ui/static/payment/partner/templates/partner_edit.html b/src/main/ui/static/payment/partner/templates/partner_edit.html index 65dd50894..ace8a6272 100644 --- a/src/main/ui/static/payment/partner/templates/partner_edit.html +++ b/src/main/ui/static/payment/partner/templates/partner_edit.html @@ -1,6 +1,6 @@ @@ -186,7 +186,7 @@
- +
2:  @@ -198,7 +198,7 @@
- +
-
Alipay Information
+
Alipay Information   (Optional)
@@ -294,7 +294,8 @@
- + +

eg:https://www.baidu.com