master
yuan 7 years ago
parent b4f76e8182
commit 19f0045183

@ -88,6 +88,12 @@
width: 89%;
}
@media (min-width:1200px) {
.register-box {
margin-top: 30%;
}
}
}
</style>
@ -173,6 +179,7 @@
</div>
</nav>
<div id="fullpage" class="fullpage-wrapper">
<div style="clear: both"></div>
<div class='progress' style="height: 0px">
<div class='progress_inner'>
<div class='progress_inner__step' ng-class="{'body .dis_before:nth-child(1):before':chooseArray[0],'dis_before':chooseArray[0]}">
@ -236,45 +243,26 @@
<span class="text-bold">Success</span>
</div>
</div>
<div style="clear: both"></div>
<div class="register-box content-with">
<div class="register-box-body register-box-bg">
<p class="login-box-msg">Easy BusinessEasy Payment</p>
<form novalidate name="accountForm" action="" method="post" ng-show="chooseArray[0]">
<div class="form-group has-feedback"
ng-class="{'has-error':accountForm.username.$invalid && accountForm.username.$dirty}">
<input type="text" class="form-control" ng-model="partner.username" name="username"
placeholder="Account Name" required maxlength="80" ng-mousedown="name_exist = false">
<div style="text-align: left" ng-if="name_exist">
<p class="small text-danger">用户名已存在</p>
</div>
</div>
<div class="form-group has-feedback"
ng-class="{'has-error':accountForm.contact_person.$invalid && accountForm.contact_person.$dirty}">
<input class="form-control" ng-model="partner.contact_person" placeholder="Your Name"
required maxlength="50" name="contact_person" ng-focus="checkUserName(partner.username)">
required maxlength="50" name="contact_person">
</div>
<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="Work Email"
required
maxlength="50" name="contact_email">
<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">
<div style="text-align: left" ng-if="trueEmail">
<p style="text-align: left;font-size: 12px;color: red">The mailbox is incorrect</p>
</div>
</div>
<div class="form-group has-feedback"
ng-class="{'has-error':accountForm.password.$invalid && accountForm.password.$dirty}">
<input type="password" class="form-control" ng-model="partner.password" placeholder="Password" required
minlength="6" maxlength="12" name="password">
<div style="text-align: left">
<p style="text-align: left" class="small text-info">6~12个字符区分大小写</p>
</div></div>
<div class="form-group has-feedback"
ng-class="{'has-error':(accountForm.rePassword.$invalid && accountForm.rePassword.$dirty) ||partner.rePassword != partner.password}">
<input type="password" class="form-control" ng-model="partner.rePassword" placeholder="Confirm Password"
required
minlength="6" maxlength="12" name="rePassword">
</div>
<div class="row">
<div class="form-group col-xs-12"
ng-class="{'has-error':accountForm.contact_phone.$invalid && accountForm.contact_phone.$dirty}">
@ -287,7 +275,9 @@
title="发送验证码" ng-click="sendVerificationCode()"
ng-bind="description" ng-disabled="canClick"></button>
</div>
<div style="text-align: left">
<p style="text-align: left;font-size: 12px;color: grey">phone number is also your login id</p>
</div>
</div>
</div>
@ -297,10 +287,26 @@
required maxlength="10" name="code">
</div>
<div class="form-group has-feedback"
ng-class="{'has-error':accountForm.password.$invalid && accountForm.password.$dirty}">
<input type="password" class="form-control" ng-model="partner.password" placeholder="Password" required
minlength="6" maxlength="12" name="password">
<div style="text-align: left">
<p style="text-align: left;font-size: 12px;color: grey">6~12个字符区分大小写</p>
</div>
</div>
<div class="form-group has-feedback"
ng-class="{'has-error':(accountForm.rePassword.$invalid && accountForm.rePassword.$dirty) ||partner.rePassword != partner.password}">
<input type="password" class="form-control" ng-model="partner.rePassword" placeholder="Confirm Password"
required
minlength="6" maxlength="12" name="rePassword">
</div>
<div class="row">
<div class="col-xs-12 margin-bottom">
<button type="button" class="btn btn-success btn-block btn-flat"
ng-click="saveStep1(accountForm,1)">Next
ng-click="saveStep1(accountForm,1)" ng-disabled="accountForm.$invalid ||trueEmail">Next
</button>
<div>
<p ng-if="resError" style="padding: 6px 12px;font-size: 14px;"
@ -386,7 +392,7 @@
<div class="row">
<div class="col-xs-12 margin-bottom">
<button type="button" class="btn btn-success btn-block btn-flat"
ng-click="saveApplyInfo(companyForm,2)">Next
ng-click="saveApplyInfo(companyForm,2)" ng-disabled="companyForm.$invalid">Next
</button>
<div>
<p ng-if="resError" style="padding: 6px 12px;font-size: 14px;"
@ -418,47 +424,40 @@
title="Search" ng-click="searchBankInfo(partner.bsb_no)">Search</button>
</div>
</div>
<div class="form-group has-feedback"
ng-class="{'has-error':bankForm.bank.$invalid && bankForm.bank.$dirty}">
<input class="form-control" ng-model="bankaccount.bank" placeholder="Bank" required
name="bank">
</div>
<div class="form-group has-feedback"
ng-class="{'has-error':bankForm.city.$invalid && bankForm.city.$dirty}">
<input class="form-control" ng-model="bankaccount.city" placeholder="City" required
name="city">
</div>
<div class="form-group has-feedback"
ng-class="{'has-error':bankForm.address.$invalid && bankForm.address.$dirty}">
<input class="form-control" ng-model="bankaccount.address" placeholder="Address" required
name="address">
</div>
<div class="form-group has-feedback"
ng-class="{'has-error':bankForm.system.$invalid && bankForm.bank_system.$dirty}">
<input class="form-control" ng-model="bankaccount.system" placeholder="System" required
name="system">
</div>
<div class="form-group has-feedback"
ng-class="{'has-error':bankForm.postcode.$invalid && bankForm.bank_postcode.$dirty}">
<input class="form-control" ng-model="bankaccount.postcode" placeholder="Postcode" required
name="postcode">
</div>
<div class="form-group has-feedback"
ng-class="{'has-error':bankForm.state.$invalid && bankForm.bank_state.$dirty}">
<input class="form-control" ng-model="bankaccount.state" placeholder="State" required
name="state">
</div>
<div class="form-group has-feedback"
ng-class="{'has-error':bankForm.branch.$invalid && bankForm.branch.$dirty}">
<input class="form-control" ng-model="bankaccount.branch" placeholder="Branch" required
name="branch">
<div style="text-align: left" ng-if="showBankInfo">
<div class="form-group has-feedback"
ng-class="{'has-error':bankForm.bank.$invalid && bankForm.bank.$dirty}">
<p class="form-control-static">&nbsp; Bank: <em>bank{{bankaccount.bank}}</em></p>
</div>
<div class="form-group has-feedback"
ng-class="{'has-error':bankForm.city.$invalid && bankForm.city.$dirty}">
<p class="form-control-static">&nbsp; City: <em>{{bankaccount.city}}</em></p>
</div>
<div class="form-group has-feedback"
ng-class="{'has-error':bankForm.address.$invalid && bankForm.address.$dirty}">
<p class="form-control-static">&nbsp; Address: <em>{{bankaccount.address}}</em></p>
</div>
<div class="form-group has-feedback"
ng-class="{'has-error':bankForm.system.$invalid && bankForm.bank_system.$dirty}">
<p class="form-control-static">&nbsp; system: <em>{{bankaccount.system}}</em></p>
</div>
<div class="form-group has-feedback"
ng-class="{'has-error':bankForm.postcode.$invalid && bankForm.bank_postcode.$dirty}">
<p class="form-control-static">&nbsp; postcode: <em>{{bankaccount.postcode}}</em></p>
</div>
<div class="form-group has-feedback"
ng-class="{'has-error':bankForm.state.$invalid && bankForm.bank_state.$dirty}">
<p class="form-control-static">&nbsp; state: <em>{{bankaccount.state}}</em></p>
</div>
<div class="form-group has-feedback"
ng-class="{'has-error':bankForm.branch.$invalid && bankForm.branch.$dirty}">
<p class="form-control-static">&nbsp; branch: <em>{{bankaccount.branch}}</em></p>
</div>
</div>
<div class="row">
<div class="col-xs-12 margin-bottom">
<button type="button" class="btn btn-success btn-block btn-flat"
ng-click="saveApplyInfo(bankForm,3)">Next
ng-click="saveApplyInfo(bankForm,3)" ng-disabled="bankForm.$invalid">Next
</button>
<div>
<p ng-if="resError" style="padding: 6px 12px;font-size: 14px;"
@ -468,66 +467,35 @@
</div>
</form>
<form novalidate name="cleanForm" action="" method="post" ng-show="chooseArray[3]">
<div class="form-group has-feedback"
ng-class="{'has-error':cleanForm.clean_days.$invalid && cleanForm.clean_days.$dirty}">
<select class="form-control" ng-model="partner.clean_days" id="citySelect"
ng-change="changeDays(partner.clean_days)" name="clean_days">
ng-change="changeDays(partner.clean_days)" name="clean_days" required
ng-options="cleanDay.value as cleanDay.label for cleanDay in cleanDays">
<option value="">Clean Days</option>
<option value="1">T+1</option>
<option value="2">T+2</option>
<option value="3">T+3</option>
</select>
<div>{{rateConfig}}</div>
</div>
<div class="form-group has-feedback"
ng-class="{'has-error':cleanForm.wechat_rate_value.$invalid && cleanForm.wechat_rate_value.$dirty}">
<div class="input-group">
<input type="number" placeholder="WeChat Rate Value" name="wechat_rate_value"
stringToNumber2 class="form-control" ng-model="rate.wechat_rate_value"
min="0.6" max="2.2" step="0.1" id="wechat_rate_value_input" required>
<div class="input-group-addon">%</div>
<div style="text-align: left" ng-if="showCleanDay">
<div class="form-group has-feedback">
<p class="form-control-static">&nbsp; WeChat Rate Value: <em>{{rate.wechat_rate_value}}%</em></p>
</div>
</div>
<div class="form-group has-feedback"
ng-class="{'has-error':cleanForm.alipay_rate_value.$invalid && cleanForm.alipay_rate_value.$dirty}">
<div class="input-group">
<input type="number" placeholder="Alipay Rate Value(Retail)" name="alipay_rate_value"
stringToNumber2 class="form-control" ng-model="rate.alipay_rate_value"
min="0.6" max="2.2" step="0.1" id="alipay_rate_value_input" required>
<div class="input-group-addon">%</div>
<div class="form-group has-feedback">
<p class="form-control-static">&nbsp; Alipay Rate Value(Retail): <em>{{rate.alipay_rate_value}}%</em></p>
</div>
</div>
<div class="form-group has-feedback"
ng-class="{'has-error':cleanForm.alipayonline_rate_value.$invalid && cleanForm.alipayonline_rate_value.$dirty}">
<div class="input-group">
<input type="number" placeholder="Alipay Rate Value(Online)"
name="alipayonline_rate_value" stringToNumber2 class="form-control"
ng-model="rate.alipayonline_rate_value"
min="0.6" max="2.2" step="0.1" id="alipayonline_rate_value_input" required>
<div class="input-group-addon">%</div>
<div class="form-group has-feedback">
<p class="form-control-static">&nbsp; Alipay Rate Value(Online): <em>{{rate.alipayonline_rate_value}}%</em></p>
</div>
</div>
<div class="form-group has-feedback"
ng-class="{'has-error':cleanForm.bestpay_rate_value.$invalid && cleanForm.bestpay_rate_value.$dirty}">
<div class="input-group">
<input type="number" placeholder="Bestpay Rate Value" name="bestpay_rate_value"
stringToNumber2 class="form-control" ng-model="rate.bestpay_rate_value"
min="0.6" max="2.2" step="0.1" id="bestpay_rate_value_input" required>
<div class="input-group-addon">%</div>
<div class="form-group has-feedback">
<p class="form-control-static">&nbsp; Bestpay Rate Value: <em>{{rate.bestpay_rate_value}}%</em></p>
</div>
</div>
<div class="form-group has-feedback"
ng-class="{'has-error':cleanForm.jd_rate_value.$invalid && cleanForm.jd_rate_value.$dirty}">
<div class="input-group">
<input type="number" placeholder="JD Rate Value" name="jd_rate_value" stringToNumber2
class="form-control" ng-model="rate.jd_rate_value"
min="0.6" max="2.2" step="0.1" id="jd_rate_value_input" required>
<div class="input-group-addon">%</div>
<div class="form-group has-feedback">
<p class="form-control-static">&nbsp; JD Rate Value: <em>{{rate.jd_rate_value}}%</em></p>
</div>
</div>
<div class="form-group has-feedback">
<div class="checkbox agree_left agree-text">
<label><input type="checkbox" ng-model="partner.agree" value="1">Agree to Terms & Conditions</label>
@ -536,7 +504,7 @@
<div class="row">
<div class="col-xs-12 margin-bottom">
<button type="button" class="btn btn-success btn-block btn-flat"
ng-click="saveApplyInfo(cleanForm,4)" ng-disabled="!partner.agree" >Submit
ng-click="saveApplyInfo(cleanForm,4)" ng-disabled="cleanForm.$invalid || !partner.agree" >Submit
</button>
<div>
<p ng-if="resError" style="padding: 6px 12px;font-size: 14px;"

@ -71,7 +71,7 @@ body .progress_inner__step:before, body .progress_inner, body .progress_inner__s
position: absolute;
left: 0;
right: 0;
top:42%;
top: 16em;
-webkit-transform: translateY(-50%);
transform: translateY(-50%);
margin: auto;

@ -6,6 +6,17 @@ angular.module('applyPartnerApp', ['ngMessages']).controller('applyPartnerCtrl',
"label": "CHN",
"value": "CHN"
}];
var cleanDays = [{
"label": "T+1",
"value": "1"
}, {
"label": "T+2",
"value": "2"
}, {
"label": "T+3",
"value": "3"
}];
var stateMap = [
{
"label": "ACT",
@ -43,6 +54,7 @@ angular.module('applyPartnerApp', ['ngMessages']).controller('applyPartnerCtrl',
$scope.name_exist = false;
$scope.states = angular.copy(stateMap);
$scope.countries = angular.copy(countryMap);
$scope.cleanDays = angular.copy(cleanDays);
$scope.seconds = 6;
$scope.canClick=false;
$scope.description = "Send Code";
@ -69,8 +81,7 @@ angular.module('applyPartnerApp', ['ngMessages']).controller('applyPartnerCtrl',
})
}
};
$scope.disabledArray = new Array(true, false, false, false, false);
$scope.chooseArray = new Array(false, true, false, false, false);
$scope.chooseArray = new Array(true, false, false, false, false);
$scope.changeChoose = function (index) {
angular.forEach($scope.partner, function(key, value) {
if(value.trim()==''){
@ -79,8 +90,6 @@ angular.module('applyPartnerApp', ['ngMessages']).controller('applyPartnerCtrl',
});
$scope.chooseArray = new Array(false, false, false, false, false);
$scope.chooseArray[index] = true;
$scope.disabledArray[index] = true;
};
$scope.getRateConfig = function () {
$http.get('/sys/partners/sys_rates').then(function (resp) {
@ -113,9 +122,20 @@ angular.module('applyPartnerApp', ['ngMessages']).controller('applyPartnerCtrl',
}
},1000)
};
$scope.checkEmail = function () {
$scope.trueEmail = false;
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.sendVerificationCode = function () {
$scope.sendPhoneCodeTime();
$http.post('/register/info/phone/'+ $scope.partner.contact_phone +'/verify').then(function (resp) {
$http.post('/register/info/phone/'+ $scope.partner.contact_phone +'/verify?'+'nation_code=61').then(function (resp) {
}, function (resp) {
$scope.resError = resp.data.message;
});
@ -126,6 +146,7 @@ angular.module('applyPartnerApp', ['ngMessages']).controller('applyPartnerCtrl',
};
$scope.searchBankInfo = function (bsb_no) {
if (bsb_no != null && bsb_no != "") {
$scope.showBankInfo = false;
$http.get('/register/info/bank/' + bsb_no).then(function (resp) {
$scope.bankInfo = resp.data;
$scope.bankaccount.bank = $scope.bankInfo.bank;
@ -135,6 +156,9 @@ angular.module('applyPartnerApp', ['ngMessages']).controller('applyPartnerCtrl',
$scope.bankaccount.postcode = $scope.bankInfo.postcode;
$scope.bankaccount.state = $scope.bankInfo.state;
$scope.bankaccount.branch = $scope.bankInfo.branch;
$scope.showBankInfo = true;
}, function (resp) {
$scope.showBankInfo = false;
});
} else {
$scope.resError = "请先填写BSB No";
@ -142,6 +166,7 @@ angular.module('applyPartnerApp', ['ngMessages']).controller('applyPartnerCtrl',
};
$scope.changeDays = function (clean_days) {
if (clean_days) {
$scope.showCleanDay = false;
switch (clean_days) {
case '1': {
$scope.rate.wechat_rate_value = parseFloat($scope.sysRateConfig.t1.Wechat);
@ -149,6 +174,7 @@ angular.module('applyPartnerApp', ['ngMessages']).controller('applyPartnerCtrl',
$scope.rate.alipayonline_rate_value = parseFloat($scope.sysRateConfig.t1.AlipayOnline);
$scope.rate.bestpay_rate_value = parseFloat($scope.sysRateConfig.t1.Bestpay);
$scope.rate.jd_rate_value = parseFloat($scope.sysRateConfig.t1.JDpay);
$scope.showCleanDay = true;
break;
}
case '2': {
@ -157,6 +183,7 @@ angular.module('applyPartnerApp', ['ngMessages']).controller('applyPartnerCtrl',
$scope.rate.bestpay_rate_value = parseFloat($scope.sysRateConfig.t2.Bestpay);
$scope.rate.alipayonline_rate_value = parseFloat($scope.sysRateConfig.t2.AlipayOnline);
$scope.rate.jd_rate_value = parseFloat($scope.sysRateConfig.t2.JDpay);
$scope.showCleanDay = true;
break;
}
case '3': {
@ -165,9 +192,12 @@ angular.module('applyPartnerApp', ['ngMessages']).controller('applyPartnerCtrl',
$scope.rate.bestpay_rate_value = parseFloat($scope.sysRateConfig.t3.Bestpay);
$scope.rate.alipayonline_rate_value = parseFloat($scope.sysRateConfig.t3.AlipayOnline);
$scope.rate.jd_rate_value = parseFloat($scope.sysRateConfig.t3.JDpay);
$scope.showCleanDay = true;
break;
}
}
}else {
$scope.showCleanDay = false;
}
};
@ -181,11 +211,12 @@ angular.module('applyPartnerApp', ['ngMessages']).controller('applyPartnerCtrl',
return;
}
$scope.initParam();
$scope.partner.username = $scope.partner.contact_phone;
$http.post('/register/info/update/' + $scope.partner.username +'/step1', $scope.partner).then(function (resp) {
$scope.changeChoose(index);
$scope.partner.codeKey = resp.data.codeKey;
}, function (resp) {
$scope.resError = resp.data.message;
$scope.resError = "请稍后重试";
});
};

Loading…
Cancel
Save