add upay_desc_file

master
luoyang 5 years ago
parent 2d48e63569
commit 9beff85f28

@ -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;
}
}

@ -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);
}

@ -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()};
}
}

@ -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) {

@ -252,6 +252,23 @@
</a>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-2">* Detailed Business Description详细的业务描述</label>
<div class="col-sm-4">
<div class="form-control-static">
<button class="btn btn-primary" type="button" ng-if="('10'|withRole) || (('100'|withRole) && (!partner.upay_approve_result || partner.upay_approve_result==0 || partner.upay_approve_result==5))"
ngf-select="uploadDescFile($file)">
<i class="fa fa-upload"></i> Upload
</button>
<i class="fa fa-check-square-o check-i" aria-hidden="true" style="float: none" ng-if="$root.complianceCheck.authFile"></i>
<a role="button" download="" target="_blank" class="btn-group btn btn-warning" type="button" href="{{file.upay_desc_file}}" ><i class="fa fa-download"></i></a>
</div>
<uib-progressbar value="descFileProgress.value" ng-if="descFileProgress"></uib-progressbar>
<a ng-if="descIsImage" target="_blank" ng-href="{{file.upay_desc_file}}">
<img ng-src="{{file.upay_desc_file}}"class="col-sm-6" onerror="this.src='/static/images/file_close.png'">
</a>
</div>
</div>
</div>
</div>
<div style="text-align: center">

Loading…
Cancel
Save