diff --git a/src/main/java/au/com/royalpay/payment/manage/merchants/core/ClientManager.java b/src/main/java/au/com/royalpay/payment/manage/merchants/core/ClientManager.java index 827128df1..a6e740d7a 100644 --- a/src/main/java/au/com/royalpay/payment/manage/merchants/core/ClientManager.java +++ b/src/main/java/au/com/royalpay/payment/manage/merchants/core/ClientManager.java @@ -355,6 +355,8 @@ public interface ClientManager { void subYeepayMerchantApplication(String clientMoniker,JSONObject merchantInfo, JSONObject manager); + void reSubYeepayMerchantApplication(String clientMoniker,JSONObject merchantInfo, JSONObject manager); + void updateAllPartnerPassword(String clientMoniker, List emails, String accountWhiteList); void postponeClientRate(Date now, Date yearTomorrow, String expireDate, JSONObject client); diff --git a/src/main/java/au/com/royalpay/payment/manage/merchants/core/impls/ClientManagerImpl.java b/src/main/java/au/com/royalpay/payment/manage/merchants/core/impls/ClientManagerImpl.java index 646e6f4ce..cbb18558d 100644 --- a/src/main/java/au/com/royalpay/payment/manage/merchants/core/impls/ClientManagerImpl.java +++ b/src/main/java/au/com/royalpay/payment/manage/merchants/core/impls/ClientManagerImpl.java @@ -3731,6 +3731,8 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid merchantInfo.put("extinfo",extInfo.toJSONString()); yeePayClientConfigMapper.saveMerchantConfig(merchantInfo); JSONObject yeepayConfig = yeePayClientConfigMapper.findMerchantConfig(client.getIntValue("client_id")); + yeepayConfig.put("company_website",merchantInfo.getString("company_website")); + yeepayConfig.put("abn",merchantInfo.getString("abn")); SubmerchantRegisterResult result = yeePayClient.registerMerchant(client,yeepayConfig); if(result.getStatus().equals("FAILED")){ throw new BadRequestException(result.getErrorMsg()); @@ -3741,6 +3743,35 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid clientMapper.update(client); } + @Override + public void reSubYeepayMerchantApplication(String clientMoniker, JSONObject merchantInfo, JSONObject manager) { + JSONObject client = getClientInfoByMoniker(clientMoniker); + if (client == null) { + throw new InvalidShortIdException(); + } + checkOrgPermission(manager, client); + JSONObject yeepayConfig = yeePayClientConfigMapper.findMerchantConfigBySub(merchantInfo.getString("subMerchantId")); + List directorsAll = new ArrayList<>(); + List executivesAll = new ArrayList<>(); + directorsAll.add(merchantInfo.getJSONObject("directors")); + executivesAll.add(merchantInfo.getJSONObject("executives")); + JSONObject extInfo = new JSONObject(); + extInfo.put("directors",directorsAll); + extInfo.put("executives",executivesAll); + yeepayConfig.put("extinfo",extInfo.toJSONString()); + yeepayConfig.put("industry",merchantInfo.getString("industry")); + yeepayConfig.put("business_content",merchantInfo.getString("business_content")); + yeepayConfig.put("business_licence",merchantInfo.getString("business_licence")); + yeePayClientConfigMapper.update(yeepayConfig); + yeepayConfig.put("company_website",merchantInfo.getString("company_website")); + yeepayConfig.put("abn",merchantInfo.getString("abn")); + yeepayConfig.put("mode","UPDATE"); + SubmerchantRegisterResult result = yeePayClient.registerMerchant(client,yeepayConfig); + if(result.getStatus().equals("FAILED")){ + throw new BadRequestException(result.getErrorMsg()); + } + } + @Override public List listMerchantIds(String clientMoniker, JSONObject manager) { JSONObject client = getClientInfoByMoniker(clientMoniker); diff --git a/src/main/java/au/com/royalpay/payment/manage/merchants/web/PartnerManageController.java b/src/main/java/au/com/royalpay/payment/manage/merchants/web/PartnerManageController.java index 3b9dcdb6d..fcf6f6d07 100644 --- a/src/main/java/au/com/royalpay/payment/manage/merchants/web/PartnerManageController.java +++ b/src/main/java/au/com/royalpay/payment/manage/merchants/web/PartnerManageController.java @@ -615,6 +615,11 @@ public class PartnerManageController { clientManager.subYeepayMerchantApplication(clientMoniker, merchantInfo,manager); } + @ManagerMapping(value = "/{clientMoniker}/updateYeepaySubMerchantId", method = RequestMethod.POST, role = {ManagerRole.OPERATOR, ManagerRole.ADMIN}) + public void reSubYeepayMerchantApplication(@PathVariable String clientMoniker,@RequestBody JSONObject merchantInfo,@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) { + clientManager.reSubYeepayMerchantApplication(clientMoniker, merchantInfo,manager); + } + @RequestMapping(value = "/compliance", method = RequestMethod.GET) @RequireManager(role = { ManagerRole.OPERATOR}) public JSONObject lisPartnersByCompliance(@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager, PartnerQuery query) { diff --git a/src/main/ui/static/payment/partner/partner-manage.js b/src/main/ui/static/payment/partner/partner-manage.js index c1bfab7d5..0807c0f7a 100644 --- a/src/main/ui/static/payment/partner/partner-manage.js +++ b/src/main/ui/static/payment/partner/partner-manage.js @@ -3410,7 +3410,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter subMerchantInfo: function () { return $scope.partner; }, - yeepaySubMerchantId: function () { + subMerchantId: function () { return sub_merchant_id; } } @@ -3530,55 +3530,55 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter var merchantId = ''; - $scope.uploadLegalIDcardFront = function (file) { - if (file != null) { - if (file.size > 3 * 1024 * 1024) { - commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB,请压缩后重试', type: 'error'}) - } else { - $scope.legalIDcardFrontProgress = {value: 0}; - Upload.upload({ - url: '/attachment/yeepayFiles', - data: {file: file} - }).then(function (resp) { - delete $scope.legalIDcardFrontProgress; - $scope.legalIDcardFront = resp.data.path; - vouchers['legalIDcardFront'] = resp.data.path; - merchantId = resp.data.merchantId; - commonDialog.alert({title: 'Upload Success', content: 'Upload Success', type: 'success'}) - }, function (resp) { - delete $scope.legalIDcardFrontProgress; - commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'}) - }, function (evt) { - $scope.legalIDcardFrontProgress.value = parseInt(100 * evt.loaded / evt.total); - }) - } - } - }; - - $scope.uploadLegalIDcardBack = function (file) { - if (file != null) { - if (file.size > 3 * 1024 * 1024) { - commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB,请压缩后重试', type: 'error'}) - } else { - $scope.legalIDcardBackProgress = {value: 0}; - Upload.upload({ - url: '/attachment/yeepayFiles', - data: {file: file} - }).then(function (resp) { - delete $scope.legalIDcardBackProgress; - $scope.legalIDcardBack = resp.data.path; - vouchers['legalIDcardBack'] = resp.data.path; - merchantId = resp.data.merchantId; - commonDialog.alert({title: 'Upload Success', content: 'Upload Success', type: 'success'}) - }, function (resp) { - delete $scope.legalIDcardBackProgress; - commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'}) - }, function (evt) { - $scope.legalIDcardBackProgress.value = parseInt(100 * evt.loaded / evt.total); - }) - } - } - }; + // $scope.uploadLegalIDcardFront = function (file) { + // if (file != null) { + // if (file.size > 3 * 1024 * 1024) { + // commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB,请压缩后重试', type: 'error'}) + // } else { + // $scope.legalIDcardFrontProgress = {value: 0}; + // Upload.upload({ + // url: '/attachment/yeepayFiles', + // data: {file: file} + // }).then(function (resp) { + // delete $scope.legalIDcardFrontProgress; + // $scope.legalIDcardFront = resp.data.path; + // vouchers['legalIDcardFront'] = resp.data.path; + // merchantId = resp.data.merchantId; + // commonDialog.alert({title: 'Upload Success', content: 'Upload Success', type: 'success'}) + // }, function (resp) { + // delete $scope.legalIDcardFrontProgress; + // commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'}) + // }, function (evt) { + // $scope.legalIDcardFrontProgress.value = parseInt(100 * evt.loaded / evt.total); + // }) + // } + // } + // }; + // + // $scope.uploadLegalIDcardBack = function (file) { + // if (file != null) { + // if (file.size > 3 * 1024 * 1024) { + // commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB,请压缩后重试', type: 'error'}) + // } else { + // $scope.legalIDcardBackProgress = {value: 0}; + // Upload.upload({ + // url: '/attachment/yeepayFiles', + // data: {file: file} + // }).then(function (resp) { + // delete $scope.legalIDcardBackProgress; + // $scope.legalIDcardBack = resp.data.path; + // vouchers['legalIDcardBack'] = resp.data.path; + // merchantId = resp.data.merchantId; + // commonDialog.alert({title: 'Upload Success', content: 'Upload Success', type: 'success'}) + // }, function (resp) { + // delete $scope.legalIDcardBackProgress; + // commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'}) + // }, function (evt) { + // $scope.legalIDcardBackProgress.value = parseInt(100 * evt.loaded / evt.total); + // }) + // } + // } + // }; $scope.uploadBusinessLicence = function (file) { if (file != null) { @@ -3605,130 +3605,130 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter } }; - $scope.uploadTaxLevel = function (file) { - if (file != null) { - if (file.size > 3 * 1024 * 1024) { - commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB,请压缩后重试', type: 'error'}) - } else { - $scope.taxLevelProgress = {value: 0}; - Upload.upload({ - url: '/attachment/yeepayFiles', - data: {file: file} - }).then(function (resp) { - delete $scope.taxLevelProgress; - $scope.taxLevel = resp.data.path; - vouchers['taxLevel'] = resp.data.path; - merchantId = resp.data.merchantId; - commonDialog.alert({title: 'Upload Success', content: 'Upload Success', type: 'success'}) - }, function (resp) { - delete $scope.taxLevelProgress; - commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'}) - }, function (evt) { - $scope.taxLevelProgress.value = parseInt(100 * evt.loaded / evt.total); - }) - } - } - }; - - $scope.uploadBankAccountOpen = function (file) { - if (file != null) { - if (file.size > 3 * 1024 * 1024) { - commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB,请压缩后重试', type: 'error'}) - } else { - $scope.bankAccountOpenProgress = {value: 0}; - Upload.upload({ - url: '/attachment/yeepayFiles', - data: {file: file} - }).then(function (resp) { - delete $scope.bankAccountOpenProgress; - $scope.bankAccountOpen = resp.data.path; - vouchers['bankAccountOpen'] = resp.data.path; - merchantId = resp.data.merchantId; - commonDialog.alert({title: 'Upload Success', content: 'Upload Success', type: 'success'}) - }, function (resp) { - delete $scope.bankAccountOpenProgress; - commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'}) - }, function (evt) { - $scope.bankAccountOpenProgress.value = parseInt(100 * evt.loaded / evt.total); - }) - } - } - }; - - $scope.uploadOrgCode = function (file) { - if (file != null) { - if (file.size > 3 * 1024 * 1024) { - commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB,请压缩后重试', type: 'error'}) - } else { - $scope.orgCodeProgress = {value: 0}; - Upload.upload({ - url: '/attachment/yeepayFiles', - data: {file: file} - }).then(function (resp) { - delete $scope.orgCodeProgress; - $scope.orgCode = resp.data.path; - vouchers['orgCode'] = resp.data.path; - merchantId = resp.data.merchantId; - commonDialog.alert({title: 'Upload Success', content: 'Upload Success', type: 'success'}) - }, function (resp) { - delete $scope.orgCodeProgress; - commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'}) - }, function (evt) { - $scope.orgCodeProgress.value = parseInt(100 * evt.loaded / evt.total); - }) - } - } - }; - - $scope.uploadNonStanProtocol = function (file) { - if (file != null) { - if (file.size > 3 * 1024 * 1024) { - commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB,请压缩后重试', type: 'error'}) - } else { - $scope.nonStanProtocolProgress = {value: 0}; - Upload.upload({ - url: '/attachment/yeepayFiles', - data: {file: file} - }).then(function (resp) { - delete $scope.nonStanProtocolProgress; - $scope.nonStanProtocol = resp.data.path; - vouchers['nonStanProtocol'] = resp.data.path; - merchantId = resp.data.merchantId; - commonDialog.alert({title: 'Upload Success', content: 'Upload Success', type: 'success'}) - }, function (resp) { - delete $scope.nonStanProtocolProgress; - commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'}) - }, function (evt) { - $scope.nonStanProtocolProgress.value = parseInt(100 * evt.loaded / evt.total); - }) - } - } - }; - - $scope.uploadZipPath = function (file) { - if (file != null) { - if (file.size > 3 * 1024 * 1024) { - commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB,请压缩后重试', type: 'error'}) - } else { - $scope.zipPathProgress = {value: 0}; - Upload.upload({ - url: '/attachment/yeepayFiles', - data: {file: file} - }).then(function (resp) { - delete $scope.zipPathProgress; - $scope.zipPath = resp.data.path; - vouchers['zipPath'] = resp.data.path; - merchantId = resp.data.merchantId; - commonDialog.alert({title: 'Upload Success', content: 'Upload Success', type: 'success'}) - }, function (resp) { - delete $scope.zipPathProgress; - commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'}) - }, function (evt) { - $scope.zipPathProgress.value = parseInt(100 * evt.loaded / evt.total); - }) - } - } - }; + // $scope.uploadTaxLevel = function (file) { + // if (file != null) { + // if (file.size > 3 * 1024 * 1024) { + // commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB,请压缩后重试', type: 'error'}) + // } else { + // $scope.taxLevelProgress = {value: 0}; + // Upload.upload({ + // url: '/attachment/yeepayFiles', + // data: {file: file} + // }).then(function (resp) { + // delete $scope.taxLevelProgress; + // $scope.taxLevel = resp.data.path; + // vouchers['taxLevel'] = resp.data.path; + // merchantId = resp.data.merchantId; + // commonDialog.alert({title: 'Upload Success', content: 'Upload Success', type: 'success'}) + // }, function (resp) { + // delete $scope.taxLevelProgress; + // commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'}) + // }, function (evt) { + // $scope.taxLevelProgress.value = parseInt(100 * evt.loaded / evt.total); + // }) + // } + // } + // }; + + // $scope.uploadBankAccountOpen = function (file) { + // if (file != null) { + // if (file.size > 3 * 1024 * 1024) { + // commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB,请压缩后重试', type: 'error'}) + // } else { + // $scope.bankAccountOpenProgress = {value: 0}; + // Upload.upload({ + // url: '/attachment/yeepayFiles', + // data: {file: file} + // }).then(function (resp) { + // delete $scope.bankAccountOpenProgress; + // $scope.bankAccountOpen = resp.data.path; + // vouchers['bankAccountOpen'] = resp.data.path; + // merchantId = resp.data.merchantId; + // commonDialog.alert({title: 'Upload Success', content: 'Upload Success', type: 'success'}) + // }, function (resp) { + // delete $scope.bankAccountOpenProgress; + // commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'}) + // }, function (evt) { + // $scope.bankAccountOpenProgress.value = parseInt(100 * evt.loaded / evt.total); + // }) + // } + // } + // }; + + // $scope.uploadOrgCode = function (file) { + // if (file != null) { + // if (file.size > 3 * 1024 * 1024) { + // commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB,请压缩后重试', type: 'error'}) + // } else { + // $scope.orgCodeProgress = {value: 0}; + // Upload.upload({ + // url: '/attachment/yeepayFiles', + // data: {file: file} + // }).then(function (resp) { + // delete $scope.orgCodeProgress; + // $scope.orgCode = resp.data.path; + // vouchers['orgCode'] = resp.data.path; + // merchantId = resp.data.merchantId; + // commonDialog.alert({title: 'Upload Success', content: 'Upload Success', type: 'success'}) + // }, function (resp) { + // delete $scope.orgCodeProgress; + // commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'}) + // }, function (evt) { + // $scope.orgCodeProgress.value = parseInt(100 * evt.loaded / evt.total); + // }) + // } + // } + // }; + // + // $scope.uploadNonStanProtocol = function (file) { + // if (file != null) { + // if (file.size > 3 * 1024 * 1024) { + // commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB,请压缩后重试', type: 'error'}) + // } else { + // $scope.nonStanProtocolProgress = {value: 0}; + // Upload.upload({ + // url: '/attachment/yeepayFiles', + // data: {file: file} + // }).then(function (resp) { + // delete $scope.nonStanProtocolProgress; + // $scope.nonStanProtocol = resp.data.path; + // vouchers['nonStanProtocol'] = resp.data.path; + // merchantId = resp.data.merchantId; + // commonDialog.alert({title: 'Upload Success', content: 'Upload Success', type: 'success'}) + // }, function (resp) { + // delete $scope.nonStanProtocolProgress; + // commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'}) + // }, function (evt) { + // $scope.nonStanProtocolProgress.value = parseInt(100 * evt.loaded / evt.total); + // }) + // } + // } + // }; + // + // $scope.uploadZipPath = function (file) { + // if (file != null) { + // if (file.size > 3 * 1024 * 1024) { + // commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB,请压缩后重试', type: 'error'}) + // } else { + // $scope.zipPathProgress = {value: 0}; + // Upload.upload({ + // url: '/attachment/yeepayFiles', + // data: {file: file} + // }).then(function (resp) { + // delete $scope.zipPathProgress; + // $scope.zipPath = resp.data.path; + // vouchers['zipPath'] = resp.data.path; + // merchantId = resp.data.merchantId; + // commonDialog.alert({title: 'Upload Success', content: 'Upload Success', type: 'success'}) + // }, function (resp) { + // delete $scope.zipPathProgress; + // commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'}) + // }, function (evt) { + // $scope.zipPathProgress.value = parseInt(100 * evt.loaded / evt.total); + // }) + // } + // } + // }; $scope.uploadDirectorPassport = function (file) { if (file != null) { @@ -3797,6 +3797,8 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter // } // } // }); + merchantInfo['company_website'] = $scope.subMerchantInfo.company_website; + merchantInfo['abn'] = $scope.subMerchantInfo.abn; merchantInfo['executives'] = $scope.executives; merchantInfo['directors'] = $scope.directors; merchantInfo['business_content'] = $scope.business_content; @@ -3823,7 +3825,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter } }]); - app.controller('updateYeepaySubMerchantIdCtrl', ['$scope', '$http', '$uibModal', '$state','subMerchantInfo','yeepayIndustryMap','yeepayBusinessContentMap','$filter', 'commonDialog','Upload', function ($scope, $http, $uibModal, $state,subMerchantInfo,yeepayIndustryMap,yeepayBusinessContentMap,$filter, commonDialog,Upload) { + app.controller('updateYeepaySubMerchantIdCtrl', ['$scope', '$http', '$uibModal', '$state','subMerchantInfo','yeepayIndustryMap','yeepayBusinessContentMap','$filter', 'commonDialog','Upload','subMerchantId', function ($scope, $http, $uibModal, $state,subMerchantInfo,yeepayIndustryMap,yeepayBusinessContentMap,$filter, commonDialog,Upload,subMerchantId) { $scope.yeepay_industries = yeepayIndustryMap.configs(); $scope.yeepay_business_contents = yeepayBusinessContentMap.configs(); $scope.subMerchantInfo = angular.copy(subMerchantInfo); @@ -3838,55 +3840,55 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter var merchantId = ''; - $scope.uploadLegalIDcardFront = function (file) { - if (file != null) { - if (file.size > 3 * 1024 * 1024) { - commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB,请压缩后重试', type: 'error'}) - } else { - $scope.legalIDcardFrontProgress = {value: 0}; - Upload.upload({ - url: '/attachment/yeepayFiles', - data: {file: file} - }).then(function (resp) { - delete $scope.legalIDcardFrontProgress; - $scope.legalIDcardFront = resp.data.path; - vouchers['legalIDcardFront'] = resp.data.path; - merchantId = resp.data.merchantId; - commonDialog.alert({title: 'Upload Success', content: 'Upload Success', type: 'success'}) - }, function (resp) { - delete $scope.legalIDcardFrontProgress; - commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'}) - }, function (evt) { - $scope.legalIDcardFrontProgress.value = parseInt(100 * evt.loaded / evt.total); - }) - } - } - }; - - $scope.uploadLegalIDcardBack = function (file) { - if (file != null) { - if (file.size > 3 * 1024 * 1024) { - commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB,请压缩后重试', type: 'error'}) - } else { - $scope.legalIDcardBackProgress = {value: 0}; - Upload.upload({ - url: '/attachment/yeepayFiles', - data: {file: file} - }).then(function (resp) { - delete $scope.legalIDcardBackProgress; - $scope.legalIDcardBack = resp.data.path; - vouchers['legalIDcardBack'] = resp.data.path; - merchantId = resp.data.merchantId; - commonDialog.alert({title: 'Upload Success', content: 'Upload Success', type: 'success'}) - }, function (resp) { - delete $scope.legalIDcardBackProgress; - commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'}) - }, function (evt) { - $scope.legalIDcardBackProgress.value = parseInt(100 * evt.loaded / evt.total); - }) - } - } - }; + // $scope.uploadLegalIDcardFront = function (file) { + // if (file != null) { + // if (file.size > 3 * 1024 * 1024) { + // commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB,请压缩后重试', type: 'error'}) + // } else { + // $scope.legalIDcardFrontProgress = {value: 0}; + // Upload.upload({ + // url: '/attachment/yeepayFiles', + // data: {file: file} + // }).then(function (resp) { + // delete $scope.legalIDcardFrontProgress; + // $scope.legalIDcardFront = resp.data.path; + // vouchers['legalIDcardFront'] = resp.data.path; + // merchantId = resp.data.merchantId; + // commonDialog.alert({title: 'Upload Success', content: 'Upload Success', type: 'success'}) + // }, function (resp) { + // delete $scope.legalIDcardFrontProgress; + // commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'}) + // }, function (evt) { + // $scope.legalIDcardFrontProgress.value = parseInt(100 * evt.loaded / evt.total); + // }) + // } + // } + // }; + // + // $scope.uploadLegalIDcardBack = function (file) { + // if (file != null) { + // if (file.size > 3 * 1024 * 1024) { + // commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB,请压缩后重试', type: 'error'}) + // } else { + // $scope.legalIDcardBackProgress = {value: 0}; + // Upload.upload({ + // url: '/attachment/yeepayFiles', + // data: {file: file} + // }).then(function (resp) { + // delete $scope.legalIDcardBackProgress; + // $scope.legalIDcardBack = resp.data.path; + // vouchers['legalIDcardBack'] = resp.data.path; + // merchantId = resp.data.merchantId; + // commonDialog.alert({title: 'Upload Success', content: 'Upload Success', type: 'success'}) + // }, function (resp) { + // delete $scope.legalIDcardBackProgress; + // commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'}) + // }, function (evt) { + // $scope.legalIDcardBackProgress.value = parseInt(100 * evt.loaded / evt.total); + // }) + // } + // } + // }; $scope.uploadBusinessLicence = function (file) { if (file != null) { @@ -3913,130 +3915,130 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter } }; - $scope.uploadTaxLevel = function (file) { - if (file != null) { - if (file.size > 3 * 1024 * 1024) { - commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB,请压缩后重试', type: 'error'}) - } else { - $scope.taxLevelProgress = {value: 0}; - Upload.upload({ - url: '/attachment/yeepayFiles', - data: {file: file} - }).then(function (resp) { - delete $scope.taxLevelProgress; - $scope.taxLevel = resp.data.path; - vouchers['taxLevel'] = resp.data.path; - merchantId = resp.data.merchantId; - commonDialog.alert({title: 'Upload Success', content: 'Upload Success', type: 'success'}) - }, function (resp) { - delete $scope.taxLevelProgress; - commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'}) - }, function (evt) { - $scope.taxLevelProgress.value = parseInt(100 * evt.loaded / evt.total); - }) - } - } - }; - - $scope.uploadBankAccountOpen = function (file) { - if (file != null) { - if (file.size > 3 * 1024 * 1024) { - commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB,请压缩后重试', type: 'error'}) - } else { - $scope.bankAccountOpenProgress = {value: 0}; - Upload.upload({ - url: '/attachment/yeepayFiles', - data: {file: file} - }).then(function (resp) { - delete $scope.bankAccountOpenProgress; - $scope.bankAccountOpen = resp.data.path; - vouchers['bankAccountOpen'] = resp.data.path; - merchantId = resp.data.merchantId; - commonDialog.alert({title: 'Upload Success', content: 'Upload Success', type: 'success'}) - }, function (resp) { - delete $scope.bankAccountOpenProgress; - commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'}) - }, function (evt) { - $scope.bankAccountOpenProgress.value = parseInt(100 * evt.loaded / evt.total); - }) - } - } - }; - - $scope.uploadOrgCode = function (file) { - if (file != null) { - if (file.size > 3 * 1024 * 1024) { - commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB,请压缩后重试', type: 'error'}) - } else { - $scope.orgCodeProgress = {value: 0}; - Upload.upload({ - url: '/attachment/yeepayFiles', - data: {file: file} - }).then(function (resp) { - delete $scope.orgCodeProgress; - $scope.orgCode = resp.data.path; - vouchers['orgCode'] = resp.data.path; - merchantId = resp.data.merchantId; - commonDialog.alert({title: 'Upload Success', content: 'Upload Success', type: 'success'}) - }, function (resp) { - delete $scope.orgCodeProgress; - commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'}) - }, function (evt) { - $scope.orgCodeProgress.value = parseInt(100 * evt.loaded / evt.total); - }) - } - } - }; - - $scope.uploadNonStanProtocol = function (file) { - if (file != null) { - if (file.size > 3 * 1024 * 1024) { - commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB,请压缩后重试', type: 'error'}) - } else { - $scope.nonStanProtocolProgress = {value: 0}; - Upload.upload({ - url: '/attachment/yeepayFiles', - data: {file: file} - }).then(function (resp) { - delete $scope.nonStanProtocolProgress; - $scope.nonStanProtocol = resp.data.path; - vouchers['nonStanProtocol'] = resp.data.path; - merchantId = resp.data.merchantId; - commonDialog.alert({title: 'Upload Success', content: 'Upload Success', type: 'success'}) - }, function (resp) { - delete $scope.nonStanProtocolProgress; - commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'}) - }, function (evt) { - $scope.nonStanProtocolProgress.value = parseInt(100 * evt.loaded / evt.total); - }) - } - } - }; - - $scope.uploadZipPath = function (file) { - if (file != null) { - if (file.size > 3 * 1024 * 1024) { - commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB,请压缩后重试', type: 'error'}) - } else { - $scope.zipPathProgress = {value: 0}; - Upload.upload({ - url: '/attachment/yeepayFiles', - data: {file: file} - }).then(function (resp) { - delete $scope.zipPathProgress; - $scope.zipPath = resp.data.path; - vouchers['zipPath'] = resp.data.path; - merchantId = resp.data.merchantId; - commonDialog.alert({title: 'Upload Success', content: 'Upload Success', type: 'success'}) - }, function (resp) { - delete $scope.zipPathProgress; - commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'}) - }, function (evt) { - $scope.zipPathProgress.value = parseInt(100 * evt.loaded / evt.total); - }) - } - } - }; + // $scope.uploadTaxLevel = function (file) { + // if (file != null) { + // if (file.size > 3 * 1024 * 1024) { + // commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB,请压缩后重试', type: 'error'}) + // } else { + // $scope.taxLevelProgress = {value: 0}; + // Upload.upload({ + // url: '/attachment/yeepayFiles', + // data: {file: file} + // }).then(function (resp) { + // delete $scope.taxLevelProgress; + // $scope.taxLevel = resp.data.path; + // vouchers['taxLevel'] = resp.data.path; + // merchantId = resp.data.merchantId; + // commonDialog.alert({title: 'Upload Success', content: 'Upload Success', type: 'success'}) + // }, function (resp) { + // delete $scope.taxLevelProgress; + // commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'}) + // }, function (evt) { + // $scope.taxLevelProgress.value = parseInt(100 * evt.loaded / evt.total); + // }) + // } + // } + // }; + + // $scope.uploadBankAccountOpen = function (file) { + // if (file != null) { + // if (file.size > 3 * 1024 * 1024) { + // commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB,请压缩后重试', type: 'error'}) + // } else { + // $scope.bankAccountOpenProgress = {value: 0}; + // Upload.upload({ + // url: '/attachment/yeepayFiles', + // data: {file: file} + // }).then(function (resp) { + // delete $scope.bankAccountOpenProgress; + // $scope.bankAccountOpen = resp.data.path; + // vouchers['bankAccountOpen'] = resp.data.path; + // merchantId = resp.data.merchantId; + // commonDialog.alert({title: 'Upload Success', content: 'Upload Success', type: 'success'}) + // }, function (resp) { + // delete $scope.bankAccountOpenProgress; + // commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'}) + // }, function (evt) { + // $scope.bankAccountOpenProgress.value = parseInt(100 * evt.loaded / evt.total); + // }) + // } + // } + // }; + + // $scope.uploadOrgCode = function (file) { + // if (file != null) { + // if (file.size > 3 * 1024 * 1024) { + // commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB,请压缩后重试', type: 'error'}) + // } else { + // $scope.orgCodeProgress = {value: 0}; + // Upload.upload({ + // url: '/attachment/yeepayFiles', + // data: {file: file} + // }).then(function (resp) { + // delete $scope.orgCodeProgress; + // $scope.orgCode = resp.data.path; + // vouchers['orgCode'] = resp.data.path; + // merchantId = resp.data.merchantId; + // commonDialog.alert({title: 'Upload Success', content: 'Upload Success', type: 'success'}) + // }, function (resp) { + // delete $scope.orgCodeProgress; + // commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'}) + // }, function (evt) { + // $scope.orgCodeProgress.value = parseInt(100 * evt.loaded / evt.total); + // }) + // } + // } + // }; + // + // $scope.uploadNonStanProtocol = function (file) { + // if (file != null) { + // if (file.size > 3 * 1024 * 1024) { + // commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB,请压缩后重试', type: 'error'}) + // } else { + // $scope.nonStanProtocolProgress = {value: 0}; + // Upload.upload({ + // url: '/attachment/yeepayFiles', + // data: {file: file} + // }).then(function (resp) { + // delete $scope.nonStanProtocolProgress; + // $scope.nonStanProtocol = resp.data.path; + // vouchers['nonStanProtocol'] = resp.data.path; + // merchantId = resp.data.merchantId; + // commonDialog.alert({title: 'Upload Success', content: 'Upload Success', type: 'success'}) + // }, function (resp) { + // delete $scope.nonStanProtocolProgress; + // commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'}) + // }, function (evt) { + // $scope.nonStanProtocolProgress.value = parseInt(100 * evt.loaded / evt.total); + // }) + // } + // } + // }; + // + // $scope.uploadZipPath = function (file) { + // if (file != null) { + // if (file.size > 3 * 1024 * 1024) { + // commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB,请压缩后重试', type: 'error'}) + // } else { + // $scope.zipPathProgress = {value: 0}; + // Upload.upload({ + // url: '/attachment/yeepayFiles', + // data: {file: file} + // }).then(function (resp) { + // delete $scope.zipPathProgress; + // $scope.zipPath = resp.data.path; + // vouchers['zipPath'] = resp.data.path; + // merchantId = resp.data.merchantId; + // commonDialog.alert({title: 'Upload Success', content: 'Upload Success', type: 'success'}) + // }, function (resp) { + // delete $scope.zipPathProgress; + // commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'}) + // }, function (evt) { + // $scope.zipPathProgress.value = parseInt(100 * evt.loaded / evt.total); + // }) + // } + // } + // }; $scope.uploadDirectorPassport = function (file) { if (file != null) { @@ -4088,7 +4090,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter } }; - $scope.saveYeepayApply = function (form) { + $scope.updateYeepayApply = function (form) { $scope.errmsg = null; if (form.$invalid) { angular.forEach(form, function (item, key) { @@ -4105,18 +4107,21 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter // } // } // }); + merchantInfo['company_website'] = $scope.subMerchantInfo.company_website; + merchantInfo['abn'] = $scope.subMerchantInfo.abn; merchantInfo['executives'] = $scope.executives; + merchantInfo['subMerchantId'] = angular.copy(subMerchantId); merchantInfo['directors'] = $scope.directors; merchantInfo['business_content'] = $scope.business_content; merchantInfo['industry'] = $scope.industry; merchantInfo['merchantId'] = merchantId; - $http.post('/sys/partners/' + $scope.subMerchantInfo.client_moniker + '/registYeepaySubMerchantId', merchantInfo).then(function (resp) { + $http.post('/sys/partners/' + $scope.subMerchantInfo.client_moniker + '/updateYeepaySubMerchantId', merchantInfo).then(function (resp) { $scope.apply_sub_merchant_id = resp.data; $scope.$close(); if (subMerchantInfo.yeepay_sub_merchant_id != null) { commonDialog.alert({ title: 'Success', - content: 'Modify Yeepay Sub Merchant ID successfully', + content: 'Update Successfully,Please Wait For Review!', type: 'success' }); $state.reload(); diff --git a/src/main/ui/static/payment/partner/templates/apply_yeepay_sub_merchant_id.html b/src/main/ui/static/payment/partner/templates/apply_yeepay_sub_merchant_id.html index 72f2b2185..6eed12f07 100644 --- a/src/main/ui/static/payment/partner/templates/apply_yeepay_sub_merchant_id.html +++ b/src/main/ui/static/payment/partner/templates/apply_yeepay_sub_merchant_id.html @@ -39,6 +39,30 @@ +
+ +
+ +
+

Required Field

+
+
+

eg:https://www.royalpay.com.au

+
+
+
+
+ +
+ +
+

Required Field

+
+
+
+ @@ -181,7 +205,7 @@
- +
@@ -236,7 +260,7 @@
- +
diff --git a/src/main/ui/static/payment/partner/templates/sub_merchant_id_apply.html b/src/main/ui/static/payment/partner/templates/sub_merchant_id_apply.html index b5da35571..c9dcc545f 100644 --- a/src/main/ui/static/payment/partner/templates/sub_merchant_id_apply.html +++ b/src/main/ui/static/payment/partner/templates/sub_merchant_id_apply.html @@ -201,10 +201,10 @@ ng-click="useYeepaySubMerchantId(id_apply.sub_merchant_id)"> USE - - - - +
diff --git a/src/main/ui/static/payment/partner/templates/update_yeepay_sub_merchant_id.html b/src/main/ui/static/payment/partner/templates/update_yeepay_sub_merchant_id.html index 8d656df06..30769c0bf 100644 --- a/src/main/ui/static/payment/partner/templates/update_yeepay_sub_merchant_id.html +++ b/src/main/ui/static/payment/partner/templates/update_yeepay_sub_merchant_id.html @@ -39,6 +39,30 @@
+
+ +
+ +
+

Required Field

+
+
+

eg:https://www.royalpay.com.au

+
+
+
+
+ +
+ +
+

Required Field

+
+
+
+ @@ -181,7 +205,7 @@
- +
@@ -236,7 +260,7 @@
- +