[FIX] 修改万能险保额显示错误问题

This commit is contained in:
wangmingzhe
2019-12-29 20:15:11 +08:00
parent 580952227a
commit da76604d23

View File

@@ -13,8 +13,20 @@
<van-tag type="primary" v-if="item.isMainRisk == 0" class="mr5 green" plain>主险</van-tag>
<van-tag type="primary" v-else class="mr5 green" plain>附加险</van-tag>
<span class="ml5 center fs13 flex1">{{ item.riskName }}</span>
<van-tag type="primary" v-if="item.isMainRisk == 0 && item.hasAddtionRisk" plain @click="selectAddtionRisk" class="green mr8"></van-tag>
<van-icon name="search" size="20" v-if="item.documentDTOS && item.documentDTOS.length > 0" @click="seeDocument(index)" class="green mr5" />
<van-tag
type="primary"
v-if="item.isMainRisk == 0 && item.hasAddtionRisk"
plain
@click="selectAddtionRisk"
class="green mr8"
></van-tag>
<van-icon
name="search"
size="20"
v-if="item.documentDTOS && item.documentDTOS.length > 0"
@click="seeDocument(index)"
class="green mr5"
/>
<van-icon name="delete" size="22" @click="deleteRisk(index)" class="green" />
</div>
<!-- 险种条件-->
@@ -22,7 +34,10 @@
<div v-for="(riskFactor, riskFactorIndex) in item.calFactorLst" :key="riskFactorIndex">
<div class="flex justify-content-s pv10 border-bottom" v-if="riskFactor.type == 1">
<div class="flex align-items-c">
<span v-if="riskFactor.suffix" class="fs14"> {{ riskFactor.name + '(' + riskFactor.suffix + ')' }} </span>
<span
v-if="riskFactor.suffix"
class="fs14"
>{{ riskFactor.name + '(' + riskFactor.suffix + ')' }}</span>
<span v-else class="fs14">{{ riskFactor.name }} &nbsp;&nbsp; &nbsp;&nbsp;</span>
<!-- {{riskFactorIndex}} -->
<van-stepper
@@ -55,7 +70,11 @@
<div class="border-bottom" v-if="riskFactor.type == 3">
<div class="pv12 border-bd">{{ riskFactor.name }}</div>
<div class="duty">
<div class="flex justify-content-s border-bd pv10 align-items-c" v-for="(dutyItem, dutyItemIndex) in riskFactor.rules" :key="dutyItemIndex">
<div
class="flex justify-content-s border-bd pv10 align-items-c"
v-for="(dutyItem, dutyItemIndex) in riskFactor.rules"
:key="dutyItemIndex"
>
<span class="fs14 w100">{{ dutyItem.dutyName }}({{ dutyItem.suffix }})</span>
<div class="flex">
<van-stepper
@@ -98,32 +117,63 @@
<div v-for="(riskFactor, riskFactorIndex) in item.calFactorLst" :key="riskFactorIndex">
<div class="flex justify-content-s pv10 border-bottom">
<div class="flex">
<van-field v-if="riskFactor.type == 0" v-model="riskFactor.showContent" readonly :label="riskFactor.name" />
<van-field v-if="riskFactor.type == 1" v-model="riskFactor.defaultValue" readonly :label="riskFactor.name + '(' + riskFactor.suffix + ')'" />
<van-field
v-if="riskFactor.type == 0"
v-model="riskFactor.showContent"
readonly
:label="riskFactor.name"
/>
<van-field
v-if="riskFactor.type == 1"
v-model="riskFactor.defaultValue"
readonly
:label="riskFactor.name + '(' + riskFactor.suffix + ')'"
/>
</div>
</div>
</div>
</div>
<!-- 只有万能险且只有建议书才展示 -->
<van-field class="pv10" v-if="item.hasPredictTransferPrem === '0'" v-model="item.predictTransferPrem" label="预计转入保费" placeholder="请输入" />
<div class="flex justify-content-s pv10 border-bottom" v-if="isRelated && isFrom != 'proposal'">
<van-field v-model="policyNo" clearable label="关联保单" name="关联保单号" maxlength="20" placeholder="请输入保单号/投保单号" />
<van-field
class="pv10"
v-if="item.hasPredictTransferPrem === '0'"
v-model="item.predictTransferPrem"
label="预计转入保费"
placeholder="请输入"
/>
<div
class="flex justify-content-s pv10 border-bottom"
v-if="isRelated && isFrom != 'proposal'"
>
<van-field
v-model="policyNo"
clearable
label="关联保单"
name="关联保单号"
maxlength="20"
placeholder="请输入保单号/投保单号"
/>
</div>
<div class="flex justify-content-s pv10 border-bottom prem">
<span
style="font-weight:bold"
v-if="(trialList.length > 0 && trialList[index].trialType == 0) || (trialList.length > 0 && trialList[index].trialType == 2)"
>
首期保费(
</span>
<span style="font-weight:bold" v-else>
保额(
</span>
<span class="fee red" v-if="trialList && trialList.length > 0">{{ trialList[index].prem.toFixed(2) | moneyFormat }}</span>
>首期保费(</span>
<span style="font-weight:bold" v-else>保额(</span>
<span
class="fee red"
v-if="trialList && trialList.length > 0"
>{{ trialList[index].prem.toFixed(2) | moneyFormat }}</span>
</div>
</div>
<div class="bottom-btn bg-white">
<van-button type="danger" size="large" @click="nextStep" :disabled="nextStepFlag" v-no-more-click="1000">完成</van-button>
<van-button
type="danger"
size="large"
@click="nextStep"
:disabled="nextStepFlag"
v-no-more-click="1000"
>完成</van-button>
</div>
<van-action-sheet v-model="show" cancel-text="取消" :actions="policyInfo" @select="openDocument" />
@@ -248,7 +298,6 @@ export default {
})
// this.$toast(localStorage.hint)
} else {
// this.mainRiskInfluenceAddRisk()
// currentEle['amt'] = Number(currentEle.defaultValue) * Number(currentEle.moneyUnit)
@@ -270,8 +319,6 @@ export default {
}
}
}
},
//弹框选择
toSelect(index, index1, columns) {
@@ -753,8 +800,6 @@ export default {
// currentEle.defaultValue = value
console.log('进来几次')
this.mult = Number(this.defalutAmt) / Number(defalutValue)
},
//下一步
async nextStep() {
@@ -804,10 +849,13 @@ export default {
}
// console.log(riskItem)
//万能型产品保费赋值给保额
// if (this.trialList[index].productCode == 'GFRS_M0003') {
// // console.log('2222222222')
// riskItem['amt'] = this.trialList[index].prem
// }
//增加判断是否是从建议书跳转过来了的
if (localStorage.isFrom != 'proposal') {
if (this.trialList[index].productCode == 'GFRS_M0003') {
// console.log('2222222222')
riskItem['amt'] = this.trialList[index].prem
}
}
//豁免险保额处理
if (item.isRemit == '0') {
// console.log('33333333')