Commit 703785f2 by Chao Sun

提交校验

parent df8a9104
...@@ -390,9 +390,9 @@ ...@@ -390,9 +390,9 @@
}) })
return; return;
}else{ }else{
if(this.irrAndSimpleCalcuteParam.paymentPeriod >100 ){ if(this.irrAndSimpleCalcuteParam.paymentPeriod >50 ){
uni.showToast({ uni.showToast({
title: '交费年限不能大于100年!', title: '交费年限一般不大于50年,请确认!',
duration: 2000, duration: 2000,
icon: 'none' icon: 'none'
}) })
...@@ -414,21 +414,24 @@ ...@@ -414,21 +414,24 @@
icon: 'none' icon: 'none'
}) })
return; return;
}else if(this.irrAndSimpleCalcuteParam.annualPremium > 1000000000){ }else{
if(this.irrAndSimpleCalcuteParam.annualPremium > 1000000000){
uni.showToast({ uni.showToast({
title: '年交保费不能大于1,000,000,000', title: '年交保费不能大于1,000,000,000',
duration: 2000, duration: 2000,
icon: 'none' icon: 'none'
}) })
return; return;
}else if(this.irrAndSimpleCalcuteParam.annualPremium < 0){ }
if(this.irrAndSimpleCalcuteParam.annualPremium < 0){
uni.showToast({ uni.showToast({
title: '年交保费不能小于0', title: '年交保费必须大于0',
duration: 2000, duration: 2000,
icon: 'none' icon: 'none'
}) })
return; return;
} }
}
if(this.irrAndSimpleCalcuteParam.allFirstPayment && this.irrAndSimpleCalcuteParam.allFirstPayment < 0){ if(this.irrAndSimpleCalcuteParam.allFirstPayment && this.irrAndSimpleCalcuteParam.allFirstPayment < 0){
uni.showToast({ uni.showToast({
title: '万能账户首年交费信息须大于或等于0', title: '万能账户首年交费信息须大于或等于0',
...@@ -447,15 +450,84 @@ ...@@ -447,15 +450,84 @@
return; return;
} }
} }
//提领信息判断
if(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){
uni.showToast({
title: `请输入第${i+1}行提领开始日期和结束日期,且该日期必须大于0`,
duration: 2000,
icon: 'none'
})
return;
}else{
if(this.yearWithdrawalInfos[i].withdrawalEnd > this.yearWithdrawalInfos[i].withdrawalStart){
uni.showToast({
title: `第${i+1}行,提领开始日期必须小于等于提领结束日期!`,
duration: 2000,
icon: 'none'
})
return;
}
}
if(this.yearWithdrawalInfos[i]['yearWithdrawalAmount'] && this.yearWithdrawalInfos[i]['yearWithdrawalAmount']<0){
uni.showToast({
title: `第${i+1}行,提领金额必须大于0`,
duration: 2000,
icon: 'none'
})
return;
}else{
uni.showToast({
title: `请输入第${i+1}行,提领金额`,
duration: 2000,
icon: 'none'
})
return;
}
}
//年金提领信息校验
if(this.calcuteType == 2){
if(!this.yearWithdrawalInfos[i]['withdrawalStart'] || this.yearWithdrawalInfos[i]['withdrawalStart']<0){
uni.showToast({
title: '请输入提领信息保单年度,且年度值必须大于0',
duration: 2000,
icon: 'none'
})
return;
}
}
}
}
if(this.calcuteMethod == 1){ if(this.calcuteMethod == 1){
if(!this.irrAndSimple.nyear){ if(!this.irrAndSimple.nyear && this.irrAndSimple.nyear!=0){
uni.showToast({ uni.showToast({
title: '现金价值年度未输入!', title: '请输入现金价值年度!',
duration: 2000,
icon: 'none'
})
return;
}else{
if(this.irrAndSimple.nyear>100){
uni.showToast({
title: '现金价值年度不能大于100!',
duration: 2000, duration: 2000,
icon: 'none' icon: 'none'
}) })
return; return;
} }
if(this.irrAndSimple.nyear<0){
uni.showToast({
title: '现金价值年度必须大于0!',
duration: 2000,
icon: 'none'
})
return;
}
}
if(!this.irrAndSimple.nyear){ if(!this.irrAndSimple.nyear){
uni.showToast({ uni.showToast({
title: '生存总利益未输入!', title: '生存总利益未输入!',
...@@ -464,10 +536,6 @@ ...@@ -464,10 +536,6 @@
}) })
return; return;
} }
//年金单次计算时,有提领信息
if(this.calcuteType == 2 && this.yearWithdrawalInfos && this.yearWithdrawalInfos.length>0){
this.yearWithdrawalInfos[0].withdrawalEnd = Number(this.irrAndSimple.nyear)
}
} }
const params = { const params = {
...this.irrAndSimpleCalcuteParam, ...this.irrAndSimpleCalcuteParam,
......
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