master
yuan 7 years ago
parent 2ba51365ec
commit 483b3aa9c1

@ -52,6 +52,7 @@ public class ClientPreApplyBean {
@NotEmpty(message = "codeKey can't be null")
private String codeKey;
private boolean agree;
private String nation_code;
public JSONObject insertObject() {
JSONObject res = (JSONObject) JSON.toJSON(this);
@ -225,4 +226,12 @@ public class ClientPreApplyBean {
public void setCodeKey(String codeKey) {
this.codeKey = codeKey;
}
public String getNation_code() {
return nation_code;
}
public void setNation_code(String nation_code) {
this.nation_code = nation_code;
}
}

@ -275,6 +275,7 @@ public class SimpleClientApplyServiceImpl implements SimpleClientApplyService {
sysClient.put("create_time",new Date());
sysClient.put("source",4);
sysClient.put("approve_result",2);
sysClient.put("approve_time",new Date());
sysClient.put("creator",0);
sysClient.put("industry",331);
sysClient.put("merchant_id",subMerchantId.getString("merchant_id"));
@ -293,10 +294,10 @@ public class SimpleClientApplyServiceImpl implements SimpleClientApplyService {
sysAccount.put("password_aes", PasswordUtils.encryptAESPwd(apply.getString("password")));
sysAccount.put("creator",0);
sysAccount.put("contact_phone",apply.getString("contact_phone"));
sysAccount.put("password_hash",apply.getString("password"));
sysAccount.put("client_id",clientId);
sysAccount.put("create_time",new Date());
sysAccount.put("is_password_expired",0);
sysAccount.put("nation_code",'+'+apply.getString("nation_code"));
clientAccountMapper.save(sysAccount);
JSONObject sysBank = new JSONObject();

@ -272,7 +272,7 @@
<div class="form-group has-feedback"
ng-class="{'has-error':accountForm.contact_email.$invalid && accountForm.contact_email.$dirty}">
<input class="form-control" ng-model="partner.contact_email" placeholder="Email address"
required maxlength="50" name="contact_email" ng-mouseleave="checkEmail()" ng-mousedown="trueEmail =false">
required maxlength="50" name="contact_email" ng-mouseleave="checkParams()" ng-mousedown="trueEmail =false">
<div style="text-align: left" ng-if="trueEmail">
<p style="text-align: left;font-size: 12px;color: red">The mailbox is incorrect</p>
</div>
@ -285,11 +285,14 @@
<span class="input-group-addon">+61</span>
<input type="text" name="contact_phone" required ng-model="partner.contact_phone"
class="form-control" style="display: inline"
placeholder="Your Phone">
placeholder="Your Phone" maxlength="20" ng-mouseleave="checkParams()" ng-mousedown="name_exist =false">
<button type="button" class="btn btn-success button_width" style="display:inline;height: 34px;float: right;border-radius: 0px"
title="发送验证码" ng-click="sendVerificationCode()"
ng-bind="description" ng-disabled="canClick"></button>
</div>
<div style="text-align: left" ng-if="name_exist">
<span style="text-align: left;font-size: 12px;" class="text-danger">The phone number has already existed</span>
</div>
<div style="text-align: left">
<span style="text-align: left;font-size: 12px;" class="text-info">phone number is also your login id</span>
</div>
@ -299,7 +302,7 @@
<div class="form-group has-feedback"
ng-class="{'has-error':accountForm.code.$invalid && accountForm.code.$dirty}">
<input class="form-control" type="number" ng-model="partner.phoneCodeKey" placeholder="Code"
required maxlength="10" name="code">
required maxlength="10" name="code" ng-click="checkParams()">
</div>
<div class="form-group has-feedback"
@ -334,7 +337,7 @@
<div class="form-group has-feedback"
ng-class="{'has-error':companyForm.company_name.$invalid && companyForm.company_name.$dirty}">
<input type="text" class="form-control" ng-model="partner.company_name" name="company_name"
placeholder="Company Name" required maxlength="80">
placeholder="Company Name" required maxlength="80">
</div>
<div class="form-group has-feedback"
ng-class="{'has-error':companyForm.abn.$invalid && companyForm.abn.$dirty}">
@ -344,17 +347,17 @@
<div class="form-group has-feedback"
ng-class="{'has-error':companyForm.short_name.$invalid && companyForm.short_name.$dirty}">
<input type="text" class="form-control" ng-model="partner.short_name" name="short_name"
placeholder="Merchant Name" required maxlength="80">
placeholder="Merchant Name" required maxlength="50">
</div>
<div class="form-group has-feedback"
ng-class="{'has-error':companyForm.company_phone.$invalid && companyForm.company_phone.$dirty}">
<input type="text" class="form-control" ng-model="partner.company_phone" name="company_phone"
placeholder="Company phone" required maxlength="80">
placeholder="Company phone" required maxlength="20">
</div>
<div class="form-group has-feedback"
ng-class="{'has-error':companyForm.address.$invalid && companyForm.address.$dirty}">
<textarea class="form-control" ng-model="partner.address" placeholder="Address"
name="address" required maxlength="100"></textarea>
name="address" required maxlength="200"></textarea>
</div>
<div class="form-group has-feedback"
@ -365,7 +368,7 @@
<div class="form-group has-feedback"
ng-class="{'has-error':companyForm.state.$invalid && companyForm.state.$dirty}">
<select class="form-control" name="state"
ng-model="partner.state"
ng-model="partner.state" maxlength="20"
id="state-input" required
ng-options="state.value as state.label for state in states">
<option value="">State</option>
@ -374,7 +377,7 @@
<div class="form-group has-feedback"
ng-class="{'has-error':companyForm.postcode.$invalid && companyForm.postcode.$dirty}">
<input class="form-control" ng-model="partner.postcode" placeholder="Postcode" required
maxlength="50" name="postcode">
maxlength="10" name="postcode">
</div>
<div class="row">
<div class="col-xs-12 margin-bottom">
@ -382,7 +385,7 @@
<div class="dropdown">
<input id="dLabel" data-toggle="dropdown" data-target="#" class="form-control"
ng-model="industryLable" placeholder="Industry" required
maxlength="50" name="royalpayindustry">
maxlength="50" name="royalpayindustry" readonly="readonly">
<ul class="dropdown-menu multi-level" role="menu" aria-labelledby="dropdownMenu">
<li class="dropdown-submenu" ng-repeat="industry in royalpayindustry">
<a tabindex="-1" ng-model="industry.mccCode">{{industry.label}}</a>
@ -420,13 +423,14 @@
<div class="form-group has-feedback"
ng-class="{'has-error':bankForm.account_no.$invalid && bankForm.account_no.$dirty}">
<input class="form-control" ng-model="partner.bank_no" placeholder="Account No"
required
required maxlength="20"
name="account_no">
</div>
<div class="form-group has-feedback"
ng-class="{'has-error':bankForm.account_name.$invalid && bankForm.account_name.$dirty}">
<input class="form-control" ng-model="partner.bank_name" placeholder="Account Name"
maxlength="50"
required name="account_name">
</div>

@ -71,6 +71,25 @@ angular.module('applyPartnerApp', ['ngMessages']).controller('applyPartnerCtrl',
$scope.loadRoyalpayindustry();
$scope.checkParams = function () {
if($scope.partner.contact_phone && $scope.partner.nation_code){
$http.get('/register/account/check?phone='+$scope.partner.contact_phone+'&nation_code='+$scope.partner.nation_code).then(function (resp) {
$scope.name_exist = false;
}, function (resp) {
if (resp.data.status == 403){
$scope.name_exist = true;
}
})
};
if($scope.partner.contact_email){
var reg = new RegExp("^[a-z0-9]+([._\\-]*[a-z0-9])*@([a-z0-9]+[-a-z0-9]*[a-z0-9]+.){1,63}[a-z0-9]+$");
if(!reg.test($scope.partner.contact_email)){
$scope.trueEmail = true;
}else {
$scope.trueEmail = false;
}
}
};
$scope.checkUserName = function (phone,nation_code) {
if(phone && nation_code){
$http.get('/register/account/check?phone='+phone+'&nation_code='+nation_code).then(function (resp) {

Loading…
Cancel
Save