Commit 9f94847a by Sweet Zhang

数字类型判断

parent 7c2c85bd
......@@ -114,7 +114,6 @@
selectCustomPolicyYear(){
this.policyYearModalFlag=true;
this.irrAndSimpleInfos = this.policyYearLists = [];
console.log(this.irrAndSimpleInfos)
},
// 选择保单年度区间
selectPolicyYearRange(e){
......@@ -213,10 +212,10 @@
}
console.log(this.policyYearLists)
for(let i=0;i<this.policyYearLists.length;i++){
if(this.policyYearLists[i].cashValue<0 || isNaN(this.policyYearLists[i].cashValue)){
if(this.policyYearLists[i].cashValue<0 || isNaN(this.policyYearLists[i].cashValue || this.policyYearLists[i].cashValue > 999999999999999)){
uni.showModal({
title: '数据格式输入错误',
content: `保单年度为${this.policyYearLists[i].nyear}时,现金价值格式错误,须为大于或等于0的数字类型`,
content: `保单年度为${this.policyYearLists[i].nyear}时,现金价值格式错误,须为大于或等于0且必须小于999,999,999,999,999的数字类型`,
showCancel:false,
success: function (res) {
if (res.confirm) {
......
......@@ -510,8 +510,8 @@
return false;
}
}
if(!this.irrAndSimple.nyear){
this.errorDialog(1,`生存总利益未输入!`);
if(!this.irrAndSimple.cashValue){
this.errorDialog(1,`${irrAndSimpleCalcuteParam.allFirstPayment > 0} ? '总生存利益(万能账户现价+现金价值)' :'现金价值'未输入!`);
return false;
}
}
......
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