diff --git a/src/main/java/au/com/royalpay/payment/manage/merchants/beans/ClientMWAuthFilesInfo.java b/src/main/java/au/com/royalpay/payment/manage/merchants/beans/ClientMWAuthFilesInfo.java index 73f0db163..fde67b19e 100644 --- a/src/main/java/au/com/royalpay/payment/manage/merchants/beans/ClientMWAuthFilesInfo.java +++ b/src/main/java/au/com/royalpay/payment/manage/merchants/beans/ClientMWAuthFilesInfo.java @@ -20,6 +20,7 @@ public class ClientMWAuthFilesInfo { private String upay_risk_level; private String upay_risk_remark; private String upay_application_form; + private String upay_desc_file; public JSONObject toJson(){ return (JSONObject)JSONObject.toJSON(this); @@ -139,4 +140,12 @@ public class ClientMWAuthFilesInfo { public String getUpay_application_form() { return upay_application_form; } + + public String getUpay_desc_file() { + return upay_desc_file; + } + + public void setUpay_desc_file(String upay_desc_file) { + this.upay_desc_file = upay_desc_file; + } } 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 0a6955bca..c6d1d0b70 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 @@ -4008,6 +4008,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid updateSysMWClientFiles(manager, clientId, UPayAuthFileEnum.UPAY_TERMS_CONDITIONS.getFileName(), filesInfo.getUpay_terms_conditions()); updateSysMWClientFiles(manager, clientId, UPayAuthFileEnum.KYC_UTILITY_BILL_FILE.getFileName(), filesInfo.getKyc_utility_bill_file()); updateSysMWClientFiles(manager, clientId, UPayAuthFileEnum.UPAY_APPLICATION_FORM.getFileName(), filesInfo.getUpay_application_form()); + updateSysMWClientFiles(manager, clientId, UPayAuthFileEnum.UPAY_DESC_FILE.getFileName(), filesInfo.getUpay_desc_file()); } catch (Exception e) { logger.error("上传合规文件失败", e); } diff --git a/src/main/java/au/com/royalpay/payment/manage/merchants/enums/UPayAuthFileEnum.java b/src/main/java/au/com/royalpay/payment/manage/merchants/enums/UPayAuthFileEnum.java index 202a44d5f..bdaa59ecf 100644 --- a/src/main/java/au/com/royalpay/payment/manage/merchants/enums/UPayAuthFileEnum.java +++ b/src/main/java/au/com/royalpay/payment/manage/merchants/enums/UPayAuthFileEnum.java @@ -12,7 +12,8 @@ public enum UPayAuthFileEnum { UPAY_PROMOTIONAL_OFFER("upay_promotional_offer"), UPAY_TERMS_CONDITIONS("upay_terms_conditions"), KYC_UTILITY_BILL_FILE("kyc_utility_bill_file"), - UPAY_APPLICATION_FORM("upay_application_form"); + UPAY_APPLICATION_FORM("upay_application_form"), + UPAY_DESC_FILE("upay_desc_file"); private final String fileName; @@ -35,6 +36,7 @@ public enum UPayAuthFileEnum { UPAY_PROMOTIONAL_OFFER.getFileName(), UPAY_TERMS_CONDITIONS.getFileName(), KYC_UTILITY_BILL_FILE.getFileName(), - UPAY_APPLICATION_FORM.getFileName()}; + UPAY_APPLICATION_FORM.getFileName(), + UPAY_DESC_FILE.getFileName()}; } } diff --git a/src/main/ui/static/payment/partner/partner-manage.js b/src/main/ui/static/payment/partner/partner-manage.js index 199dc4bb3..d0f5574d3 100644 --- a/src/main/ui/static/payment/partner/partner-manage.js +++ b/src/main/ui/static/payment/partner/partner-manage.js @@ -3815,6 +3815,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter $scope.promotionalIsImage = true; $scope.termsIsImage = true; $scope.applicationIsImage = true; + $scope.descIsImage = true; if ($scope.file.client_bank_file && $scope.file.client_bank_file.endsWith('pdf')) { $scope.bankIsImage = false; } @@ -3848,6 +3849,9 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter if ($scope.file.upay_application_form && $scope.file.upay_application_form.endsWith('pdf')) { $scope.applicationIsImage = false; } + if ($scope.file.upay_desc_file && $scope.file.upay_desc_file.endsWith('pdf')) { + $scope.descIsImage = false; + } $scope.uploadApplicationFile = function (file) { if (file != null) { if (file.size > 3 * 1024 * 1024) { @@ -4167,6 +4171,35 @@ 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'}) + } else { + $scope.descFileProgress = {value: 0}; + Upload.upload({ + url: '/attachment/files', + data: {file: file} + }).then(function (resp) { + $scope.uploadFile = {}; + delete $scope.descFileProgress; + $scope.file.upay_desc_file = resp.data.url; + $scope.uploadFile.upay_desc_file = resp.data.url; + $scope.updateFile(); + if ($scope.file.upay_desc_file.endsWith('pdf')) { + $scope.descIsImage = false; + } else { + $scope.descIsImage = true; + } + }, function (resp) { + delete $scope.descFileProgress; + commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'}) + }, function (evt) { + $scope.descFileProgress.value = parseInt(100 * evt.loaded / evt.total); + }) + } + } + }; $scope.saveIdInfo = function () { if (!$scope.file.upay_risk_level) { diff --git a/src/main/ui/static/payment/partner/templates/partner_mw_auth_files.html b/src/main/ui/static/payment/partner/templates/partner_mw_auth_files.html index f522ad69f..dd8df6229 100644 --- a/src/main/ui/static/payment/partner/templates/partner_mw_auth_files.html +++ b/src/main/ui/static/payment/partner/templates/partner_mw_auth_files.html @@ -252,6 +252,23 @@ +
+ +
+
+ + + +
+ + + + +
+