Commit 9a222984 by Chao Sun

bug修复

parent 54a54603
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
<div id="app"><!--app-html--></div> <div id="app"><!--app-html--></div>
<script type="module" src="/main.js"></script> <script type="module" src="/main.js"></script>
<!-- 移动端调试 --> <!-- 移动端调试 -->
<!-- <script type="text/javascript" src="//cdn.jsdelivr.net/npm/eruda"></script> <script type="text/javascript" src="//cdn.jsdelivr.net/npm/eruda"></script>
<script>eruda.init();</script> --> <script>eruda.init();</script>
</body> </body>
</html> </html>
...@@ -262,7 +262,7 @@ ...@@ -262,7 +262,7 @@
} }
if(dataHandling.getQueryString('openId')) { if(dataHandling.getQueryString('openId')) {
uni.setStorageSync('openId',dataHandling.getQueryString('openId')) uni.setStorageSync('openId',dataHandling.getQueryString('openId'))
}else if(!uni.getStorageSync('openId')){ }else if(!dataHandling.getQueryString('openId') && dataHandling.getQueryString('isBack') != 1){
api.getWxUserInfo({userApplyType:'1',businessNo:uni.getStorageSync('businessNo')}).then(res=>{ api.getWxUserInfo({userApplyType:'1',businessNo:uni.getStorageSync('businessNo')}).then(res=>{
if(res['success']){ if(res['success']){
window.location.href = res.data.paymentForm.action; window.location.href = res.data.paymentForm.action;
...@@ -317,6 +317,11 @@ ...@@ -317,6 +317,11 @@
this.irrAndSimpleCalcuteParam.allFirstPayment = null; this.irrAndSimpleCalcuteParam.allFirstPayment = null;
if(this.withdrawalType == '1'){ if(this.withdrawalType == '1'){
this.yearWithdrawalInfos = []; this.yearWithdrawalInfos = [];
}else{
this.yearWithdrawalInfos = [].concat([{withdrawalType:'2',
withdrawalStart:null,
yearWithdrawalAmount:null,
withdrawalEnd:null}]);
} }
} }
this.resultShowFlag = false; this.resultShowFlag = false;
...@@ -338,6 +343,7 @@ ...@@ -338,6 +343,7 @@
this.errorDialog(1,`年交保费为必填项`); this.errorDialog(1,`年交保费为必填项`);
return false; return false;
} }
//提领信息判断
if(this.yearWithdrawalInfos && this.yearWithdrawalInfos.length>0){ if(this.yearWithdrawalInfos && this.yearWithdrawalInfos.length>0){
for (let i = 0; i < this.yearWithdrawalInfos.length; i++) { for (let i = 0; i < this.yearWithdrawalInfos.length; i++) {
//增额提领信息校验 //增额提领信息校验
...@@ -346,7 +352,7 @@ ...@@ -346,7 +352,7 @@
this.errorDialog(1,`请输入第${i+1}行提领起领年度和止领年度,且该保单年度必须大于0`); this.errorDialog(1,`请输入第${i+1}行提领起领年度和止领年度,且该保单年度必须大于0`);
return false; return false;
}else{ }else{
if(this.yearWithdrawalInfos[i].withdrawalEnd < this.yearWithdrawalInfos[i].withdrawalStart){ if(Number(this.yearWithdrawalInfos[i].withdrawalStart) > Number(this.yearWithdrawalInfos[i].withdrawalEnd)){
this.errorDialog(2,`第${i+1}行,起领年度必须小于等于止领年度!`); this.errorDialog(2,`第${i+1}行,起领年度必须小于等于止领年度!`);
return false; return false;
} }
...@@ -354,7 +360,7 @@ ...@@ -354,7 +360,7 @@
if(this.yearWithdrawalInfos[i]['yearWithdrawalAmount'] && this.yearWithdrawalInfos[i]['yearWithdrawalAmount']<=0){ if(this.yearWithdrawalInfos[i]['yearWithdrawalAmount'] && this.yearWithdrawalInfos[i]['yearWithdrawalAmount']<=0){
this.errorDialog(2,`第${i+1}行,提领金额必须大于0`); this.errorDialog(2,`第${i+1}行,提领金额必须大于0`);
return false; return false;
}else if(this.yearWithdrawalInfos[i]['yearWithdrawalAmount'] > 999999999999999){ }else if(Number(this.yearWithdrawalInfos[i]['yearWithdrawalAmount']) > 999999999999999){
this.errorDialog(2,`第${i+1}行,提领金额必须小于999,999,999,999,999`); this.errorDialog(2,`第${i+1}行,提领金额必须小于999,999,999,999,999`);
return false; return false;
}else{ }else{
...@@ -378,7 +384,7 @@ ...@@ -378,7 +384,7 @@
this.errorDialog(1,'提领金额必须大于等于0'); this.errorDialog(1,'提领金额必须大于等于0');
return false; return false;
} }
if(this.yearWithdrawalInfos[i]['yearWithdrawalAmount']>999999999999999){ if(Number(this.yearWithdrawalInfos[i]['yearWithdrawalAmount']>999999999999999)){
this.errorDialog(1,'提领金额必须小于999,999,999,999,999'); this.errorDialog(1,'提领金额必须小于999,999,999,999,999');
return false; return false;
} }
...@@ -490,28 +496,31 @@ ...@@ -490,28 +496,31 @@
//增额提领信息校验 //增额提领信息校验
if(this.calcuteType == 1){ if(this.calcuteType == 1){
if(!this.yearWithdrawalInfos[i].withdrawalStart || !this.yearWithdrawalInfos[i].withdrawalEnd || this.yearWithdrawalInfos[i].withdrawalStart<=0 || this.yearWithdrawalInfos[i].withdrawalEnd<=0){ if(!this.yearWithdrawalInfos[i].withdrawalStart || !this.yearWithdrawalInfos[i].withdrawalEnd || this.yearWithdrawalInfos[i].withdrawalStart<=0 || this.yearWithdrawalInfos[i].withdrawalEnd<=0){
this.errorDialog(2,`请输入第${i+1}行起领年度和止领年度,且该年度必须大于0!`); this.errorDialog(1,`请输入第${i+1}行提领起领年度和止领年度,且该保单年度必须大于0`);
return false; return false;
}else{ }else{
if(this.yearWithdrawalInfos[i].withdrawalEnd < this.yearWithdrawalInfos[i].withdrawalStart){ if(Number(this.yearWithdrawalInfos[i].withdrawalStart) > Number(this.yearWithdrawalInfos[i].withdrawalEnd)){
this.errorDialog(2,`第${i+1}行,起领年度必须小于等于止领年度!`); this.errorDialog(2,`第${i+1}行,起领年度必须小于等于止领年度!`);
return false; return false;
} }
} }
if(this.yearWithdrawalInfos[i]['yearWithdrawalAmount'] && this.yearWithdrawalInfos[i]['yearWithdrawalAmount']<0){ if(this.yearWithdrawalInfos[i]['yearWithdrawalAmount'] && this.yearWithdrawalInfos[i]['yearWithdrawalAmount']<=0){
this.errorDialog(2,`第${i+1}行,提领金额必须大于0!`); this.errorDialog(2,`第${i+1}行,提领金额必须大于0`);
return false;
}else if(Number(this.yearWithdrawalInfos[i]['yearWithdrawalAmount']) > 999999999999999){
this.errorDialog(2,`第${i+1}行,提领金额必须小于999,999,999,999,999`);
return false; return false;
}else{ }else{
if(!this.yearWithdrawalInfos[i]['yearWithdrawalAmount']){ if(!this.yearWithdrawalInfos[i]['yearWithdrawalAmount']){
this.errorDialog(2,`请输入第${i+1}行,提领金额!`); this.errorDialog(1,`请输入第${i+1}行,提领金额`);
return false; return false;
} }
} }
} }
//年金提领信息校验 //年金提领信息校验
if(this.calcuteType == 2){ if(this.calcuteType == '2'){
if(!this.yearWithdrawalInfos[i]['withdrawalStart'] || this.yearWithdrawalInfos[i]['withdrawalStart']<=0){ if(!this.yearWithdrawalInfos[i]['withdrawalStart'] || this.yearWithdrawalInfos[i]['withdrawalStart']<0){
this.errorDialog(2,`请输入提领信息保单年度,且年度值必须大于0!`); this.errorDialog(1,`请输入提领信息保单年度,且年度值必须大于0`);
return false; return false;
} }
if(!this.yearWithdrawalInfos[i]['yearWithdrawalAmount']){ if(!this.yearWithdrawalInfos[i]['yearWithdrawalAmount']){
...@@ -522,7 +531,7 @@ ...@@ -522,7 +531,7 @@
this.errorDialog(1,'提领金额必须大于等于0'); this.errorDialog(1,'提领金额必须大于等于0');
return false; return false;
} }
if(this.yearWithdrawalInfos[i]['yearWithdrawalAmount']>999999999999999){ if(Number(this.yearWithdrawalInfos[i]['yearWithdrawalAmount']>999999999999999)){
this.errorDialog(1,'提领金额必须小于999,999,999,999,999'); this.errorDialog(1,'提领金额必须小于999,999,999,999,999');
return false; return false;
} }
...@@ -535,7 +544,7 @@ ...@@ -535,7 +544,7 @@
this.errorDialog(1,`请输入现金价值年度!`); this.errorDialog(1,`请输入现金价值年度!`);
return false; return false;
}else{ }else{
if(this.irrAndSimple.nyear>105){ if(Number(this.irrAndSimple.nyear)>105){
this.errorDialog(2,`现金价值年度不能大于105!`); this.errorDialog(2,`现金价值年度不能大于105!`);
return false; return false;
} }
...@@ -547,6 +556,11 @@ ...@@ -547,6 +556,11 @@
if(!this.irrAndSimple.cashValue || this.irrAndSimple.cashValue<0){ if(!this.irrAndSimple.cashValue || this.irrAndSimple.cashValue<0){
this.errorDialog(1,'请输入现金价值且现金价值只能大于或等于0!'); this.errorDialog(1,'请输入现金价值且现金价值只能大于或等于0!');
return false; return false;
}else{
if(Number(this.irrAndSimple.cashValue) > 999999999999999){
this.errorDialog(1,'现金价值必须小于999,999,999,999,999');
return false;
}
} }
} }
const params = { const params = {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment