Commit 7c2c85bd by Sweet Zhang

报错弹窗修改

parent 4ba71484
......@@ -35,7 +35,7 @@
<scroll-view scroll-y="true" style="height: 560rpx;">
<view class="batchDataTd" v-for="item in irrAndSimpleInfos">
<text>{{item.nyear}}</text>
<input class="uni-input" style="height: 100%;" type="digit" v-model="item.cashValue" placeholder="请输入纯数字" />
<input class="uni-input" style="height: 100%;" type="digit" v-model="item.cashValue" placeholder="请输入数字,例如10000" maxlength="17"/>
</view>
</scroll-view>
</view>
......
......@@ -38,7 +38,7 @@
<view class="inputItem">
<text>年交保费:</text>
<view class="inputContent">
<input class="uni-input" type="digit" placeholder="请输入"
<input class="uni-input" type="digit" placeholder="请输入" maxlength="17"
v-model.trim="irrAndSimpleCalcuteParam.annualPremium"
/><label for=""></label>
</view>
......@@ -46,7 +46,7 @@
<view class="inputItem" v-show="calcuteType==='2'">
<text>万能账户首年交费<text style="font-size: 24rpx;">(如有)</text></text>
<view class="inputContent">
<input class="uni-input" type="number" placeholder="请输入"
<input class="uni-input" type="digit" placeholder="请输入" maxlength="17"
v-model.trim="irrAndSimpleCalcuteParam.allFirstPayment" @input="withdrawalTypeInit()"
/><label for=""></label>
</view>
......@@ -72,14 +72,14 @@
<view class="inputItem">
<text>从第几个保单年度开始提取:</text>
<view class="inputContent">
<input class="uni-input" type="number" placeholder="请输入"
<input class="uni-input" type="number" placeholder="请输入" maxlength="3"
v-model="item.withdrawalStart"/><label for=""></label>
</view>
</view>
<view class="inputItem">
<text style="white-space: nowrap;">每年提取金额:</text>
<view class="inputContent">
<input class="uni-input" type="number" placeholder="请输入"
<input class="uni-input" type="digit" placeholder="请输入" maxlength="17"
v-model="item.yearWithdrawalAmount" /><label for=""></label>
</view>
</view>
......@@ -98,7 +98,7 @@
v-model="item.withdrawalStart"/>
<input class="uni-input" type="number" placeholder="请输入"
v-model="item.withdrawalEnd"/>
<input class="uni-input withdrawNumber" type="number" placeholder="请输入"
<input class="uni-input withdrawNumber" type="digit" placeholder="请输入" maxlength="17"
v-model="item.yearWithdrawalAmount"/>
<view v-show="yearWithdrawalInfos.length>1">
<text @click="reduce(idx)"><svg t="1662455801913" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3447" width="20" height="20"><path d="M512 0c-285.257143 0-512 226.742857-512 512s226.742857 512 512 512 512-226.742857 512-512-226.742857-512-512-512z m0 950.857143c-241.371429 0-438.857143-197.485714-438.857143-438.857143s197.485714-438.857143 438.857143-438.857143 438.857143 197.485714 438.857143 438.857143-197.485714 438.857143-438.857143 438.857143z" p-id="3448" fill="#CEB07D"></path><path d="M731.428571 475.428571h-438.857142c-21.942857 0-36.571429 14.628571-36.571429 36.571429s14.628571 36.571429 36.571429 36.571429h438.857142c21.942857 0 36.571429-14.628571 36.571429-36.571429s-14.628571-36.571429-36.571429-36.571429z" p-id="3449" fill="#CEB07D"></path></svg></text>
......@@ -122,7 +122,7 @@
<view class="inputItem">
<text>第:</text>
<view class="inputContent">
<input class="uni-input" type="number" placeholder="请输入" min='1'
<input class="uni-input" type="number" placeholder="请输入" min='1' maxlength="3"
v-model="irrAndSimple.nyear"/>
<label for=""></label>
</view>
......@@ -130,7 +130,7 @@
<view class="inputItem">
<text>{{irrAndSimpleCalcuteParam.allFirstPayment > 0 ? '总生存利益(万能账户现价+现金价值)' :'现金价值'}}:</text>
<view class="inputContent">
<input class="uni-input" type="number" placeholder="请输入" min='1'
<input class="uni-input" type="digit" placeholder="请输入" min='1' maxlength="17"
v-model="irrAndSimple.cashValue"/>
<label for=""></label>
</view>
......@@ -230,7 +230,7 @@
}
},
components:{
dataImport
dataImport
},
onLoad() {
if(dataHandling.getQueryString('isBack') == 1){
......@@ -296,7 +296,6 @@
}
}
});
return;
},
// 当有万能账户时,提领信息清空
withdrawalTypeInit(){
......@@ -333,9 +332,11 @@
//批量
if(!this.irrAndSimpleCalcuteParam.paymentPeriod || this.irrAndSimpleCalcuteParam.paymentPeriod==0){
this.errorDialog(1,`交费年限为必填项且必须大于0`);
return false;
}
if(!this.irrAndSimpleCalcuteParam.annualPremium){
this.errorDialog(1,`年交保费为必填项`);
return false;
}
if(this.yearWithdrawalInfos && this.yearWithdrawalInfos.length>0){
for (let i = 0; i < this.yearWithdrawalInfos.length; i++) {
......@@ -343,16 +344,20 @@
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}行,起领年度必须小于等于止领年度!`);
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(1,`请输入第${i+1}行,提领金额`);
return false;
}
}
}
......@@ -360,6 +365,7 @@
if(this.calcuteType == '2'){
if(!this.yearWithdrawalInfos[i]['withdrawalStart'] || this.yearWithdrawalInfos[i]['withdrawalStart']<0){
this.errorDialog(1,`请输入提领信息保单年度,且年度值必须大于0`);
return false;
}
}
}
......@@ -427,27 +433,34 @@
irrAndSimpleCalte(){
if(!this.irrAndSimpleCalcuteParam.paymentPeriod || this.irrAndSimpleCalcuteParam.paymentPeriod <= 0){
this.errorDialog(1,`交费年限为必填项且必须大于0`);
return false;
}else{
if(this.irrAndSimpleCalcuteParam.paymentPeriod >50 ){
this.errorDialog(2,`交费年限一般不大于50年,请确认!`);
return false;
}
}
if(!this.irrAndSimpleCalcuteParam.annualPremium){
this.errorDialog(1,`年交保费为必填项!`);
return false;
}else{
if(this.irrAndSimpleCalcuteParam.annualPremium > 1000000000){
this.errorDialog(2,`年交保费不能大于1,000,000,000!`);
if(this.irrAndSimpleCalcuteParam.annualPremium > 999999999999999){
this.errorDialog(2,`年交保费不能大于999,999,999,999,999!`);
return false;
}
if(this.irrAndSimpleCalcuteParam.annualPremium <= 0){
this.errorDialog(2,`年交保费必须大于0!`);
return false;
}
}
if(this.irrAndSimpleCalcuteParam.allFirstPayment && this.irrAndSimpleCalcuteParam.allFirstPayment < 0){
this.errorDialog(2,`万能账户首年交费信息须大于或等于0!`);
return false;
}
if(this.businessType == 2){
if(!this.mobile){
this.errorDialog(1,`保存时手机号必填!`);
return false;
}
}
//提领信息判断
......@@ -457,16 +470,20 @@
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}行,起领年度必须小于等于止领年度!`);
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}行,提领金额!`);
return false;
}
}
}
......@@ -474,6 +491,7 @@
if(this.calcuteType == 2){
if(!this.yearWithdrawalInfos[i]['withdrawalStart'] || this.yearWithdrawalInfos[i]['withdrawalStart']<=0){
this.errorDialog(2,`请输入提领信息保单年度,且年度值必须大于0!`);
return false;
}
}
}
......@@ -481,16 +499,20 @@
if(this.calcuteMethod == 1){
if(!this.irrAndSimple.nyear && this.irrAndSimple.nyear!=0){
this.errorDialog(1,`请输入现金价值年度!`);
return false;
}else{
if(this.irrAndSimple.nyear>105){
this.errorDialog(2,`现金价值年度不能大于105!`);
return false;
}
if(this.irrAndSimple.nyear<=0){
this.errorDialog(2,`现金价值年度必须大于0!`);
return false;
}
}
if(!this.irrAndSimple.nyear){
this.errorDialog(1,`生存总利益未输入!`);
return false;
}
}
const params = {
......
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="stylesheet" href="/sfp/assets/uni.42592f11.css">
<meta charset="UTF-8" />
<script>
var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') ||
CSS.supports('top: constant(a)'))
document.write(
'<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' +
(coverSupport ? ', viewport-fit=cover' : '') + '" />')
</script>
<title>sfp</title>
<!--preload-links-->
<!--app-context-->
<script type="module" crossorigin src="/sfp/assets/index.154fcd7e.js"></script>
<link rel="stylesheet" href="/sfp/assets/index.13d2da89.css">
</head>
<body>
<div id="app"><!--app-html--></div>
<!-- 移动端调试 -->
<script type="text/javascript" src="//cdn.jsdelivr.net/npm/eruda"></script>
<script>eruda.init();</script>
</body>
</html>
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