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

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

View File

@@ -5,16 +5,28 @@
<span class="mr10">{{ saleInsuredPersonInfo.name }}</span>
<span class="mr10">{{ saleInsuredPersonInfo.sex == 0 ? '男' : '女' }}</span>
<span class="mr10">{{ saleInsuredPersonInfo.age }}</span>
<span class="mr10 flex1 van-ellipsis"> {{ saleInsuredPersonInfo.occupationName }}</span>
<span class="mr10 flex1 van-ellipsis">{{ saleInsuredPersonInfo.occupationName }}</span>
</div>
</div>
<div v-for="(item, index) in chooseProducts" :key="index" class="ph10 bg-white">
<div class="flex justify-content-s align-items-c border-bottom pv10">
<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" />
<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-icon name="delete" size="22" @click="deleteRisk(index)" class="green" />
</div>
<!-- 险种条件-->
@@ -22,8 +34,11 @@
<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-else class="fs14"> {{ riskFactor.name }} &nbsp;&nbsp; &nbsp;&nbsp;</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
v-model="defalutAmt"
@@ -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" />
@@ -170,8 +220,8 @@ export default {
influenceAddRiskCodes: [],
influences: [],
nextStepFlag: false,
isRelated: localStorage.isRelated === '0',//关联保单号
policyNo: '',
isRelated: localStorage.isRelated === '0', //关联保单号
policyNo: '',
// 份数
mult: '',
isFrom: '',
@@ -196,7 +246,7 @@ export default {
//初始化数据
init() {
// 获取是否从建议书过来的
this.isFrom = localStorage.isFrom
this.isFrom = localStorage.isFrom
//获取投保人信息
if (localStorage.saleInsuredInfo) {
this.saleInsuredInfo = JSON.parse(localStorage.saleInsuredInfo)
@@ -211,15 +261,15 @@ export default {
if (item.mainRiskCode == 'GFRS_M0006') {
item.isHidden = true
}
if(item.mainRiskCode != 'GFRS_M0008') {
item.calFactorLst.map(i => {
this.defalutAmt = i.displayAmount
console.log(i.displayAmount)
console.log(i.defaultValue)
this.mult = Number(i.displayAmount) / Number(i.defaultValue)
})
}
})
if (item.mainRiskCode != 'GFRS_M0008') {
item.calFactorLst.map(i => {
this.defalutAmt = i.displayAmount
console.log(i.displayAmount)
console.log(i.defaultValue)
this.mult = Number(i.displayAmount) / Number(i.defaultValue)
})
}
})
// this.influenceAddRiskCodes
@@ -238,22 +288,21 @@ export default {
dutyStepperChange(value, productIndex, calFactorIndex, dutyItemIndex, isChecked, min, max) {
let currentEle = this.chooseProducts[productIndex].calFactorLst[calFactorIndex].rules[dutyItemIndex]
if (value < min || value > max) {
this.$toast(localStorage.hint)
this.$toast(localStorage.hint)
} else {
if ((Number(value) * 10000) % (Number(currentEle.limit) * 10000) != 0) {
Dialog.alert({
message: localStorage.hint
}).then(()=> {
}).then(() => {
currentEle.defaultDutyAmt = currentEle.minDutyAmt
})
// this.$toast(localStorage.hint)
// this.$toast(localStorage.hint)
} else {
// this.mainRiskInfluenceAddRisk()
// currentEle['amt'] = Number(currentEle.defaultValue) * Number(currentEle.moneyUnit)
// this.getTrial()
if (isChecked) {
if (isChecked) {
;[this.productIndex, this.calFactorIndex] = [productIndex, calFactorIndex]
let currentEle = this.chooseProducts[productIndex].calFactorLst[calFactorIndex].rules
currentEle.forEach(item => {
@@ -270,8 +319,6 @@ export default {
}
}
}
},
//弹框选择
toSelect(index, index1, columns) {
@@ -671,7 +718,7 @@ export default {
})
//通用规则1交费方式为一次交情无交费期限
if (trialInfo['payIntv'] == '0') {
if (trialInfo['payIntv'] == '0') {
trialInfo['payEndYear'] = '1000'
trialInfo['payEndYearFlag'] = 'Y'
// 福宝宝和万能险传A
@@ -732,17 +779,17 @@ export default {
})
},
//保额份数变化
stepperChange(defalutValue, productIndex, calFactorIndex, min, max ) {
stepperChange(defalutValue, productIndex, calFactorIndex, min, max) {
// debugger
let currentEle = this.chooseProducts[productIndex].calFactorLst[calFactorIndex]
let currentEle = this.chooseProducts[productIndex].calFactorLst[calFactorIndex]
if (Number(this.defalutAmt) < Number(min) || Number(this.defalutAmt) > Number(max)) {
this.$toast(localStorage.hint)
this.nextStepFlag = true
} else {
if ((Number(this.defalutAmt) * 10000) % (Number(currentEle.limit) * 10000) != 0) {
// this.defalutAmt = currentEle.rules[productIndex].displayAmount
this.$toast(localStorage.hint)
this.nextStepFlag = true
} else {
if ((Number(this.defalutAmt) * 10000) % (Number(currentEle.limit) * 10000) != 0) {
// this.defalutAmt = currentEle.rules[productIndex].displayAmount
this.$toast(localStorage.hint)
this.nextStepFlag = true
} else {
this.mainRiskInfluenceAddRisk()
currentEle['amt'] = Number(this.defalutAmt) * Number(currentEle.moneyUnit)
@@ -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')