Commit 60f87d5e by Sweet Zhang

批量数据校验

parent df8a9104
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
<view class="dataOptionContainer"> <view class="dataOptionContainer">
<!-- 粘贴数据区域 --> <!-- 粘贴数据区域 -->
<view class="uni-textarea"> <view class="uni-textarea">
<textarea v-model="pasteData" placeholder-style="color:#999999;font-size:14px;padding-left:9px;padding-top:3px" placeholder="请根据左侧保单年度进行现金价值数据粘贴,或直接输入,数据需进行换行分隔"/> <textarea v-model="pasteData" placeholder-style="color:#999999;font-size:14px;padding-left:9px;padding-top:3px" placeholder="请根据左侧保单年度进行现金价值数据粘贴,如您想直接输入数据,需使用回车键或换行符分隔"/>
<button class="mini-btn pasteDiscernment" type="default" size="mini" @click="pasteDataDistinguish">粘贴并识别</button> <button class="mini-btn pasteDiscernment" type="default" size="mini" @click="pasteDataDistinguish">粘贴并识别</button>
</view> </view>
<!-- 批量数据输入区域 --> <!-- 批量数据输入区域 -->
...@@ -188,7 +188,25 @@ ...@@ -188,7 +188,25 @@
this.irrAndSimpleInfos.forEach(item=>item.cashValue=''); this.irrAndSimpleInfos.forEach(item=>item.cashValue='');
}, },
calcuteIrr(){ calcuteIrr(){
this.policyYearLists = this.irrAndSimpleInfos this.policyYearLists = this.irrAndSimpleInfos.filter(item=>item.cashValue!=='')
console.log(this.policyYearLists)
for(let i=0;i<this.policyYearLists.length;i++){
if(this.policyYearLists[i].cashValue<0 || isNaN(this.policyYearLists[i].cashValue)){
uni.showModal({
title: '数据格式输入错误',
content: `保单年度为${this.policyYearLists[i].nyear}时,现金价值格式错误,须为大于或等于0的数字类型`,
showCancel:false,
success: function (res) {
if (res.confirm) {
console.log('用户点击确定');
} else if (res.cancel) {
console.log('用户点击取消');
}
}
});
return;
}
}
const params = { const params = {
...this.calcuteData, ...this.calcuteData,
calcuteMethod:2, calcuteMethod:2,
...@@ -200,7 +218,7 @@ ...@@ -200,7 +218,7 @@
this.irrAndSimpleResInfos = res.data.irrAndSimpleResInfos; this.irrAndSimpleResInfos = res.data.irrAndSimpleResInfos;
// this.resultShowFlag = true; // this.resultShowFlag = true;
//计算成功返回上一页 //计算成功返回上一页
uni.setStorageSync('resIrrAndSimpleResInfos',this.irrAndSimpleResInfos) uni.setStorageSync('resIrrAndSimpleResInfos',this.irrAndSimpleResInfos);
uni.navigateBack({ uni.navigateBack({
delta:1,//返回层数,2则上上页 delta:1,//返回层数,2则上上页
}) })
......
...@@ -260,4 +260,13 @@ ...@@ -260,4 +260,13 @@
} }
.qrcodeContainer img{ .qrcodeContainer img{
max-width: 100%; max-width: 100%;
}
.tips{
position: absolute;
bottom: -30rpx;
left: 28rpx;
width: 100%;
font-size: 24rpx;
text-align: left;
color: red;
} }
\ No newline at end of file
...@@ -56,13 +56,13 @@ ...@@ -56,13 +56,13 @@
<view class="title"> <view class="title">
<text>提领信息</text> <text>提领信息</text>
<view style="display: flex;flex-direction: column;align-items: flex-end;" @click="changeWithdrawalType()" v-if="calcuteType=='1'"> <view @click="changeWithdrawalType()" v-if="calcuteType=='1'">
<view style="display: flex;"> <view style="display: flex;">
<view class="radioButton" :class="{'selected':!withdrawalType}"></view> <view class="radioButton" :class="{'selected':!withdrawalType}"></view>
<text style="margin-left: 10rpx;">减保取现</text> <text style="margin-left: 10rpx;">减保取现</text>
</view> </view>
<view> <view class="tips">
<text>(如有,请点击按钮进行填写提领信息)</text> <text>(如有减保取现,请点击右侧按钮填写减保领取信息)</text>
</view> </view>
</view> </view>
</view> </view>
......
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