Commit c6f148ca by Chao Sun

部分bug修复

parent a7282ad4
......@@ -72,6 +72,7 @@
box-sizing: border-box;
font-size: 30rpx;
color: #333333;
scroll-behavior:smooth;
}
.title{
display: flex;
......@@ -122,6 +123,7 @@
opacity: 1;
margin: 30rpx 15rpx 56rpx;
padding: 15rpx 17rpx;
scroll-behavior:smooth;
}
.simpleDataResult .resultTitle{
font-size: 32rpx;
......
......@@ -12,7 +12,7 @@
<!-- 使用说明 -->
<text>使用说明</text>
</view>
<scroll-view scroll-y="true" class="formInfoContainer">
<scroll-view scroll-y="true" class="formInfoContainer" id="formInfoContainer">
<view class="tabTitle">
<text @click="switchTab('1')" :class="{ 'actived': calcuteType==='1' }">增额</text>
<text @click="switchTab('2')" :class="{ 'actived': calcuteType==='2' }">年金</text>
......@@ -139,7 +139,7 @@
<!-- 现金价值单利复利结果展示 -->
<view class="resultContent">
<!-- 单次计算显示结果 -->
<view class="simpleDataResult" v-if="resultShowFlag && calcuteMethod == '1'">
<view id="simpleDataResult" class="simpleDataResult" v-if="resultShowFlag && calcuteMethod == '1'">
<view class="inputItem">
<text class="resultTitle">IRR复利</text>
<text class="calcNumber">{{irrAndSimpleResInfos.length>0?(irrAndSimpleResInfos[0]['irrValue'] * 100).toFixed(3):null}}%</text>
......@@ -171,7 +171,8 @@
</view>
<!-- 操作 -->
<view class="optionContent">
<button type="default" plain="true" form-type="reset">清空</button>
<button type="default" plain="true" form-type="reset"
@click="resetData()">清空</button>
<button type="default" plain="true"
class="btn" @click="calcute(2)"
v-show="calcuteMethod==2">输入批量数据</button>
......@@ -204,7 +205,7 @@
withdrawalType:'1', //提领方式(1:正常提领; 2:减保取现)
resultShowFlag:false,
calcuteMethod:'1', //计算方式(1:单次; 2:批量)
businessType:1,
businessType:1, //业务类型(1:计算; 2:保存)
mobile:undefined,
irrAndSimpleCalcuteParam:{},
yearWithdrawal:{
......@@ -279,8 +280,6 @@
yearWithdrawalAmount:null}]);
}else if(e=='1'){
this.irrAndSimpleCalcuteParam.allFirstPayment = null;
}else{
}
this.resultShowFlag = false;
}
......@@ -376,19 +375,53 @@
irrAndSimpleCalte(){
if(!this.irrAndSimpleCalcuteParam.paymentPeriod){
uni.showToast({
title: '请填写交费年限',
title: '请填写交费年限!',
duration: 2000,
icon: 'none'
})
return;
}else{
if(this.irrAndSimpleCalcuteParam.paymentPeriod >100 ){
uni.showToast({
title: '交费年限不能大于100年!',
duration: 2000,
icon: 'none'
})
return;
}
if(this.irrAndSimpleCalcuteParam.paymentPeriod < 0 ){
uni.showToast({
title: '交费年限必须大于0',
duration: 2000,
icon: 'none'
})
return;
}
}
if(!this.irrAndSimpleCalcuteParam.annualPremium){
uni.showToast({
title: '请填写年交保费',
title: '请填写年交保费',
duration: 2000,
icon: 'none'
})
return;
}else{
if(this.irrAndSimpleCalcuteParam.annualPremium > 1000000000){
uni.showToast({
title: '年交保费不能大于1,000,000,000',
duration: 2000,
icon: 'none'
})
return;
}
if(this.irrAndSimpleCalcuteParam.annualPremium < 0){
uni.showToast({
title: '年交保费不能小于0',
duration: 2000,
icon: 'none'
})
return;
}
}
if(this.businessType == 2){
if(!this.mobile){
......@@ -436,12 +469,18 @@
withdrawalType:this.withdrawalType?'1':'2',
decimal: 5
};
// document.getElementById(simpleDataResult).scrollIntoView({
// behavior: "smooth",
// block: "end",
// inline: "end"
// });
api.irrAndSimpleCalcute(params).then(res=>{
console.log(res)
if(res.success === true){
if(res.data.irrAndSimpleResInfos){
this.irrAndSimpleResInfos = res.data.irrAndSimpleResInfos;
this.resultShowFlag = true;
}else{
this.irrAndSimpleResInfos = [];
}
......@@ -454,8 +493,13 @@
})
}
})
},
resetData(){
this.irrAndSimpleCalcuteParam = {};
this.yearWithdrawalInfos = [];
this.withdrawalType = '1';
this.irrAndSimple = {nyear:undefined,cashValue:undefined}
}
},
onShow() {
if(uni.getStorageSync('resIrrAndSimpleResInfos')){
......
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