Commit ae070e14 by Sweet Zhang

解决冲突

parents ca522788 7aebfdd3
......@@ -3,9 +3,6 @@
flex-direction: column;
align-items: center;
}
.claimInfomationContent{
margin-bottom: 40rpx;
}
.radioButton{
position: relative;
width: 40rpx;
......@@ -213,9 +210,9 @@
.batchDataResult .resultTd text.resultNumber{
color: #CEB07D;
}
.cashValueContent{
/* .cashValueContent{
margin-top: 80rpx;
}
} */
.cashValueContent .title button{
background-color: transparent;
font-size: 30rpx;
......
......@@ -52,35 +52,38 @@
<view class="claimInfomationContent" v-if="!(calcuteType==='2' && irrAndSimpleCalcuteParam.allFirstPayment)">
<view class="title">
<text>提领信息</text>
<view style="display: flex;" @click="changeWithdrawalType" v-show="calcuteType==='1'">
<view style="display: flex;" @click="changeWithdrawalType()" v-show="calcuteType==='1'">
<view class="radioButton" :class="{'selected':!withdrawalType}"></view>
<text style="margin-left: 10rpx;">减保取现</text>
</view>
</view>
<!-- 年金提领信息 -->
<view class="annuityContent" v-show="calcuteType==='2'">
<view v-for="item in yearWithdrawalInfos">
<view class="inputItem">
<text>从第几个保单年度开始提取:</text>
<view class="inputContent">
<input class="uni-input" type="number" placeholder="请输入" /><label for=""></label>
<input class="uni-input" type="number" placeholder="请输入"
v-model="item.withdrawalStart"/><label for=""></label>
</view>
</view>
<view class="inputItem">
<text>每年提取金额:</text>
<view class="inputContent">
<input class="uni-input" type="number" placeholder="请输入" /><label for=""></label>
<input class="uni-input" type="number" placeholder="请输入"
v-model="item.yearWithdrawalAmount" /><label for=""></label>
</view>
</view>
</view>
</view>
<!-- 增额减保取现 -->
<view class="reduceInsuranceContent" v-show="!withdrawalType && calcuteType==='1'">
<view class="tableTh">
<text>起领年度(年初)</text>
<text>止领年度(年末)</text>
<text class="withdrawNumber">年提取金额(元)</text>
<text></text>
</view>
<view class="tableTd" v-for="(item,idx) in yearWithdrawalInfos">
<input class="uni-input" type="number" placeholder="请输入"
v-model="item.withdrawalStart"/>
......@@ -96,7 +99,7 @@
</view>
</view>
<!-- 现金价值信息 -->
<view class="cashValueContent">
<view class="cashValueContent" :style="{marginTop:(calcuteType=='1'?'80rpx':'40rpx')}">
<view class="title">
<text>现金价值</text>
<view class="calcTypeOption">
......@@ -134,11 +137,11 @@
<view class="simpleDataResult" v-if="resultShowFlag && calcuteMethod == '1'">
<view class="inputItem">
<text class="resultTitle">IRR复利</text>
<text class="calcNumber">{{irrAndSimpleResInfos[0]['irrValue'] * 100}}%</text>
<text class="calcNumber">{{(irrAndSimpleResInfos[0]['irrValue']).toFixed(5) * 100}}%</text>
</view>
<view class="inputItem">
<text class="resultTitle">单利</text>
<text class="calcNumber">{{irrAndSimpleResInfos[0]['simpleValue'] * 100}}%</text>
<text class="calcNumber">{{(irrAndSimpleResInfos[0]['simpleValue']).toFixed(5) * 100}}%</text>
</view>
</view>
<!-- 批量计算显示结果 -->
......@@ -219,7 +222,6 @@
if(!uni.getStorageSync('businessNo')){
uni.setStorageSync('businessNo', nanoid());
}
this.yearWithdrawalInfos.push(this.yearWithdrawal);
if(dataHandling.getQueryString('subscribe')==0){
this.isNeedOfficialAccountQrcode = true;
}else{
......@@ -235,22 +237,51 @@
}
})
}
if(this.yearWithdrawal.length>0){
this.yearWithdrawalInfos.push({...this.yearWithdrawal,withdrawalType:this.withdrawalType?'1':'2'})
}
},
methods: {
switchTab(e){
this.calcuteType = e;
//点年金时初始化1条提领信息
if(e=='2'){
this.yearWithdrawalInfos = [].concat([{withdrawalType:'1',
withdrawalStart:null,
yearWithdrawalAmount:null}]);
}
},
// calcuteMethod判断单次还是批量;businessType判断保存还是计算
calcute(businessType){
this.businessType = businessType;
console.log(this.businessType)
if(this.calcuteMethod==='1'){
// 计算
this.irrAndSimpleCalte();
}else if(this.calcuteMethod === '2'){
// 输入批量数据
if(!this.irrAndSimpleCalcuteParam.paymentPeriod){
uni.showToast({
title: '请填写交费年限',
duration: 2000,
icon: 'none'
})
return;
}
if(!this.irrAndSimpleCalcuteParam.annualPremium){
uni.showToast({
title: '请填写年交保费',
duration: 2000,
icon: 'none'
})
return;
}
// 输入批量数据,缓存当页数据
const calcuteData = {
paymentPeriod:this.irrAndSimpleCalcuteParam.paymentPeriod,
annualPremium:this.irrAndSimpleCalcuteParam.annualPremium,
allFirstPayment:this.irrAndSimpleCalcuteParam.allFirstPayment,
yearWithdrawalInfos:this.yearWithdrawalInfos
}
uni.setStorageSync('calcuteData',calcuteData)
uni.navigateTo({
url: '/pages/dataImport/data-import'
});
......@@ -259,19 +290,33 @@
//点击单次时初始化数据
initCashValue(calcuteMethod){
this.calcuteMethod = calcuteMethod;
if(calcuteMethod == 1){
this.irrAndSimpleInfos = [].push({nyear:undefined,cashValue:undefined})
if(calcuteMethod === '1'){
this.irrAndSimple = {nyear:null,cashValue:null};
this.irrAndSimpleInfos = [].concat([{nyear:null,cashValue:null}]);
console.log(this.irrAndSimple)
}
},
changeWithdrawalType(){
this.withdrawalType = !this.withdrawalType
this.withdrawalType = !this.withdrawalType;
console.log(this.withdrawalType)
if(!this.withdrawalType){
this.yearWithdrawalInfos = [].concat([{withdrawalType:'2',
withdrawalStart:null,
withdrawalEnd:null,
yearWithdrawalAmount:null,}]);
console.log(this.yearWithdrawalInfos)
}else{
this.yearWithdrawalInfos = [];
}
},
//提领信息+
add(){
this.yearWithdrawalInfos.push({withdrawalType:undefined,
withdrawalStart:undefined,
withdrawalEnd:undefined,
yearWithdrawalAmount:undefined,})
yearWithdrawalAmount:undefined,
withdrawalType:this.withdrawalType?'1':'2'
})
},
//提领信息-
reduce(idx){
......@@ -308,8 +353,6 @@
return;
}
}
console.log(this.irrAndSimple)
console.log([].push(this.irrAndSimple))
const params = {
...this.irrAndSimpleCalcuteParam,
calcuteType:this.calcuteType,
......@@ -319,8 +362,8 @@
mobile: null,
loginNo: null,
wechat_openid: uni.getStorageSync('openId') || '',
yearWithdrawalInfos:null,
irrAndSimpleInfos:this.irrAndSimpleInfos.concat([this.irrAndSimple]),
yearWithdrawalInfos:this.yearWithdrawalInfos,
irrAndSimpleInfos:[].concat([this.irrAndSimple]),
withdrawalType:this.withdrawalType?'1':'2',
decimal: 5
};
......
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