[R] 接口调整

master
liuxinxin 5 years ago
parent 1fac5ac08c
commit 8af398e674

@ -2561,9 +2561,7 @@ public class RetailAppServiceImp implements RetailAppService {
JSONObject result = new JSONObject();
boolean lessKycFiles = true;
JSONObject kycFilesAuth = clientComplianceCompanyMapper.findKycFileComplete(client.getIntValue("client_id"));
if(kycFilesAuth != null
|| !("PINE".equals(client.getString("client_moniker"))
|| "LEOH".equals(client.getString("client_moniker")))){
if(kycFilesAuth != null){
lessKycFiles = false;
}
result.put("help_confirm", messageSource.getMessage("client.auth.file.help_confirm", null, RequestEnvironment.getLocale()));
@ -2602,23 +2600,21 @@ public class RetailAppServiceImp implements RetailAppService {
JSONObject complianceFilesNotice = new JSONObject();
JSONObject complianceFileStatus = signInAccountService.checkAuthFileStatus(client);
/*if(!complianceFileStatus.getBoolean("client_less_file")){
return null;
}*/
JSONObject compliance = clientComplianceCompanyMapper.findFileByClientId(account.getIntValue("client_id"));
complianceFilesNotice.put("auth_type",FilesAuthTypeEnum.COMPLIANCE.getAuthType());
complianceFilesNotice.put("type", messageSource.getMessage("client.auth.file.compliance.type", null, RequestEnvironment.getLocale()));
/*complianceFilesNotice.put("deadline","2020-01-31");*/
/*complianceFilesNotice.put("root_url","111");*/
complianceFilesNotice.put("client_less_file",complianceFileStatus.getBoolean("client_less_file"));
if(compliance != null){
complianceFilesNotice.put("client_refuse_reason",compliance.getString("description"));
complianceFilesNotice.put("status",compliance.getString("status"));
complianceFilesNotice.put( "status_type", FilesAuthStatusEnum.STATUS.getAuthStatus(compliance.getIntValue("status")) );
}else if( !complianceFileStatus.getBoolean("client_less_file")){
complianceFilesNotice.put( "status_type", FilesAuthStatusEnum.STATUS.getAuthStatus(1) );
}else{
complianceFilesNotice.put( "status_type", FilesAuthStatusEnum.STATUS.getAuthStatus(-1) );
}
complianceFilesNotice.put("status_type_description", messageSource.getMessage("client.auth.file.status."+ complianceFilesNotice.getString( "status_type").toLowerCase(), null, RequestEnvironment.getLocale()));
return complianceFilesNotice;
}
@ -2634,8 +2630,6 @@ public class RetailAppServiceImp implements RetailAppService {
kycFilesNotice.put("auth_type",FilesAuthTypeEnum.KYC.getAuthType());
kycFilesNotice.put("type", messageSource.getMessage("client.auth.file.kyc.type", null, RequestEnvironment.getLocale()));
/* kycFilesNotice.put("deadline", "2020-01-31");*/
/* kycFilesNotice.put("root_url","111");*/
kycFilesNotice.put("client_less_file",kycFileStatus.getBoolean("client_less_file"));
if(compliance != null){
kycFilesNotice.put("client_refuse_reason",compliance.getString("description"));
@ -2644,6 +2638,7 @@ public class RetailAppServiceImp implements RetailAppService {
}else{
kycFilesNotice.put( "status_type", FilesAuthStatusEnum.STATUS.getAuthStatus(-1) );
}
kycFilesNotice.put("status_type_description", messageSource.getMessage("client.auth.file.status."+ kycFilesNotice.getString( "status_type").toLowerCase(), null, RequestEnvironment.getLocale()));
return kycFilesNotice;
}
@ -2964,7 +2959,7 @@ public class RetailAppServiceImp implements RetailAppService {
res.put("base_info_lack", true);
}
clientLegalInfo = sysClientLegalPersonMapper.findRepresentativeInfo(res.getIntValue("client_id"));
if (StringUtils.isEmpty(clientLegalInfo.getString("representative_person")) || StringUtils.isEmpty(clientLegalInfo.getString("job_title"))
if (clientLegalInfo == null||StringUtils.isEmpty(clientLegalInfo.getString("representative_person")) || StringUtils.isEmpty(clientLegalInfo.getString("job_title"))
|| StringUtils.isEmpty(clientLegalInfo.getString("phone"))
|| StringUtils.isEmpty(clientLegalInfo.getString("email"))
|| StringUtils.isEmpty(clientLegalInfo.getString("address"))

@ -226,6 +226,9 @@ public class KycServiceImpl implements KycService {
if (clientAllAuthFiles == null || clientAllAuthFiles.size() == 0) {
throw new BadRequestException("Please check the information is uploaded completely");
}
if( !"passport".equals(account.getString("id_type")) && !"driver_license".equals(account.getString("id_type"))){
throw new BadRequestException("Please check the Id Type is selected");
}
String[] fileKeys = {"client_company_file", "client_id_file"};
String[] fileNames = {"ASIC File", "ID"};
if(StringUtils.equalsIgnoreCase("passport",account.getString("id_type")) ){

@ -22,13 +22,12 @@ package au.com.royalpay.payment.manage.kyc.enums;
public String getAuthStatus(int status) {
switch (status) {
case 0:
case 9:
return "WAIT_AUTH";
case 1:
return "PASSED";
case 2:
return "REFUSED";
case 9:
return "BD_HELP";
case -1:
return "NOT_SUBMITTED";
default:

@ -43,6 +43,8 @@ public interface ClientFilesMapper {
List<JSONObject> findRepetitiveFiles(@Param("client_id") int clientId,@Param("file_name") String fileType);
List<JSONObject> findRepetitiveFilesForDelete(@Param("client_id") int clientId,@Param("file_name") String fileType);
@AutoSql(type = SqlType.SELECT)
JSONObject findFileById(@Param("file_id") String file_id);

@ -19,6 +19,8 @@ public class ClientAuthFilesInfo {
private String file_apply_info;
private String utility_bill_info;
private int authStatus=0;
public JSONObject toJson(){
@ -73,6 +75,14 @@ public class ClientAuthFilesInfo {
this.file_id_info = file_id_info;
}
public String getUtility_bill_info() {
return utility_bill_info;
}
public void setUtility_bill_info(String utility_bill_info) {
this.utility_bill_info = utility_bill_info;
}
@Override
public String toString() {
return "ClientAuthFilesInfo{" +
@ -81,6 +91,7 @@ public class ClientAuthFilesInfo {
", file_id_info='" + file_id_info + '\'' +
", file_agreement_info='" + file_agreement_info + '\'' +
", file_apply_info='" + file_apply_info + '\'' +
", utility_bill_info='" + utility_bill_info + '\'' +
", authStatus=" + authStatus +
'}';
}

@ -519,6 +519,8 @@ public interface ClientManager {
boolean isPartnerKycfilesComplete(String clientMoniker);
JSONObject isLessFiles(JSONObject partner);
/**
* /
*

@ -918,17 +918,31 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
}
clientMapper.update(info);
if (StringUtils.isNotBlank(info.getString("representative_person"))) {
JSONObject legal = new JSONObject();
legal.put("client_id", client.getIntValue("client_id"));
legal.put("representative_person", info.getString("representative_person"));
legal.put("job_title", info.getString("representative_job_title"));
legal.put("phone", info.getString("representative_phone"));
legal.put("email", info.getString("representative_email"));
legal.put("address", info.getString("registered_address"));
legal.put("suburb", info.getString("registered_suburb"));
legal.put("state", info.getString("registered_state"));
legal.put("postcode", info.getString("registered_postcode"));
sysClientLegalPersonMapper.update(legal);
JSONObject legalInfo = sysClientLegalPersonMapper.findRepresentativeInfo(clientId);
if(legalInfo != null){
legalInfo.put("client_id", client.getIntValue("client_id"));
legalInfo.put("representative_person", info.getString("representative_person"));
legalInfo.put("job_title", info.getString("representative_job_title"));
legalInfo.put("phone", info.getString("representative_phone"));
legalInfo.put("email", info.getString("representative_email"));
legalInfo.put("address", info.getString("registered_address"));
legalInfo.put("suburb", info.getString("registered_suburb"));
legalInfo.put("state", info.getString("registered_state"));
legalInfo.put("postcode", info.getString("registered_postcode"));
sysClientLegalPersonMapper.update(legalInfo);
}else{
JSONObject legal = new JSONObject();
legal.put("client_id", client.getIntValue("client_id"));
legal.put("representative_person", info.getString("representative_person"));
legal.put("job_title", info.getString("representative_job_title"));
legal.put("phone", info.getString("representative_phone"));
legal.put("email", info.getString("representative_email"));
legal.put("address", info.getString("registered_address"));
legal.put("suburb", info.getString("registered_suburb"));
legal.put("state", info.getString("registered_state"));
legal.put("postcode", info.getString("registered_postcode"));
sysClientLegalPersonMapper.save(legal);
}
}
saveOrUpdateMailList(info, client);
clientInfoCacheSupport.clearClientCache(clientId);
@ -1105,6 +1119,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
clientModifySupport.processClientModify(auditModify);
sendCommissionWechatMessage(client);// wxMessage
if (pass == 1) {
createKycAuthStatus(manager,client);
clientModifySupport.processClientConfigModify(new SwitchPermissionModify(manager, clientMoniker, "skip_clearing", false));
if (client.getIntValue("source") == 4) {
List<JSONObject> accounts = clientAccountMapper.listAdminAccounts(client.getIntValue("client_id"));
@ -1126,6 +1141,18 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
clientInfoCacheSupport.clearClientCache(client.getIntValue("client_id"));
}
public void createKycAuthStatus(JSONObject manager,JSONObject client){
JSONObject fileComp = new JSONObject();
fileComp.put("client_id", client.getIntValue("client_id"));
fileComp.put("submit_time", new Date());
fileComp.put("status", 1);
fileComp.put("source", 2);
fileComp.put("commit_by_id", manager.getString("display_name"));
fileComp.put("type", 2);
fileComp.put("is_valid", 1);
clientComplianceCompanyMapper.save(fileComp);
}
@Override
public void auditClientGreenChannel(JSONObject manager, String clientMoniker) {
JSONObject client = getClientInfoByMoniker(clientMoniker);
@ -3404,6 +3431,25 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
for (JSONObject file : clientFiles) {
fileJson.put(file.getString("file_name"), file.getString("file_value"));
}
String[] fileKeys = {"kyc_utility_bill_file"};
if (clientFiles.size() > 0) {
for (String fileKey : fileKeys) {
List<JSONObject> clientFileUrl = clientFiles.stream()
.filter(json -> (fileKey.equals(json.getString("file_name"))))
.sorted((log1, log2) -> log2.getDate("last_update_date").compareTo(log1.getDate("last_update_date")))
.map(json -> {
JSONObject params = new JSONObject();
params.put("file_id", json.getString("file_id"));
params.put("file_value", json.getString("file_value"));
return params;
})
.collect(Collectors.toList());
if (clientFileUrl != null && clientFileUrl.size() > 0) {
fileJson.put(fileKey, clientFileUrl);
}
}
}
return fileJson;
}
@ -3423,7 +3469,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
@Override
public JSONObject getAllAuthFiles(JSONObject manager, String clientMoniker) {
JSONObject client = getClientInfoByMoniker(clientMoniker);
String[] fileKeys = {"client_bank_file", "client_company_file", "client_id_file", "client_agree_file", "client_apply_file"};
String[] fileKeys = {"client_bank_file", "client_company_file", "client_id_file", "client_agree_file", "client_apply_file","kyc_utility_bill_file"};
if (client == null) {
throw new InvalidShortIdException();
}
@ -3541,9 +3587,10 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
try {
updateSysClientFiles(manager, clientId, CLIENT_AGREE_FILE, filesInfo.getFile_agreement_info());
updateSysClientFiles(manager, clientId, CLIENT_APPLY_FILE, filesInfo.getFile_apply_info());
updateSysClientFiles(manager, clientId, CLIENT_BANK_FILE, filesInfo.getFile_bank_info());
updateSysClientFiles(manager, clientId, CLIENT_COMPANY_FILE, filesInfo.getFile_company_info());
updateSysClientFiles(manager, clientId, CLIENT_ID_FILE, filesInfo.getFile_id_info());
updateSysClientFilesWithoutRepeat(manager, clientId, CLIENT_BANK_FILE, filesInfo.getFile_bank_info());
updateSysClientFilesWithoutRepeat(manager, clientId, CLIENT_COMPANY_FILE, filesInfo.getFile_company_info());
updateSysClientFilesWithoutRepeat(manager, clientId, CLIENT_ID_FILE, filesInfo.getFile_id_info());
updateSysClientFiles(manager, clientId, KYC_UTILITY_BILL_FILE, filesInfo.getUtility_bill_info());
} catch (Exception e) {
logger.error("上传合规文件失败", e);
}
@ -3987,6 +4034,29 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
}
}
public void updateSysClientFilesWithoutRepeat(JSONObject manager, int clientId, String fileType, String fileValue) {
List<JSONObject> repetitiveFiles = clientFilesMapper.findRepetitiveFilesForDelete(clientId,fileType);
if (fileValue != null) {
JSONObject fileJson = new JSONObject();
fileJson.put("client_id", clientId);
fileJson.put("last_update_date", new Date());
fileJson.put("last_update_by", manager.getString("display_name"));
fileJson.put("file_name", fileType);
fileJson.put("file_value", fileValue);
fileJson.put("status", 1);
fileJson.put("is_valid", 1);
clientFilesMapper.save(fileJson);
logger.info(clientId + "的fileType文件上传成功");
if(repetitiveFiles != null){
for(JSONObject repetitiveFile : repetitiveFiles){
clientFilesMapper.deleteByClientAndFileId(repetitiveFile.getString("file_id"));
}
}
}
}
public void updateSysClientFilesForWaitCompliance(JSONObject manager, int clientId, String fileType, String fileValue, List<JSONObject> fileResult) {
if (fileValue != null) {
String[] values = fileValue.split(",");
@ -5659,6 +5729,9 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
throw new BadRequestException("The Partner's Bank Account is not config!");
}
JSONObject representativeInfo = sysClientLegalPersonMapper.findRepresentativeInfo(client.getIntValue("client_id"));
if (representativeInfo == null) {
throw new BadRequestException("The LegalPersonInfo is not config!Please upgrade the RoyalPay App version");
}
for (String str : representativeInfo.keySet()) {
if (representativeInfo.getString(str) == null || !(representativeInfo.getString(str).length() > 0) || !(client.getString("contact_job") != null && client.getString("contact_job").length() > 0)) {
throw new BadRequestException("The LegalPersonInfo is not config!Please upgrade the RoyalPay App version");
@ -6273,6 +6346,20 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
}};
}
@Override
public JSONObject isLessFiles(JSONObject partner){
JSONObject client = clientMapper.findClientByMoniker(partner.getString("client_moniker"));
if (client == null) {
throw new InvalidShortIdException();
}
if(client.getIntValue("approve_result") == 1){
boolean lessKycFiles = isPartnerKycfilesComplete(partner.getString("client_moniker"));
partner.put("lessKycFiles", lessKycFiles);
partner.put("lessComplianceFiles",signInAccountService.checkAuthFileStatus(partner.getJSONObject("client")).getBoolean("client_less_file") );
}
return partner;
}
@Override
public boolean isPartnerKycfilesComplete(String clientMoniker) {
boolean lessKycFiles = true;

@ -622,6 +622,12 @@ public class PartnerViewController {
clientManager.deleteAuthFiles(fileId);
}
@PartnerMapping(value = "/auth_file/{fileId}/deleteByAdmin", method = RequestMethod.PUT, roles = {PartnerRole.ADMIN, PartnerRole.MANAGER})
@ResponseBody
public void deleteAuthFilesByAdmin(@PathVariable String fileId, @ModelAttribute(CommonConsts.PARTNER_STATUS) JSONObject account) {
clientManager.deleteAuthFilesByAdmin(fileId);
}
/**
*
* @param clientMoniker

@ -751,9 +751,7 @@ public class SignInAccountServiceImpl implements SignInAccountService, Applicati
JSONObject result = new JSONObject();
boolean lessKycFiles = true;
JSONObject kycFilesAuth = clientComplianceCompanyMapper.findKycFileComplete(client.getIntValue("client_id"));
if(kycFilesAuth != null
|| !("PINE".equals(client.getString("client_moniker"))
|| "LEOH".equals(client.getString("client_moniker")))){
if(kycFilesAuth != null){
lessKycFiles = false;
}
result.put("client_less_file", lessKycFiles);

@ -186,9 +186,7 @@ public class SignInController {
@PartnerMapping(value = "/current_partner", method = RequestMethod.GET)
public JSONObject partnerLoginStatus(@ModelAttribute(CommonConsts.PARTNER_STATUS) JSONObject partner) {
partner.put("has_incremental_setvice",clientManager.partnerIncrementalService(partner.getString("client_moniker")).getJSONArray("all_service").size()>0);
boolean lessKycFiles = ("PINE".equals(partner.getString("client_moniker")) || "LEOH".equals(partner.getString("client_moniker"))) && clientManager.isPartnerKycfilesComplete(partner.getString("client_moniker"));
partner.put("lessKycFiles", lessKycFiles);
partner.put("lessComplianceFiles",signInAccountService.checkAuthFileStatus(partner.getJSONObject("client")).getBoolean("client_less_file") );
partner = clientManager.isLessFiles(partner);
return partner;
}

@ -38,6 +38,17 @@
AND is_valid = 1
</select>
<select id="findRepetitiveFilesForDelete" resultType="com.alibaba.fastjson.JSONObject">
SELECT
*
FROM
sys_files
WHERE
client_id = #{client_id}
AND file_name = #{file_name}
AND is_valid = 1
</select>
<select id="findAllClientFile" resultType="com.alibaba.fastjson.JSONObject">
select * from sys_files where is_valid = 1
and client_id = #{client_id}

@ -121,3 +121,7 @@ client.auth.file.compliance.type=2019-10 KYC Certification Information Supplemen
client.auth.file.kyc.type=2020-01 KYC Certification Information Supplement(2)
client.auth.file.help_confirm=Please confirm whether you need help from customer service ?
client.auth.file.help_success=Successful notification, please wait for customer service to contact you.
client.auth.file.status.wait_auth=Pending examination and approval
client.auth.file.status.passed=Done
client.auth.file.status.refused=Refused
client.auth.file.status.not_submitted=Not Submitted

@ -114,3 +114,7 @@ client.auth.file.compliance.type=2019-10月KYC材料认证补充(1)
client.auth.file.kyc.type=2020-01月KYC材料认证补充(2)
client.auth.file.help_confirm=请确认您是否需要客服的帮助?
client.auth.file.help_success=通知成功,请等待客服与您联系。
client.auth.file.status.wait_auth=待审核
client.auth.file.status.passed=已完成
client.auth.file.status.refused=打回
client.auth.file.status.not_submitted=未提交

@ -17,12 +17,12 @@
}
</style>
<section class="content-header">
<h1>商户KYC文件补充
<h1>2020-01月KYC材料认证补充(2)
<span class="small text-danger" style="margin: 20px 20px;font-size: 20px;" ng-if="file.file_company.description">
({{file.file_company.description}})</span>
</h1>
<br/>
<p ng-if="currentUser.lessComplianceFiles && currentUser.lessKycFiles">前去补充合规文件:<a ui-sref="compliance_to_perfect">点击前往</a></p>
<p ng-if="currentUser.lessComplianceFiles && currentUser.lessKycFiles">前去补充2019-10月KYC材料认证补充(1) :<a ui-sref="compliance_to_perfect">点击前往</a></p>
</section>
<div class="panel-body box box-warning ng-scope" style="margin-top: 20px;">
<div class="form-horizontal">

@ -3876,6 +3876,39 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
if ($scope.file.file_id_info && $scope.file.file_id_info.endsWith('pdf')) {
$scope.idIsImage = false;
}
$scope.billIsImage = true;
if ($scope.file.file_company_info && $scope.file.file_company_info.endsWith('pdf')) {
$scope.billIsImage = false;
}
//上传账单流水
$scope.uploadBillFile = function (file) {
if (file != null) {
if (file.size > 3 * 1024 * 1024) {
commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB请压缩后重试', type: 'error'})
} else {
$scope.billFileProgress = {value: 0};
Upload.upload({
url: '/attachment/files',
data: {file: file}
}).then(function (resp) {
delete $scope.billFileProgress;
$scope.file.utility_bill_info = resp.data.url;
$scope.updateFile();
if ($scope.file.utility_bill_info.endsWith('pdf')) {
$scope.billIsImage = false;
} else {
$scope.billIsImage = true;
}
}, function (resp) {
delete $scope.billFileProgress;
commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'})
}, function (evt) {
$scope.billFileProgress.value = parseInt(100 * evt.loaded / evt.total);
})
}
}
};
$scope.uploadCompanyFile = function (file) {
if (file != null) {

@ -328,6 +328,15 @@ define(['angular', 'decimal', 'uiRouter', 'ngBootSwitch', 'ngFileUpload', 'uiBoo
$scope.commitToCompliance = function () {
$http.get('/client/partner_info/compliance/files').then(function (resp) {
$scope.complianceFiles = resp.data;
var id_type = sessionStorage.getItem($scope.partner.client_moniker+'_idType');
if(id_type != 'passport' && id_type != 'driver_license'){
commonDialog.alert({title: 'Message', content: '请前去完善合规资料选择 ID Type再进行提交', type: 'info'});
return;
}
if(id_type == 'passport' && $scope.complianceFiles.kyc_utility_bill_file == null){
commonDialog.alert({title: 'Message', content: '请前去完善合规资料提交Utility Bill Files再进行提交', type: 'info'});
return;
}
if ($scope.complianceFiles.client_id_file == null || $scope.complianceFiles.client_bank_file == null || $scope.complianceFiles.client_company_file == null) {
commonDialog.alert({title: 'Message', content: '请前去完善合规资料,再进行提交!', type: 'info'});
return;
@ -651,8 +660,11 @@ define(['angular', 'decimal', 'uiRouter', 'ngBootSwitch', 'ngFileUpload', 'uiBoo
}
}]);
app.controller('clientComplianceFilesCtrl', ['$scope', '$http', '$rootScope', 'commonDialog', '$state', 'Upload', 'file', function ($scope, $http, $rootScope, commonDialog, $state, Upload, file) {
$scope.file = file.data || {};
$scope.file.id_type = sessionStorage.getItem($scope.partner.client_moniker+'_idType');
$scope.setSession = function(idType){
sessionStorage.setItem($scope.partner.client_moniker+'_idType',idType);
}
//audit files
$scope.uploadBankFile = function (file) {
if (file != null) {
@ -701,6 +713,10 @@ define(['angular', 'decimal', 'uiRouter', 'ngBootSwitch', 'ngFileUpload', 'uiBoo
if ($scope.file.file_id_info && $scope.file.file_id_info.endsWith('pdf')) {
$scope.idIsImage = false;
}
$scope.billIsImage = true;
if ($scope.file.utility_bill_info && $scope.file.utility_bill_info.endsWith('pdf')) {
$scope.billIsImage = false;
}
$scope.uploadCompanyFile = function (file) {
if (file != null) {
@ -817,6 +833,35 @@ define(['angular', 'decimal', 'uiRouter', 'ngBootSwitch', 'ngFileUpload', 'uiBoo
}
};
//上传账单流水
$scope.uploadBillFile = function (file) {
if (file != null) {
if (file.size > 3 * 1024 * 1024) {
commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB请压缩后重试', type: 'error'})
} else {
$scope.billFileProgress = {value: 0};
Upload.upload({
url: '/attachment/files',
data: {file: file}
}).then(function (resp) {
delete $scope.billFileProgress;
$scope.file.utility_bill_info = resp.data.url;
$scope.updateFile();
if ($scope.file.utility_bill_info.endsWith('pdf')) {
$scope.billIsImage = false;
} else {
$scope.billIsImage = true;
}
}, function (resp) {
delete $scope.billFileProgress;
commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'})
}, function (evt) {
$scope.billFileProgress.value = parseInt(100 * evt.loaded / evt.total);
})
}
}
};
/* $scope.downloadAsZip = function () {
var url = '/sys/partners/' + $scope.partner.client_moniker + '/download/complianceAsZIP';
return url;
@ -835,6 +880,26 @@ define(['angular', 'decimal', 'uiRouter', 'ngBootSwitch', 'ngFileUpload', 'uiBoo
})
};
$scope.deleteComplianceFiles = function (file_id) {
$scope.file_id = file_id;
commonDialog.confirm({
title: 'Warning',
content: 'This operation will delete the file, Are you sure?'
}).then(function () {
$http.put('/client/partner_info/auth_file/' + $scope.file_id + '/deleteByAdmin').then(function (resp) {
commonDialog.alert({
title: 'Success',
content: 'Delete Successful',
type: 'success'
});
$state.reload();
}, function (resp) {
commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'});
})
})
};
function commitError() {
commonDialog.alert({
title: 'Error',

@ -62,6 +62,27 @@
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-2">* Choose ID Type </label>
<div class="col-sm-4">
<div class="form-control-static">
<select class="form-control"
ng-model="file.id_type" style="width: 250px" ng-change="setSession(file.id_type)">
<option value="">Please Choose</option>
<option value="passport" >Passport</option>
<option value="driver_license">Driver's license</option>
</select>
<p class="text-info">
<i class="fa fa-info"></i> If client have already attached surcharge in their own system, ignore this choice.<br>
<i class="fa fa-info"></i> It is recommended to notice customers about they will pay addition money as surcharge in the payment page. <br>
<i class="fa fa-info"></i> 请选择上传ID的文件类型.<br>
<i class="fa fa-info"></i> 上传护照文件需要您上传水电煤账单文件.<br>
<i class="fa fa-info"></i> 上传驾照,水电煤账单文件可以不填.
</p>
</div>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-2">* ID </label>
<div class="col-sm-4">
@ -94,6 +115,51 @@
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-2"> Utility Bill Files</label>
<div class="col-sm-4">
<div class="form-control-static">
<button class="btn btn-primary" type="button"
ngf-select="uploadBillFile($file)">
<i class="fa fa-upload"></i> Upload
</button>
</div>
<uib-progressbar value="billFileProgress.value" ng-if="billFileProgress"></uib-progressbar>
<table>
<tbody>
<tr ng-repeat="file_src in file.kyc_utility_bill_file track by $index">
<td ng-bind="$index+1+'.'" class="btn">1</td>
<td><a ng-if="billIsImage" target="_blank" ng-href="{{file_src.file_value}}">
<img ng-src="{{file_src.file_value}}" class="col-sm-8"
onerror="this.src='/static/images/file_close.png'">
</a>
<button class="btn btn-danger" type="button"
ng-click="deleteComplianceFiles(file_src.file_id)">
X
</button>
</td>
</tr>
</tbody>
</table>
</div>
<div class="col-sm-5">
<div class="form-control-static">
<div class="col-sm-12">
<p class="col-sm-6">Example请提供水电煤账单文件图片,如示例
<img class="col-xs-12" style="border: 1px solid #ddd"
src="https://file.royalpay.com.au/open/2019/12/16/1576491226098_Ho29fpS08rNP9AvPTZQfyoIrNa9bcB.png" title="" alt="水费.png"/>
<br/><img class="col-xs-12" style="border: 1px solid #ddd"
src="https://file.royalpay.com.au/open/2019/12/16/1576491263193_hqD9DkQOZvqx8Qaw1ABIkqL21aSNrd.jpg" title="" alt="电费.jpg"/>
</p>
<p class="col-sm-6">
<img class="col-xs-12" style="border: 1px solid #ddd"
src="https://file.royalpay.com.au/open/2019/12/16/1576491285195_C8oXVU4QIJ3ADDEMghaNXTt3cXUhtd.png" title="" alt="煤气.png"/>
</p>
</div>
</div>
</div>
</div>
<!-- <div class="form-horizontal">
<div class="form-group">
<label class="control-label col-sm-2">* Agreement</label>

@ -17,12 +17,12 @@
}
</style>
<section class="content-header">
<h1>商户合规文件补充
<h1>2019-10月KYC材料认证补充(1)
<span class="small text-danger" style="margin: 20px 20px;font-size: 20px;" ng-if="file.client_refuse_reason">
({{file.client_refuse_reason}})</span>
</h1>
<br/>
<p ng-if="currentUser.lessComplianceFiles && currentUser.lessKycFiles">前去补充KYC文件<a ui-sref="kyc_files_perfect">点击前往</a></p>
<p ng-if="currentUser.lessComplianceFiles && currentUser.lessKycFiles">前去补充2020-01月KYC材料认证补充(2) <a ui-sref="kyc_files_perfect">点击前往</a></p>
</section>
<div class="panel-body box box-warning ng-scope" style="margin-top: 20px;">
<div class="form-horizontal">

@ -76,13 +76,13 @@
<span >Refused</span>
<span ng-if="file.file_company.description">({{file.file_company.description}})</span>
</p>
<p ng-if="file.file_company && file.file_company.status == 0">
<p ng-if="file.file_company && (file.file_company.status == 0 || file.file_company.status == 9)">
<span>Pending examination and approval</span>
</p>
<p ng-if="file.file_company && file.file_company.status == 1" style="color: green">
<p ng-if="(file.file_company && file.file_company.status == 1) || !file.client_less_file" style="color: green">
<span>Done</span>
</p>
<p ng-if=" !file.file_company">
<p ng-if=" !file.file_company && file.client_less_file">
<span>Not Submitted</span>
</p>
</td>
@ -98,7 +98,7 @@
<span>Refused</span>
<span ng-if="kycFile.file_company.description">({{kycFile.file_company.description}})</span>
</p>
<p ng-if="kycFile.file_company && kycFile.file_company.status == 0">
<p ng-if="kycFile.file_company && (kycFile.file_company.status == 0 || kycFile.file_company.status == 9)">
<span>Pending examination and approval</span>
</p>
<p ng-if="kycFile.file_company && kycFile.file_company.status == 1" style="color: green">
@ -136,13 +136,13 @@
<span>打回</span>
<span ng-if="file.file_company.description">({{file.file_company.description}})</span>
</p>
<p ng-if="file.file_company && file.file_company.status == 0">
<p ng-if="file.file_company && (file.file_company.status == 0 || file.file_company.status == 9)">
<span>待审核</span>
</p>
<p ng-if="file.file_company && file.file_company.status == 1" style="color: green">
<p ng-if="(file.file_company && file.file_company.status == 1) || !file.client_less_file" style="color: green">
<span>已完成</span>
</p>
<p ng-if=" !file.file_company">
<p ng-if=" !file.file_company && file.client_less_file">
<span>未提交</span>
</p>
</td>
@ -158,7 +158,7 @@
<span>打回</span>
<span ng-if="kycFile.file_company.description">({{kycFile.file_company.description}})</span>
</p>
<p ng-if="kycFile.file_company && kycFile.file_company.status == 0">
<p ng-if="kycFile.file_company && (kycFile.file_company.status == 0 || kycFile.file_company.status == 9)">
<span>待审核</span>
</p>
<p ng-if="kycFile.file_company && kycFile.file_company.status == 1" style="color: green">

@ -209,6 +209,52 @@
</div>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-2"> Utility Bill Files</label>
<div class="col-sm-4">
<div class="form-control-static">
<button class="btn btn-primary" type="button"
ngf-select="uploadBillFile($file)">
<i class="fa fa-upload"></i> Upload
</button>
<i class="fa fa-check-square-o check-i" style="float: none" aria-hidden="true"ng-if="$root.complianceCheck.authFile"></i>
</div>
<uib-progressbar value="billFileProgress.value" ng-if="billFileProgress"></uib-progressbar>
<table>
<tbody>
<tr ng-repeat="file_src in file.kyc_utility_bill_file track by $index">
<td ng-bind="$index+1+'.'" class="btn">1</td>
<td><a ng-if="billIsImage" target="_blank" ng-href="{{file_src.file_value}}">
<img ng-src="{{file_src.file_value}}" class="col-sm-8"
onerror="this.src='/static/images/file_close.png'">
</a>
<button class="btn btn-danger" type="button"
ng-click="deleteComplianceFiles(file_src.file_id)">
X
</button>
</td>
</tr>
</tbody>
</table>
</div>
<div class="col-sm-6">
<div class="form-control-static">
<div class="col-sm-12">
<p class="col-sm-6">Example请提供水电煤账单文件图片,如示例
<img class="col-xs-12" style="border: 1px solid #ddd"
src="https://file.royalpay.com.au/open/2019/12/16/1576491226098_Ho29fpS08rNP9AvPTZQfyoIrNa9bcB.png" title="" alt="水费.png"/>
<br/><img class="col-xs-12" style="border: 1px solid #ddd"
src="https://file.royalpay.com.au/open/2019/12/16/1576491263193_hqD9DkQOZvqx8Qaw1ABIkqL21aSNrd.jpg" title="" alt="电费.jpg"/>
</p>
<p class="col-sm-6">
<img class="col-xs-12" style="border: 1px solid #ddd"
src="https://file.royalpay.com.au/open/2019/12/16/1576491285195_C8oXVU4QIJ3ADDEMghaNXTt3cXUhtd.png" title="" alt="煤气.png"/>
</p>
</div>
</div>
</div>
</div>
</div>
</div>
<div style="text-align: center">

@ -277,9 +277,9 @@
<li ui-sref-active="active" ng-if="partner.show_all_permission && partner.is_valid==1">
<a ui-sref=".files">Compliance Files</a>
</li>
<li ui-sref-active="active" ng-if="partner.show_all_permission && partner.is_valid==1">
<!--<li ui-sref-active="active" ng-if="partner.show_all_permission && partner.is_valid==1">
<a ui-sref=".kyc_files">KYC Files</a>
</li>
</li>-->
<li ui-sref-active="active" ng-if="partner.show_all_permission && partner.is_valid==1">
<a ui-sref=".settlement({clientMoniker:partner.client_moniker})">Settlement</a>
</li>

Loading…
Cancel
Save