商户合规资料不全,补充商户资料

master
liuxinxin 5 years ago
parent 5822cbc520
commit a4481c6c0e

@ -0,0 +1,28 @@
package au.com.royalpay.payment.manage.mappers.system;
import cn.yixblog.support.mybatis.autosql.annotations.AdvanceSelect;
import cn.yixblog.support.mybatis.autosql.annotations.AutoMapper;
import cn.yixblog.support.mybatis.autosql.annotations.AutoSql;
import cn.yixblog.support.mybatis.autosql.annotations.SqlType;
import com.alibaba.fastjson.JSONObject;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* Created by yishuqian on 06/03/2017.
*/
@AutoMapper(tablename = "client_authfile_compliance", pkName = "compliance_id")
public interface ClientComplianceCompanyMapper {
@AutoSql(type = SqlType.INSERT)
void save(JSONObject partner);
@AutoSql(type = SqlType.UPDATE)
void update(JSONObject partner);
@AutoSql(type = SqlType.SELECT)
JSONObject findFileByClientId(@Param("client_id") int client_id);
}

@ -0,0 +1,24 @@
package au.com.royalpay.payment.manage.mappers.system;
import cn.yixblog.support.mybatis.autosql.annotations.AdvanceSelect;
import cn.yixblog.support.mybatis.autosql.annotations.AutoMapper;
import cn.yixblog.support.mybatis.autosql.annotations.AutoSql;
import cn.yixblog.support.mybatis.autosql.annotations.SqlType;
import com.alibaba.fastjson.JSONObject;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* Created by yishuqian on 06/03/2017.
*/
@AutoMapper(tablename = "client_authfile_compliance_detail", pkName = "file_detial_id")
public interface ClientComplianceFilesMapper {
@AutoSql(type = SqlType.INSERT)
void save(JSONObject partner);
@AutoSql(type = SqlType.UPDATE)
void update(JSONObject partner);
}

@ -24,6 +24,17 @@ public interface ClientFilesMapper {
@AdvanceSelect(addonWhereClause = "is_valid = 1 and status = 1") @AdvanceSelect(addonWhereClause = "is_valid = 1 and status = 1")
List<JSONObject> findClientFile(@Param("client_id") int clientId); List<JSONObject> findClientFile(@Param("client_id") int clientId);
@AutoSql(type = SqlType.SELECT)
@AdvanceSelect(addonWhereClause = "is_valid = 1 and status = 0")
List<JSONObject> findClientFileCommit(@Param("client_id") int clientId);
@AutoSql(type = SqlType.SELECT)
@AdvanceSelect(addonWhereClause = "is_valid = 1 ")
List<JSONObject> findClientViewFile(@Param("client_id") int clientId);
void updateByFileId(@Param("file_id") String fileId);
@AutoSql(type = SqlType.SELECT) @AutoSql(type = SqlType.SELECT)
@AdvanceSelect(addonWhereClause = "is_valid = 1") @AdvanceSelect(addonWhereClause = "is_valid = 1")
List<JSONObject> findAllClientFile(@Param("client_id") int clientId); List<JSONObject> findAllClientFile(@Param("client_id") int clientId);
@ -37,4 +48,6 @@ public interface ClientFilesMapper {
void confirmAgreeFile(@Param("client_id") int client_id); void confirmAgreeFile(@Param("client_id") int client_id);
void updateBeforeCompliance(@Param("client_id") int client_id);
} }

@ -235,10 +235,16 @@ public interface ClientManager {
JSONObject getAuthFiles(JSONObject manager, String clientMoniker); JSONObject getAuthFiles(JSONObject manager, String clientMoniker);
JSONObject getClientViewAuthFiles(JSONObject manager, String clientMoniker);
JSONObject getAllAuthFiles(JSONObject manager, String clientMoniker); JSONObject getAllAuthFiles(JSONObject manager, String clientMoniker);
void deleteAuthFiles(JSONObject fileInfo);
void uploadAuthFiles(JSONObject manager, String clientMoniker, ClientAuthFilesInfo filesInfo); void uploadAuthFiles(JSONObject manager, String clientMoniker, ClientAuthFilesInfo filesInfo);
void uploadAuthFilesForClient(JSONObject manager, String clientMoniker, ClientAuthFilesInfo filesInfo);
JSONObject getClientsAnalysis(JSONObject manager); JSONObject getClientsAnalysis(JSONObject manager);
List<JSONObject> getUnRegister(JSONObject manager); List<JSONObject> getUnRegister(JSONObject manager);

@ -3080,6 +3080,44 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
return fileJson; return fileJson;
} }
@Override
public JSONObject getClientViewAuthFiles(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"};
if (client == null) {
throw new InvalidShortIdException();
}
List<JSONObject> clientFiles = clientFilesMapper.findClientViewFile(client.getIntValue("client_id"));
JSONObject fileJson = new JSONObject();
if (clientFiles != null && 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;
};
@Override
public void deleteAuthFiles(JSONObject fileInfo)
{
clientFilesMapper.updateByFileId(fileInfo.getString("file_id"));
}
@Override @Override
@Transactional @Transactional
public void uploadAuthFiles(JSONObject manager, String clientMoniker, ClientAuthFilesInfo filesInfo) { public void uploadAuthFiles(JSONObject manager, String clientMoniker, ClientAuthFilesInfo filesInfo) {
@ -3104,6 +3142,30 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
// } // }
} }
@Override
@Transactional
public void uploadAuthFilesForClient(JSONObject manager, String clientMoniker, ClientAuthFilesInfo filesInfo) {
JSONObject client = getClientInfoByMoniker(clientMoniker);
if (client == null) {
throw new InvalidShortIdException();
}
int clientId = client.getIntValue("client_id");
try {
updateSysClientFilesForClient(manager, clientId, CLIENT_AGREE_FILE, filesInfo.getFile_agreement_info());
updateSysClientFilesForClient(manager, clientId, CLIENT_APPLY_FILE, filesInfo.getFile_apply_info());
updateSysClientFilesForClient(manager, clientId, CLIENT_BANK_FILE, filesInfo.getFile_bank_info());
updateSysClientFilesForClient(manager, clientId, CLIENT_COMPANY_FILE, filesInfo.getFile_company_info());
updateSysClientFilesForClient(manager, clientId, CLIENT_ID_FILE, filesInfo.getFile_id_info());
} catch (Exception e) {
logger.error("上传合规文件失败", e);
}
// boolean clientSource = client.getIntValue("source") == 4 ? true : false;
// if (filesInfo.getAuthStatus() == 1 && clientSource) {
// client.put("approve_result", 3);
// clientMapper.update(client);
// }
}
@Override @Override
public JSONObject getSettlementLog(JSONObject manager, String clientMoniker, TradeLogQuery query) { public JSONObject getSettlementLog(JSONObject manager, String clientMoniker, TradeLogQuery query) {
JSONObject client = getClientInfoByMoniker(clientMoniker); JSONObject client = getClientInfoByMoniker(clientMoniker);
@ -3156,6 +3218,23 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
} }
} }
public void updateSysClientFilesForClient(JSONObject manager, int clientId, String fileType, String fileValue) {
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", 0);
fileJson.put("is_valid", 1);
clientFilesMapper.save(fileJson);
logger.info(clientId + "的fileType文件上传成功");
}
}
@Override @Override
public JSONObject getClientsAnalysis(JSONObject manager) { public JSONObject getClientsAnalysis(JSONObject manager) {
JSONObject params = new JSONObject(); JSONObject params = new JSONObject();

@ -534,6 +534,11 @@ public class PartnerManageController {
return clientManager.getAllAuthFiles(manager, clientMoniker); return clientManager.getAllAuthFiles(manager, clientMoniker);
} }
@ManagerMapping(value = "/{clientMoniker}/delete", method = RequestMethod.PUT, role = {ManagerRole.OPERATOR, ManagerRole.BD_USER})
public void deleteAuthFiles(@PathVariable String clientMoniker, @RequestBody JSONObject fileInfo, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
clientManager.deleteAuthFiles(fileInfo);
}
@ManagerMapping(value = "/{clientMoniker}/file", method = RequestMethod.PUT, role = {ManagerRole.ADMIN, ManagerRole.OPERATOR, ManagerRole.BD_USER}) @ManagerMapping(value = "/{clientMoniker}/file", method = RequestMethod.PUT, role = {ManagerRole.ADMIN, ManagerRole.OPERATOR, ManagerRole.BD_USER})
public void uploadAuthFiles(@PathVariable String clientMoniker, @RequestBody ClientAuthFilesInfo filesInfo, public void uploadAuthFiles(@PathVariable String clientMoniker, @RequestBody ClientAuthFilesInfo filesInfo,
@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) { @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {

@ -2,11 +2,16 @@ package au.com.royalpay.payment.manage.merchants.web;
import au.com.royalpay.payment.core.exceptions.ParamInvalidException; import au.com.royalpay.payment.core.exceptions.ParamInvalidException;
import au.com.royalpay.payment.manage.application.core.SimpleClientApplyService; import au.com.royalpay.payment.manage.application.core.SimpleClientApplyService;
import au.com.royalpay.payment.manage.mappers.system.ClientComplianceCompanyMapper;
import au.com.royalpay.payment.manage.mappers.system.ClientComplianceFilesMapper;
import au.com.royalpay.payment.manage.mappers.system.ClientFilesMapper;
import au.com.royalpay.payment.manage.mappers.system.ClientMapper;
import au.com.royalpay.payment.manage.merchants.beans.ClientAuthFilesInfo; import au.com.royalpay.payment.manage.merchants.beans.ClientAuthFilesInfo;
import au.com.royalpay.payment.manage.merchants.beans.ClientRegisterInfo; import au.com.royalpay.payment.manage.merchants.beans.ClientRegisterInfo;
import au.com.royalpay.payment.manage.merchants.beans.NewAccountBean; import au.com.royalpay.payment.manage.merchants.beans.NewAccountBean;
import au.com.royalpay.payment.manage.merchants.core.ClientManager; import au.com.royalpay.payment.manage.merchants.core.ClientManager;
import au.com.royalpay.payment.manage.merchants.core.ClientSignEventSupport; import au.com.royalpay.payment.manage.merchants.core.ClientSignEventSupport;
import au.com.royalpay.payment.manage.permission.manager.ManagerMapping;
import au.com.royalpay.payment.manage.permission.manager.PartnerMapping; import au.com.royalpay.payment.manage.permission.manager.PartnerMapping;
import au.com.royalpay.payment.manage.permission.manager.RequirePartner; import au.com.royalpay.payment.manage.permission.manager.RequirePartner;
import au.com.royalpay.payment.manage.pos.datasource.ReadOnlyConnection; import au.com.royalpay.payment.manage.pos.datasource.ReadOnlyConnection;
@ -21,11 +26,14 @@ import au.com.royalpay.payment.tools.exceptions.BadRequestException;
import au.com.royalpay.payment.tools.exceptions.ForbiddenException; import au.com.royalpay.payment.tools.exceptions.ForbiddenException;
import au.com.royalpay.payment.tools.http.HttpUtils; import au.com.royalpay.payment.tools.http.HttpUtils;
import au.com.royalpay.payment.tools.merchants.beans.QRCodeConfig; import au.com.royalpay.payment.tools.merchants.beans.QRCodeConfig;
import au.com.royalpay.payment.tools.permission.enums.ManagerRole;
import au.com.royalpay.payment.tools.permission.enums.PartnerRole; import au.com.royalpay.payment.tools.permission.enums.PartnerRole;
import au.com.royalpay.payment.tools.permission.wechat.WechatMapping; import au.com.royalpay.payment.tools.permission.wechat.WechatMapping;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import org.apache.commons.lang3.RandomStringUtils;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.ui.Model; import org.springframework.ui.Model;
import org.springframework.validation.Errors; import org.springframework.validation.Errors;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
@ -35,6 +43,7 @@ import javax.servlet.http.HttpServletResponse;
import javax.validation.Valid; import javax.validation.Valid;
import java.io.IOException; import java.io.IOException;
import java.io.OutputStream; import java.io.OutputStream;
import java.util.Date;
import java.util.List; import java.util.List;
/** /**
@ -52,6 +61,18 @@ public class PartnerViewController {
private ClientSignEventSupport clientSignEventSupport; private ClientSignEventSupport clientSignEventSupport;
@Resource @Resource
private ClientContractService clientContractService; private ClientContractService clientContractService;
@Resource
private ClientComplianceCompanyMapper clientComplianceCompanyMapper;
@Resource
private ClientComplianceFilesMapper clientComplianceFilesMapper;
@Resource
private ClientFilesMapper clientFilesMapper;
@Resource
private ClientMapper clientMapper;
@Resource @Resource
private SimpleClientApplyService simpleClientApplyService; private SimpleClientApplyService simpleClientApplyService;
@ -496,6 +517,25 @@ public class PartnerViewController {
return clientManager.getAuthFiles(null,account.getString("client_moniker")); return clientManager.getAuthFiles(null,account.getString("client_moniker"));
} }
@PartnerMapping(value = "/compliance/complianceInfo", method = RequestMethod.GET)
@ResponseBody
public JSONObject complianceInfo(@ModelAttribute(CommonConsts.PARTNER_STATUS) JSONObject account) {
return null;
}
@PartnerMapping(value = "/compliance/clientViewFiles", method = RequestMethod.GET)
@ResponseBody
public JSONObject complianceFiles(@ModelAttribute(CommonConsts.PARTNER_STATUS) JSONObject account) {
JSONObject file = clientManager.getClientViewAuthFiles(null,account.getString("client_moniker"));
file.put("file_company",clientComplianceCompanyMapper.findFileByClientId(account.getIntValue("client_id")));
return file;
}
/* @PartnerMapping(value = "/{clientMoniker}/clientViewFiles", method = RequestMethod.GET, role = {ManagerRole.ADMIN, ManagerRole.OPERATOR, ManagerRole.BD_USER, ManagerRole.SERVANT})
public JSONObject getAuthFiles(@PathVariable String clientMoniker, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
return clientManager.getAllAuthFiles(manager, clientMoniker);
}*/
@PartnerMapping(value = "/verify/email", method = RequestMethod.PUT) @PartnerMapping(value = "/verify/email", method = RequestMethod.PUT)
@ResponseBody @ResponseBody
public void sendVerifyEmail(@ModelAttribute(CommonConsts.PARTNER_STATUS) JSONObject account) { public void sendVerifyEmail(@ModelAttribute(CommonConsts.PARTNER_STATUS) JSONObject account) {
@ -519,12 +559,44 @@ public class PartnerViewController {
@ResponseBody @ResponseBody
public void updateFile(@ModelAttribute(CommonConsts.PARTNER_STATUS) JSONObject account, @RequestBody ClientAuthFilesInfo filesInfo) { public void updateFile(@ModelAttribute(CommonConsts.PARTNER_STATUS) JSONObject account, @RequestBody ClientAuthFilesInfo filesInfo) {
JSONObject client = account.getJSONObject("client"); JSONObject client = account.getJSONObject("client");
if (client.getIntValue("approve_result") != 1 && client.getIntValue("source") == 4){ /*if (client.getIntValue("approve_result") != 1 && client.getIntValue("source") == 4){
JSONObject manager = new JSONObject(); JSONObject manager = new JSONObject();
manager.put("display_name","client"); manager.put("display_name","client");
clientManager.uploadAuthFiles(manager, account.getString("client_moniker"), filesInfo); clientManager.uploadAuthFiles(manager, account.getString("client_moniker"), filesInfo);
}*/
if (true){
JSONObject manager = new JSONObject();
manager.put("display_name","client");
clientManager.uploadAuthFilesForClient(manager, account.getString("client_moniker"), filesInfo);
}else { }else {
throw new BadRequestException("已通过审核,暂不能提交和修改"); throw new BadRequestException("已通过审核,暂不能提交和修改");
} }
} }
@PartnerMapping(value = "/clientCompliance/viewCommit", method = RequestMethod.PUT)
@ResponseBody
@Transactional
public void clientComplianceViewCommit(@ModelAttribute(CommonConsts.PARTNER_STATUS) JSONObject account, @RequestBody ClientAuthFilesInfo filesInfo) {
JSONObject client = account.getJSONObject("client");
JSONObject fileComp = clientComplianceCompanyMapper.findFileByClientId(client.getIntValue("client_id"));
if(fileComp == null )
{
fileComp = new JSONObject();
String a = client.getString("client_moniker")+"-"+ RandomStringUtils.random(8, true, true).toUpperCase();
fileComp.put("compliance_id", client.getString("client_moniker")+"-"+ RandomStringUtils.random(8, true, true).toUpperCase());
fileComp.put("client_id",client.getIntValue("client_id"));
fileComp.put("create_time",new Date());
fileComp.put("staus",0);
clientComplianceCompanyMapper.save(fileComp);
clientFilesMapper.updateBeforeCompliance(client.getIntValue("client_id"));
}else
{
fileComp.put("create_time",new Date());
fileComp.put("staus",0);
clientComplianceCompanyMapper.update(fileComp);
clientFilesMapper.updateBeforeCompliance(client.getIntValue("client_id"));
}
}
} }

@ -0,0 +1,29 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="au.com.royalpay.payment.manage.mappers.system.ClientComplianceCompanyMapper">
<select id="findFileByClientAndType" resultType="com.alibaba.fastjson.JSONObject">
select * from sys_files
where client_id = #{client_id}
and file_name = #{file_name}
and status = 1
and is_valid = 1
order by last_update_date desc
</select>
<select id="deleteByClientAndType" resultType="com.alibaba.fastjson.JSONObject">
update from sys_files set is_valid = 0
where client_id = #{client_id}
and file_id = #{file_id}
</select>
<update id="confirmAgreeFile">
update sys_files
set state = 2
where file_name = 'source_agree_file'
and client_id = #{client_id}
</update>
<update id="updateByFileId">
update sys_files
set is_valid = 0
where file_id = #{file_id}
</update>
</mapper>

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="au.com.royalpay.payment.manage.mappers.system.ClientComplianceFilesMapper">
</mapper>

@ -20,4 +20,18 @@
where file_name = 'source_agree_file' where file_name = 'source_agree_file'
and client_id = #{client_id} and client_id = #{client_id}
</update> </update>
<update id="updateByFileId">
update sys_files
set is_valid = 0
where file_id = #{file_id}
</update>
<update id="updateBeforeCompliance">
update sys_files
set status = 2
where client_id = #{client_id}
and is_valid = 1
</update>
</mapper> </mapper>

@ -9,7 +9,12 @@ define(['angular','decimal', 'uiRouter', 'uiBootstrap', 'angularEcharts'], funct
$stateProvider.state('partner_dashboard', { $stateProvider.state('partner_dashboard', {
url: '/partner_dashboard', url: '/partner_dashboard',
templateUrl: '/static/dashboard/templates/partner_dashboard.html', templateUrl: '/static/dashboard/templates/partner_dashboard.html',
controller: 'partnerDashboardCtrl' controller: 'partnerDashboardCtrl',
resolve: {
company_info: ['$http', function ($http) {
return $http.get('/client/partner_info/compliance/complianceInfo');
}]
}
}) })
}]); }]);
/*app.controller('partnerDashboardCtrl', ['$scope', '$http', '$filter', '$uibModal','$timeout', 'chartParser', function ($scope, $http, $filter, $uibModal,$timeout, chartParser) { /*app.controller('partnerDashboardCtrl', ['$scope', '$http', '$filter', '$uibModal','$timeout', 'chartParser', function ($scope, $http, $filter, $uibModal,$timeout, chartParser) {
@ -568,7 +573,9 @@ define(['angular','decimal', 'uiRouter', 'uiBootstrap', 'angularEcharts'], funct
} }
}]);*/ }]);*/
app.controller('partnerDashboardCtrl', ['$scope', '$http', '$filter', '$uibModal','$timeout', 'chartParser','clearingDetailService','commonDialog', function ($scope, $http, $filter, $uibModal,$timeout, chartParser,clearingDetailService,commonDialog) { app.controller('partnerDashboardCtrl', ['$scope', '$http', '$filter', '$uibModal','$timeout', 'chartParser','clearingDetailService','commonDialog','company_info', function ($scope, $http, $filter, $uibModal,$timeout, chartParser,clearingDetailService,commonDialog,company_info) {
debugger;
$scope.company_info = company_info.data || {};
$scope.sendMailCount = 0; $scope.sendMailCount = 0;
$scope.scales = [ $scope.scales = [
{ {
@ -982,7 +989,13 @@ define(['angular','decimal', 'uiRouter', 'uiBootstrap', 'angularEcharts'], funct
}) })
}; };
$scope.ComplianceToPrefect(); /*if($scope.currentUser.client.client_less_file)
{
debugger;
var a = $scope.currentUser.client.client_less_file;
$scope.ComplianceToPrefect();
}*/
}]); }]);
app.controller('contactCustomerServiceDialogCtrl', ['$scope', '$http', function ($scope, $http) { app.controller('contactCustomerServiceDialogCtrl', ['$scope', '$http', function ($scope, $http) {

@ -3803,6 +3803,17 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
return url; return url;
}; };
$scope.deleteComplianceFiles = function (file_id) {
debugger;
$scope.file_id = file_id;
/*$http.put('/sys/partners/' + $scope.partner.client_moniker + '/saveAdditional_content', {additional_content: $scope.partner.additional_content}).then(function (resp) {*/
$http.put('/sys/partners/' + $scope.partner.client_moniker + '/delete',{file_id: $scope.file_id}).then(function (resp) {
$state.reload();
})
};
$scope.updateFile = function () { $scope.updateFile = function () {
$http.put('/sys/partners/' + $scope.partner.client_moniker + '/file', $scope.file).then(function () { $http.put('/sys/partners/' + $scope.partner.client_moniker + '/file', $scope.file).then(function () {
commonDialog.alert({ commonDialog.alert({

@ -38,12 +38,12 @@ define(['angular', 'decimal', 'uiRouter', 'ngBootSwitch', 'ngFileUpload','uiBoot
}] }]
} }
}).state('basic.compliance_to_perfect', { }).state('basic.compliance_to_perfect', {
url: '/{client_moniker}/compliance_files', url: '/{client_moniker}/compliance_to_prefect',
templateUrl: '/static/payment/partner/templates/client_compliance_to_prefect.html', templateUrl: '/static/payment/partner/templates/client_compliance_to_prefect.html',
controller: 'clientComplianceFilesCtrl', controller: 'clientComplianceFilesCtrl',
resolve: { resolve: {
file: ['$http', function ($http) { file: ['$http', function ($http) {
return $http.get('/client/partner_info/compliance/files'); return $http.get('/client/partner_info/compliance/clientViewFiles');
}] }]
} }
}).state('basic.clearing_config', { }).state('basic.clearing_config', {
@ -745,6 +745,51 @@ define(['angular', 'decimal', 'uiRouter', 'ngBootSwitch', 'ngFileUpload','uiBoot
type: 'error' type: 'error'
}); });
}; };
$scope.clientComplianceViewCommit= function () {
if(!$scope.file.client_agree_file)
{
commonDialog.alert({title: 'Error', content: '请提交* Agreement', type: 'error'});
return;
}else if(!$scope.file.client_id_file)
{
commonDialog.alert({title: 'Error', content:'请提交* ID', type: 'error'});
return;
}else if(!$scope.file.client_bank_file)
{
commonDialog.alert({title: 'Error', content: '请提交* bank statement', type: 'error'});
return;
}
else if(!$scope.file.client_company_file)
{
commonDialog.alert({title: 'Error', content: '请提交* Certificate of Registration', type: 'error'});
return;
};
$http.put('/client/partner_info/clientCompliance/viewCommit', $scope.file).then(function () {
commonDialog.alert({
title: 'Success',
content: 'Upload Successful',
type: 'success'
});
$state.reload();
}, function (resp) {
commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'});
})
};
$scope.deleteComplianceFiles = function (file_id) {
debugger;
$scope.file_id = file_id;
/*$http.put('/sys/partners/' + $scope.partner.client_moniker + '/saveAdditional_content', {additional_content: $scope.partner.additional_content}).then(function (resp) {*/
$http.put('/sys/partners/' + $scope.partner.client_moniker + '/delete',{file_id: $scope.file_id}).then(function (resp) {
$state.reload();
})
};
$scope.commitPartner = function () { $scope.commitPartner = function () {
if ($scope.file) { if ($scope.file) {
if ($scope.file.file_bank_info != null && $scope.file.file_company_info != null && $scope.file.file_id_info != null && $scope.file_apply_info != null) { if ($scope.file.file_bank_info != null && $scope.file.file_company_info != null && $scope.file.file_id_info != null && $scope.file_apply_info != null) {

@ -4,6 +4,13 @@
} }
</style> </style>
<div class="panel panel-default"> <div class="panel panel-default">
<div class="panel-heading">Audit Files &nbsp;&nbsp;&nbsp;
<button class="btn-group btn btn-warning" type="button"
ng-click="clientComplianceViewCommit()" ng-if="file.file_company.staus != 0">Commit to Compliance
</button>
<p class="btn-group btn btn-warning" ng-if="file.file_company.staus == 0">正在审核中
</p>
</div>
<div class="panel-body"> <div class="panel-body">
<div class="form-horizontal"> <div class="form-horizontal">
<div class="form-group"> <div class="form-group">
@ -11,15 +18,33 @@
<div class="col-sm-4"> <div class="col-sm-4">
<div class="form-control-static"> <div class="form-control-static">
<button class="btn btn-primary" type="button" <button class="btn btn-primary" type="button"
ngf-select="uploadBankFile($file)" ng-hide="currentUser.approve_result == 1"> ngf-select="uploadBankFile($file)"
ng-if="file.file_company.staus != 0">
<i class="fa fa-upload"></i> Upload <i class="fa fa-upload"></i> Upload
</button> </button>
<a ng-if="file.client_bank_file" role="button" class="btn-group btn btn-warning" type="button" ng-href="{{file.client_bank_file}}" target="_blank"><i class="fa fa-download"></i></a> <a ng-if="file.client_bank_file" role="button" class="btn-group btn btn-warning" type="button" ng-href="{{file.client_bank_file}}" target="_blank"><i class="fa fa-download"></i></a>
<i class="fa fa-check-square-o check-i" aria-hidden="true" style="float: none" ng-if="$root.complianceCheck.authFile"></i> <i class="fa fa-check-square-o check-i" aria-hidden="true" style="float: none" ng-if="$root.complianceCheck.authFile"></i>
</div> </div>
<uib-progressbar value="bankFileProgress.value" ng-if="bankFileProgress"></uib-progressbar> <uib-progressbar value="bankFileProgress.value" ng-if="bankFileProgress"></uib-progressbar>
<a ng-if="bankIsImage" target="_blank" ng-href="{{file.client_bank_file}}"> <!-- <a ng-if="bankIsImage" target="_blank" ng-repeat="src in file.client_bank_file" ng-href="{{src}}">
<img ng-src="{{file.client_bank_file}}" class="col-sm-8"></a> <img ng-src="{{src}}" class="col-sm-8">
</a>-->
<table>
<tbody>
<tr ng-repeat="file_src in file.client_bank_file track by $index">
<td ng-bind="$index+1">1</td>
<td><a ng-if="bankIsImage" target="_blank" ng-href="{{file_src.file_value}}">
<img ng-src="{{file_src.file_value}}" class="col-sm-8">
</a></td>
<td >
<button class="btn-group btn btn-warning" type="button" ng-click="deleteComplianceFiles(file_src.file_id)" ng-if="file.file_company.staus != 0">X</button>
</td>
</tr>
</tbody>
</table>
</div> </div>
<div class="col-sm-6"> <div class="col-sm-6">
<div class="form-control-static"> <div class="form-control-static">
@ -35,15 +60,27 @@
<div class="col-sm-4"> <div class="col-sm-4">
<div class="form-control-static"> <div class="form-control-static">
<button class="btn btn-primary" type="button" <button class="btn btn-primary" type="button"
ngf-select="uploadCompanyFile($file)" ng-hide="currentUser.approve_result == 1"> ngf-select="uploadCompanyFile($file)"
ng-if="file.file_company.staus != 0">
<i class="fa fa-upload"></i> Upload <i class="fa fa-upload"></i> Upload
</button> </button>
<a ng-if="file.client_company_file" role="button" class="btn-group btn btn-warning" type="button" ng-href="{{file.client_company_file}}" target="_blank"><i class="fa fa-download"></i></a> <a ng-if="file.client_company_file" role="button" class="btn-group btn btn-warning" type="button" ng-href="{{file.client_company_file}}" target="_blank"><i class="fa fa-download"></i></a>
<i class="fa fa-check-square-o check-i" aria-hidden="true" style="float: none" ng-if="$root.complianceCheck.authFile"></i> <i class="fa fa-check-square-o check-i" aria-hidden="true" style="float: none" ng-if="$root.complianceCheck.authFile"></i>
</div> </div>
<uib-progressbar value="companyFileProgress.value" ng-if="companyFileProgress"></uib-progressbar> <uib-progressbar value="companyFileProgress.value" ng-if="companyFileProgress"></uib-progressbar>
<a ng-if="companyIsImage" ng-href="{{file.client_company_file}}" target="_blank"> <!-- <a ng-if="companyIsImage" ng-repeat="src in file.client_company_file" ng-href="{{src}}" target="_blank">
<img ng-src="{{file.client_company_file}}" class="col-sm-8"></a> <img ng-src="{{src}}" class="col-sm-8"></a>-->
<table><tbody>
<tr ng-repeat="file_src in file.client_company_file track by $index">
<td ng-bind="$index+1">1</td>
<td><a ng-if="bankIsImage" target="_blank" ng-href="{{file_src.file_value}}">
<img ng-src="{{file_src.file_value}}" class="col-sm-8">
</a></td>
<td >
<button class="btn-group btn btn-warning" type="button" ng-click="deleteComplianceFiles(file_src.file_id)" ng-if="file.file_company.staus != 0">X</button>
</td>
</tr>
</tbody></table>
</div> </div>
<div class="col-sm-6"> <div class="col-sm-6">
<div class="form-control-static"> <div class="form-control-static">
@ -67,15 +104,28 @@
<div class="col-sm-4"> <div class="col-sm-4">
<div class="form-control-static"> <div class="form-control-static">
<button class="btn btn-primary" type="button" <button class="btn btn-primary" type="button"
ngf-select="uploadIDFile($file)" ng-hide="currentUser.approve_result == 1"> ngf-select="uploadIDFile($file)"
ng-if="file.file_company.staus != 0">
<i class="fa fa-upload"></i> Upload <i class="fa fa-upload"></i> Upload
</button> </button>
<a ng-if="file.client_id_file" role="button" class="btn-group btn btn-warning" type="button" ng-href="{{file.client_id_file}}" target="_blank"><i class="fa fa-download"></i></a> <a ng-if="file.client_id_file" role="button" class="btn-group btn btn-warning" type="button" ng-href="{{file.client_id_file}}" target="_blank"><i class="fa fa-download"></i></a>
<i class="fa fa-check-square-o check-i" aria-hidden="true" style="float: none" ng-if="$root.complianceCheck.authFile"></i> <i class="fa fa-check-square-o check-i" aria-hidden="true" style="float: none" ng-if="$root.complianceCheck.authFile"></i>
</div> </div>
<uib-progressbar value="idFileProgress.value" ng-if="idFileProgress"></uib-progressbar> <uib-progressbar value="idFileProgress.value" ng-if="idFileProgress"></uib-progressbar>
<a ng-if="idIsImage" ng-href="{{file.client_id_file}}" target="_blank"> <!--<a ng-if="idIsImage" ng-repeat="src in file.client_id_file" ng-href="{{src}}" target="_blank">
<img ng-src="{{file.client_id_file}}" class="col-sm-8"></a> <img ng-src="{{src}}" class="col-sm-8"></a>-->
<table>
<tbody>
<tr ng-repeat="file_src in file.client_id_file track by $index">
<td ng-bind="$index+1">1</td>
<td><a ng-if="bankIsImage" target="_blank" ng-href="{{file_src.file_value}}">
<img ng-src="{{file_src.file_value}}" class="col-sm-8">
</a></td>
<td >
<button class="btn-group btn btn-warning" type="button" ng-click="deleteComplianceFiles(file_src.file_id)" ng-if="file.file_company.staus != 0">X</button>
</td>
</tr>
</tbody></table>
</div> </div>
<div class="col-sm-6"> <div class="col-sm-6">
<div class="form-control-static"> <div class="form-control-static">
@ -94,21 +144,34 @@
</div> </div>
</div> </div>
<!-- <div class="form-horizontal"> <div class="form-horizontal">
<div class="form-group"> <div class="form-group">
<label class="control-label col-sm-2">* Agreement</label> <label class="control-label col-sm-2">* Agreement</label>
<div class="col-sm-4"> <div class="col-sm-4">
<div class="form-control-static"> <div class="form-control-static">
<button class="btn btn-primary" type="button" <button class="btn btn-primary" type="button"
ngf-select="uploadAgreementFile($file)" ng-hide="currentUser.approve_result == 1"> ngf-select="uploadAgreementFile($file)"
ng-if="file.file_company.staus != 0">
<i class="fa fa-upload"></i> Upload <i class="fa fa-upload"></i> Upload
</button> </button>
<a ng-if="file.client_agree_file" role="button" class="btn-group btn btn-warning" type="button" ng-href="{{file.client_agree_file}}" target="_blank"><i class="fa fa-download"></i></a> <a ng-if="file.client_agree_file" role="button" class="btn-group btn btn-warning" type="button" ng-href="{{file.client_agree_file}}" target="_blank"><i class="fa fa-download"></i></a>
<i class="fa fa-check-square-o check-i" aria-hidden="true" style="float: none" ng-if="$root.complianceCheck.authFile"></i> <i class="fa fa-check-square-o check-i" aria-hidden="true" style="float: none" ng-if="$root.complianceCheck.authFile"></i>
</div> </div>
<uib-progressbar value="agreementFileProgress.value" ng-if="agreementFileProgress"></uib-progressbar> <uib-progressbar value="agreementFileProgress.value" ng-if="agreementFileProgress"></uib-progressbar>
<a ng-if="agreeIsImage" target="_blank" ng-href="{{file.client_agree_file}}"> <!-- <a ng-if="agreeIsImage" target="_blank" ng-repeat="src in file.client_agree_file" ng-href="{{src}}">
<img ng-src="{{file.client_agree_file}}" class="col-sm-8"></a> <img ng-src="{{src}}" class="col-sm-8"></a>-->
<table>
<tbody>
<tr ng-repeat="file_src in file.client_agree_file track by $index">
<td ng-bind="$index+1">1</td>
<td><a ng-if="bankIsImage" target="_blank" ng-href="{{file_src.file_value}}">
<img ng-src="{{file_src.file_value}}" class="col-sm-8">
</a></td>
<td >
<button class="btn-group btn btn-warning" type="button" ng-click="deleteComplianceFiles(file_src.file_id)" ng-if="file.file_company.staus != 0">X</button>
</td>
</tr>
</tbody></table>
</div> </div>
<div class="col-sm-6"> <div class="col-sm-6">
<div class="form-control-static"> <div class="form-control-static">
@ -120,31 +183,6 @@
</div> </div>
</div> </div>
<div class="form-horizontal">
<div class="form-group">
<label class="control-label col-sm-2">Application Form(optional)</label>
<div class="col-sm-4">
<div class="form-control-static" ng-if="currentUser." ng-hide="currentUser.approve_result == 1">
<button class="btn btn-primary" type="button"
ngf-select="uploadApplyFile($file)">
<i class="fa fa-upload"></i> Upload
</button>
<a ng-if="file.client_apply_file" role="button" class="btn-group btn btn-warning" type="button" ng-href="{{file.client_apply_file}}" target="_blank"><i class="fa fa-download"></i></a>
<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="bankFileProgress.value" ng-if="applyFileProgress"></uib-progressbar>
<a ng-if="applyIsImage" target="_blank" ng-href="{{file.client_apply_file}}">
<img ng-src="{{file.client_apply_file}}" class="col-sm-8"></a>
</div>
<div class="col-sm-6">
<div class="form-control-static">
<p>Example请保证图片信息清晰可见,如下图</p>
<img class="col-sm-6" style="border: 1px solid #ddd"
src="https://file.royalpay.com.au/open/2017/06/15/1497454548133_uSn0TP2uQNLEfnMB57CMrxG2jTOWHG.png">
</div>
</div>
</div>
</div>-->
</div> </div>
</div> </div>
</div> </div>

@ -49,12 +49,13 @@
<a ui-sref=".clearing_config">Clearing Config</a> <a ui-sref=".clearing_config">Clearing Config</a>
</li> </li>
<li ui-sref-active="active" ng-show="partner.source==4"> <!--<li ui-sref-active="active" ng-show="partner.source==4">
<a ui-sref=".compliance_files">Compliance files</a> <a ui-sref=".compliance_files">Compliance files</a>
</li> </li>-->
<li ui-sref-active="active" ng-show="partner.source!=4"> <li ui-sref-active="active">
<a ui-sref=".compliance_to_perfect">Compliance to prefect</a> <a ui-sref=".compliance_to_perfect">Compliance to prefect</a>
<p ngif app>(资料审核中)</p>
</li> </li>
</ul> </ul>

@ -26,10 +26,25 @@
<i class="fa fa-check-square-o check-i" aria-hidden="true" style="float: none" ng-if="$root.complianceCheck.authFile"></i> <i class="fa fa-check-square-o check-i" aria-hidden="true" style="float: none" ng-if="$root.complianceCheck.authFile"></i>
</div> </div>
<uib-progressbar value="bankFileProgress.value" ng-if="bankFileProgress"></uib-progressbar> <uib-progressbar value="bankFileProgress.value" ng-if="bankFileProgress"></uib-progressbar>
<a ng-if="bankIsImage" target="_blank" ng-repeat="src in file.client_bank_file" ng-href="{{src}}"> <!-- <a ng-if="bankIsImage" target="_blank" ng-repeat="src in file.client_bank_file" ng-href="{{src}}">
<img ng-src="{{src}}" class="col-sm-8"> <img ng-src="{{src}}" class="col-sm-8">
</a> </a>-->
<table>
<tbody>
<tr ng-repeat="file_src in file.client_bank_file track by $index">
<td ng-bind="$index+1">1</td>
<td><a ng-if="bankIsImage" target="_blank" ng-href="{{file_src.file_value}}">
<img ng-src="{{file_src.file_value}}" class="col-sm-8">
</a></td>
<td >
<button class="btn-group btn btn-warning" type="button" ng-click="deleteComplianceFiles(file_src.file_id)">X</button>
</td>
</tr>
</tbody>
</table>
</div> </div>
<div class="col-sm-6"> <div class="col-sm-6">
<div class="form-control-static"> <div class="form-control-static">
@ -52,8 +67,19 @@
<i class="fa fa-check-square-o check-i" aria-hidden="true" style="float: none" ng-if="$root.complianceCheck.authFile"></i> <i class="fa fa-check-square-o check-i" aria-hidden="true" style="float: none" ng-if="$root.complianceCheck.authFile"></i>
</div> </div>
<uib-progressbar value="companyFileProgress.value" ng-if="companyFileProgress"></uib-progressbar> <uib-progressbar value="companyFileProgress.value" ng-if="companyFileProgress"></uib-progressbar>
<a ng-if="companyIsImage" ng-repeat="src in file.client_company_file" ng-href="{{src}}" target="_blank"> <!-- <a ng-if="companyIsImage" ng-repeat="src in file.client_company_file" ng-href="{{src}}" target="_blank">
<img ng-src="{{src}}" class="col-sm-8"></a> <img ng-src="{{src}}" class="col-sm-8"></a>-->
<table><tbody>
<tr ng-repeat="file_src in file.client_company_file track by $index">
<td ng-bind="$index+1">1</td>
<td><a ng-if="bankIsImage" target="_blank" ng-href="{{file_src.file_value}}">
<img ng-src="{{file_src.file_value}}" class="col-sm-8">
</a></td>
<td >
<button class="btn-group btn btn-warning" type="button" ng-click="deleteComplianceFiles(file_src.file_id)">X</button>
</td>
</tr>
</tbody></table>
</div> </div>
<div class="col-sm-6"> <div class="col-sm-6">
<div class="form-control-static"> <div class="form-control-static">
@ -84,8 +110,20 @@
<i class="fa fa-check-square-o check-i" aria-hidden="true" style="float: none" ng-if="$root.complianceCheck.authFile"></i> <i class="fa fa-check-square-o check-i" aria-hidden="true" style="float: none" ng-if="$root.complianceCheck.authFile"></i>
</div> </div>
<uib-progressbar value="idFileProgress.value" ng-if="idFileProgress"></uib-progressbar> <uib-progressbar value="idFileProgress.value" ng-if="idFileProgress"></uib-progressbar>
<a ng-if="idIsImage" ng-repeat="src in file.client_id_file" ng-href="{{src}}" target="_blank"> <!--<a ng-if="idIsImage" ng-repeat="src in file.client_id_file" ng-href="{{src}}" target="_blank">
<img ng-src="{{src}}" class="col-sm-8"></a> <img ng-src="{{src}}" class="col-sm-8"></a>-->
<table>
<tbody>
<tr ng-repeat="file_src in file.client_id_file track by $index">
<td ng-bind="$index+1">1</td>
<td><a ng-if="bankIsImage" target="_blank" ng-href="{{file_src.file_value}}">
<img ng-src="{{file_src.file_value}}" class="col-sm-8">
</a></td>
<td >
<button class="btn-group btn btn-warning" type="button" ng-click="deleteComplianceFiles(file_src.file_id)">X</button>
</td>
</tr>
</tbody></table>
</div> </div>
<div class="col-sm-6"> <div class="col-sm-6">
<div class="form-control-static"> <div class="form-control-static">
@ -117,8 +155,20 @@
<i class="fa fa-check-square-o check-i" aria-hidden="true" style="float: none" ng-if="$root.complianceCheck.authFile"></i> <i class="fa fa-check-square-o check-i" aria-hidden="true" style="float: none" ng-if="$root.complianceCheck.authFile"></i>
</div> </div>
<uib-progressbar value="agreementFileProgress.value" ng-if="agreementFileProgress"></uib-progressbar> <uib-progressbar value="agreementFileProgress.value" ng-if="agreementFileProgress"></uib-progressbar>
<a ng-if="agreeIsImage" target="_blank" ng-repeat="src in file.client_agree_file" ng-href="{{src}}"> <!-- <a ng-if="agreeIsImage" target="_blank" ng-repeat="src in file.client_agree_file" ng-href="{{src}}">
<img ng-src="{{src}}" class="col-sm-8"></a> <img ng-src="{{src}}" class="col-sm-8"></a>-->
<table>
<tbody>
<tr ng-repeat="file_src in file.client_agree_file track by $index">
<td ng-bind="$index+1">1</td>
<td><a ng-if="bankIsImage" target="_blank" ng-href="{{file_src.file_value}}">
<img ng-src="{{file_src.file_value}}" class="col-sm-8">
</a></td>
<td >
<button class="btn-group btn btn-warning" type="button" ng-click="deleteComplianceFiles(file_src.file_id)">X</button>
</td>
</tr>
</tbody></table>
</div> </div>
<div class="col-sm-6"> <div class="col-sm-6">
<div class="form-control-static"> <div class="form-control-static">
@ -143,8 +193,20 @@
<i class="fa fa-check-square-o check-i" style="float: none" aria-hidden="true"ng-if="$root.complianceCheck.authFile"></i> <i class="fa fa-check-square-o check-i" style="float: none" aria-hidden="true"ng-if="$root.complianceCheck.authFile"></i>
</div> </div>
<uib-progressbar value="bankFileProgress.value" ng-if="applyFileProgress"></uib-progressbar> <uib-progressbar value="bankFileProgress.value" ng-if="applyFileProgress"></uib-progressbar>
<a ng-if="applyIsImage" target="_blank" ng-repeat="src in file.client_apply_file" ng-href="{{src}}"> <!-- <a ng-if="applyIsImage" target="_blank" ng-repeat="src in file.client_apply_file" ng-href="{{src}}">
<img ng-src="{{src}}" class="col-sm-8"></a> <img ng-src="{{src}}" class="col-sm-8"></a>-->
<table>
<tbody>
<tr ng-repeat="file_src in file.client_apply_file track by $index">
<td ng-bind="$index+1">1</td>
<td><a ng-if="bankIsImage" target="_blank" ng-href="{{file_src.file_value}}">
<img ng-src="{{file_src.file_value}}" class="col-sm-8">
</a></td>
<td >
<button class="btn-group btn btn-warning" type="button" ng-click="deleteComplianceFiles(file_src.file_id)">X</button>
</td>
</tr>
</tbody></table>
</div> </div>
<div class="col-sm-6"> <div class="col-sm-6">
<div class="form-control-static"> <div class="form-control-static">

Loading…
Cancel
Save