diff --git a/src/main/ui/static/merchantapplication/merchant_application.js b/src/main/ui/static/merchantapplication/merchant_application.js
index 1cee2109e..9872b7f12 100644
--- a/src/main/ui/static/merchantapplication/merchant_application.js
+++ b/src/main/ui/static/merchantapplication/merchant_application.js
@@ -229,6 +229,53 @@ angular.module('applyPartnerApp', ['ngMessages']).controller('applyPartnerCtrl',
}
};
+ $scope.partner.client_pay_type = [];
+ $scope.partner.client_pay_desc = [];
+ var resetClientPayDescByTpey = function (type) {
+ type = parseInt(type);
+ if (type == 1) {
+ while (parseInt($scope.partner.client_pay_desc[0]) < 6) {
+ $scope.partner.client_pay_desc.splice(0, 1);
+ }
+ }
+ if (type == 2) {
+ while (parseInt($scope.partner.client_pay_desc[$scope.partner.client_pay_desc.length-1]) > 5) {
+ $scope.partner.client_pay_desc.splice($scope.partner.client_pay_desc.length-1, 1);
+ }
+ }
+ };
+
+ var compare = function (x, y) {
+ x = parseInt(x);
+ y = parseInt(y);
+ if (x < y) {
+ return -1;
+ } else if (x > y) {
+ return 1;
+ } else {
+ return 0;
+ }
+ }
+ $scope.toggleClientPayType = function (type) {
+ var $idx = $scope.partner.client_pay_type.indexOf(type);
+ if ($idx >= 0) {
+ $scope.partner.client_pay_type.splice($idx, 1);
+ resetClientPayDescByTpey(type);
+ } else {
+ $scope.partner.client_pay_type.push(type);
+ $scope.partner.client_pay_type.sort(compare);
+ }
+ };
+ $scope.toggleClientPayDesc = function (type) {
+ var $idx = $scope.partner.client_pay_desc.indexOf(type);
+ if ($idx >= 0) {
+ $scope.partner.client_pay_desc.splice($idx, 1);
+ } else {
+ $scope.partner.client_pay_desc.push(type);
+ $scope.partner.client_pay_desc.sort(compare);
+ }
+ };
+
$scope.saveStep1 = function (form,index) {
alert('Do not forget your login id ('+$scope.partner.contact_phone+') and password');
$scope.initErrorMsg();
@@ -269,6 +316,33 @@ angular.module('applyPartnerApp', ['ngMessages']).controller('applyPartnerCtrl',
alert("Company Name包含敏感词汇,请检查后重新提交!");
return;
}
+ if ($scope.partner.client_pay_type.length==0) {
+ alert('请选择商户支付场景')
+ return;
+ }
+ if ($scope.partner.client_pay_desc.length==0) {
+ alert('请选择商户支付方式')
+ return;
+ }
+ if ($scope.partner.client_pay_type.indexOf('1') >= 0 && $scope.partner.client_pay_type.indexOf('2') >= 0) {
+ var fristDesc = $scope.partner.client_pay_desc[0];
+ var lastDesc = $scope.partner.client_pay_desc[($scope.partner.client_pay_desc.length - 1)];
+ if (parseInt(fristDesc) > 5 || parseInt(lastDesc) < 6) {
+ alert("请检查线上/线下支付场景是否已选择支付方式")
+ return;
+ }
+ }
+ if ($scope.partner.client_pay_desc.indexOf('8') >= 0) {
+ var lastDesc = $scope.partner.client_pay_desc[($scope.partner.client_pay_desc.length - 1)];
+ if (parseInt(lastDesc) < 10) {
+ alert("请检查线下支付是否已选择收银系统类型")
+ return;
+ }
+ }
+ if ($scope.partner.client_pay_type instanceof Array) {
+ $scope.partner.client_pay_type = $scope.partner.client_pay_type.join(',');
+ $scope.partner.client_pay_desc = $scope.partner.client_pay_desc.join(',');
+ }
$http.post('/register/info/update/' + $scope.partner.username, $scope.partner).then(function (resp) {
if (index == 3) {
$scope.getRateConfig();
diff --git a/src/main/ui/static/payment/partner/templates/simple_application_detail.html b/src/main/ui/static/payment/partner/templates/simple_application_detail.html
index e0c14b56e..5312ad1bb 100644
--- a/src/main/ui/static/payment/partner/templates/simple_application_detail.html
+++ b/src/main/ui/static/payment/partner/templates/simple_application_detail.html
@@ -234,6 +234,102 @@
+