Commit ae070e14 by Sweet Zhang

解决冲突

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