add 自助申请场景选择

master
luoyang 6 years ago
parent a60f1f40c5
commit ba5f37cbda

@ -13,7 +13,7 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<jib-maven-plugin.version>1.1.2</jib-maven-plugin.version>
<docker-image.version>1.0.23</docker-image.version>
<docker-image.version>1.0.24</docker-image.version>
</properties>
<dependencies>

@ -53,6 +53,9 @@ public class ClientPreApplyBean {
private String codeKey;
private boolean agree;
private String nation_code;
private String client_pay_type;
private String client_pay_desc;
public JSONObject insertObject() {
JSONObject res = (JSONObject) JSON.toJSON(this);
@ -234,4 +237,20 @@ public class ClientPreApplyBean {
public void setNation_code(String nation_code) {
this.nation_code = nation_code;
}
public void setClient_pay_type(String client_pay_type) {
this.client_pay_type = client_pay_type;
}
public void setClient_pay_desc(String client_pay_desc) {
this.client_pay_desc = client_pay_desc;
}
public String getClient_pay_type() {
return client_pay_type;
}
public String getClient_pay_desc() {
return client_pay_desc;
}
}

@ -378,6 +378,10 @@ public class SimpleClientApplyServiceImpl implements SimpleClientApplyService {
clientConfig.put("client_moniker", clientMoniker);
clientConfig.put("clean_days", apply.getIntValue("clean_days"));
clientConfig.put("common_sub_merchant_id", 1);
if (StringUtils.isNotBlank(apply.getString("client_pay_type")) && StringUtils.isNotBlank(apply.getString("client_pay_desc"))) {
clientConfig.put("client_pay_type", apply.getString("client_pay_type"));
clientConfig.put("client_pay_desc", apply.getString("client_pay_desc"));
}
clientConfigMapper.save(clientConfig);
apply.put("client_moniker", clientMoniker);

@ -26,6 +26,7 @@ import com.github.miemiedev.mybatis.paginator.domain.PageBounds;
import com.github.miemiedev.mybatis.paginator.domain.PageList;
import org.apache.commons.lang3.RandomStringUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.ApplicationEventPublisher;
import org.springframework.context.ApplicationEventPublisherAware;
@ -217,6 +218,10 @@ public class ClientApplyImpl implements ClientApply, ApplicationEventPublisherAw
clientMapper.save(partner);
JSONObject clientConfig = new JSONObject();
if (StringUtils.isNotBlank(apply.getString("client_pay_type")) && StringUtils.isNotBlank(apply.getString("client_pay_desc"))) {
clientConfig.put("client_pay_type", apply.getString("client_pay_type"));
clientConfig.put("client_pay_desc", apply.getString("client_pay_desc"));
}
clientConfig.put("client_id",partner.getIntValue("client_id"));
clientConfig.put("client_moniker",info.getClientMoniker());
clientConfigService.save(clientConfig);

@ -400,14 +400,126 @@
</div>
</div>
</div>
<!-- <div class="form-group has-feedback"
ng-class="{'has-error':companyForm.royalpayindustry.$invalid && companyForm.royalpayindustry.$dirty}">
<input class="form-control" id="royalpayindustry" required
name="royalpayindustry" readonly
ng-model="partner.royalpayindustry"
multi-level-select-popup="royalpayindustry"
on-select="onRoyalPayIndustrySelect($selected)">
</div>-->
<div class="panel panel-default">
<div class="panel-heading">Merchant Payment Scenario</div>
<div class="panel-body">
<div class="form-horizontal">
<div class="form-group">
<label class="control-label col-sm-5">*
Merchant Payment Scenario Type</label>
<div class="col-sm-5">
<a class="btn btn-default"
ng-class="{active:partner.client_pay_type.indexOf('1')>=0}"
ng-click="toggleClientPayType('1')">
<i class="fa fa-mixcloud"></i>
Online</a>
<a class="btn btn-default"
ng-class="{active:partner.client_pay_type.indexOf('2')>=0}"
ng-click="toggleClientPayType('2')">
<i class="fa fa-shopping-basket"></i>
Offline</a>
</div>
</div>
<div class="form-group"
ng-if="partner.client_pay_type.indexOf('1')>=0">
<label class="control-label col-sm-2">
*Online</label>
<div class="col-sm-10">
<a class="btn btn-default"
ng-class="{active:partner.client_pay_desc.indexOf('1')>=0}"
ng-click="toggleClientPayDesc('1')">
<i class="fa fa-desktop"></i>
PC Web</a>
<a class="btn btn-default"
ng-class="{active:partner.client_pay_desc.indexOf('2')>=0}"
ng-click="toggleClientPayDesc('2')">
<i class="fa fa-mobile-phone"></i>
Moblie Web</a>
<a class="btn btn-default"
ng-class="{active:partner.client_pay_desc.indexOf('3')>=0}"
ng-click="toggleClientPayDesc('3')">
<i class="fa fa-mobile-phone"></i>
APP</a>
<a class="btn btn-default"
ng-class="{active:partner.client_pay_desc.indexOf('4')>=0}"
ng-click="toggleClientPayDesc('4')">
<i class="fa fa-wechat"></i>
Wechat/Alipay JSAPI</a>
<a class="btn btn-default"
ng-class="{active:partner.client_pay_desc.indexOf('5')>=0}"
ng-click="toggleClientPayDesc('5')">
<i class="fa fa-wechat"></i>
MiniProgram</a>
</div>
</div>
<div ng-if="partner.client_pay_type.indexOf('2')>=0">
<div class="form-group"
ng-class="{'has-error':partnerForm.client_offline.$invalid && partnerForm.client_offline.$dirty}">
<label class="control-label col-sm-2">*Offline</label>
<div class="col-sm-8">
<a class="btn btn-default"
ng-class="{active:partner.client_pay_desc.indexOf('6')>=0}"
ng-click="toggleClientPayDesc('6')">
<i class="fa fa-qrcode"></i>
QR Code</a>
<a class="btn btn-default"
ng-class="{active:partner.client_pay_desc.indexOf('7')>=0}"
ng-click="toggleClientPayDesc('7')">
<i class="fa fa-user"></i>
RoyalPay POS</a>
<a class="btn btn-default"
ng-class="{active:partner.client_pay_desc.indexOf('8')>=0}"
ng-click="toggleClientPayDesc('8')">
<i class="fa fa-laptop"></i>
POS</a>
<a class="btn btn-default"
ng-class="{active:partner.client_pay_desc.indexOf('9')>=0}"
ng-click="toggleClientPayDesc('9')">
<i class="fa fa-shopping-cart"></i>
Vending machine</a>
</div>
</div>
</div>
<div ng-if="partner.client_pay_desc.indexOf('8')>=0">
<div class="form-group"
ng-class="{'has-error':partnerForm.client_offline.$invalid && partnerForm.client_offline.$dirty}">
<label class="control-label col-sm-2">* POS</label>
<div class="col-sm-8">
<a class="btn btn-default"
ng-class="{active:partner.client_pay_desc.indexOf('10')>=0}"
ng-click="toggleClientPayDesc('10')">
<i class="fa fa-laptop"></i>
ipos</a>
<a class="btn btn-default"
ng-class="{active:partner.client_pay_desc.indexOf('11')>=0}"
ng-click="toggleClientPayDesc('11')">
<i class="fa fa-laptop"></i>
pospal</a>
<a class="btn btn-default"
ng-class="{active:partner.client_pay_desc.indexOf('12')>=0}"
ng-click="toggleClientPayDesc('12')">
<i class="fa fa-laptop"></i>
aupos</a>
<a class="btn btn-default"
ng-class="{active:partner.client_pay_desc.indexOf('13')>=0}"
ng-click="toggleClientPayDesc('13')">
<i class="fa fa-laptop"></i>
other</a>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- <div class="form-group has-feedback"
ng-class="{'has-error':companyForm.royalpayindustry.$invalid && companyForm.royalpayindustry.$dirty}">
<input class="form-control" id="royalpayindustry" required
name="royalpayindustry" readonly
ng-model="partner.royalpayindustry"
multi-level-select-popup="royalpayindustry"
on-select="onRoyalPayIndustrySelect($selected)">
</div>-->
<div class="row">
<div class="col-xs-12 margin-bottom">

@ -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();

@ -234,6 +234,102 @@
</div>
</div>
</div>
<div class="panel panel-default" ng-if="partner.client_pay_type">
<div class="panel-heading">Merchant Payment Scenario</div>
<div class="panel-body">
<div class="form-horizontal">
<div class="form-group">
<label class="control-label col-sm-2">
Merchant Payment Scenario Type</label>
<div class="col-sm-8">
<button class="btn btn-default"
ng-class="{active:partner.client_pay_type.indexOf('1')>=0}">
<i class="fa fa-mixcloud"></i>
线上</button>
<button class="btn btn-default"
ng-class="{active:partner.client_pay_type.indexOf('2')>=0}">
<i class="fa fa-shopping-basket"></i>
线下</button>
</div>
</div>
<div class="form-group"
ng-if="partner.client_pay_type.indexOf('1')>=0">
<label class="control-label col-sm-2">
Online</label>
<div class="col-sm-8">
<button class="btn btn-default"
ng-class="{active:partner.client_pay_desc.indexOf('1')>=0}">
<i class="fa fa-desktop"></i>
PC网站</button>
<button class="btn btn-default"
ng-class="{active:partner.client_pay_desc.indexOf('2')>=0}">
<i class="fa fa-mobile-phone"></i>
手机端网站</button>
<button class="btn btn-default"
ng-class="{active:partner.client_pay_desc.indexOf('3')>=0}">
<i class="fa fa-mobile-phone"></i>
APP</button>
<button class="btn btn-default"
ng-class="{active:partner.client_pay_desc.indexOf('4')>=0}">
<i class="fa fa-wechat"></i>
微信内、支付宝内网站</button>
<button class="btn btn-default"
ng-class="{active:partner.client_pay_desc.indexOf('5')>=0}">
<i class="fa fa-wechat"></i>
小程序</button>
</div>
</div>
<div ng-if="partner.client_pay_type.indexOf('2')>=0">
<div class="form-group"
ng-class="{'has-error':partnerForm.client_offline.$invalid && partnerForm.client_offline.$dirty}">
<label class="control-label col-sm-2">Offline</label>
<div class="col-sm-8">
<button class="btn btn-default"
ng-class="{active:partner.client_pay_desc.indexOf('6')>=0}">
<i class="fa fa-qrcode"></i>
二维码立牌</button>
<button class="btn btn-default"
ng-class="{active:partner.client_pay_desc.indexOf('7')>=0}">
<i class="fa fa-user"></i>
RoyalPay POS</button>
<button class="btn btn-default"
ng-class="{active:partner.client_pay_desc.indexOf('8')>=0}">
<i class="fa fa-laptop"></i>
收银系统</button>
<button class="btn btn-default"
ng-class="{active:partner.client_pay_desc.indexOf('9')>=0}">
<i class="fa fa-shopping-cart"></i>
无人售货机</button>
</div>
</div>
</div>
<div ng-if="partner.client_pay_desc.indexOf('8')>=0">
<div class="form-group"
ng-class="{'has-error':partnerForm.client_offline.$invalid && partnerForm.client_offline.$dirty}">
<label class="control-label col-sm-2">* POS</label>
<div class="col-sm-8">
<button class="btn btn-default"
ng-class="{active:partner.client_pay_desc.indexOf('10')>=0}">
<i class="fa fa-laptop"></i>
ipos</button>
<button class="btn btn-default"
ng-class="{active:partner.client_pay_desc.indexOf('11')>=0}">
<i class="fa fa-laptop"></i>
pospal</button>
<button class="btn btn-default"
ng-class="{active:partner.client_pay_desc.indexOf('12')>=0}">
<i class="fa fa-laptop"></i>
aupos</button>
<button class="btn btn-default"
ng-class="{active:partner.client_pay_desc.indexOf('13')>=0}">
<i class="fa fa-laptop"></i>
其他</button>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</uib-tab>
<uib-tab heading="Handle">

Loading…
Cancel
Save