add 提交合规制作卡合同引导弹窗

master
luoyang 5 years ago
parent 9beff85f28
commit 52fe081aac

@ -4744,7 +4744,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
}
client.putAll(clientConfigService.find(client.getIntValue("client_id")));
beforeCommitToDoAgreeValid(client, manager);
beforeCommitToDoAgreeValid(client, manager,"Wechat");
OpenStatusModify openStatusModify = new OpenStatusModify(manager, clientMoniker, 1);
openStatusModify.setApprove_result(4);
@ -4766,7 +4766,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
}
int clientId = client.getIntValue("client_id");
client.putAll(clientConfigService.find(clientId));
beforeCommitToDoAgreeValid(client, manager);
beforeCommitToDoAgreeValid(client, manager,"rpaypmt_card");
JSONObject surCharge = merchantInfoProvider.clientCurrentRate(client.getIntValue("client_id"), new Date(), "rpaypmt_card");
if (surCharge == null || surCharge.size() <= 0) {
@ -4784,7 +4784,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
saveClientAuditProcess(client.getIntValue("client_id"), null, 1, "提交Compliance制作合同", manager,2);
}
private void beforeCommitToDoAgreeValid(JSONObject client, JSONObject manager) {
private void beforeCommitToDoAgreeValid(JSONObject client, JSONObject manager, String channel) {
if (manager != null && ManagerRole.BD_USER.hasRole(manager.getIntValue("role"))) {
int bdOperatClientRole = clientBDMapper.checkBDPermission(client.getIntValue("client_id"), manager.getString("manager_id"));
if (bdOperatClientRole <= 0) {
@ -4792,7 +4792,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
}
}
JSONObject surCharge = merchantInfoProvider.clientCurrentRate(client.getIntValue("client_id"), new Date(), "Wechat");
JSONObject surCharge = merchantInfoProvider.clientCurrentRate(client.getIntValue("client_id"), new Date(), channel);
if (surCharge == null || surCharge.size() <= 0) {
throw new BadRequestException("The Partner's Rate is not config!");
}

@ -76,8 +76,8 @@ require(['angular', 'jquery'], function (angular, $) {
});
function boot(user) {
var paths = ['static/boot/managerMainAppv2', 'static/menu/managerMenu','static/analysis/org/analysis-org', 'static/analysis/report/analysis-report', 'static/analysis/monitoring/analysis-monitoring', 'static/analysis/bd/analysis-bd','static/analysis/trans-analysis'];
var moduleNames = ['managerMainAppv2', 'listMenuApp','analysisTransaction', 'analysisBD', 'analysisOrg', 'analysisMonitoring', 'analysisReport'];
var paths = ['static/boot/managerMainAppv2', 'static/menu/managerMenu','static/analysis/org/analysis-org', 'static/analysis/report/analysis-report', 'static/analysis/monitoring/analysis-monitoring', 'static/analysis/bd/analysis-bd','static/analysis/trans-analysis','static/payment/partner/add-partner'];
var moduleNames = ['managerMainAppv2', 'listMenuApp','analysisTransaction', 'analysisBD', 'analysisOrg', 'analysisMonitoring', 'analysisReport','addPartnerApp'];
window.currentUser = user;
angular.forEach(user.modules, function (mod) {
paths.push(mod.js_path);

@ -22,6 +22,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
controller: 'addPartnerCtrl'
}).state('partners.edit', {
url: '/{clientMoniker}/edit',
params: {"commitCardPayment": false, commitCrossBorderPayment: false},
templateUrl: '/static/payment/partner/templates/partner_edit.html',
controller: 'partnerEditCtrl',
resolve: {
@ -38,7 +39,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
} else {
$scope.partner = {timezone: 'Australia/Melbourne'};
}
$scope.partner.enable_cross_payment = true;
$scope.partner.enable_cross_payment = false;
$scope.partner.enable_cross_payment = false;
$scope.initMerchantCode = function () {
$http.get('/sys/partners/init/merchant_code').then(function (response) {
@ -47,11 +48,16 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
$scope.merchantIsValid = true;
});
};
$scope.enablePaymentType = function (type) {
$scope.partner[type] = !$scope.partner[type];
};
$scope.enablePaymentType('enable_cross_payment');
$scope.initMerchantCode();
$scope.partner.company_phone_c = 61;
$scope.partner.contact_phone_c = 61;
$scope.partner.client_pay_type = [];
$scope.partner.client_pay_desc = [];
var resetClientPayDescByTpey = function (type) {
type = parseInt(type);
if (type == 1) {
@ -63,9 +69,6 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
};
$scope.partner.sameAsContactPerson = false;
$scope.enablePaymentType = function (type) {
$scope.partner[type] = !$scope.partner[type];
};
$scope.checkboxOnclick = function (){
$scope.partner.sameAsContactPerson = !($scope.partner.sameAsContactPerson);
if($scope.partner.sameAsContactPerson) {
@ -499,6 +502,14 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
$scope.partner[type] = !$scope.partner[type];
};
if ($state.params.commitCardPayment) {
$scope.enablePaymentType('enable_card_payment');
}
if ($state.params.commitCrossBorderPayment) {
$scope.enablePaymentType('enable_cross_payment');
}
function hasRole() {
var rolenum;
switch (sessionStorage.getItem('role')) {

@ -922,6 +922,18 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
})
}
$scope.apply2makeAgreeFile = function () {
if (!$scope.partner.enable_cross_payment) {
commonDialog.alert({
title: 'Error!',
content: '请完善商户跨境支付基本信息、签约费率、合规文件!',
type: 'error'
});
$state.go('partners.edit',{
clientMoniker:$scope.partner.client_moniker,
commitCardPayment:false,
commitCrossBorderPayment:true});
return;
}
$http.get('/sys/partners/' + $scope.partner.client_moniker + '/make_agree_file').then(function () {
commonDialog.alert({
title: 'Success!',
@ -936,6 +948,18 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
};
$scope.apply2makeCardAgreeFile = function () {
if (!$scope.partner.enable_card_payment) {
commonDialog.alert({
title: 'Error!',
content: '请完善商户卡支付基本信息、签约费率、合规文件!',
type: 'error'
});
$state.go('partners.edit',{
clientMoniker:$scope.partner.client_moniker,
commitCardPayment:true,
commitCrossBorderPayment: false});
return;
}
$http.get('/sys/partners/' + $scope.partner.client_moniker + '/make_card_agree_file').then(function () {
commonDialog.alert({
title: 'Success!',
@ -944,8 +968,19 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
});
$state.reload();
}, function (resp) {
if (String(resp.data.message).match("No Rate Config")) {
commonDialog.alert({
title: 'Error!',
content: '商户卡支付签约费率未配置,请添加商户卡支付签约费率!',
type: 'error'
});
$state.go('partners.detail.rates', {
clientMoniker: $scope.partner.client_moniker
});
}else {
commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'});
}
}
);
};
@ -2019,7 +2054,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
}]);
app.controller('partnerRatesCtrl', ['$scope', '$rootScope', '$http', '$uibModal', 'commonDialog', '$sce', function ($scope, $rootScope, $http, $uibModal, commonDialog, $sce) {
app.controller('partnerRatesCtrl', ['$scope', '$rootScope', '$http', '$uibModal', 'commonDialog', '$sce','$state', function ($scope, $rootScope, $http, $uibModal, commonDialog, $sce,$state) {
$scope.bankCtrl = {edit: true, rate_name: 'Wechat'};
$scope.init = {
skip_clearing: false,

@ -23,6 +23,10 @@
.form-control-span{
height: 34px;
}
.check-box {
zoom: 130%;
margin-right: 5px;
}
</style>
<section class="content-header">
<h1>New Partner</h1>
@ -41,10 +45,10 @@
<div class="col-sm-12 analysis-nav">
<ul class="nav nav-pills">
<li ng-class="{active:partner.enable_cross_payment}" style="cursor: pointer">
<a ng-click="enablePaymentType('enable_cross_payment')"><span>跨境支付|Cross-border Payment</span></a>
<a ng-click="enablePaymentType('enable_cross_payment')"><input type="checkbox" class="check-box" style="margin-right: 5px;" ng-model="partner.enable_cross_payment"><span>跨境支付|Cross-border Payment</span></a>
</li>
<li ng-class="{active:partner.enable_card_payment}" style="cursor: pointer">
<a ng-click="enablePaymentType('enable_card_payment')"> <span>卡支付|Card Payment</span></a>
<a ng-click="enablePaymentType('enable_card_payment')"><input type="checkbox" class="check-box" style="margin-right: 5px;" ng-model="partner.enable_card_payment"><span>卡支付|Card Payment</span></a>
</li>
</ul>
</div>

@ -214,9 +214,9 @@
<li role="presentation" ng-class="{active:bankCtrl.rate_name=='CB_BankPay'}"><a role="button" ng-click="bankCtrl.rate_name='CB_BankPay'" ng-if="sysconfig.active_channels.indexOf('CB_BankPay')!=-1">CB_BankPay</a></li>
<li role="presentation" ng-class="{active:bankCtrl.rate_name=='rpaypmt_card'}"><a role="button" ng-click="bankCtrl.rate_name='rpaypmt_card'">Card Payment</a></li>
<li role="presentation" ng-class="{active:bankCtrl.rate_name=='rpaypmt_dd'}"><a role="button" ng-click="bankCtrl.rate_name='rpaypmt_dd'">Direct Debit</a></li>
<button class="btn btn-warning" style="float: right" type="button" ng-click="newCardPaymentRates()" ng-if="partner.rate_editable && (('11'|withRole)||((!partner.upay_approve_result||partner.upay_approve_result>4) && ('111'|withRole)))" >
<a id="addCardPaymentRate" class="btn btn-warning" style="float: right" type="button" ng-click="newCardPaymentRates()" ng-if="partner.rate_editable && (('11'|withRole)||((!partner.upay_approve_result||partner.upay_approve_result>4) && ('111'|withRole)))" >
Add Card Payment Rates
</button>
</a>
</ul>
<div class="table-responsive">
<table class="table table-bordered">

@ -363,7 +363,7 @@
<div ng-if="!partner.upay_open_status" class="btn-group pull-right" role="group" aria-label="...">
<button type="button" class="btn btn-primary" ng-click="apply2makeCardAgreeFile()">
<i class="fa fa-paper-plane"></i>
提交合规制作合同
提交合规制作卡支付合同
</button>
</div>
<div ng-if="partner.audit_card_logs">

@ -17,6 +17,10 @@
.form-control-span{
height: 34px;
}
.check-box {
zoom: 130%;
margin-right: 5px;
}
</style>
<section class="content-header">
<h1 ng-bind="partner.short_name"></h1>
@ -37,10 +41,16 @@
<div class="col-sm-12 analysis-nav">
<ul class="nav nav-pills">
<li ng-class="{active:partner.enable_cross_payment}" style="cursor: pointer">
<a ng-click="enablePaymentType('enable_cross_payment')"><span>跨境支付|Cross-border Payment</span></a>
<a ng-click="enablePaymentType('enable_cross_payment')">
<input ng-if="partner.enable_cross_payment" type="checkbox" class="check-box" style="margin-right: 5px;" checked>
<input ng-if="!partner.enable_cross_payment" type="checkbox" class="check-box" style="margin-right: 5px;">
<span>跨境支付|Cross-border Payment</span></a>
</li>
<li ng-class="{active:partner.enable_card_payment}" style="cursor: pointer">
<a ng-click="enablePaymentType('enable_card_payment')"> <span>卡支付|Card Payment</span></a>
<a ng-click="enablePaymentType('enable_card_payment')">
<input ng-if="partner.enable_card_payment" type="checkbox" class="check-box" style="margin-right: 5px;" checked>
<input ng-if="!partner.enable_card_payment" type="checkbox" class="check-box" style="margin-right: 5px;">
<span>卡支付|Card Payment</span></a>
</li>
</ul>
</div>

Loading…
Cancel
Save