Commit 9a222984 by Chao Sun

bug修复

parent 54a54603
......@@ -17,7 +17,7 @@
<div id="app"><!--app-html--></div>
<script type="module" src="/main.js"></script>
<!-- 移动端调试 -->
<!-- <script type="text/javascript" src="//cdn.jsdelivr.net/npm/eruda"></script>
<script>eruda.init();</script> -->
<script type="text/javascript" src="//cdn.jsdelivr.net/npm/eruda"></script>
<script>eruda.init();</script>
</body>
</html>
......@@ -262,7 +262,7 @@
}
if(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=>{
if(res['success']){
window.location.href = res.data.paymentForm.action;
......@@ -317,6 +317,11 @@
this.irrAndSimpleCalcuteParam.allFirstPayment = null;
if(this.withdrawalType == '1'){
this.yearWithdrawalInfos = [];
}else{
this.yearWithdrawalInfos = [].concat([{withdrawalType:'2',
withdrawalStart:null,
yearWithdrawalAmount:null,
withdrawalEnd:null}]);
}
}
this.resultShowFlag = false;
......@@ -338,54 +343,55 @@
this.errorDialog(1,`年交保费为必填项`);
return false;
}
//提领信息判断
if(this.yearWithdrawalInfos && this.yearWithdrawalInfos.length>0){
for (let i = 0; i < this.yearWithdrawalInfos.length; i++) {
//增额提领信息校验
if(this.calcuteType == 1){
if(!this.yearWithdrawalInfos[i].withdrawalStart || !this.yearWithdrawalInfos[i].withdrawalEnd || this.yearWithdrawalInfos[i].withdrawalStart<=0 || this.yearWithdrawalInfos[i].withdrawalEnd<=0){
this.errorDialog(1,`请输入第${i+1}行提领起领年度和止领年度,且该保单年度必须大于0`);
return false;
}else{
if(this.yearWithdrawalInfos[i].withdrawalEnd < this.yearWithdrawalInfos[i].withdrawalStart){
this.errorDialog(2,`第${i+1}行,起领年度必须小于等于止领年度!`);
//增额提领信息校验
if(this.calcuteType == 1){
if(!this.yearWithdrawalInfos[i].withdrawalStart || !this.yearWithdrawalInfos[i].withdrawalEnd || this.yearWithdrawalInfos[i].withdrawalStart<=0 || this.yearWithdrawalInfos[i].withdrawalEnd<=0){
this.errorDialog(1,`请输入第${i+1}行提领起领年度和止领年度,且该保单年度必须大于0`);
return false;
}else{
if(Number(this.yearWithdrawalInfos[i].withdrawalStart) > Number(this.yearWithdrawalInfos[i].withdrawalEnd)){
this.errorDialog(2,`第${i+1}行,起领年度必须小于等于止领年度!`);
return false;
}
}
}
if(this.yearWithdrawalInfos[i]['yearWithdrawalAmount'] && this.yearWithdrawalInfos[i]['yearWithdrawalAmount']<=0){
this.errorDialog(2,`第${i+1}行,提领金额必须大于0`);
return false;
}else if(this.yearWithdrawalInfos[i]['yearWithdrawalAmount'] > 999999999999999){
this.errorDialog(2,`第${i+1}行,提领金额必须小于999,999,999,999,999`);
return false;
}else{
if(!this.yearWithdrawalInfos[i]['yearWithdrawalAmount']){
this.errorDialog(1,`请输入第${i+1}行,提领金额`);
if(this.yearWithdrawalInfos[i]['yearWithdrawalAmount'] && this.yearWithdrawalInfos[i]['yearWithdrawalAmount']<=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;
}else{
if(!this.yearWithdrawalInfos[i]['yearWithdrawalAmount']){
this.errorDialog(1,`请输入第${i+1}行,提领金额`);
return false;
}
}
}
}
//年金提领信息校验
if(this.calcuteType == '2'){
if(!this.yearWithdrawalInfos[i]['withdrawalStart'] || this.yearWithdrawalInfos[i]['withdrawalStart']<0){
this.errorDialog(1,`请输入提领信息保单年度,且年度值必须大于0`);
return false;
}
if(!this.yearWithdrawalInfos[i]['yearWithdrawalAmount']){
this.errorDialog(1,'请输入提领金额');
return false;
}else{
if(this.yearWithdrawalInfos[i]['yearWithdrawalAmount']<0){
this.errorDialog(1,'提领金额必须大于等于0');
//年金提领信息校验
if(this.calcuteType == '2'){
if(!this.yearWithdrawalInfos[i]['withdrawalStart'] || this.yearWithdrawalInfos[i]['withdrawalStart']<0){
this.errorDialog(1,`请输入提领信息保单年度,且年度值必须大于0`);
return false;
}
if(this.yearWithdrawalInfos[i]['yearWithdrawalAmount']>999999999999999){
this.errorDialog(1,'提领金额必须小于999,999,999,999,999');
if(!this.yearWithdrawalInfos[i]['yearWithdrawalAmount']){
this.errorDialog(1,'请输入提领金额');
return false;
}else{
if(this.yearWithdrawalInfos[i]['yearWithdrawalAmount']<0){
this.errorDialog(1,'提领金额必须大于等于0');
return false;
}
if(Number(this.yearWithdrawalInfos[i]['yearWithdrawalAmount']>999999999999999)){
this.errorDialog(1,'提领金额必须小于999,999,999,999,999');
return false;
}
}
}
}
}
}
// 输入批量数据,缓存当页数据
const calcuteData = {
paymentPeriod:this.irrAndSimpleCalcuteParam.paymentPeriod,
......@@ -487,55 +493,58 @@
//提领信息判断
if(this.yearWithdrawalInfos && this.yearWithdrawalInfos.length>0){
for (let i = 0; i < this.yearWithdrawalInfos.length; i++) {
//增额提领信息校验
if(this.calcuteType == 1){
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!`);
return false;
}else{
if(this.yearWithdrawalInfos[i].withdrawalEnd < this.yearWithdrawalInfos[i].withdrawalStart){
this.errorDialog(2,`第${i+1}行,起领年度必须小于等于止领年度!`);
//增额提领信息校验
if(this.calcuteType == 1){
if(!this.yearWithdrawalInfos[i].withdrawalStart || !this.yearWithdrawalInfos[i].withdrawalEnd || this.yearWithdrawalInfos[i].withdrawalStart<=0 || this.yearWithdrawalInfos[i].withdrawalEnd<=0){
this.errorDialog(1,`请输入第${i+1}行提领起领年度和止领年度,且该保单年度必须大于0`);
return false;
}else{
if(Number(this.yearWithdrawalInfos[i].withdrawalStart) > Number(this.yearWithdrawalInfos[i].withdrawalEnd)){
this.errorDialog(2,`第${i+1}行,起领年度必须小于等于止领年度!`);
return false;
}
}
}
if(this.yearWithdrawalInfos[i]['yearWithdrawalAmount'] && this.yearWithdrawalInfos[i]['yearWithdrawalAmount']<0){
this.errorDialog(2,`第${i+1}行,提领金额必须大于0!`);
return false;
}else{
if(!this.yearWithdrawalInfos[i]['yearWithdrawalAmount']){
this.errorDialog(2,`请输入第${i+1}行,提领金额!`);
if(this.yearWithdrawalInfos[i]['yearWithdrawalAmount'] && this.yearWithdrawalInfos[i]['yearWithdrawalAmount']<=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;
}else{
if(!this.yearWithdrawalInfos[i]['yearWithdrawalAmount']){
this.errorDialog(1,`请输入第${i+1}行,提领金额`);
return false;
}
}
}
}
//年金提领信息校验
if(this.calcuteType == 2){
if(!this.yearWithdrawalInfos[i]['withdrawalStart'] || this.yearWithdrawalInfos[i]['withdrawalStart']<=0){
this.errorDialog(2,`请输入提领信息保单年度,且年度值必须大于0!`);
return false;
}
if(!this.yearWithdrawalInfos[i]['yearWithdrawalAmount']){
this.errorDialog(1,'请输入提领金额');
return false;
}else{
if(this.yearWithdrawalInfos[i]['yearWithdrawalAmount']<0){
this.errorDialog(1,'提领金额必须大于等于0');
//年金提领信息校验
if(this.calcuteType == '2'){
if(!this.yearWithdrawalInfos[i]['withdrawalStart'] || this.yearWithdrawalInfos[i]['withdrawalStart']<0){
this.errorDialog(1,`请输入提领信息保单年度,且年度值必须大于0`);
return false;
}
if(this.yearWithdrawalInfos[i]['yearWithdrawalAmount']>999999999999999){
this.errorDialog(1,'提领金额必须小于999,999,999,999,999');
if(!this.yearWithdrawalInfos[i]['yearWithdrawalAmount']){
this.errorDialog(1,'请输入提领金额');
return false;
}else{
if(this.yearWithdrawalInfos[i]['yearWithdrawalAmount']<0){
this.errorDialog(1,'提领金额必须大于等于0');
return false;
}
if(Number(this.yearWithdrawalInfos[i]['yearWithdrawalAmount']>999999999999999)){
this.errorDialog(1,'提领金额必须小于999,999,999,999,999');
return false;
}
}
}
}
}
}
if(this.calcuteMethod == 1){
if(!this.irrAndSimple.nyear && this.irrAndSimple.nyear!=0){
this.errorDialog(1,`请输入现金价值年度!`);
return false;
}else{
if(this.irrAndSimple.nyear>105){
if(Number(this.irrAndSimple.nyear)>105){
this.errorDialog(2,`现金价值年度不能大于105!`);
return false;
}
......@@ -547,6 +556,11 @@
if(!this.irrAndSimple.cashValue || this.irrAndSimple.cashValue<0){
this.errorDialog(1,'请输入现金价值且现金价值只能大于或等于0!');
return false;
}else{
if(Number(this.irrAndSimple.cashValue) > 999999999999999){
this.errorDialog(1,'现金价值必须小于999,999,999,999,999');
return false;
}
}
}
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