add 优化代码、增加BD端handle操作(无法提供文件原因未完善、提交操作未核验)

master
luoyang 5 years ago
parent d466f2fc0f
commit adc653509b

@ -5,7 +5,7 @@ import com.alibaba.fastjson.JSONObject;
import java.util.List;
public interface KycManage {
public interface KycService {
JSONObject listProgressClients(JSONObject manager, KycPartnersQuery query);
@ -17,4 +17,7 @@ public interface KycManage {
void sendNotify(JSONObject complianceInfo);
void kycNotifyBd(JSONObject account, String source);
JSONObject getKYCFilesForBDHelp(JSONObject manager, String clientMoniker);
}

@ -1,16 +1,19 @@
package au.com.royalpay.payment.manage.kyc.core.impls;
import au.com.royalpay.payment.core.exceptions.InvalidShortIdException;
import au.com.royalpay.payment.manage.kyc.bean.KycPartnersQuery;
import au.com.royalpay.payment.manage.kyc.core.KycManage;
import au.com.royalpay.payment.manage.kyc.core.KycService;
import au.com.royalpay.payment.manage.mappers.financial.FinancialBDConfigMapper;
import au.com.royalpay.payment.manage.mappers.system.ClientBDMapper;
import au.com.royalpay.payment.manage.mappers.system.ClientComplianceCompanyMapper;
import au.com.royalpay.payment.manage.mappers.system.ClientMapper;
import au.com.royalpay.payment.manage.merchants.core.ClientManager;
import au.com.royalpay.payment.manage.notice.core.MailService;
import au.com.royalpay.payment.tools.connections.mpsupport.MpWechatApi;
import au.com.royalpay.payment.tools.connections.mpsupport.MpWechatApiProvider;
import au.com.royalpay.payment.tools.connections.mpsupport.beans.TemplateMessage;
import au.com.royalpay.payment.tools.env.PlatformEnvironment;
import au.com.royalpay.payment.tools.exceptions.BadRequestException;
import au.com.royalpay.payment.tools.permission.enums.ManagerRole;
import au.com.royalpay.payment.tools.threadpool.RoyalThreadPoolExecutor;
import au.com.royalpay.payment.tools.utils.PageListUtils;
@ -32,7 +35,7 @@ import java.util.Date;
import java.util.List;
@Service
public class KycManageImpl implements KycManage {
public class KycServiceImpl implements KycService {
private Logger logger = LoggerFactory.getLogger(getClass());
@Resource
@ -40,6 +43,8 @@ public class KycManageImpl implements KycManage {
@Resource
private ClientMapper clientMapper;
@Resource
private ClientManager clientManager;
@Resource
private ClientBDMapper clientBDMapper;
@Resource
private FinancialBDConfigMapper financialBDConfigMapper;
@ -155,6 +160,53 @@ public class KycManageImpl implements KycManage {
}
@Override
public void kycNotifyBd(JSONObject account, String source) {
JSONObject client = clientManager.getClientInfo(account.getIntValue("client_id"));
if (client == null) {
throw new InvalidShortIdException();
}
int sourceEnum = 2;
if ("app".equals(source.toLowerCase())) {
sourceEnum = 1;
}
JSONObject fileComp = clientComplianceCompanyMapper.findKycFileByClientId(client.getIntValue("client_id"));
if (fileComp == null) {
fileComp = new JSONObject();
fileComp.put("client_id", client.getIntValue("client_id"));
fileComp.put("submit_time", new Date());
fileComp.put("status", 9);
fileComp.put("source", sourceEnum);
fileComp.put("commit_by_id", account.getString("account_id"));
fileComp.put("type", 2);
fileComp.put("is_valid", 1);
clientComplianceCompanyMapper.save(fileComp);
} else if (fileComp.getIntValue("status") == 2) {
fileComp.put("status", 9);
fileComp.put("submit_time", new Date());
fileComp.put("source", sourceEnum);
fileComp.put("commit_by_id", account.getString("account_id"));
clientComplianceCompanyMapper.update(fileComp);
} else {
throw new BadRequestException("please do not repeat submission");
}
sendNotify(fileComp);
}
@Override
public JSONObject getKYCFilesForBDHelp(JSONObject manager, String clientMoniker) {
JSONObject client = clientManager.getClientInfoByMoniker(clientMoniker);
if (client == null) {
throw new InvalidShortIdException();
}
checkClientBelongBd(client.getIntValue("client_id"), manager.getString("manager_id"));
JSONObject kycInfo = clientComplianceCompanyMapper.findKycFileByClientId(client.getIntValue("client_id"));
if (kycInfo == null || kycInfo.getIntValue("status") != 9) {
throw new BadRequestException("This Partner is not application submitted");
}
return clientManager.getKycFilesForBD(client);
}
private void checkManagerPermission(JSONObject manager, JSONObject params, KycPartnersQuery query) {
//todo 可支持bdleader查看组内bd商户kyc情况
// if (ManagerRole.BD_USER.hasRole(manager.getIntValue("role"))) {
@ -181,4 +233,12 @@ public class KycManageImpl implements KycManage {
}
//todo 如果是合规增加bd_user为customerService
}
private void checkClientBelongBd(int clientId, String managerId) {
int permissionInt = clientBDMapper.checkBDPermission(clientId, managerId);
if (permissionInt < 1) {
// throw new BadRequestException("This Partner is not belongs to you");
}
}
}

@ -0,0 +1,22 @@
package au.com.royalpay.payment.manage.kyc.web;
import au.com.royalpay.payment.manage.kyc.core.KycService;
import au.com.royalpay.payment.manage.permission.manager.PartnerMapping;
import au.com.royalpay.payment.tools.CommonConsts;
import com.alibaba.fastjson.JSONObject;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
@RestController
@RequestMapping("/sys/kyc/partner")
public class KycController {
@Resource
private KycService kycService;
@PartnerMapping(value = "/notifyBd", method = RequestMethod.PUT)
@ResponseBody
public void clientKycBdIntervention(@ModelAttribute(CommonConsts.PARTNER_STATUS) JSONObject account) {
kycService.kycNotifyBd(account, "web");
}
}

@ -1,15 +1,12 @@
package au.com.royalpay.payment.manage.kyc.web;
import au.com.royalpay.payment.manage.kyc.bean.KycPartnersQuery;
import au.com.royalpay.payment.manage.kyc.core.KycManage;
import au.com.royalpay.payment.manage.kyc.core.KycService;
import au.com.royalpay.payment.manage.permission.manager.ManagerMapping;
import au.com.royalpay.payment.tools.CommonConsts;
import au.com.royalpay.payment.tools.permission.enums.ManagerRole;
import com.alibaba.fastjson.JSONObject;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.List;
@ -17,27 +14,31 @@ import java.util.List;
@RestController
@RequestMapping("/sys/kyc/manage")
public class KycManageController {
@Resource
private KycManage kycManage;
private KycService kycService;
@ManagerMapping(value = "/partner/progressing", method = RequestMethod.GET, role = {ManagerRole.OPERATOR, ManagerRole.BD_USER})
public JSONObject listProgressClients(@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager, KycPartnersQuery query) {
return kycManage.listProgressClients(manager, query);
return kycService.listProgressClients(manager, query);
}
@ManagerMapping(value = "/partner/completed", method = RequestMethod.GET, role = {ManagerRole.OPERATOR, ManagerRole.BD_USER})
public JSONObject listCompletedClients(@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager, KycPartnersQuery query) {
return kycManage.listCompletedClients(manager, query);
return kycService.listCompletedClients(manager, query);
}
@ManagerMapping(value = "/partner/need_help", method = RequestMethod.GET, role = {ManagerRole.OPERATOR, ManagerRole.BD_USER})
public List<JSONObject> listNeedHelpClients(@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager, KycPartnersQuery query) {
return kycManage.listNeedHelpClients(manager, query);
return kycService.listNeedHelpClients(manager, query);
}
@ManagerMapping(value = "/partner/dashboard", method = RequestMethod.GET, role = {ManagerRole.OPERATOR, ManagerRole.BD_USER})
public JSONObject getKycDashboard(@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
return kycManage.getKycDashboard(manager);
return kycService.getKycDashboard(manager);
}
@ManagerMapping(value = "/{clientMoniker}/bd_help",method = RequestMethod.GET, role = {ManagerRole.OPERATOR, ManagerRole.BD_USER})
public JSONObject getKycFilesForBDHelp(@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager, @PathVariable String clientMoniker) {
return kycService.getKYCFilesForBDHelp(manager,clientMoniker);
}
}

@ -24,15 +24,15 @@ public interface ClientComplianceCompanyMapper {
@AutoSql(type = SqlType.SELECT)
@AdvanceSelect(addonWhereClause = "type = 1")
JSONObject findFileByClientId(@Param("client_id") int client_id);
JSONObject findFileByClientId(@Param("client_id") int clientId);
@AutoSql(type = SqlType.SELECT)
@AdvanceSelect(addonWhereClause = "type = 2")
JSONObject findKycFileByClientId(@Param("client_id") int client_id);
JSONObject findKycFileByClientId(@Param("client_id") int clientId);
@AutoSql(type = SqlType.SELECT)
@AdvanceSelect(addonWhereClause = "type = 2 and status in(0,1,9)")
JSONObject findKycFileComplete(@Param("client_id") int client_id);
@AdvanceSelect(addonWhereClause = "type = 2 and status in (0,1,9)")
JSONObject findKycFileComplete(@Param("client_id") int clientId);
PageList<JSONObject> listClientCompliances(JSONObject params, PageBounds pageBounds);

@ -268,8 +268,6 @@ public interface ClientManager {
void commitAuthKycFilesToCompliance(String clientMoniker, JSONObject account, String source);
void commitKycBdIntervention(String clientMoniker, JSONObject account, String source);
JSONObject getClientAggregateFile(JSONObject account, MultipartFile file) throws IOException;
JSONObject getClientsAnalysis(JSONObject manager);
@ -505,7 +503,7 @@ public interface ClientManager {
JSONObject getComplianceFilesForBD(JSONObject account);
JSONObject getKycFilesForBD(JSONObject account);
JSONObject getKycFilesForBD(JSONObject client);
/**
*

@ -17,12 +17,11 @@ import au.com.royalpay.payment.core.PaymentChannelApi;
import au.com.royalpay.payment.core.exceptions.EmailException;
import au.com.royalpay.payment.core.exceptions.InvalidShortIdException;
import au.com.royalpay.payment.core.mappers.SysClientMapper;
import au.com.royalpay.payment.manage.appclient.beans.RSvcMchBean;
import au.com.royalpay.payment.tools.defines.IncrementalChannel;
import au.com.royalpay.payment.core.utils.OrderExpiryRuleResolver;
import au.com.royalpay.payment.manage.analysis.mappers.TransactionAnalysisMapper;
import au.com.royalpay.payment.manage.appclient.beans.AppClientBean;
import au.com.royalpay.payment.manage.appclient.beans.AppMerchantBean;
import au.com.royalpay.payment.manage.appclient.beans.RSvcMchBean;
import au.com.royalpay.payment.manage.application.core.SimpleClientApplyService;
import au.com.royalpay.payment.manage.complianceAudit.core.ClientComplianceApply;
import au.com.royalpay.payment.manage.dev.bean.TestMerchantAccountInfo;
@ -54,6 +53,7 @@ import au.com.royalpay.payment.tools.connections.mpsupport.MpWechatApi;
import au.com.royalpay.payment.tools.connections.mpsupport.MpWechatApiProvider;
import au.com.royalpay.payment.tools.connections.mpsupport.beans.TemplateMessage;
import au.com.royalpay.payment.tools.connections.mpsupport.exceptions.WechatException;
import au.com.royalpay.payment.tools.defines.IncrementalChannel;
import au.com.royalpay.payment.tools.env.PlatformEnvironment;
import au.com.royalpay.payment.tools.env.SysConfigManager;
import au.com.royalpay.payment.tools.exceptions.BadRequestException;
@ -92,7 +92,7 @@ import org.apache.commons.lang3.time.DateFormatUtils;
import org.apache.commons.lang3.time.DateUtils;
import org.apache.poi.hssf.usermodel.*;
import org.apache.poi.hssf.util.HSSFColor;
import org.apache.poi.ss.usermodel.*;
import org.apache.poi.ss.usermodel.CellStyle;
import org.apache.poi.ss.usermodel.Font;
import org.dom4j.Element;
import org.slf4j.Logger;
@ -133,8 +133,8 @@ import java.security.KeyPair;
import java.security.interfaces.RSAPrivateKey;
import java.security.interfaces.RSAPublicKey;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.List;
import java.util.*;
import java.util.concurrent.TimeUnit;
import java.util.stream.Collectors;
import java.util.zip.ZipEntry;
@ -2288,13 +2288,12 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
}
@Override
public JSONObject getKycFilesForBD(JSONObject account) {
JSONObject client = getClientInfo(account.getIntValue("client_id"));
public JSONObject getKycFilesForBD(JSONObject client) {
if (client == null) {
throw new InvalidShortIdException();
}
JSONObject file = clientComplianceApply.kycAuthFile(client);
file.put("file_company", clientComplianceCompanyMapper.findKycFileByClientId(account.getIntValue("client_id")));
file.put("file_company", clientComplianceCompanyMapper.findKycFileByClientId(client.getIntValue("client_id")));
file.put("client", client);
return file;
}
@ -3605,6 +3604,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
fileComp.put("client_id", client.getIntValue("client_id"));
fileComp.put("submit_time", new Date());
fileComp.put("status", 0);
fileComp.put("type", 1);
fileComp.put("company_photo", companyPhoto);
fileComp.put("store_photo", storePhoto);
fileComp.put("company_website", webSite);
@ -3685,42 +3685,6 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
signInAccountService.clearAccountCache(account.getString("account_id"));
}
@Override
@Transactional
public void commitKycBdIntervention(String clientMoniker, JSONObject account, String source) {
JSONObject client = getClientInfoByMoniker(clientMoniker);
int sourceEnum = 2;
if (client == null) {
throw new InvalidShortIdException();
}
if ("app".equals(source.toLowerCase())) {
sourceEnum = 1;
}
JSONObject fileComp = clientComplianceCompanyMapper.findKycFileByClientId(client.getIntValue("client_id"));
if (fileComp == null) {
fileComp = new JSONObject();
fileComp.put("client_id", client.getIntValue("client_id"));
fileComp.put("submit_time", new Date());
fileComp.put("status", 9);
fileComp.put("source", sourceEnum);
fileComp.put("commit_by_id", account.getString("account_id"));
fileComp.put("type", 2);
clientComplianceCompanyMapper.save(fileComp);
clientFilesMapper.updateBeforeCompliance(client.getIntValue("client_id"));
} else if (fileComp.getIntValue("status") == 2) {
fileComp.put("status", 9);
fileComp.put("submit_time", new Date());
fileComp.put("source", sourceEnum);
fileComp.put("commit_by_id", account.getString("account_id"));
clientComplianceCompanyMapper.update(fileComp);
clientFilesMapper.updateBeforeCompliance(client.getIntValue("client_id"));
} else {
throw new BadRequestException("please do not repeat submission");
}
signInAccountService.clearAccountCache(account.getString("account_id"));
}
@Override
public JSONObject getClientAggregateFile(JSONObject account, MultipartFile file) throws IOException {
if (StringUtils.isBlank(file.getOriginalFilename())) {

@ -3,8 +3,8 @@ package au.com.royalpay.payment.manage.merchants.web;
import au.com.royalpay.payment.core.exceptions.ParamInvalidException;
import au.com.royalpay.payment.manage.application.core.SimpleClientApplyService;
import au.com.royalpay.payment.manage.mappers.system.ClientComplianceCompanyMapper;
import au.com.royalpay.payment.manage.merchants.beans.ClientKycFilesInfo;
import au.com.royalpay.payment.manage.merchants.beans.ClientAuthFilesInfo;
import au.com.royalpay.payment.manage.merchants.beans.ClientKycFilesInfo;
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.core.ClientManager;
@ -621,12 +621,6 @@ public class PartnerViewController {
clientManager.commitAuthKycFilesToCompliance(clientMoniker, account, "Web");
}
@PartnerMapping(value = "/clientCompliance/{clientMoniker}/kycBdIntervention", method = RequestMethod.POST)
@ResponseBody
public void clientKycBdIntervention(@PathVariable String clientMoniker ,@ModelAttribute(CommonConsts.PARTNER_STATUS) JSONObject account) {
clientManager.commitAuthKycFilesToCompliance(clientMoniker, account, "Web");
}
@PartnerMapping(value = "/clientCompliance/{clientMoniker}/commit_aggregate_file", method = RequestMethod.POST)
@ResponseBody
public JSONObject getClientArregateFile(@ModelAttribute(CommonConsts.PARTNER_STATUS) JSONObject account, @RequestParam MultipartFile file, @RequestHeader("User-Agent") String userAgent, HttpServletRequest request) throws IOException {

@ -79,7 +79,8 @@ var modules = [
{path: 'static/integralmall/coupon_cancellation', module: 'couponCancellation', roles: [1,2]},
{path: 'static/invoice/invoice_assistant', module: 'partnerInvoice', roles: [1]},
{path: 'static/payment/billqrcode/bill-qrcode-manage', module: 'billQrCodeManagement', roles: [1,2,3]},
{path: 'static/incrementalService/partner-incremental-service', module: 'partnerIncrementalService', roles: [1,2,3]}
{path: 'static/incrementalService/partner-incremental-service', module: 'partnerIncrementalService', roles: [1,2,3]},
{path: 'static/payment/kyc/kyc', module: 'kycApp', roles: [1,2,3]}
];
require(['angular', 'jquery'], function (angular, $) {

@ -61,13 +61,8 @@ define(['angular', 'angularSanitize', 'angularAnimate', 'angularMessages', 'uiRo
})
};
if($scope.currentUser.client.client_less_file && complianceNoticeCount==0 && $scope.currentUser.role!=3)
{
$scope.ComplianceToperfect();
complianceNoticeCount++;
}
if($scope.currentUser.lessKycFiles && complianceNoticeCount==0 && $scope.currentUser.role!=3)
{
//todo 这边需要调整 或者关系 不能做两个if,字段放到client里位置要一致有bug当补充合规材料提交后不提示弹窗弹窗样式要修改
if(($scope.currentUser.client.client_less_file ||$scope.currentUser.lessKycFiles) && complianceNoticeCount==0 && $scope.currentUser.role!=3) {
$scope.ComplianceToperfect();
complianceNoticeCount++;
}
@ -488,7 +483,6 @@ define(['angular', 'angularSanitize', 'angularAnimate', 'angularMessages', 'uiRo
app.controller('partnerFilesCtrl', ['$scope', '$http', '$sce', 'file', 'kycFile', function ($scope, $http, $sce, file , kycFile) {
$scope.file = angular.copy(file);
$scope.kycFile = angular.copy(kycFile);
debugger;
}]);
app.factory('myLoginLogView', ['$uibModal', function ($uibModal) {
return {

@ -6,11 +6,28 @@ define(['angular', 'static/commons/commons', 'uiBootstrap', 'uiRouter', 'ngBootS
url: '/partners/partnerKYCProgress',
templateUrl: 'static/payment/kyc/templates/partner_kyc_progress.html',
controller: 'partnerKYCProgressCtrl'
}).state('partnerKYCProgress.bdHelpKycProgress', {
url: '/{clientMoniker}/bdHelpKycProgress',
templateUrl: 'static/payment/kyc/templates/bd_kyc_progress.html',
controller: 'bdHelpKYCProgressCtrl',
resolve: {
file: ['$http','$stateParams',function ($http, $stateParams) {
return $http.get('/sys/kyc/manage/' + $stateParams.clientMoniker + '/bd_help');
}]
}
}).state('partnerKYCProgress.partner_detail', {
url: '/{clientMoniker}/partner_detail',
templateUrl: '/static/payment/kyc/templates/bd_kyc_partner_detail.html',
controller: 'partnerDetailForBDHelpCtrl',
resolve: {
partner: ['$http', '$stateParams', function ($http, $stateParams) {
return $http.get('/sys/partners/' + $stateParams.clientMoniker);
}]
}
})
}]);
app.controller('partnerKYCProgressCtrl', ['$scope', '$sce', '$http','$uibModal',
function ($scope, $sce, $http, $uibModal) {
app.controller('partnerKYCProgressCtrl', ['$scope', '$sce', '$http','$uibModal', 'commonDialog',
function ($scope, $sce, $http, $uibModal, commonDialog) {
$scope.ctrl = {
plusShow1: false,
plusShow2: false,
@ -123,16 +140,65 @@ define(['angular', 'static/commons/commons', 'uiBootstrap', 'uiRouter', 'ngBootS
};
$scope.loadKYCDashboardInfo();
}]);
app.controller('addHandleDetailCtrl', [ '$scope', '$http', '$state', 'compliance_id', 'commonDialog',function ($scope, $http, $state, compliance_id, commonDialog) {
$scope.handleDetail = {compliance_id:compliance_id};
$scope.addHandleLog = function () {
$http.put('/register/manage', $scope.handleDetail).then(function (resp) {
$scope.$close();
},function (resp) {
app.controller('bdHelpKYCProgressCtrl', [ '$scope', '$http', '$state', 'file', 'commonDialog',function ($scope, $http, $state, file, commonDialog) {
$scope.file = angular.copy(file.data) || {};
$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 + '/delete').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'});
})
})
};
$scope.clientComplianceViewCommit = function () {
if (!$scope.file.client_bank_file.file_value) {
commonDialog.alert({title: 'Error', content: '请提交* ASIC File', type: 'error'});
return;
}
if (!$scope.file.client_id_file.file_value) {
commonDialog.alert({title: 'Error', content: '请提交ID护照或驾照信息', type: 'error'});
return;
}
if ($scope.file.id_type == "" || $scope.file.id_type == undefined || $scope.file.id_type == null) {
commonDialog.alert({title: 'Error', content: '请选择ID文件的类型', type: 'error'});
return;
}
if ($scope.file.id_type == "passport") {
if (!$scope.file.kyc_utility_bill_file.file_value) {
commonDialog.alert({title: 'Error', content: '请提交Utility Bill FIles(水电煤账单)信息', type: 'error'});
return;
}
}
commonDialog.confirm({
title: 'Warning',
content: 'Are you sure to submit files?'
}).then(function () {
$http.post('/client/partner_info/clientCompliance/' + $scope.partner.client_moniker + '/kycFilesViewCommit/' + $scope.file.id_type).then(function () {
commonDialog.alert({
title: 'Success',
content: 'Commit Successful',
type: 'success'
});
$state.reload();
}, function (resp) {
commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'});
})
});
}
};
}]);
app.controller('partnerDetailForBDHelpCtrl', [ '$scope', '$http', '$state', 'partner', 'commonDialog',function ($scope, $http, $state, partner, commonDialog) {
$scope.partner = angular.copy(partner.data);
}]);
return app;
});

@ -0,0 +1,213 @@
define(['angular', 'static/commons/commons', 'uiBootstrap', 'uiRouter', 'ngBootSwitch', 'ngFileUpload', 'uiSelect'], function (angular) {
'use strict';
var app = angular.module('kycApp', ['ui.bootstrap', 'ui.router', 'frapontillo.bootstrap-switch', 'ngFileUpload', 'ui.select']);
app.config(['$stateProvider', function ($stateProvider) {
$stateProvider.state('kyc_files_perfect', {
url: '/kyc_files_perfect',
templateUrl: '/static/payment/kyc/templates/client_kyc_files_complete.html',
controller: 'clientCommitToKycFilesCtrl',
resolve: {
file: ['$http', function ($http) {
return $http.get('/client/partner_info/kyc/clientViewFiles');
}],
partner: ['$http', function ($http) {
return $http.get('/client/partner_info');
}]
}
});
}]);
app.controller('clientCommitToKycFilesCtrl', ['$scope', '$http', '$rootScope', 'commonDialog', '$state', 'Upload', 'file', 'partner', function ($scope, $http, $rootScope, commonDialog, $state, Upload, file, partner) {
$scope.file = file.data || {};
$scope.partner = partner.data || {};
$scope.file.id_type = "";
$scope.file.need_bd = true;
//audit files
$scope.uploadBankFile = function (file) {
if (file != null) {
if (file.size > 3 * 1024 * 1024) {
commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB请压缩后重试', type: 'error'})
} else {
$scope.bankFileProgress = {value: 0};
Upload.upload({
url: '/attachment/files',
data: {file: file}
}).then(function (resp) {
delete $scope.bankFileProgress;
$scope.file.file_bank_info = resp.data.url;
$scope.updateFile();
if ($scope.file.file_bank_info.endsWith('pdf')) {
$scope.bankIsImage = false;
} else {
$scope.bankIsImage = true;
}
}, function (resp) {
delete $scope.bankFileProgress;
commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'})
}, function (evt) {
$scope.bankFileProgress.value = parseInt(100 * evt.loaded / evt.total);
})
}
}
};
//上传ID信息
$scope.uploadIDFile = function (file) {
if (file != null) {
if (file.size > 3 * 1024 * 1024) {
commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB请压缩后重试', type: 'error'})
} else {
$scope.idFileProgress = {value: 0};
Upload.upload({
url: '/attachment/files',
data: {file: file}
}).then(function (resp) {
delete $scope.idFileProgress;
$scope.file.file_id_info = resp.data.url;
$scope.updateFile();
if ($scope.file.file_id_info.endsWith('pdf')) {
$scope.idIsImage = false;
} else {
$scope.idIsImage = true;
}
}, function (resp) {
delete $scope.idFileProgress;
commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'})
}, function (evt) {
$scope.idFileProgress.value = parseInt(100 * evt.loaded / evt.total);
})
}
}
};
//上传账单流水
$scope.uploadCompanyFile = 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.bankIsImage = true;
if ($scope.file.file_bank_info && $scope.file.file_bank_info.endsWith('pdf')) {
$scope.bankIsImage = false;
}
$scope.idIsImage = true;
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.updateFile = function () {
$http.put('/client/partner_info/update/kycFile', $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.needBDIntervention = function () {
commonDialog.confirm({
title: 'Warning',
content: 'Are you sure to need notify BD ?'
}).then(function () {
$http.put('/sys/kyc/partner/notifyBd').then(function () {
commonDialog.alert({
title: 'Success',
content: 'Notify Successful,Please wait for bd to contact you',
type: 'success'
});
$state.go('partner_dashboard');
}, function (resp) {
commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'});
})
})
};
$scope.clientComplianceViewCommit = function () {
if (!$scope.file.client_bank_file.file_value) {
commonDialog.alert({title: 'Error', content: '请提交* ASIC File', type: 'error'});
return;
}
if (!$scope.file.client_id_file.file_value) {
commonDialog.alert({title: 'Error', content: '请提交ID护照或驾照信息', type: 'error'});
return;
}
if ($scope.file.id_type == "" || $scope.file.id_type == undefined || $scope.file.id_type == null) {
commonDialog.alert({title: 'Error', content: '请选择ID文件的类型', type: 'error'});
return;
}
if ($scope.file.id_type == "passport") {
if (!$scope.file.kyc_utility_bill_file.file_value) {
commonDialog.alert({title: 'Error', content: '请提交Utility Bill FIles(水电煤账单)信息', type: 'error'});
return;
}
}
commonDialog.confirm({
title: 'Warning',
content: 'Are you sure to submit files?'
}).then(function () {
$http.post('/client/partner_info/clientCompliance/' + $scope.partner.client_moniker + '/kycFilesViewCommit/' + $scope.file.id_type).then(function () {
commonDialog.alert({
title: 'Success',
content: 'Commit Successful',
type: 'success'
});
$state.reload();
}, function (resp) {
commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'});
})
});
};
$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 + '/delete').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'});
})
})
};
}]);
return app;
});

@ -0,0 +1,301 @@
<style type="text/css">
#bg {
display: block;
position: absolute;
top: 0%;
left: 0%;
width: 100%;
height: 100%;
background-color: black;
z-index: 1001;
-moz-opacity: 0.7;
opacity: .70;
filter: alpha(opacity=70);
}
#show {
display: block;
position: absolute;
top: 20%;
left: 50%;
width: 50%;
padding: 50px;
z-index: 2004;
overflow: auto;
}
.industry-p {
width: 95%;
float: left;
}
.img-size {
height: 100px;
margin-left: 20px;
}
.btn-default:active,
.btn-default.active,
.open > .dropdown-toggle.btn-default {
color: #333;
background-color: #f7bf90;
border-color: #adadad;
}
</style>
<div class="content">
<div class="row">
<div class="col-sm-12">
<div class="nav-tabs-custom">
<ul class="nav nav-tabs">
<li class="active">
<a>Partner Detail</a>
</li>
<li>
<a ui-sref="partnerKYCProgress.bdHelpKycProgress({clientMoniker:partner.client_moniker})">KYC Files Audit</a>
</li>
</ul>
<div class="tab-content" ui-view>
<div class="panel panel-default">
<div class="panel-heading">
Partner Basic Information
<a role="button" class="" ng-click="configMasterMerchant()"
ng-if="partner.show_all_permission && ('10'|withRole)||(partner.show_all_permission && ('1'|withRole))">
(<i class="fa fa-arrows" aria-hidden="true"></i> Config master merchant)
</a>
<a role="button" class="pull-right"
ng-if="partner.show_all_permission && ('110'|withRole)||(partner.show_all_permission && ('1'|withRole))"
ui-sref="partners.edit({clientMoniker:partner.client_moniker})">
<i class="fa fa-edit"></i> Edit
</a>
</div>
<div class="panel-body">
<div class="form-horizontal">
<div class="form-group">
<label class="control-label col-sm-2">Partner Code</label>
<div class="col-sm-10">
<p class="form-control-static">
<span id="parent_code">{{partner.client_moniker}}</span>
<span ng-if="partner.parent_client_id!=null">(Sub Partner of
<a ui-sref="partners.detail({clientMoniker:partner.parent_client.client_moniker})"
ng-bind="partner.parent_client.client_moniker"></a>)
</span>
<span ng-if="partner.is_valid==0"
ng-class="{pass_timeout:partner.is_valid==0}">(已禁用)</span>
</p>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-2">Company Name</label>
<div class="col-sm-10">
<p class="form-control-static">
<span ng-bind="partner.company_name"></span>
<span
ng-if="isComplianceOfCompanyName && partner.open_status"
style="margin-left: 10px;font-weight: 700;color: red;">
注意:(微信渠道可能不合规)
</span>
<span class="description-text text-red" ng-if="('10000000010' | withRole)" ng-bind="partner.same_company_name"></span>
</p>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-2">Short Name</label>
<div class="col-sm-10">
<p class="form-control-static pull-left" ng-bind="partner.short_name"></p>
<p class="form-control-static pull-left"
ng-if="isComplianceOfShortName && partner.open_status"
style="margin-left: 10px;font-weight: 700;color: red;">
注意:(微信渠道可能不合规)
</p>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-2">Business Name</label>
<div class="col-sm-10">
<p class="form-control-static" ng-bind="partner.business_name"></p>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-2">Store Name</label>
<div class="col-sm-10">
<p class="form-control-static pull-left" ng-bind="partner.store_name"></p>
<p class="form-control-static pull-left"
ng-if="isComplianceOfShortName && partner.open_status"
style="margin-left: 10px;font-weight: 700;color: red;">
注意:(微信渠道可能不合规)
</p>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-2">Business Structure</label>
<div class="col-sm-10">
<p class="form-control-static pull-left"
ng-bind="partner.business_structure|business_structure"></p>
<p class="form-control-static pull-left"
ng-if="isComplianceOfBusinessStructure && partner.open_status"
style="margin-left: 10px;font-weight: 700;color: red;">
注意:(微信渠道可能不合规)
</p>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-2">Logo</label>
<div class="col-sm-10">
<img ng-src="{{partner.logo_url}}" style="max-height: 100px;">
</div>
</div>
<div class="form-group" ng-if="partner.abn">
<label class="control-label col-sm-2">ABN</label>
<div class="col-sm-10">
<p class="form-control-static" ng-bind="partner.abn"></p>
</div>
</div>
<div class="form-group" ng-if="partner.acn">
<label class="control-label col-sm-2">ACN</label>
<div class="col-sm-10">
<p class="form-control-static" ng-bind="partner.acn"></p>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-2">Industry</label>
<div class="col-sm-10">
<p class="form-control-static" ng-bind="partner.industry|partner_industry"></p>
</div>
</div>
<div hidden class="form-group">
<label class="control-label col-sm-2">Sector</label>
<div class="col-sm-10">
<p class="form-control-static" ng-bind="partner.sector"></p>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-2">Service Phone</label>
<div class="col-sm-10">
<p class="form-control-static" ng-bind="partner.company_phone||'-'"></p>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-2">Major Products/Service</label>
<div class="col-sm-10">
<p class="form-control-static" ng-bind="partner.description"></p>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-2">Remark</label>
<div class="col-sm-10">
<p class="form-control-static" ng-bind="partner.remark"></p>
</div>
</div>
<div class="form-group" ng-if="partner.referrer_id">
<label class="control-label col-sm-2">Referrer</label>
<div class="col-sm-10">
<p class="form-control-static" ng-bind="partner.referrer_name"></p>
</div>
</div>
</div>
</div>
</div>
<!--end 商户基本资料-->
<div class="panel panel-default">
<div class="panel-heading">Partner Contact Information</div>
<div class="panel-body">
<div class="form-horizontal">
<div class="form-group">
<label class="control-label col-sm-2">Contact Person Name</label>
<div class="col-sm-10">
<p class="form-control-static" ng-bind="partner.contact_person"></p>
</div>
</div>
<div class="form-group col-sm-6">
<label class="control-label col-sm-4">Phone</label>
<div class="col-sm-8">
<p class="form-control-static" ng-bind="partner.contact_phone"></p>
<p class="description-text text-red" ng-if="('10000000010' | withRole)" ng-bind="partner.same_phone"></p>
</div>
</div>
<div class="form-group col-sm-6">
<label class="control-label col-sm-4">E-mail</label>
<div class="col-sm-8">
<p class="form-control-static">
<span ng-bind="partner.contact_email"></span>
</span>
</p>
<p class="description-text text-red" ng-if="('10000000010' | withRole)" ng-bind="partner.same_email"></p>
</div>
</div>
</div>
</div>
</div>
<!--end 商户联系资料-->
<div class="panel panel-default">
<div class="panel-heading">Address Information</div>
<div class="panel-body">
<div class="form-horizontal">
<div class="form-group col-sm-6">
<label class="control-label col-sm-4">Address</label>
<div class="col-sm-8">
<p class="form-control-static" ng-bind="partner.address"></p>
<p class="description-text text-red" ng-if="('10000000010' | withRole)" ng-bind="partner.same_address"></p>
</div>
</div>
<div class="form-group col-sm-6">
<label class="control-label col-sm-4">Suburb</label>
<div class="col-sm-8">
<p class="form-control-static" ng-bind="partner.suburb"></p>
</div>
</div>
<div class="form-group col-sm-6">
<label class="control-label col-sm-4">PostCode</label>
<div class="col-sm-8">
<p class="form-control-static" ng-bind="partner.postcode"></p>
</div>
</div>
<div class="form-group col-sm-6">
<label class="control-label col-sm-4">State</label>
<div class="col-sm-8">
<p class="form-control-static" ng-bind="partner.state"></p>
</div>
</div>
<div class="form-group col-sm-6">
<label class="control-label col-sm-4">Country</label>
<div class="col-sm-8">
<p class="form-control-static" ng-bind="partner.country"></p>
</div>
</div>
<div class="form-group ">
<label class="control-label col-sm-2">Timezone</label>
<div class="col-sm-10">
<p class="form-control-static" ng-bind="partner.timezone|timezoneLabel"></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>

@ -0,0 +1,203 @@
<style type="text/css">
img {
width: 100%;
}
</style>
<div class="content">
<div class="row">
<div class="col-sm-12">
<div class="nav-tabs-custom">
<ul class="nav nav-tabs">
<li>
<a ui-sref="partnerKYCProgress.partner_detail({clientMoniker:file.client.client_moniker})">Partner Detail</a>
</li>
<li class="active">
<a>KYC Files Audit</a>
</li>
</ul>
<div class="tab-content" ui-view>
<div class="panel panel-default">
<div class="panel-body">
<div class="form-group">
<label class="control-label col-sm-2">商户简介:</label>
<div class="col-sm-10">
<p class="form-control-static">
<span ng-if="file.file_company.status==0">待审核</span>
<span ng-if="file.file_company.status==1">通过</span>
<span ng-if="file.file_company.status==9">需要帮助<p class="small text-danger" ng-if="file.file_company.description && file.file_company.description!=' '"> 打回原因:({{file.file_company.description}}</p></span>
<span ng-if="file.file_company.status==2">打回<p class="small text-danger" ng-if="file.file_company.description && file.file_company.description!=' '"> 打回原因:({{file.file_company.description}}</p></span>
</p>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-2">Partner Code</label>
<div class="col-sm-10">
<p class="form-control-static">
<a class="text-primary" role="button" title="Detail"
ui-sref="partners.detail({clientMoniker:file.client.client_moniker})">
<span id="parent_code">{{file.client.client_moniker}}</span>
</a>
</p>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-2">Company Name</label>
<div class="col-sm-10">
<p class="form-control-static">
<span ng-bind="file.client.company_name"></span>
</p>
</div>
</div>
</div>
<div class="panel-heading">Audit Files &nbsp;&nbsp;&nbsp;
<button class="btn btn-warning" type="button">如无法提供KYC文件在下方"无法提供材料原因"填写原因后提交
</button>
</div>
<div class="panel-body">
<div class="form-horizontal">
<div class="form-group">
<label class="control-label col-sm-3">* ASIC File</label>
<div class="col-sm-3">
<div class="form-control-static">
<button class="btn btn-primary" type="button"
ngf-select="uploadBankFile($file)">
<i class="fa fa-upload"></i> Upload
</button>
</div>
<uib-progressbar value="bankFileProgress.value" ng-if="bankFileProgress"></uib-progressbar>
<table>
<tbody>
<tr>
<img ng-src="{{file.client_bank_file[0].file_value}}" class="col-sm-8"
onerror="this.src='/static/images/file_close.png'">
</td>
</tr>
</tbody>
</table>
</div>
<div class="col-sm-3">
<div class="form-control-static">
<p>Example请保证图片信息清晰可见,如示例
<img class="col-sm-6" style="border: 1px solid #ddd"
src="https://file.royalpay.com.au/open/2017/03/07/1488859920633_5ruVtDa30yY2ytBSDAAqxg0Ob2nreh.jpeg">
</p>
</div>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-3">* Choose ID Type </label>
<div class="col-sm-5">
<div class="form-control-static">
<select class="form-control" ng-model="file.id_type" style="width: 250px">
<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-3">* ID </label>
<div class="col-sm-3">
<div class="form-control-static">
<button class="btn btn-primary" type="button"
ngf-select="uploadIDFile($file)">
<i class="fa fa-upload"></i> Upload
</button>
</div>
<uib-progressbar value="idFileProgress.value" ng-if="idFileProgress"></uib-progressbar>
<table>
<tbody>
<tr>
<img ng-src="{{file.client_id_file[0].file_value}}" class="col-sm-8"
onerror="this.src='/static/images/file_close.png'">
</td>
</tr>
</tbody>
</table>
</div>
<div class="col-sm-3">
<div class="form-control-static">
<div class="col-sm-12">
<p>Example请保证图片(护照或驾照)信息清晰可见,如示例
<img class="col-xs-6" style="border: 1px solid #ddd"
src="https://file.royalpay.com.au/open/2017/06/29/1498725651779_OPiqOP1dGnTpaxPsCR3P9lVrp4384b.jpg">
<img class="col-sm-6" style="border: 1px solid #ddd"
src="https://file.royalpay.com.au/open/2017/06/29/1498725678615_Bv2tzUtihY5U6YK9ScveXzKkVWOnrF.jpg">
</p>
</div>
</div>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-3"> Utility Bill Files</label>
<div class="col-sm-3">
<div class="form-control-static">
<button class="btn btn-primary" type="button"
ngf-select="uploadCompanyFile($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 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/2017/03/07/1488865011738_mW91ylSb5V1NJYu8jxvBPGNN49Zyel.jpeg">
</p>
<p class="col-sm-6">sole trade个体户),partnership合伙,trust信托请在http://abr.business.gov.au将查询结果截图上传
<img class="col-sm-12" style="border: 1px solid #ddd"
src="https://file.royalpay.com.au/open/2017/03/07/1488860564017_37spL6phUySM27oRtO4cQ7FOJblYJ6.jpeg">
</p>
</div>
</div>
</div>
</div>
<div class="row" style="text-align: center">
<button style="width: 30%;height: 50px;font-size: 20px;margin-top: 40px;margin-bottom: 20px;" class="btn-group btn btn-success" type="button"
ng-click="clientComplianceViewCommit()">Submit Files
</button>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>

@ -60,6 +60,26 @@
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-3">* Choose ID Type </label>
<div class="col-sm-5">
<div class="form-control-static">
<select class="form-control" ng-model="file.id_type" style="width: 250px">
<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-3">* ID </label>
<div class="col-sm-3">
@ -97,25 +117,6 @@
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-3">Choose ID Type </label>
<div class="col-sm-3">
<div class="form-control-static">
<select class="form-control" ng-model="file.id_type">
<option value="passport" >Passport</option>
<option value="driver_license">Driver's license</option>
</select>
</div>
</div>
<div class="col-sm-3">
<div class="form-control-static">
<div class="col-sm-12">
<p>选择ID类型若选择Driver's license,Utility Bill Files可以选填</p>
</div>
</div>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-3"> Utility Bill Files</label>
<div class="col-sm-3">
@ -159,26 +160,14 @@
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-3">* Is Need BD</label>
<div class="col-sm-3">
<div class="form-control-static">
<button ng-click="needBDIntervention()" class="btn-group btn btn-success">BD Intervention</button>
</div>
</div>
<div class="col-sm-3">
<div class="form-control-static">
<div class="col-sm-12">
<p>对补充材料有疑问需要BD介入帮助,如果需要BD介入帮助上述材料可不填</p>
</div>
</div>
</div>
</div>
<div class="row" style="text-align: center">
<button style="width: 35%;height: 50px;font-size: 20px;margin-top: 40px;margin-bottom: 20px;" class="btn-group btn btn-success" type="button"
<button style="width: 30%;height: 50px;font-size: 20px;margin-top: 40px;margin-bottom: 20px;" class="btn-group btn btn-success" type="button"
ng-click="clientComplianceViewCommit()">Submit Files
</button>
<button style="width: 10%;height: 50px;font-size: 20px;margin-top: 40px;margin-bottom: 20px;" class="btn-group btn btn-warning" type="button"
ng-click="needBDIntervention()">Notify BD Help
</button>
<!-- 对补充材料有疑问需要BD介入帮助,如果需要BD介入帮助上述材料可不填-->
</div>
</div>
</div>

@ -27,7 +27,7 @@
display: none;
}
</style>
<section class="content-header" style="margin-bottom: 30px">
<section class="content-header">
<h1>商户KYC认证进度</h1>
<ol class="breadcrumb">
<li>
@ -36,347 +36,345 @@
<li class="active">商户KYC认证进度</li>
</ol>
</section>
<div class="row" style="padding: 0 30px">
<div class="col-lg-3 col-6">
<!-- small card -->
<div class="small-box bg-info4">
<div class="inner" style="height: 130px;">
<h2 class="bg-title">{{total_need_help}}</h2>
<p class="bg-title1">{{total_need_help}}/{{total_partner}}</p>
<p class="bg-title2">需要帮助的商户/总商户数</p>
</div>
<div class="icon" style="position: absolute;top: 2px;right: 10px;">
<div class="circleChart1" style="color: white"></div>
<div ui-view>
<div class="row" style="padding: 0 30px;margin-top: 30px;">
<div class="col-lg-3 col-6">
<!-- small card -->
<div class="small-box bg-info4">
<div class="inner" style="height: 130px;">
<h2 class="bg-title">{{total_need_help}}</h2>
<p class="bg-title1">{{total_need_help}}/{{total_partner}}</p>
<p class="bg-title2">需要帮助的商户/总商户数</p>
</div>
<div class="icon" style="position: absolute;top: 2px;right: 10px;">
<div class="circleChart1" style="color: white"></div>
</div>
</div>
</div>
</div>
<div class="col-lg-3 col-6">
<!-- small card -->
<div class="small-box bg-info3">
<div class="inner" style="height: 130px;">
<h2 class="bg-title">{{total_progressing}}</h2>
<p class="bg-title1">{{total_progressing}}/{{total_partner}}</p>
<p class="bg-title2">已提交材料/总商户数</p>
</div>
<div class="icon" style="position: absolute;top: 2px;right: 10px;">
<div class="circleChart2" style="color: white"></div>
<div class="col-lg-3 col-6">
<!-- small card -->
<div class="small-box bg-info3">
<div class="inner" style="height: 130px;">
<h2 class="bg-title">{{total_progressing}}</h2>
<p class="bg-title1">{{total_progressing}}/{{total_partner}}</p>
<p class="bg-title2">已提交材料/总商户数</p>
</div>
<div class="icon" style="position: absolute;top: 2px;right: 10px;">
<div class="circleChart2" style="color: white"></div>
</div>
</div>
</div>
</div>
<div class="col-lg-3 col-6">
<!-- small card -->
<div class="small-box bg-info2">
<div class="inner" style="height: 130px;">
<h2 class="bg-title">{{total_pass_partner}}</h2>
<p class="bg-title1">{{total_pass_partner}}/{{total_partner}}</p>
<p class="bg-title2">已通过/总商户数</p>
<div class="col-lg-3 col-6">
<!-- small card -->
<div class="small-box bg-info2">
<div class="inner" style="height: 130px;">
<h2 class="bg-title">{{total_pass_partner}}</h2>
<p class="bg-title1">{{total_pass_partner}}/{{total_partner}}</p>
<p class="bg-title2">已通过/总商户数</p>
</div>
<div class="icon" style="position: absolute;top: 2px;right: 10px;">
<div class="circleChart3" style="color: white"></div>
</div>
</div>
<div class="icon" style="position: absolute;top: 2px;right: 10px;">
<div class="circleChart3" style="color: white"></div>
</div>
<div class="col-lg-3 col-6">
<!-- small card -->
<div class="small-box bg-info1">
<div class="inner" style="height: 130px;">
<h2 class="bg-title">{{total_refuse_partner}}</h2>
<p class="bg-title1">{{total_refuse_partner}}/{{total_progressing}}</p>
<p class="bg-title2">材料打回/提交审核商户数</p>
</div>
<div class="icon" style="position: absolute;top: 2px;right: 10px;">
<div class="circleChart4" style="color: white"></div>
</div>
</div>
</div>
</div>
<div class="col-lg-3 col-6">
<!-- small card -->
<div class="small-box bg-info1">
<div class="inner" style="height: 130px;">
<h2 class="bg-title">{{total_refuse_partner}}</h2>
<p class="bg-title1">{{total_refuse_partner}}/{{total_progressing}}</p>
<p class="bg-title2">材料打回/提交审核商户数</p>
</div>
<div class="icon" style="position: absolute;top: 2px;right: 10px;">
<div class="circleChart4" style="color: white"></div>
<div class="box box-warning">
<div class="box-header">待处理需要帮助的商户({{need_help.length}}家):
<div class="box-tools pull-right">
<button type="button" ng-if="!ctrl.plusShow1" class="btn btn-tool btn-box-tool" data-toggle="collapse" data-target="#need-help" ng-click="ctrl.plusShow1=true">
<i class="fa fa-minus"></i>
</button>
<button type="button" ng-if="ctrl.plusShow1" class="btn btn-tool btn-box-tool" data-toggle="collapse" data-target="#need-help" ng-click="ctrl.plusShow1=false">
<i class="fa fa-plus"></i>
</button>
</div>
</div>
</div>
</div>
<div class="box box-warning">
<div class="box-header">待处理需要帮助的商户({{need_help.length}}家):
<div class="box-tools pull-right">
<button type="button" ng-if="!ctrl.plusShow1" class="btn btn-tool btn-box-tool" data-toggle="collapse" data-target="#need-help" ng-click="ctrl.plusShow1=true">
<i class="fa fa-minus"></i>
</button>
<button type="button" ng-if="ctrl.plusShow1" class="btn btn-tool btn-box-tool" data-toggle="collapse" data-target="#need-help" ng-click="ctrl.plusShow1=false">
<i class="fa fa-plus"></i>
</button>
<div class="box-body table-responsive collapse in" id="need-help">
<table class="table table-bordered table-striped table-hover">
<thead>
<tr>
<th>Client Moniker</th>
<th>Short Name</th>
<th>Compliance Status</th>
<th>Register Time</th>
<th>Submit Time</th>
<th>Source</th>
<th>Operation</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="client in need_help">
<td>
{{client.client_moniker}}
</td>
<td ng-bind="client.short_name"></td>
<td ng-class="{'bg-green':(client.approve_result==2 && (client.client_source==1 || client.client_source==2)),'bg-red':((client.open_status==1||client.open_status==2||client.open_status==4) && client.approve_result!=3)||(client.approve_result==3 && (!client.open_status || client.open_status==1 || client.open_status == 4))||(client.approve_result==4 && !client.open_status)||(client.open_status==10)}">
<span ng-if="client.approve_result==1 && client.approve_time">通过({{client.approve_time}})</span>
<span ng-if="!client.open_status && !client.approve_result && client.approve_result!=5 && client.client_source!=4">资料完善中</span>
<span ng-if="!client.open_status && !client.approve_result && client.approve_result!=5 && client.client_source==4">(自助开通)资料完善中</span>
<span ng-if="!client.open_status && client.approve_result==2 && client.approve_time">自助开通试用中({{client.approve_time}}~{{client.expiry_time}})</span>
<span ng-if="client.approve_result==0 && client.approve_time">不通过({{client.approve_time}})</span>
<span ng-if="client.approve_result==5 && client.approve_time && client.refuse_remark">申请打回({{client.refuse_remark|limitTo:15}})</span>
<span ng-if="(client.open_status==1||client.open_status==4) && client.approve_result!=3"><i
ng-if="client.refuse_remark.length>0" class="fa fa-reply" aria-hidden="true"
title="被打回重新提交"></i>等待合规</span>
<span ng-if="client.approve_result==3 && (!client.open_status || client.open_status==4)">自助开通(等待合规)</span>
<span ng-if="client.open_status==2">合同制作完成</span>
<span ng-if="client.open_status==3 && client.approve_result!=5">等待BD上传材料审核</span>
<span ng-if="client.open_status==10">绿色通道申请中</span>
<span ng-if="client.approve_result==4 && !client.open_status"><i
ng-if="client.refuse_remark.length>0" class="fa fa-reply" aria-hidden="true"
title="被打回重新提交"></i>等待合规</span>
</td>
<td ng-bind="client.create_time|date:'dd/MMM/yyyy'"></td>
<td ng-bind="client.submit_time|date:'dd/MMM/yyyy'"></td>
<td>
<span ng-if="client.source==1">App</span>
<span ng-if="client.source==2">Web</span>
</td>
<td>
<a class="text-primary" role="button" title="Detail"
ui-sref="partners.detail({clientMoniker:client.client_moniker})">
<i class="fa fa-search"></i> Detail
</a>|
<a class="text-primary" role="button" title="Detail" ui-sref="partnerKYCProgress.bdHelpKycProgress({clientMoniker:client.client_moniker})">Handle
</a>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="box-body table-responsive collapse in" id="need-help">
<table class="table table-bordered table-striped table-hover">
<thead>
<tr>
<th>Client Moniker</th>
<th>Short Name</th>
<th>Compliance Status</th>
<th>Register Time</th>
<th>Submit Time</th>
<th>Source</th>
<th>Operation</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="client in need_help">
<td>
{{client.client_moniker}}
</td>
<td ng-bind="client.short_name"></td>
<td ng-class="{'bg-green':(client.approve_result==2 && (client.client_source==1 || client.client_source==2)),'bg-red':((client.open_status==1||client.open_status==2||client.open_status==4) && client.approve_result!=3)||(client.approve_result==3 && (!client.open_status || client.open_status==1 || client.open_status == 4))||(client.approve_result==4 && !client.open_status)||(client.open_status==10)}">
<span ng-if="client.approve_result==1 && client.approve_time">通过({{client.approve_time}})</span>
<span ng-if="!client.open_status && !client.approve_result && client.approve_result!=5 && client.client_source!=4">资料完善中</span>
<span ng-if="!client.open_status && !client.approve_result && client.approve_result!=5 && client.client_source==4">(自助开通)资料完善中</span>
<span ng-if="!client.open_status && client.approve_result==2 && client.approve_time">自助开通试用中({{client.approve_time}}~{{client.expiry_time}})</span>
<span ng-if="client.approve_result==0 && client.approve_time">不通过({{client.approve_time}})</span>
<span ng-if="client.approve_result==5 && client.approve_time && client.refuse_remark">申请打回({{client.refuse_remark|limitTo:15}})</span>
<span ng-if="(client.open_status==1||client.open_status==4) && client.approve_result!=3"><i
ng-if="client.refuse_remark.length>0" class="fa fa-reply" aria-hidden="true"
title="被打回重新提交"></i>等待合规</span>
<span ng-if="client.approve_result==3 && (!client.open_status || client.open_status==4)">自助开通(等待合规)</span>
<span ng-if="client.open_status==2">合同制作完成</span>
<span ng-if="client.open_status==3 && client.approve_result!=5">等待BD上传材料审核</span>
<span ng-if="client.open_status==10">绿色通道申请中</span>
<span ng-if="client.approve_result==4 && !client.open_status"><i
ng-if="client.refuse_remark.length>0" class="fa fa-reply" aria-hidden="true"
title="被打回重新提交"></i>等待合规</span>
</td>
<td ng-bind="client.create_time|date:'dd/MMM/yyyy'"></td>
<td ng-bind="client.submit_time|date:'dd/MMM/yyyy'"></td>
<td>
<span ng-if="client.source==1">App</span>
<span ng-if="client.source==2">Web</span>
</td>
<td>
<a class="text-primary" role="button" title="Detail"
ui-sref="partner_apply.apply_detail({client_pre_apply_id:apply.client_pre_apply_id})">
<i class="fa fa-search"></i> Detail
</a>|
<a class="text-primary" role="button" title="Detail" ng-click="addHandleLog(client)">Handle
</a>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="box box-info" style="margin-top: 30px;">
<div class="box-header">已提交审核({{progressPagination.totalCount}}家):
<div class="box-tools pull-right">
<button type="button" ng-if="!ctrl.plusShow2" class="btn btn-tool btn-box-tool" data-toggle="collapse" data-target="#approving" ng-click="ctrl.plusShow2=true">
<i class="fa fa-minus"></i>
</button>
<button type="button" ng-if="ctrl.plusShow2" class="btn btn-tool btn-box-tool" data-toggle="collapse" data-target="#approving" ng-click="ctrl.plusShow2=false">
<i class="fa fa-plus"></i>
</button>
<div class="box box-info" style="margin-top: 30px;">
<div class="box-header">已提交审核({{progressPagination.totalCount}}家):
<div class="box-tools pull-right">
<button type="button" ng-if="!ctrl.plusShow2" class="btn btn-tool btn-box-tool" data-toggle="collapse" data-target="#approving" ng-click="ctrl.plusShow2=true">
<i class="fa fa-minus"></i>
</button>
<button type="button" ng-if="ctrl.plusShow2" class="btn btn-tool btn-box-tool" data-toggle="collapse" data-target="#approving" ng-click="ctrl.plusShow2=false">
<i class="fa fa-plus"></i>
</button>
</div>
</div>
</div>
<div class="box-body table-responsive collapse in" id="approving">
<div class="row">
<div class="col-sm-12">
<div class="form-horizontal">
<div class="form-group col-xs-12">
<label class="col-xs-4 col-sm-2 control-label">Partner Code</label>
<div class="col-sm-5 col-xs-8">
<input class="form-control" placeholder="" ng-click="loadClientProgressing(1)"
ng-model="params.client_moniker">
<div class="box-body table-responsive collapse in" id="approving">
<div class="row">
<div class="col-sm-12">
<div class="form-horizontal">
<div class="form-group col-xs-12">
<label class="col-xs-4 col-sm-2 control-label">Partner Code</label>
<div class="col-sm-5 col-xs-8">
<input class="form-control" placeholder="" ng-click="loadClientProgressing(1)"
ng-model="params.client_moniker">
</div>
</div>
</div>
<div class="form-group col-xs-12">
<label class="control-label col-xs-4 col-sm-2">审核状态:</label>
<div class="col-sm-10 col-xs-8">
<p class="form-control-static">
<a role="button" ng-class="{'bg-primary':status==null}"
ng-click="status=null;loadClientProgressing(1,status)">All</a> |
<a role="button" ng-class="{'bg-primary':statusSelected([0])}"
ng-click="status=[0];loadClientProgressing(1,status)">待审核</a>|
<a role="button" ng-class="{'bg-primary':statusSelected([1])}"
ng-click="status=[1];loadClientProgressing(1,status)">通过</a>
</p>
<div class="form-group col-xs-12">
<label class="control-label col-xs-4 col-sm-2">审核状态:</label>
<div class="col-sm-10 col-xs-8">
<p class="form-control-static">
<a role="button" ng-class="{'bg-primary':status==null}"
ng-click="status=null;loadClientProgressing(1,status)">All</a> |
<a role="button" ng-class="{'bg-primary':statusSelected([0])}"
ng-click="status=[0];loadClientProgressing(1,status)">待审核</a>|
<a role="button" ng-class="{'bg-primary':statusSelected([1])}"
ng-click="status=[1];loadClientProgressing(1,status)">通过</a>
</p>
</div>
</div>
<button class="btn btn-success" type="button" ng-click="loadClientProgressing()">
<i class="fa fa-search"></i> Search
</button>
</div>
<button class="btn btn-success" type="button" ng-click="loadClientProgressing()">
<i class="fa fa-search"></i> Search
</button>
</div>
</div>
<div class="box-body table-responsive">
<table class="table table-bordered table-striped table-hover">
<thead>
<tr>
<th>Client Moniker</th>
<th>Short Name</th>
<th>Compliance Status</th>
<th>Register Time</th>
<th>AuthFile Status</th>
<th>Submit Time</th>
<th>Source</th>
<th>Operation</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="client in approving">
<td ng-bind="client.client_moniker"></td>
<td ng-bind="client.short_name"></td>
<td ng-class="{'bg-green':(client.approve_result==2 && (client.client_source==1 || client.client_source==2)),'bg-red':((client.open_status==1||client.open_status==2||client.open_status==4) && client.approve_result!=3)||(client.approve_result==3 && (!client.open_status || client.open_status==1 || client.open_status == 4))||(client.approve_result==4 && !client.open_status)||(client.open_status==10)}">
<span ng-if="client.approve_result==1 && client.approve_time">通过({{client.approve_time}})</span>
<span ng-if="!client.open_status && !client.approve_result && client.approve_result!=5 && client.client_source!=4">资料完善中</span>
<span ng-if="!client.open_status && !client.approve_result && client.approve_result!=5 && client.client_source==4">(自助开通)资料完善中</span>
<span ng-if="!client.open_status && client.approve_result==2 && client.approve_time">自助开通试用中({{client.approve_time}}~{{client.expiry_time}})</span>
<span ng-if="client.approve_result==0 && client.approve_time">不通过({{client.approve_time}})</span>
<span ng-if="client.approve_result==5 && client.approve_time && client.refuse_remark">申请打回({{client.refuse_remark|limitTo:15}})</span>
<span ng-if="(client.open_status==1||client.open_status==4) && client.approve_result!=3"><i
ng-if="client.refuse_remark.length>0" class="fa fa-reply" aria-hidden="true"
title="被打回重新提交"></i>等待合规</span>
<span ng-if="client.approve_result==3 && (!client.open_status || client.open_status==4)">自助开通(等待合规)</span>
<span ng-if="client.open_status==2">合同制作完成</span>
<span ng-if="client.open_status==3 && client.approve_result!=5">等待BD上传材料审核</span>
<span ng-if="client.open_status==10">绿色通道申请中</span>
<span ng-if="client.approve_result==4 && !client.open_status"><i
ng-if="client.refuse_remark.length>0" class="fa fa-reply" aria-hidden="true"
title="被打回重新提交"></i>等待合规</span>
</td>
<td ng-bind="client.create_time|date:'dd/MMM/yyyy'"></td>
<td>
<span ng-if="client.status==0">待审核</span>
<span ng-if="client.status==1">通过</span>
<span ng-if="client.status==2">打回</span>
</td>
<td ng-bind="client.submit_time|date:'dd/MMM/yyyy'"></td>
<td>
<span ng-if="client.source==1">App</span>
<span ng-if="client.source==2">Web</span>
</td>
<td><a class="text-primary" role="button" title="Detail"
ui-sref="partners.detail({clientMoniker:client.client_moniker})">
<i class="fa fa-search"></i> Detail
</a>
</td>
<!--({client_id:client.client_id})-->
</tr>
</tbody>
</table>
</div>
<div class="modal-footer">
<uib-pagination ng-if="progressPagination"
class="pagination"
total-items="progressPagination.totalCount"
boundary-links="true"
ng-model="pagination.page"
items-per-page="pagination.limit"
max-size="10"
ng-change="loadClientProgressing()"
previous-text="&lsaquo;"
next-text="&rsaquo;"
first-text="&laquo;"
last-text="&raquo;"></uib-pagination>
<div class="col-xs-12">Total Records:{{progressPagination.totalCount}};Total Pages:{{progressPagination.totalPages}}</div>
</div>
</div>
<div class="box-body table-responsive">
<table class="table table-bordered table-striped table-hover">
<thead>
<tr>
<th>Client Moniker</th>
<th>Short Name</th>
<th>Compliance Status</th>
<th>Register Time</th>
<th>AuthFile Status</th>
<th>Submit Time</th>
<th>Source</th>
<th>Operation</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="client in approving">
<td ng-bind="client.client_moniker"></td>
<td ng-bind="client.short_name"></td>
<td ng-class="{'bg-green':(client.approve_result==2 && (client.client_source==1 || client.client_source==2)),'bg-red':((client.open_status==1||client.open_status==2||client.open_status==4) && client.approve_result!=3)||(client.approve_result==3 && (!client.open_status || client.open_status==1 || client.open_status == 4))||(client.approve_result==4 && !client.open_status)||(client.open_status==10)}">
<span ng-if="client.approve_result==1 && client.approve_time">通过({{client.approve_time}})</span>
<span ng-if="!client.open_status && !client.approve_result && client.approve_result!=5 && client.client_source!=4">资料完善中</span>
<span ng-if="!client.open_status && !client.approve_result && client.approve_result!=5 && client.client_source==4">(自助开通)资料完善中</span>
<span ng-if="!client.open_status && client.approve_result==2 && client.approve_time">自助开通试用中({{client.approve_time}}~{{client.expiry_time}})</span>
<span ng-if="client.approve_result==0 && client.approve_time">不通过({{client.approve_time}})</span>
<span ng-if="client.approve_result==5 && client.approve_time && client.refuse_remark">申请打回({{client.refuse_remark|limitTo:15}})</span>
<span ng-if="(client.open_status==1||client.open_status==4) && client.approve_result!=3"><i
ng-if="client.refuse_remark.length>0" class="fa fa-reply" aria-hidden="true"
title="被打回重新提交"></i>等待合规</span>
<span ng-if="client.approve_result==3 && (!client.open_status || client.open_status==4)">自助开通(等待合规)</span>
<span ng-if="client.open_status==2">合同制作完成</span>
<span ng-if="client.open_status==3 && client.approve_result!=5">等待BD上传材料审核</span>
<span ng-if="client.open_status==10">绿色通道申请中</span>
<span ng-if="client.approve_result==4 && !client.open_status"><i
ng-if="client.refuse_remark.length>0" class="fa fa-reply" aria-hidden="true"
title="被打回重新提交"></i>等待合规</span>
</td>
<td ng-bind="client.create_time|date:'dd/MMM/yyyy'"></td>
<td>
<span ng-if="client.status==0">待审核</span>
<span ng-if="client.status==1">通过</span>
<span ng-if="client.status==2">打回</span>
</td>
<td ng-bind="client.submit_time|date:'dd/MMM/yyyy'"></td>
<td>
<span ng-if="client.source==1">App</span>
<span ng-if="client.source==2">Web</span>
</td>
<td><a class="text-primary" role="button" title="Detail"
ui-sref="compliance_detail({client_moniker:client.client_moniker})">
<i class="fa fa-search"></i> Detail
</a>
</td>
<!--({client_id:client.client_id})-->
</tr>
</tbody>
</table>
</div>
<div class="modal-footer">
<uib-pagination ng-if="approving.size()>0"
class="pagination"
total-items="progressPagination.totalCount"
boundary-links="true"
ng-model="pagination.page"
items-per-page="pagination.limit"
max-size="10"
ng-change="loadClientProgressing()"
previous-text="&lsaquo;"
next-text="&rsaquo;"
first-text="&laquo;"
last-text="&raquo;"></uib-pagination>
<div class="col-xs-12">Total Records:{{progressPagination.totalCount}};Total Pages:{{progressPagination.totalPages}}</div>
</div>
</div>
</div>
<div class="box box-danger" style="margin-top: 30px;">
<div class="box-header">未提交审核({{completedPagination.totalCount}}家):
<div class="box-tools pull-right">
<button type="button" ng-if="!ctrl.plusShow3" class="btn btn-tool btn-box-tool" data-toggle="collapse" data-target="#completed_contract" ng-click="ctrl.plusShow3=true">
<i class="fa fa-minus"></i>
</button>
<button type="button" ng-if="ctrl.plusShow3" class="btn btn-tool btn-box-tool" data-toggle="collapse" data-target="#completed_contract" ng-click="ctrl.plusShow3=false">
<i class="fa fa-plus"></i>
</button>
<div class="box box-danger" style="margin-top: 30px;">
<div class="box-header">未提交审核({{completedPagination.totalCount}}家):
<div class="box-tools pull-right">
<button type="button" ng-if="!ctrl.plusShow3" class="btn btn-tool btn-box-tool" data-toggle="collapse" data-target="#completed_contract" ng-click="ctrl.plusShow3=true">
<i class="fa fa-minus"></i>
</button>
<button type="button" ng-if="ctrl.plusShow3" class="btn btn-tool btn-box-tool" data-toggle="collapse" data-target="#completed_contract" ng-click="ctrl.plusShow3=false">
<i class="fa fa-plus"></i>
</button>
</div>
</div>
</div>
<div class="box-body table-responsive collapse in" id="completed_contract">
<div class="row">
<div class="col-sm-12">
<div class="form-horizontal">
<div class="form-group col-xs-12">
<label class="col-xs-4 col-sm-2 control-label">Partner Code</label>
<div class="col-sm-5 col-xs-8">
<input class="form-control" placeholder="" ng-click="loadClientCompleted(1)"
ng-model="params.client_moniker">
</div>
</div>
<div class="form-group col-xs-12">
<label class="control-label col-xs-4 col-sm-2">审核状态:</label>
<div class="col-sm-10 col-xs-8">
<p class="form-control-static">
<a role="button" ng-class="{'bg-primary':params.status==null}"
ng-click="params.status=null;loadClientCompleted(1)">All</a> |
<a role="button" ng-class="{'bg-primary':statusSelected([3])}"
ng-click="params.status=[3];loadClientCompleted(1)">未提交</a> |
<a role="button" ng-class="{'bg-primary':statusSelected([2])}"
ng-click="params.status=[2];loadClientCompleted(1)">打回</a>
</p>
<div class="box-body table-responsive collapse in" id="completed_contract">
<div class="row">
<div class="col-sm-12">
<div class="form-horizontal">
<div class="form-group col-xs-12">
<label class="col-xs-4 col-sm-2 control-label">Partner Code</label>
<div class="col-sm-5 col-xs-8">
<input class="form-control" placeholder="" ng-click="loadClientCompleted(1)"
ng-model="params.client_moniker">
</div>
</div>
<div class="form-group col-xs-12">
<label class="control-label col-xs-4 col-sm-2">审核状态:</label>
<div class="col-sm-10 col-xs-8">
<p class="form-control-static">
<a role="button" ng-class="{'bg-primary':params.status==null}"
ng-click="params.status=null;loadClientCompleted(1)">All</a> |
<a role="button" ng-class="{'bg-primary':statusSelected([3])}"
ng-click="params.status=[3];loadClientCompleted(1)">未提交</a> |
<a role="button" ng-class="{'bg-primary':statusSelected([2])}"
ng-click="params.status=[2];loadClientCompleted(1)">打回</a>
</p>
</div>
</div>
<button class="btn btn-success" type="button" ng-click="loadClientCompleted()">
<i class="fa fa-search"></i> Search
</button>
</div>
</div>
<button class="btn btn-success" type="button" ng-click="loadClientCompleted()">
<i class="fa fa-search"></i> Search
</button>
</div>
<div class="box-body table-responsive">
<table class="table table-bordered table-striped table-hover">
<thead>
<tr>
<th>Client Moniker</th>
<th>Short Name</th>
<th>Compliance Status</th>
<th>Register Time</th>
<th>Operation</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="client in completed_contract">
<td ng-bind="client.client_moniker"></td>
<td ng-bind="client.short_name"></td>
<td ng-class="{'bg-green':(client.approve_result==2 && (client.client_source==1 || client.client_source==2)),'bg-red':((client.open_status==1||client.open_status==2||client.open_status==4) && client.approve_result!=3)||(client.approve_result==3 && (!client.open_status || client.open_status==1 || client.open_status == 4))||(client.approve_result==4 && !client.open_status)||(client.open_status==10)}">
<span ng-if="client.approve_result==1 && client.approve_time">通过({{client.approve_time}})</span>
<span ng-if="!client.open_status && !client.approve_result && client.approve_result!=5 && client.client_source!=4">资料完善中</span>
<span ng-if="!client.open_status && !client.approve_result && client.approve_result!=5 && client.client_source==4">(自助开通)资料完善中</span>
<span ng-if="!client.open_status && client.approve_result==2 && client.approve_time">自助开通试用中({{client.approve_time}}~{{client.expiry_time}})</span>
<span ng-if="client.approve_result==0 && client.approve_time">不通过({{client.approve_time}})</span>
<span ng-if="client.approve_result==5 && client.approve_time && client.refuse_remark">申请打回({{client.refuse_remark|limitTo:15}})</span>
<span ng-if="(client.open_status==1||client.open_status==4) && client.approve_result!=3"><i
ng-if="client.refuse_remark.length>0" class="fa fa-reply" aria-hidden="true"
title="被打回重新提交"></i>等待合规</span>
<span ng-if="client.approve_result==3 && (!client.open_status || client.open_status==4)">自助开通(等待合规)</span>
<span ng-if="client.open_status==2">合同制作完成</span>
<span ng-if="client.open_status==3 && client.approve_result!=5">等待BD上传材料审核</span>
<span ng-if="client.open_status==10">绿色通道申请中</span>
<span ng-if="client.approve_result==4 && !client.open_status"><i
ng-if="client.refuse_remark.length>0" class="fa fa-reply" aria-hidden="true"
title="被打回重新提交"></i>等待合规</span>
</td>
<td ng-bind="client.create_time|date:'dd/MMM/yyyy'"></td>
<td><a class="text-primary" role="button" title="Detail"
ui-sref="partners.detail({clientMoniker:client.client_moniker})">
<i class="fa fa-search"></i> Detail
</a>
</td>
<!--({client_id:client.client_id})-->
</tr>
</tbody>
</table>
</div>
<div class="modal-footer">
<uib-pagination ng-if="completed_contract.length"
class="pagination"
total-items="completedPagination.totalCount"
boundary-links="true"
ng-model="completedPagination.page"
items-per-page="completedPagination.limit"
max-size="10"
ng-change="loadClientCompleted()"
previous-text="&lsaquo;"
next-text="&rsaquo;"
first-text="&laquo;"
last-text="&raquo;"></uib-pagination>
<div class="col-xs-12">Total Records:{{completedPagination.totalCount}};Total Pages:{{completedPagination.totalPages}}</div>
</div>
</div>
</div>
<div class="box-body table-responsive">
<table class="table table-bordered table-striped table-hover">
<thead>
<tr>
<th>Client Moniker</th>
<th>Short Name</th>
<th>Compliance Status</th>
<th>Register Time</th>
<th>Operation</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="client in completed_contract">
<td ng-bind="client.client_moniker"></td>
<td ng-bind="client.short_name"></td>
<td ng-class="{'bg-green':(client.approve_result==2 && (client.client_source==1 || client.client_source==2)),'bg-red':((client.open_status==1||client.open_status==2||client.open_status==4) && client.approve_result!=3)||(client.approve_result==3 && (!client.open_status || client.open_status==1 || client.open_status == 4))||(client.approve_result==4 && !client.open_status)||(client.open_status==10)}">
<span ng-if="client.approve_result==1 && client.approve_time">通过({{client.approve_time}})</span>
<span ng-if="!client.open_status && !client.approve_result && client.approve_result!=5 && client.client_source!=4">资料完善中</span>
<span ng-if="!client.open_status && !client.approve_result && client.approve_result!=5 && client.client_source==4">(自助开通)资料完善中</span>
<span ng-if="!client.open_status && client.approve_result==2 && client.approve_time">自助开通试用中({{client.approve_time}}~{{client.expiry_time}})</span>
<span ng-if="client.approve_result==0 && client.approve_time">不通过({{client.approve_time}})</span>
<span ng-if="client.approve_result==5 && client.approve_time && client.refuse_remark">申请打回({{client.refuse_remark|limitTo:15}})</span>
<span ng-if="(client.open_status==1||client.open_status==4) && client.approve_result!=3"><i
ng-if="client.refuse_remark.length>0" class="fa fa-reply" aria-hidden="true"
title="被打回重新提交"></i>等待合规</span>
<span ng-if="client.approve_result==3 && (!client.open_status || client.open_status==4)">自助开通(等待合规)</span>
<span ng-if="client.open_status==2">合同制作完成</span>
<span ng-if="client.open_status==3 && client.approve_result!=5">等待BD上传材料审核</span>
<span ng-if="client.open_status==10">绿色通道申请中</span>
<span ng-if="client.approve_result==4 && !client.open_status"><i
ng-if="client.refuse_remark.length>0" class="fa fa-reply" aria-hidden="true"
title="被打回重新提交"></i>等待合规</span>
</td>
<td ng-bind="client.create_time|date:'dd/MMM/yyyy'"></td>
<td><a class="text-primary" role="button" title="Detail"
ui-sref="compliance_detail({client_moniker:client.client_moniker})">
<i class="fa fa-search"></i> Detail
</a>
</td>
<!--({client_id:client.client_id})-->
</tr>
</tbody>
</table>
</div>
<div class="modal-footer">
<uib-pagination ng-if="completed_contract.length"
class="pagination"
total-items="completedPagination.totalCount"
boundary-links="true"
ng-model="completedPagination.page"
items-per-page="completedPagination.limit"
max-size="10"
ng-change="loadClientCompleted()"
previous-text="&lsaquo;"
next-text="&rsaquo;"
first-text="&laquo;"
last-text="&raquo;"></uib-pagination>
<div class="col-xs-12">Total Records:{{completedPagination.totalCount}};Total Pages:{{completedPagination.totalPages}}</div>
</div>
</div>
</div>

@ -74,18 +74,6 @@ define(['angular', 'decimal', 'uiRouter', 'ngBootSwitch', 'ngFileUpload', 'uiBoo
url: '/devices',
templateUrl: '/static/payment/partner/templates/client_devices.html',
controller: 'clientDeviceCtrl'
}).state('basic.kyc_files_perfect', {
url: '/kyc_files_perfect',
templateUrl: '/static/payment/partner/templates/client_kyc_files_complete.html',
controller: 'clientCommitToKycFilesCtrl',
resolve: {
file: ['$http', function ($http) {
return $http.get('/client/partner_info/kyc/clientViewFiles');
}],
partner: ['$http', function ($http) {
return $http.get('/client/partner_info');
}]
}
})
}]);
app.controller('clientPartnerDetailCtrl', ['$scope', '$http', 'stateMap', 'partner', 'industryMap', 'businessStructuresMap', 'commonDialog', 'Upload', '$state', function ($scope, $http, stateMap, partner, industryMap, businessStructuresMap, commonDialog, Upload, $state) {
@ -1161,231 +1149,6 @@ define(['angular', 'decimal', 'uiRouter', 'ngBootSwitch', 'ngFileUpload', 'uiBoo
})
})
};
$scope.commitPartner = function () {
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) {
$http.put('/client/partner_info/compliance_audit').then(function (resp) {
});
} else {
commitError();
}
} else {
commitError();
}
};
}]);
app.controller('clientCommitToKycFilesCtrl', ['$scope', '$http', '$rootScope', 'commonDialog', '$state', 'Upload', 'file','partner', function ($scope, $http, $rootScope, commonDialog, $state, Upload, file, partner) {
$scope.file = file.data || {};
$scope.partner = partner.data || {};
$scope.file.id_type = 'passport';
$scope.file.need_bd = true;
//audit files
$scope.uploadBankFile = function (file) {
if (file != null) {
if (file.size > 3 * 1024 * 1024) {
commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB请压缩后重试', type: 'error'})
} else {
$scope.bankFileProgress = {value: 0};
Upload.upload({
url: '/attachment/files',
data: {file: file}
}).then(function (resp) {
delete $scope.bankFileProgress;
$scope.file.file_bank_info = resp.data.url;
$scope.updateFile();
if ($scope.file.file_bank_info.endsWith('pdf')) {
$scope.bankIsImage = false;
} else {
$scope.bankIsImage = true;
}
}, function (resp) {
delete $scope.bankFileProgress;
commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'})
}, function (evt) {
$scope.bankFileProgress.value = parseInt(100 * evt.loaded / evt.total);
})
}
}
};
//上传ID信息
$scope.uploadIDFile = function (file) {
if (file != null) {
if (file.size > 3 * 1024 * 1024) {
commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB请压缩后重试', type: 'error'})
} else {
$scope.idFileProgress = {value: 0};
Upload.upload({
url: '/attachment/files',
data: {file: file}
}).then(function (resp) {
delete $scope.idFileProgress;
$scope.file.file_id_info = resp.data.url;
$scope.updateFile();
if ($scope.file.file_id_info.endsWith('pdf')) {
$scope.idIsImage = false;
} else {
$scope.idIsImage = true;
}
}, function (resp) {
delete $scope.idFileProgress;
commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'})
}, function (evt) {
$scope.idFileProgress.value = parseInt(100 * evt.loaded / evt.total);
})
}
}
};
//上传账单流水
$scope.uploadCompanyFile = 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.bankIsImage = true;
if ($scope.file.file_bank_info && $scope.file.file_bank_info.endsWith('pdf')) {
$scope.bankIsImage = false;
}
$scope.idIsImage = true;
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.updateFile = function () {
$http.put('/client/partner_info/update/kycFile', $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.needBDIntervention = function () {
commonDialog.confirm({
title: 'Warning',
content: 'Are you sure to need BD intervention ?'
}).then(function () {
$http.post('/client/partner_info/clientCompliance/' + $scope.partner.client_moniker + '/kycBdIntervention').then(function () {
commonDialog.alert({
title: 'Success',
content: 'Commit Successful',
type: 'success'
});
}, function (resp) {
commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'});
})
})
};
function commitError() {
commonDialog.alert({
title: 'Error',
content: 'Missing file',
type: 'error'
});
};
$scope.clientComplianceViewCommit = function () {
if (!$scope.file.client_id_file) {
commonDialog.alert({title: 'Error', content: '请提交* ASIC File', type: 'error'});
return;
} else if (!$scope.file.client_bank_file) {
commonDialog.alert({title: 'Error', content: '请提交* bank statement', type: 'error'});
return;
}
commonDialog.confirm({
title: 'Warning',
content: 'Are you sure to submit files?'
}).then(function () {
$http.post('/client/partner_info/clientCompliance/' + $scope.partner.client_moniker + '/kycFilesViewCommit/'+ $scope.file.id_type).then(function () {
commonDialog.alert({
title: 'Success',
content: 'Commit Successful',
type: 'success'
});
$state.reload();
}, function (resp) {
commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'});
})
})
};
$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 + '/delete').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'});
})
})
};
$scope.commitPartner = function () {
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) {
$http.put('/client/partner_info/compliance_audit').then(function (resp) {
});
} else {
commitError();
}
} else {
commitError();
}
};
}]);
app.controller('aggregateFileCtrl', ['$scope', '$http', '$rootScope', 'commonDialog', '$state', '$uibModal', 'Upload', function ($scope, $http, $rootScope, commonDialog, $state, $uibModal, Upload) {

@ -61,15 +61,12 @@
<div class="col-xs-12">
<div class="form-horizontal">
<p>前去补充合规文件:<a ui-sref="compliance_to_perfect" ng-click="$dismiss()">点击前往</a></p>
<p>前去补充KYC文件<a ui-sref="basic.kyc_files_perfect" ng-click="$dismiss()">点击前往</a></p>
<p>前去补充KYC文件<a ui-sref="kyc_files_perfect" ng-click="$dismiss()">点击前往</a></p>
</div>
</div>
</div>
</div>
<div class="modal-footer">
<button class="btn btn-success" ui-sref="compliance_to_perfect" ng-click="$dismiss()" type="button">Submit Documents
</button>
<button class="btn btn-danger" ng-click="$dismiss()" type="button">Cancel</button>
</div>

Loading…
Cancel
Save