add 合同在线签订

master
luoyang 7 years ago
parent 0cc49d7113
commit dcb3ca2f68

@ -2295,83 +2295,15 @@ public class RetailAppServiceImp implements RetailAppService {
} }
@Override @Override
public JSONObject getClientAggregateFile(JSONObject device, MultipartFile file) throws IOException{ public JSONObject getClientAggregateFile(JSONObject device,MultipartFile file) throws IOException{
String clientType = device.getString("client_type"); String clientType = device.getString("client_type");
deviceSupport.findRegister(clientType); deviceSupport.findRegister(clientType);
if (StringUtils.isBlank(file.getOriginalFilename())) { if (StringUtils.isBlank(file.getOriginalFilename())) {
throw new BadRequestException("Please Enter Full Name"); throw new BadRequestException("Please Enter Full Name");
} }
JSONObject account = clientAccountMapper.findById(device.getString("account_id")); JSONObject account = clientAccountMapper.findById(device.getString("account_id"));
JSONObject client = clientManager.getClientInfo(device.getIntValue("client_id")); return clientManager.getClientAggregateFile(account, file);
String address = client.getString("address").trim();
if (address.contains(",")) {
client.put("address", address.substring(0, address.lastIndexOf(",")).trim());
client.put("address_sub", address.substring(address.lastIndexOf(",") + 1).trim());
}
if (client.getString("acn") != null && !client.getString("acn").equals("")) {
client.put("acn_type", "ACN: (" + client.getString("acn") + ")");
client.put("company_name_acn", client.getString("company_name") + " (ACN " + client.getString("acn") + ")");
} else {
client.put("acn_type", "ABN: (" + client.getString("abn") + ")");
client.put("company_name_acn", client.getString("company_name") + " (ABN " + client.getString("abn") + ")");
}
JSONObject weChatRate = merchantInfoProvider.clientCurrentRate(client.getIntValue("client_id"), new Date(), "Wechat");
if (weChatRate == null) {
throw new BadRequestException("The Partner's Rate is not config!");
}
client.put("wechat_rate", weChatRate.getBigDecimal("rate_value").setScale(2, BigDecimal.ROUND_DOWN));
client.put("clean", "T+" + weChatRate.getString("clean_days"));
client.put("clean_days", weChatRate.getString("clean_days"));
try {
JSONObject alipayRate = merchantInfoProvider.clientCurrentRate(client.getIntValue("client_id"), new Date(), "Alipay");
if (alipayRate != null) {
client.put("alipay_rate", alipayRate.getBigDecimal("rate_value").setScale(2, BigDecimal.ROUND_DOWN));
}
JSONObject bestPayRate = merchantInfoProvider.clientCurrentRate(client.getIntValue("client_id"), new Date(), "Bestpay");
if (bestPayRate != null) {
client.put("bestpay_rate", bestPayRate.getBigDecimal("rate_value").setScale(2, BigDecimal.ROUND_DOWN));
}
JSONObject jdRate = merchantInfoProvider.clientCurrentRate(client.getIntValue("client_id"), new Date(), "jd");
if (jdRate != null) {
client.put("jd_rate", jdRate.getBigDecimal("rate_value").setScale(2, BigDecimal.ROUND_DOWN));
}
JSONObject alipayOnlineRate = merchantInfoProvider.clientCurrentRate(client.getIntValue("client_id"), new Date(), "AlipayOnline");
if (alipayOnlineRate != null) {
client.put("alipay_online_rate", alipayOnlineRate.getBigDecimal("rate_value").setScale(2, BigDecimal.ROUND_DOWN));
}
JSONObject cbBankPayRate = merchantInfoProvider.clientCurrentRate(client.getIntValue("client_id"), new Date(), "CB_BankPay");
if (cbBankPayRate != null) {
client.put("cbbank_rate", cbBankPayRate.getBigDecimal("rate_value").setScale(2, BigDecimal.ROUND_DOWN));
}
} catch (Exception ignored) {
throw new BadRequestException("Merchant Rate Not Configure");
}
JSONObject bankAccount = getBankAccountByClientId(client.getIntValue("client_id"));
if (bankAccount == null || bankAccount.size() <= 0) {
throw new BadRequestException("The Partner's Account is not config!");
}
client.put("bank", bankAccount.getString("bank"));
client.put("bsb_no", bankAccount.getString("bsb_no"));
client.put("account_no", bankAccount.getString("account_no"));
client.put("account_name", bankAccount.getString("account_name"));
String start_date = DateFormatUtils.format(new Date(), "dd/MM/yyyy");
client.put("start_date", start_date);
Date endDate = TimeZoneUtils.nextYearByCurrDay();
String end_date = DateFormatUtils.format(endDate, "dd/MM/yyyy");
client.put("end_date", end_date);
client.put("full_name", file.getOriginalFilename());
BufferedImage img = ImageIO.read(file.getInputStream());
ByteArrayOutputStream out = new ByteArrayOutputStream();
ImageIO.write(img, "png", out);
client.put("img","data:image/png;base64," + Base64.encodeBase64String(out.toByteArray()));
return exportImgAggregateFile(account, client);
} }
@Override @Override
@ -2402,32 +2334,6 @@ public class RetailAppServiceImp implements RetailAppService {
clientManager.commitAuthFilesToCompliance(client.getString("client_moniker"), account,"App"); clientManager.commitAuthFilesToCompliance(client.getString("client_moniker"), account,"App");
} }
private JSONObject exportImgAggregateFile(JSONObject account, JSONObject client) throws IOException{
JSONObject result = new JSONObject();
InputStream stream = null;
try {
PdfUtils pdu = new PdfUtils();
pdu.setTemplatePdfPath(IMG_AGGREGATE_FILE);
pdu.setPdfTemplate(client);
File file = new File(client.getString("client_moniker") + "_agreement.pdf");
ByteArrayOutputStream bos = pdu.templetPdfBos(file,"STSong-Light","UniGB-UCS2-H");
stream = new ByteArrayInputStream(bos.toByteArray());
JSONObject fileInfo = attachmentClient.uploadFile(stream, client.getString("client_moniker") + "_" + System.currentTimeMillis() + "_agreement.pdf", false);
ClientAuthFilesInfo clientAuthFilesInfo = new ClientAuthFilesInfo();
clientAuthFilesInfo.setFile_agreement_info(fileInfo.getString("url"));
clientAuthFilesInfo.setFile_apply_info(null);
clientAuthFilesInfo.setFile_bank_info(null);
clientAuthFilesInfo.setFile_company_info(null);
clientAuthFilesInfo.setFile_id_info(null);
clientAuthFilesInfo.setAuthStatus(0);
result = clientManager.uploadAuthFilesForWaitCompliance(account, client.getString("client_moniker"), clientAuthFilesInfo).get(0);
} catch (Exception e) {
logger.error("合同制作出现问题:", e);
} finally {
stream.close();
}
return result;
}
private void exportCBBankAggregateFile(JSONObject client, HttpServletResponse httpResponse) { private void exportCBBankAggregateFile(JSONObject client, HttpServletResponse httpResponse) {
httpResponse.setContentType("application/pdf"); httpResponse.setContentType("application/pdf");

@ -12,6 +12,7 @@ import com.alibaba.fastjson.JSONObject;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import org.springframework.ui.Model; import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.io.IOException; import java.io.IOException;
@ -249,6 +250,8 @@ public interface ClientManager {
void commitAuthFilesToCompliance(String clientMoniker, JSONObject account, String source); void commitAuthFilesToCompliance(String clientMoniker, JSONObject account, String source);
JSONObject getClientAggregateFile(JSONObject account, MultipartFile file) throws IOException;
JSONObject getClientsAnalysis(JSONObject manager); JSONObject getClientsAnalysis(JSONObject manager);
List<JSONObject> getUnRegister(JSONObject manager); List<JSONObject> getUnRegister(JSONObject manager);

@ -105,6 +105,7 @@ import org.springframework.ui.Model;
import org.springframework.util.Assert; import org.springframework.util.Assert;
import org.springframework.util.CollectionUtils; import org.springframework.util.CollectionUtils;
import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.multipart.MultipartFile;
import org.thymeleaf.context.Context; import org.thymeleaf.context.Context;
import org.thymeleaf.spring4.SpringTemplateEngine; import org.thymeleaf.spring4.SpringTemplateEngine;
@ -306,6 +307,8 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
private String agreetemplatePdfPath; private String agreetemplatePdfPath;
@Value("${app.agreetemplate.aggregate.path}") @Value("${app.agreetemplate.aggregate.path}")
private String aggregateAgreetemplatePdfPath; private String aggregateAgreetemplatePdfPath;
private final String IMG_AGGREGATE_FILE = "https://file.royalpay.com.au/open/2019/08/22/1566440384256_R7Jc3cl5JPZsmVznKffzStwVMELwsl.pdf";
@Resource @Resource
private MpWechatApiProvider mpWechatApiProvider; private MpWechatApiProvider mpWechatApiProvider;
@ -3325,6 +3328,83 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
} }
} }
@Override
public JSONObject getClientAggregateFile(JSONObject account, MultipartFile file) throws IOException{
if (StringUtils.isBlank(file.getOriginalFilename())) {
throw new BadRequestException("Please Enter Full Name");
}
JSONObject client = getClientInfo(account.getIntValue("client_id"));
String address = client.getString("address").trim();
if (address.contains(",")) {
client.put("address", address.substring(0, address.lastIndexOf(",")).trim());
client.put("address_sub", address.substring(address.lastIndexOf(",") + 1).trim());
}
if (client.getString("acn") != null && !client.getString("acn").equals("")) {
client.put("acn_type", "ACN: (" + client.getString("acn") + ")");
client.put("company_name_acn", client.getString("company_name") + " (ACN " + client.getString("acn") + ")");
} else {
client.put("acn_type", "ABN: (" + client.getString("abn") + ")");
client.put("company_name_acn", client.getString("company_name") + " (ABN " + client.getString("abn") + ")");
}
JSONObject weChatRate = merchantInfoProvider.clientCurrentRate(client.getIntValue("client_id"), new Date(), "Wechat");
if (weChatRate == null) {
throw new BadRequestException("The Partner's Rate is not config!");
}
client.put("wechat_rate", weChatRate.getBigDecimal("rate_value").setScale(2, BigDecimal.ROUND_DOWN));
client.put("clean", "T+" + weChatRate.getString("clean_days"));
client.put("clean_days", weChatRate.getString("clean_days"));
try {
JSONObject alipayRate = merchantInfoProvider.clientCurrentRate(client.getIntValue("client_id"), new Date(), "Alipay");
if (alipayRate != null) {
client.put("alipay_rate", alipayRate.getBigDecimal("rate_value").setScale(2, BigDecimal.ROUND_DOWN));
}
JSONObject bestPayRate = merchantInfoProvider.clientCurrentRate(client.getIntValue("client_id"), new Date(), "Bestpay");
if (bestPayRate != null) {
client.put("bestpay_rate", bestPayRate.getBigDecimal("rate_value").setScale(2, BigDecimal.ROUND_DOWN));
}
JSONObject jdRate = merchantInfoProvider.clientCurrentRate(client.getIntValue("client_id"), new Date(), "jd");
if (jdRate != null) {
client.put("jd_rate", jdRate.getBigDecimal("rate_value").setScale(2, BigDecimal.ROUND_DOWN));
}
JSONObject alipayOnlineRate = merchantInfoProvider.clientCurrentRate(client.getIntValue("client_id"), new Date(), "AlipayOnline");
if (alipayOnlineRate != null) {
client.put("alipay_online_rate", alipayOnlineRate.getBigDecimal("rate_value").setScale(2, BigDecimal.ROUND_DOWN));
}
JSONObject cbBankPayRate = merchantInfoProvider.clientCurrentRate(client.getIntValue("client_id"), new Date(), "CB_BankPay");
if (cbBankPayRate != null) {
client.put("cbbank_rate", cbBankPayRate.getBigDecimal("rate_value").setScale(2, BigDecimal.ROUND_DOWN));
}
} catch (Exception ignored) {
throw new BadRequestException("Merchant Rate Not Configure");
}
JSONObject bankAccount = getBankAccountByClientId(client.getIntValue("client_id"));
if (bankAccount == null || bankAccount.size() <= 0) {
throw new BadRequestException("The Partner's Account is not config!");
}
client.put("bank", bankAccount.getString("bank"));
client.put("bsb_no", bankAccount.getString("bsb_no"));
client.put("account_no", bankAccount.getString("account_no"));
client.put("account_name", bankAccount.getString("account_name"));
String start_date = DateFormatUtils.format(new Date(), "dd/MM/yyyy");
client.put("start_date", start_date);
Date endDate = TimeZoneUtils.nextYearByCurrDay();
String end_date = DateFormatUtils.format(endDate, "dd/MM/yyyy");
client.put("end_date", end_date);
client.put("full_name", file.getOriginalFilename());
BufferedImage img = ImageIO.read(file.getInputStream());
ByteArrayOutputStream out = new ByteArrayOutputStream();
ImageIO.write(img, "png", out);
client.put("img","data:image/png;base64," + Base64.encodeBase64String(out.toByteArray()));
return exportImgAggregateFile(account, 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);
@ -5448,6 +5528,33 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
clientMapper.update(updateClient); clientMapper.update(updateClient);
} }
private JSONObject exportImgAggregateFile(JSONObject account, JSONObject client) throws IOException{
JSONObject result = new JSONObject();
InputStream stream = null;
try {
PdfUtils pdu = new PdfUtils();
pdu.setTemplatePdfPath(IMG_AGGREGATE_FILE);
pdu.setPdfTemplate(client);
File file = new File(client.getString("client_moniker") + "_agreement.pdf");
ByteArrayOutputStream bos = pdu.templetPdfBos(file,"STSong-Light","UniGB-UCS2-H");
stream = new ByteArrayInputStream(bos.toByteArray());
JSONObject fileInfo = attachmentClient.uploadFile(stream, client.getString("client_moniker") + "_" + System.currentTimeMillis() + "_agreement.pdf", false);
ClientAuthFilesInfo clientAuthFilesInfo = new ClientAuthFilesInfo();
clientAuthFilesInfo.setFile_agreement_info(fileInfo.getString("url"));
clientAuthFilesInfo.setFile_apply_info(null);
clientAuthFilesInfo.setFile_bank_info(null);
clientAuthFilesInfo.setFile_company_info(null);
clientAuthFilesInfo.setFile_id_info(null);
clientAuthFilesInfo.setAuthStatus(0);
result = uploadAuthFilesForWaitCompliance(account, client.getString("client_moniker"), clientAuthFilesInfo).get(0);
} catch (Exception e) {
logger.error("合同制作出现问题:", e);
} finally {
stream.close();
}
return result;
}
private TemplateMessage initClientMessage(JSONObject client, String newExpiryDate, String wechatOpenid, String templateId) { private TemplateMessage initClientMessage(JSONObject client, String newExpiryDate, String wechatOpenid, String templateId) {
TemplateMessage notice = new TemplateMessage(wechatOpenid, templateId, null); TemplateMessage notice = new TemplateMessage(wechatOpenid, templateId, null);
notice.put("first", "您好您的合同费率已到期根据合同协议系统已自动为您延期1年。", "#ff0000"); notice.put("first", "您好您的合同费率已到期根据合同协议系统已自动为您延期1年。", "#ff0000");

@ -35,6 +35,7 @@ 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.*;
import org.springframework.web.multipart.MultipartFile;
import javax.annotation.Resource; import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
@ -584,6 +585,12 @@ public class PartnerViewController {
clientManager.commitAuthFilesToCompliance(clientMoniker, account, "Web"); clientManager.commitAuthFilesToCompliance(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) throws IOException {
return clientManager.getClientAggregateFile(account, file);
}
@PartnerMapping(value = "/auth_file/{fileId}/delete", method = RequestMethod.PUT, roles = {PartnerRole.ADMIN, PartnerRole.MANAGER}) @PartnerMapping(value = "/auth_file/{fileId}/delete", method = RequestMethod.PUT, roles = {PartnerRole.ADMIN, PartnerRole.MANAGER})
@ResponseBody @ResponseBody
public void deleteAuthFiles(@PathVariable String fileId, @ModelAttribute(CommonConsts.PARTNER_STATUS) JSONObject account) { public void deleteAuthFiles(@PathVariable String fileId, @ModelAttribute(CommonConsts.PARTNER_STATUS) JSONObject account) {

@ -699,7 +699,7 @@ public class SignInAccountServiceImpl implements SignInAccountService, Applicati
if (clientFilesIsLess) { if (clientFilesIsLess) {
JSONObject authFileCompliance = clientComplianceCompanyMapper.findFileByClientId(client.getIntValue("client_id")); JSONObject authFileCompliance = clientComplianceCompanyMapper.findFileByClientId(client.getIntValue("client_id"));
if (authFileCompliance != null && StringUtils.isNotBlank(authFileCompliance.getString("description"))) { if (authFileCompliance != null && StringUtils.isNotBlank(authFileCompliance.getString("description"))) {
result.put("client_refuse_reason", authFileCompliance.getString("description")); result.put("client_refuse_reason", "Refuse to reason/打回原因:" + authFileCompliance.getString("description"));
} }
} }
} }

@ -47,7 +47,12 @@ define(['angular', 'angularSanitize', 'angularAnimate', 'angularMessages', 'uiRo
$scope.ComplianceToperfect = function () { $scope.ComplianceToperfect = function () {
$uibModal.open({ $uibModal.open({
templateUrl: '/static/payment/partner/templates/compliance_files_advice.html', templateUrl: '/static/payment/partner/templates/compliance_files_advice.html',
size: 'lg' size: 'lg',
// controller: 'partnerFilesCtrl'
// resolve: {
// client_refuse_reason: ['121','212']
// }
}) })
}; };
if($scope.currentUser.client.client_less_file && complianceNoticeCount==0) if($scope.currentUser.client.client_less_file && complianceNoticeCount==0)
@ -469,6 +474,9 @@ define(['angular', 'angularSanitize', 'angularAnimate', 'angularMessages', 'uiRo
}) })
} }
}]); }]);
app.controller('partnerFilesCtrl', ['$scope', '$http', '$sce', 'client_refuse_reason', function ($scope, $http, $sce, client_refuse_reason) {
$scope.client_refuse_reason = angular.copy(client_refuse_reason);
}]);
app.factory('myLoginLogView', ['$uibModal', function ($uibModal) { app.factory('myLoginLogView', ['$uibModal', function ($uibModal) {
return { return {
show: function () { show: function () {

@ -2,9 +2,9 @@
* partner info in partner client * partner info in partner client
* Created by yixian on 2016-07-03. * Created by yixian on 2016-07-03.
*/ */
define(['angular', 'decimal', 'uiRouter', 'ngBootSwitch', 'ngFileUpload','uiBootstrap'], function (angular, Decimal) { define(['angular', 'decimal', 'uiRouter', 'ngBootSwitch', 'ngFileUpload', 'uiBootstrap'], function (angular, Decimal) {
'use strict'; 'use strict';
var app = angular.module('partnerInfoApp', ['ui.router', 'frapontillo.bootstrap-switch', 'ngFileUpload','ui.bootstrap']); var app = angular.module('partnerInfoApp', ['ui.router', 'frapontillo.bootstrap-switch', 'ngFileUpload', 'ui.bootstrap']);
app.config(['$stateProvider', function ($stateProvider) { app.config(['$stateProvider', function ($stateProvider) {
$stateProvider.state('basic', { $stateProvider.state('basic', {
url: '/basic', url: '/basic',
@ -73,7 +73,7 @@ define(['angular', 'decimal', 'uiRouter', 'ngBootSwitch', 'ngFileUpload','uiBoot
controller: 'clientDeviceCtrl' controller: 'clientDeviceCtrl'
}) })
}]); }]);
app.controller('clientPartnerDetailCtrl', ['$scope', '$http', 'partner','industryMap','businessStructuresMap','commonDialog','Upload','$state', function ($scope, $http, partner,industryMap,businessStructuresMap,commonDialog,Upload,$state) { app.controller('clientPartnerDetailCtrl', ['$scope', '$http', 'partner', 'industryMap', 'businessStructuresMap', 'commonDialog', 'Upload', '$state', function ($scope, $http, partner, industryMap, businessStructuresMap, commonDialog, Upload, $state) {
$scope.business_structures = businessStructuresMap.configs(); $scope.business_structures = businessStructuresMap.configs();
$scope.industries = industryMap.configs(); $scope.industries = industryMap.configs();
$scope.partner = partner.data; $scope.partner = partner.data;
@ -156,7 +156,7 @@ define(['angular', 'decimal', 'uiRouter', 'ngBootSwitch', 'ngFileUpload','uiBoot
var removeClientPayDesc = function (items, key) { var removeClientPayDesc = function (items, key) {
for (var i = 0; i < items.length; i++) { for (var i = 0; i < items.length; i++) {
var item = items[i]; var item = items[i];
if (item.indexOf(key)>=0) { if (item.indexOf(key) >= 0) {
items.splice(items.indexOf(item), 1); items.splice(items.indexOf(item), 1);
i = i - 1; i = i - 1;
} }
@ -170,7 +170,7 @@ define(['angular', 'decimal', 'uiRouter', 'ngBootSwitch', 'ngFileUpload','uiBoot
var $idx = $scope.partner.client_pay_desc.indexOf(type); var $idx = $scope.partner.client_pay_desc.indexOf(type);
if ($idx >= 0) { if ($idx >= 0) {
if (type == '203') { if (type == '203') {
removeClientPayDesc($scope.partner.client_pay_desc,'2030') removeClientPayDesc($scope.partner.client_pay_desc, '2030')
} }
$scope.partner.client_pay_desc.splice($idx, 1); $scope.partner.client_pay_desc.splice($idx, 1);
} else { } else {
@ -214,7 +214,7 @@ define(['angular', 'decimal', 'uiRouter', 'ngBootSwitch', 'ngFileUpload','uiBoot
alert("Logo is necessary!"); alert("Logo is necessary!");
return; return;
} }
if($scope.partner.partner_type == 'photo'){ if ($scope.partner.partner_type == 'photo') {
if (!$scope.partner.company_photo) { if (!$scope.partner.company_photo) {
alert('Shop Photo1 is necessary'); alert('Shop Photo1 is necessary');
return; return;
@ -226,11 +226,11 @@ define(['angular', 'decimal', 'uiRouter', 'ngBootSwitch', 'ngFileUpload','uiBoot
} }
var content = ''; var content = '';
if ($scope.partner.client_pay_type.length==0) { if ($scope.partner.client_pay_type.length == 0) {
alert('请选择商户支付场景') alert('请选择商户支付场景')
return; return;
} }
if ($scope.partner.client_pay_desc.length==0) { if ($scope.partner.client_pay_desc.length == 0) {
alert('请选择商户支付方式') alert('请选择商户支付方式')
return; return;
} }
@ -240,7 +240,7 @@ define(['angular', 'decimal', 'uiRouter', 'ngBootSwitch', 'ngFileUpload','uiBoot
return; return;
} }
} }
if ( $scope.partner.client_pay_type.indexOf('2') >= 0) { if ($scope.partner.client_pay_type.indexOf('2') >= 0) {
if ($scope.partner.client_pay_desc.join(',').indexOf('20') < 0) { if ($scope.partner.client_pay_desc.join(',').indexOf('20') < 0) {
alert("请检查线下支付场景是否已选择支付方式"); alert("请检查线下支付场景是否已选择支付方式");
return; return;
@ -282,20 +282,20 @@ define(['angular', 'decimal', 'uiRouter', 'ngBootSwitch', 'ngFileUpload','uiBoot
$scope.commitToCompliance = function () { $scope.commitToCompliance = function () {
$http.get('/client/partner_info/compliance/files').then(function (resp) { $http.get('/client/partner_info/compliance/files').then(function (resp) {
$scope.complianceFiles = resp.data; $scope.complianceFiles = resp.data;
if($scope.complianceFiles.client_id_file == null||$scope.complianceFiles.client_bank_file == null || $scope.complianceFiles.client_company_file == null){ if ($scope.complianceFiles.client_id_file == null || $scope.complianceFiles.client_bank_file == null || $scope.complianceFiles.client_company_file == null) {
commonDialog.alert({title: 'Message', content: '请前去完善合规资料,再进行提交!', type: 'info'}); commonDialog.alert({title: 'Message', content: '请前去完善合规资料,再进行提交!', type: 'info'});
return; return;
} }
if($scope.partner.business_structure == null ||$scope.partner.logo_url == null || $scope.partner.description == null ||($scope.partner.partner_type == 'website' && $scope.partner.company_website == null) || ($scope.partner.partner_type == 'photo'&&($scope.partner.store_photo == null || $scope.partner.company_photo == null))){ if ($scope.partner.business_structure == null || $scope.partner.logo_url == null || $scope.partner.description == null || ($scope.partner.partner_type == 'website' && $scope.partner.company_website == null) || ($scope.partner.partner_type == 'photo' && ($scope.partner.store_photo == null || $scope.partner.company_photo == null))) {
commonDialog.alert({title: 'Message', content: '请前去完善商户资料,再进行提交!', type: 'info'}); commonDialog.alert({title: 'Message', content: '请前去完善商户资料,再进行提交!', type: 'info'});
return; return;
} }
if(($scope.partner.business_structure == "Company" && $scope.partner.acn == null) || ($scope.partner.business_structure != "Company" && $scope.partner.abn == null)){ if (($scope.partner.business_structure == "Company" && $scope.partner.acn == null) || ($scope.partner.business_structure != "Company" && $scope.partner.abn == null)) {
commonDialog.alert({title: 'Message', content: '请前去完善商户资料,再进行提交!', type: 'info'}); commonDialog.alert({title: 'Message', content: '请前去完善商户资料,再进行提交!', type: 'info'});
return; return;
} }
if(!$scope.partner.mail_confirm){ if (!$scope.partner.mail_confirm) {
commonDialog.alert({title: 'Message', content: '请验证邮箱后,再进行提交!', type: 'info'}); commonDialog.alert({title: 'Message', content: '请验证邮箱后,再进行提交!', type: 'info'});
return; return;
} }
@ -309,7 +309,7 @@ define(['angular', 'decimal', 'uiRouter', 'ngBootSwitch', 'ngFileUpload','uiBoot
}).then(function (choice) { }).then(function (choice) {
$scope.submitted = true; $scope.submitted = true;
if (choice == 1) { if (choice == 1) {
$http.post('/client/partner_info/complianceAudit').then(function (){ $http.post('/client/partner_info/complianceAudit').then(function () {
commonDialog.alert({title: 'Success', content: '已提交至合规,请耐心等待审核!', type: 'info'}); commonDialog.alert({title: 'Success', content: '已提交至合规,请耐心等待审核!', type: 'info'});
$state.reload(); $state.reload();
}, function () { }, function () {
@ -320,7 +320,7 @@ define(['angular', 'decimal', 'uiRouter', 'ngBootSwitch', 'ngFileUpload','uiBoot
}); });
} }
}]); }]);
app.controller('clientPartnerEditCtrl', ['$scope', '$http', 'commonDialog','stateMap','countryMap','partner','$state','Upload',function ($scope, $http, commonDialog,stateMap,countryMap,partner,$state,Upload) { app.controller('clientPartnerEditCtrl', ['$scope', '$http', 'commonDialog', 'stateMap', 'countryMap', 'partner', '$state', 'Upload', function ($scope, $http, commonDialog, stateMap, countryMap, partner, $state, Upload) {
$scope.partner = partner.data; $scope.partner = partner.data;
$scope.states = stateMap.configs(); $scope.states = stateMap.configs();
$scope.countries = countryMap.configs(); $scope.countries = countryMap.configs();
@ -418,7 +418,7 @@ define(['angular', 'decimal', 'uiRouter', 'ngBootSwitch', 'ngFileUpload','uiBoot
var removeClientPayDesc = function (items, key) { var removeClientPayDesc = function (items, key) {
for (var i = 0; i < items.length; i++) { for (var i = 0; i < items.length; i++) {
var item = items[i]; var item = items[i];
if (item.indexOf(key)>=0) { if (item.indexOf(key) >= 0) {
items.splice(items.indexOf(item), 1); items.splice(items.indexOf(item), 1);
i = i - 1; i = i - 1;
} }
@ -432,7 +432,7 @@ define(['angular', 'decimal', 'uiRouter', 'ngBootSwitch', 'ngFileUpload','uiBoot
var $idx = $scope.partner.client_pay_desc.indexOf(type); var $idx = $scope.partner.client_pay_desc.indexOf(type);
if ($idx >= 0) { if ($idx >= 0) {
if (type == '203') { if (type == '203') {
removeClientPayDesc($scope.partner.client_pay_desc,'2030') removeClientPayDesc($scope.partner.client_pay_desc, '2030')
} }
$scope.partner.client_pay_desc.splice($idx, 1); $scope.partner.client_pay_desc.splice($idx, 1);
} else { } else {
@ -454,7 +454,7 @@ define(['angular', 'decimal', 'uiRouter', 'ngBootSwitch', 'ngFileUpload','uiBoot
alert("Logo is necessary!"); alert("Logo is necessary!");
return; return;
} }
if($scope.partner.partner_type == 'photo'){ if ($scope.partner.partner_type == 'photo') {
if (!$scope.partner.company_photo) { if (!$scope.partner.company_photo) {
alert('Shop Photo1 is necessary'); alert('Shop Photo1 is necessary');
return; return;
@ -466,11 +466,11 @@ define(['angular', 'decimal', 'uiRouter', 'ngBootSwitch', 'ngFileUpload','uiBoot
} }
var content = ''; var content = '';
if ($scope.partner.client_pay_type.length==0) { if ($scope.partner.client_pay_type.length == 0) {
alert('请选择商户支付场景') alert('请选择商户支付场景')
return; return;
} }
if ($scope.partner.client_pay_desc.length==0) { if ($scope.partner.client_pay_desc.length == 0) {
alert('请选择商户支付方式') alert('请选择商户支付方式')
return; return;
} }
@ -480,7 +480,7 @@ define(['angular', 'decimal', 'uiRouter', 'ngBootSwitch', 'ngFileUpload','uiBoot
return; return;
} }
} }
if ( $scope.partner.client_pay_type.indexOf('2') >= 0) { if ($scope.partner.client_pay_type.indexOf('2') >= 0) {
if ($scope.partner.client_pay_desc.join(',').indexOf('20') < 0) { if ($scope.partner.client_pay_desc.join(',').indexOf('20') < 0) {
alert("请检查线下支付场景是否已选择支付方式"); alert("请检查线下支付场景是否已选择支付方式");
return; return;
@ -515,26 +515,26 @@ define(['angular', 'decimal', 'uiRouter', 'ngBootSwitch', 'ngFileUpload','uiBoot
}; };
}]); }]);
app.controller('clientResetPartnerPublicKeyDialogCtrl', ['$scope', '$http', 'gateway_sign', function ($scope, $http,gateway_sign) { app.controller('clientResetPartnerPublicKeyDialogCtrl', ['$scope', '$http', 'gateway_sign', function ($scope, $http, gateway_sign) {
$scope.gateway_sign = angular.copy(gateway_sign); $scope.gateway_sign = angular.copy(gateway_sign);
$scope.uploadPublicKey = function (mch_public_key) { $scope.uploadPublicKey = function (mch_public_key) {
$scope.errmsg = null; $scope.errmsg = null;
$http.put('/client/partner_info/partner_public_key', {partner_public_key:mch_public_key}).then(function () { $http.put('/client/partner_info/partner_public_key', {partner_public_key: mch_public_key}).then(function () {
$scope.$close(); $scope.$close();
}, function (resp) { }, function (resp) {
$scope.errmsg = resp.data.message; $scope.errmsg = resp.data.message;
}) })
} }
}]); }]);
app.controller('clientRefreshPlatformPublicKeyDialogCtrl', ['$scope', '$http', 'gateway_sign','commonDialog', function ($scope, $http,gateway_sign,commonDialog) { app.controller('clientRefreshPlatformPublicKeyDialogCtrl', ['$scope', '$http', 'gateway_sign', 'commonDialog', function ($scope, $http, gateway_sign, commonDialog) {
$scope.gateway_sign = angular.copy(gateway_sign); $scope.gateway_sign = angular.copy(gateway_sign);
$scope.copyPublicKey = function() { $scope.copyPublicKey = function () {
var e=document.getElementById("c-cpKey"); var e = document.getElementById("c-cpKey");
e.select(); e.select();
var successful = document.execCommand("Copy"); var successful = document.execCommand("Copy");
if (successful) { if (successful) {
commonDialog.alert({title: 'Success', content: '已复制到剪切板!', type: 'success'}); commonDialog.alert({title: 'Success', content: '已复制到剪切板!', type: 'success'});
}else { } else {
commonDialog.alert({title: 'Error', content: '您的浏览器不支持!请手动复制', type: 'error'}); commonDialog.alert({title: 'Error', content: '您的浏览器不支持!请手动复制', type: 'error'});
} }
}; };
@ -957,25 +957,21 @@ define(['angular', 'decimal', 'uiRouter', 'ngBootSwitch', 'ngFileUpload','uiBoot
}; };
$scope.clientComplianceViewCommit= function () { $scope.clientComplianceViewCommit = function () {
if(!$scope.file.client_agree_file) if (!$scope.file.client_agree_file) {
{
commonDialog.alert({title: 'Error', content: '请提交* Agreement', type: 'error'}); commonDialog.alert({title: 'Error', content: '请提交* Agreement', type: 'error'});
return; return;
}else if(!$scope.file.client_id_file) } else if (!$scope.file.client_id_file) {
{ commonDialog.alert({title: 'Error', content: '请提交* ID', type: 'error'});
commonDialog.alert({title: 'Error', content:'请提交* ID', type: 'error'});
return; return;
}else if(!$scope.file.client_bank_file) } else if (!$scope.file.client_bank_file) {
{
commonDialog.alert({title: 'Error', content: '请提交* bank statement', type: 'error'}); commonDialog.alert({title: 'Error', content: '请提交* bank statement', type: 'error'});
return; return;
} } else if (!$scope.file.client_company_file) {
else if(!$scope.file.client_company_file)
{
commonDialog.alert({title: 'Error', content: '请提交* Certificate of Registration', type: 'error'}); commonDialog.alert({title: 'Error', content: '请提交* Certificate of Registration', type: 'error'});
return; return;
}; }
;
commonDialog.confirm({ commonDialog.confirm({
title: 'Warning', title: 'Warning',
content: 'Are you sure commit for compliance audit?' content: 'Are you sure commit for compliance audit?'
@ -1032,38 +1028,75 @@ define(['angular', 'decimal', 'uiRouter', 'ngBootSwitch', 'ngFileUpload','uiBoot
}]); }]);
app.controller('aggregateFileCtrl', ['$scope', '$http', '$rootScope', 'commonDialog', '$state', 'Upload', function ($scope, $http, $rootScope, commonDialog, $state, Upload) { app.controller('aggregateFileCtrl', ['$scope', '$http', '$rootScope', 'commonDialog', '$state', 'Upload', function ($scope, $http, $rootScope, commonDialog, $state, Upload) {
$scope.signInfo = {};
$scope.aggregateFile = function () { $scope.aggregateFile = function () {
$http.get('/client/partner_info/aggregateFile/client_info').then(function (resp) { $http.get('/client/partner_info/aggregateFile/client_info').then(function (resp) {
$scope.aggregateFileInfo = resp.data; $scope.aggregateFileInfo = resp.data;
}, function (resp) { }, function (resp) {
commonDialog.alert({title: '生成合同失败', content:"错误原因:"+resp.data.message+",请联系bd或客服", type: 'error'}); commonDialog.alert({
title: '生成合同失败',
content: "错误原因:" + resp.data.message + ",请联系BD或客服",
type: 'error'
});
var url = $state.href('basic.compliance_to_perfect'); var url = $state.href('basic.compliance_to_perfect');
window.open(url); window.open(url);
}) })
}; };
$scope.aggregateFile(); $scope.aggregateFile();
$scope.goBottom =function() { $scope.goBottom = function () {
window.scrollTo(0, document.documentElement.scrollHeight-document.documentElement.clientHeight); window.scrollTo(0, document.documentElement.scrollHeight - document.documentElement.clientHeight);
}; };
$scope.submitContract =function(){ $scope.submitContract = function () {
$scope.goBottom(); $scope.goBottom();
$scope.confirmForSubmit(); $scope.confirmForSubmit();
}; };
$scope.confirmForSubmit =function(){ $scope.confirmForSubmit = function () {
var Confirm = confirm("确认提交合同吗?") var Confirm = confirm("确认提交合同吗?")
if(Confirm) if (Confirm) {
{ $scope.uploadSign();
alert(111111111); }
};
$scope.uploadSign = function () {
var sign = $('#img1').attr('src');
if ($scope.signInfo.fullName != null && $scope.signInfo.fullName != "" && sign != null && sign != "") {
var signFile = dataURLtoFile(sign, $scope.signInfo.fullName);
$scope.logoProgress = {value: 0};
Upload.upload({
url: '/client/partner_info/clientCompliance/' + $scope.aggregateFileInfo.client_moniker +'/commit_aggregate_file',
data: {file: signFile}
}).then(function (resp) {
delete $scope.logoProgress;
$state.go('basic.compliance_to_perfect');
window.open(resp.data.file_value,'_blank');
}, function (resp) {
delete $scope.logoProgress;
commonDialog.alert({title: 'Commit Aggregate File Fail', content: resp.data.message, type: 'error'})
}, function (evt) {
$scope.logoProgress.value = parseInt(100 * evt.loaded / evt.total);
})
} else {
commonDialog.alert({title: 'Commit Fail', content: '请确认是否签名和已输入全名', type: 'error'})
} }
}; };
function dataURLtoFile(dataurl, filename) {//将base64转换为文件
var arr = dataurl.split(','), mime = arr[0].match(/:(.*?);/)[1],
bstr = atob(arr[1]), n = bstr.length, u8arr = new Uint8Array(n);
while (n--) {
u8arr[n] = bstr.charCodeAt(n);
}
return new File([u8arr], filename, {type: mime});
}
}]); }]);
app.controller('clientPaymentInfoCtrl', ['$scope', '$http', '$state', 'commonDialog','$uibModal', function ($scope, $http, $state, commonDialog, $uibModal) { app.controller('clientPaymentInfoCtrl', ['$scope', '$http', '$state', 'commonDialog', '$uibModal', function ($scope, $http, $state, commonDialog, $uibModal) {
$scope.paymentInfo = $scope.partner; $scope.paymentInfo = $scope.partner;
$scope.old_customer_surcharge_rate = angular.copy($scope.partner.customer_surcharge_rate); $scope.old_customer_surcharge_rate = angular.copy($scope.partner.customer_surcharge_rate);
$scope.qrConfig = {currency: 'AUD'}; $scope.qrConfig = {currency: 'AUD'};
@ -1072,13 +1105,13 @@ define(['angular', 'decimal', 'uiRouter', 'ngBootSwitch', 'ngFileUpload','uiBoot
switch_verify_ip: false switch_verify_ip: false
}; };
$scope.clientCopyHfLink = function() { $scope.clientCopyHfLink = function () {
var e=document.getElementById("c-cpbt"); var e = document.getElementById("c-cpbt");
e.select(); e.select();
var successful = document.execCommand("Copy"); var successful = document.execCommand("Copy");
if (successful) { if (successful) {
commonDialog.alert({title: 'Success', content: '已复制到剪切板!', type: 'success'}); commonDialog.alert({title: 'Success', content: '已复制到剪切板!', type: 'success'});
}else { } else {
commonDialog.alert({title: 'Error', content: '您的浏览器不支持!', type: 'error'}); commonDialog.alert({title: 'Error', content: '您的浏览器不支持!', type: 'error'});
} }
}; };
@ -1099,7 +1132,7 @@ define(['angular', 'decimal', 'uiRouter', 'ngBootSwitch', 'ngFileUpload','uiBoot
} }
$http.put('/client/partner_info/switch_gateway_v2', {enable_gateway_version2: $scope.paymentInfo.enable_gateway_version2}).then(function () { $http.put('/client/partner_info/switch_gateway_v2', {enable_gateway_version2: $scope.paymentInfo.enable_gateway_version2}).then(function () {
$scope.loadPartnerPaymentInfo(); $scope.loadPartnerPaymentInfo();
}, function (resp) { }, function (resp) {
commonDialog.alert({ commonDialog.alert({
title: 'failed to change Gateway Version', title: 'failed to change Gateway Version',
content: resp.data.message, content: resp.data.message,
@ -1146,7 +1179,11 @@ define(['angular', 'decimal', 'uiRouter', 'ngBootSwitch', 'ngFileUpload','uiBoot
} }
} }
}).result.then(function () { }).result.then(function () {
commonDialog.alert({title: 'Success!', content: 'Partner Public Key Upload Successfully', type: 'success'}) commonDialog.alert({
title: 'Success!',
content: 'Partner Public Key Upload Successfully',
type: 'success'
})
$scope.loadPartnerPaymentInfo(); $scope.loadPartnerPaymentInfo();
}) })
}; };
@ -1163,7 +1200,11 @@ define(['angular', 'decimal', 'uiRouter', 'ngBootSwitch', 'ngFileUpload','uiBoot
} }
} }
}).result.then(function () { }).result.then(function () {
commonDialog.alert({title: 'Success!', content: 'RoyalPay Public Key Refresh Successfully', type: 'success'}) commonDialog.alert({
title: 'Success!',
content: 'RoyalPay Public Key Refresh Successfully',
type: 'success'
})
$scope.loadPartnerPaymentInfo(); $scope.loadPartnerPaymentInfo();
}) })
}; };
@ -1180,17 +1221,21 @@ define(['angular', 'decimal', 'uiRouter', 'ngBootSwitch', 'ngFileUpload','uiBoot
} }
} }
}).result.then(function () { }).result.then(function () {
commonDialog.alert({title: 'Success!', content: 'Refund Password Changed Successfully', type: 'success'}) commonDialog.alert({
title: 'Success!',
content: 'Refund Password Changed Successfully',
type: 'success'
})
}) })
}; };
$scope.clientCopyCBBannkPayLink = function() { $scope.clientCopyCBBannkPayLink = function () {
var e=document.getElementById("c-cpcbbankpay"); var e = document.getElementById("c-cpcbbankpay");
e.select(); e.select();
var successful = document.execCommand("Copy"); var successful = document.execCommand("Copy");
if (successful) { if (successful) {
commonDialog.alert({title: 'Success', content: '已复制到剪切板!', type: 'success'}); commonDialog.alert({title: 'Success', content: '已复制到剪切板!', type: 'success'});
}else { } else {
commonDialog.alert({title: 'Error', content: '您的浏览器不支持!', type: 'error'}); commonDialog.alert({title: 'Error', content: '您的浏览器不支持!', type: 'error'});
} }
}; };
@ -1377,61 +1422,61 @@ define(['angular', 'decimal', 'uiRouter', 'ngBootSwitch', 'ngFileUpload','uiBoot
slidesPc.push({ slidesPc.push({
image: '/static/images/hfpaylink_intro/pc_hf_pay_step1.png', image: '/static/images/hfpaylink_intro/pc_hf_pay_step1.png',
text: '第一次打开支付链接进行下单,第一步用微信扫码页面弹出的二维码,确认您的身份', text: '第一次打开支付链接进行下单,第一步用微信扫码页面弹出的二维码,确认您的身份',
id:0 id: 0
}); });
slidesPc.push({ slidesPc.push({
image: '/static/images/hfpaylink_intro/pc_hf_pay_step2.png', image: '/static/images/hfpaylink_intro/pc_hf_pay_step2.png',
text: '下一步填写订单信息。注意订单金额货币单位是澳元AUD。请认真填写商品名称否则可能导致交易不成功。填写完成最后提交订单。', text: '下一步填写订单信息。注意订单金额货币单位是澳元AUD。请认真填写商品名称否则可能导致交易不成功。填写完成最后提交订单。',
id:1 id: 1
}); });
slidesPc.push({ slidesPc.push({
image: '/static/images/hfpaylink_intro/pc_hf_pay_step3.png', image: '/static/images/hfpaylink_intro/pc_hf_pay_step3.png',
text: '页面显示支付二维码使用相应的支付app进行扫码支付。如订单有误请点击"返回上一步"修改订单。', text: '页面显示支付二维码使用相应的支付app进行扫码支付。如订单有误请点击"返回上一步"修改订单。',
id:2 id: 2
}); });
slidesPc.push({ slidesPc.push({
image: '/static/images/hfpaylink_intro/hf_pay_end.png', image: '/static/images/hfpaylink_intro/hf_pay_end.png',
text: '完成支付,跳转到支付成功页面。', text: '完成支付,跳转到支付成功页面。',
id:3 id: 3
}); });
}; };
var addSlidePcBank = function () { var addSlidePcBank = function () {
slidesPcBank.push({ slidesPcBank.push({
image: '/static/images/hfpaylink_intro/pc_bank_hf_pay_step1.png', image: '/static/images/hfpaylink_intro/pc_bank_hf_pay_step1.png',
text: '第一次打开支付链接进行下单,第一步用微信扫码页面弹出的二维码,确认您的身份', text: '第一次打开支付链接进行下单,第一步用微信扫码页面弹出的二维码,确认您的身份',
id:0 id: 0
}); });
slidesPcBank.push({ slidesPcBank.push({
image: '/static/images/hfpaylink_intro/pc_bank_hf_pay_step2.png', image: '/static/images/hfpaylink_intro/pc_bank_hf_pay_step2.png',
text: '下一步填写订单信息。注意订单金额货币单位是澳元AUD。请认真填写商品名称否则可能导致交易不成功。填写完成最后提交订单。', text: '下一步填写订单信息。注意订单金额货币单位是澳元AUD。请认真填写商品名称否则可能导致交易不成功。填写完成最后提交订单。',
id:1 id: 1
}); });
slidesPcBank.push({ slidesPcBank.push({
image: '/static/images/hfpaylink_intro/pc_bank_hf_pay_step3.png', image: '/static/images/hfpaylink_intro/pc_bank_hf_pay_step3.png',
text: '提交订单后,页面跳转到对应银行,请填写相关信息完成支付。', text: '提交订单后,页面跳转到对应银行,请填写相关信息完成支付。',
id:2 id: 2
}); });
slidesPcBank.push({ slidesPcBank.push({
image: '/static/images/hfpaylink_intro/hf_pay_end.png', image: '/static/images/hfpaylink_intro/hf_pay_end.png',
text: '完成支付,跳转到支付成功页面。', text: '完成支付,跳转到支付成功页面。',
id:3 id: 3
}); });
}; };
var addSlideApp = function () { var addSlideApp = function () {
slidesApp.push({ slidesApp.push({
image: '/static/images/hfpaylink_intro/app_bank_hf_pay_step1.png', image: '/static/images/hfpaylink_intro/app_bank_hf_pay_step1.png',
text: '使用微信客户端填写订单信息。注意订单金额货币单位是澳元AUD。请认真填写商品名称否则可能导致交易不成功。填写完成最后提交订单。', text: '使用微信客户端填写订单信息。注意订单金额货币单位是澳元AUD。请认真填写商品名称否则可能导致交易不成功。填写完成最后提交订单。',
id:0 id: 0
}); });
slidesApp.push({ slidesApp.push({
image: '/static/images/hfpaylink_intro/app_bank_hf_pay_step2.png', image: '/static/images/hfpaylink_intro/app_bank_hf_pay_step2.png',
text: '提交订单后,页面跳转到汇付天下支付页面,请填写相关信息完成支付。', text: '提交订单后,页面跳转到汇付天下支付页面,请填写相关信息完成支付。',
id:1 id: 1
}); });
}; };
$scope.toPcFirst = function () { $scope.toPcFirst = function () {
$scope.reset(); $scope.reset();
if(!$scope.pcfirst) { if (!$scope.pcfirst) {
return; return;
} }
addSlidePc(); addSlidePc();
@ -1439,7 +1484,7 @@ define(['angular', 'decimal', 'uiRouter', 'ngBootSwitch', 'ngFileUpload','uiBoot
}; };
$scope.toBankFirst = function () { $scope.toBankFirst = function () {
$scope.reset(); $scope.reset();
if(!$scope.bankfirst) { if (!$scope.bankfirst) {
return; return;
} }
addSlidePcBank(); addSlidePcBank();
@ -1447,7 +1492,7 @@ define(['angular', 'decimal', 'uiRouter', 'ngBootSwitch', 'ngFileUpload','uiBoot
}; };
$scope.toAppFirst = function () { $scope.toAppFirst = function () {
$scope.reset(); $scope.reset();
if(!$scope.appfirst) { if (!$scope.appfirst) {
return; return;
} }
addSlideApp(); addSlideApp();
@ -1489,8 +1534,8 @@ define(['angular', 'decimal', 'uiRouter', 'ngBootSwitch', 'ngFileUpload','uiBoot
commonDialog.confirm({ commonDialog.confirm({
title: 'Warning', title: 'Warning',
content: 'Refresh Credential will expire the current one, ' + content: 'Refresh Credential will expire the current one, ' +
'which will cause the current payment service disabled. ' + 'which will cause the current payment service disabled. ' +
'Are you sure going on?' 'Are you sure going on?'
}).then(function () { }).then(function () {
$http.put('/sys/partners/' + $scope.partner.client_moniker + '/credential_code').then(function () { $http.put('/sys/partners/' + $scope.partner.client_moniker + '/credential_code').then(function () {
$state.reload(); $state.reload();
@ -1544,9 +1589,9 @@ define(['angular', 'decimal', 'uiRouter', 'ngBootSwitch', 'ngFileUpload','uiBoot
}) })
} }
}]); }]);
app.controller('clientClearingConfigCtrl', ['$scope', '$http','$state','commonDialog', function ($scope, $http,$state,commonDialog) { app.controller('clientClearingConfigCtrl', ['$scope', '$http', '$state', 'commonDialog', function ($scope, $http, $state, commonDialog) {
$scope.bankCtrl = {rate_name:'Wechat'}; $scope.bankCtrl = {rate_name: 'Wechat'};
$scope.init = {manual:false}; $scope.init = {manual: false};
$scope.getBankAccount = function () { $scope.getBankAccount = function () {
$http.get('/client/partner_info/bank_account').then(function (resp) { $http.get('/client/partner_info/bank_account').then(function (resp) {
$scope.bankaccount = resp.data; $scope.bankaccount = resp.data;
@ -1563,32 +1608,32 @@ define(['angular', 'decimal', 'uiRouter', 'ngBootSwitch', 'ngFileUpload','uiBoot
}); });
}; };
$scope.manualSettle = function (manualSettle) { $scope.manualSettle = function (manualSettle) {
if(!$scope.init.manual){ if (!$scope.init.manual) {
$scope.init.manual = true; $scope.init.manual = true;
return; return;
} }
var waring_messsage; var waring_messsage;
if(manualSettle){ if (manualSettle) {
waring_messsage = "Open" waring_messsage = "Open"
}else { } else {
waring_messsage = "Close" waring_messsage = "Close"
} }
commonDialog.confirm({ commonDialog.confirm({
title: 'Confirmation', title: 'Confirmation',
content: 'Are you sure to '+waring_messsage+'?', content: 'Are you sure to ' + waring_messsage + '?',
}).then(function(){ }).then(function () {
$http.put('/client/partner_info/manual_settle?'+'manual_settle='+manualSettle).then(function (resp) { $http.put('/client/partner_info/manual_settle?' + 'manual_settle=' + manualSettle).then(function (resp) {
},function (resp) { }, function (resp) {
commonDialog.alert({title: 'Error!', content: resp.data.message, type: 'error'}) commonDialog.alert({title: 'Error!', content: resp.data.message, type: 'error'})
}) })
},function () { }, function () {
$state.reload(); $state.reload();
}); });
}; };
$scope.getRates(); $scope.getRates();
}]); }]);
app.controller('clientSubPartnersCtrl', ['$scope', '$http','partner', function ($scope, $http,partner) { app.controller('clientSubPartnersCtrl', ['$scope', '$http', 'partner', function ($scope, $http, partner) {
$scope.partner = partner.data; $scope.partner = partner.data;
$scope.loadSubPartners = function () { $scope.loadSubPartners = function () {
$http.get('/client/partner_info/sub_partners').then(function (resp) { $http.get('/client/partner_info/sub_partners').then(function (resp) {
@ -1604,7 +1649,7 @@ define(['angular', 'decimal', 'uiRouter', 'ngBootSwitch', 'ngFileUpload','uiBoot
}; };
$scope.loadSubPartners(); $scope.loadSubPartners();
}]); }]);
app.controller('clientDeviceCtrl','newDive','newDeviceDialogCtrl', ['$scope', '$http', 'orderService', 'commonDialog', 'refunder','$filter', '$uibModal', function ($scope, $http, orderService, commonDialog, refunder,$filter,$uibModal) { app.controller('clientDeviceCtrl', 'newDive', 'newDeviceDialogCtrl', ['$scope', '$http', 'orderService', 'commonDialog', 'refunder', '$filter', '$uibModal', function ($scope, $http, orderService, commonDialog, refunder, $filter, $uibModal) {
$scope.pagination = {}; $scope.pagination = {};
$scope.params = {}; $scope.params = {};
/** /**
@ -1710,8 +1755,6 @@ define(['angular', 'decimal', 'uiRouter', 'ngBootSwitch', 'ngFileUpload','uiBoot
}; };
}]); }]);
return app; return app;
}); });

@ -1,5 +1,5 @@
<div class="modal-header bg-green"> <div class="modal-header bg-green">
<h4 style="text-align: center">合规文件补充通知</h4> <h4 style="text-align: center">合规文件补充通知<span ng-if="client_refuse_reason">Refuse to reason/打回原因:{{client_refuse_reason}}</span></h4>
</div> </div>
<div class="modal-body" style="padding: 30px"> <div class="modal-body" style="padding: 30px">
<div class="row"> <div class="row">

@ -1131,7 +1131,7 @@
<span style="color:#f39c12">(请在此输入全名)</span> <span style="color:#f39c12">(请在此输入全名)</span>
</td> </td>
<td> <td>
<input ng-bind="aggregateFileInfo.full_name" style="border: none;overflow: hidden;height: 100%;width: 70%;"/> <input ng-model="signInfo.fullName" style="border: none;overflow: hidden;height: 100%;width: 70%;"/>
</td> </td>
<td> <td>
<p></p> <p></p>

Loading…
Cancel
Save