Merge branch 'feature/GFRS-413_【0116】豁免险' into dev

This commit is contained in:
yuweiqi
2020-01-09 16:59:24 +08:00
4 changed files with 39 additions and 84 deletions

View File

@@ -117,5 +117,3 @@ export function getAuthCode(data) {
data
})
}

View File

@@ -63,14 +63,7 @@ export default {
this.$toast('请选择产品')
return
}
//930折中方案豁免险选择
let chooseProducts = JSON.parse(localStorage.chooseProducts)
for (let i = 0; i < chooseProducts.length; i++) {
if (chooseProducts[i].productCode == 'DCRS_A0001' && this.result.productCode == 'DCRS_A0001') {
this.$toast('豁免险已选!')
return
}
}
//添加附加险
this.addAddtionRisk()
},
@@ -178,7 +171,7 @@ export default {
},
//豁免险影响
remitLimit(resultData) {
//isRemit 0是豁免险 1非豁免险 remitType 0投保人 1被保人
//isRemit 0是豁免险 1非豁免险 remitType 0投保人 1被保人 relationToAppnt 投被关系
let isRemit = resultData.productTrialInfoDTO.isRemit
if (isRemit == 1) return false
let remitType = resultData.productTrialInfoDTO.remitType

View File

@@ -13,20 +13,8 @@
<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>
<!-- 险种条件-->
@@ -34,10 +22,7 @@
<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}} -->
<!-- {{defalutAmt}} -->
@@ -48,7 +33,16 @@
:show-plus="false"
:show-minus="false"
class="ml30"
@change="stepperChange(item.calFactorLst[riskFactorIndex].defaultValue, index, riskFactorIndex, (riskFactor.minAmt || riskFactor.minPrem), (riskFactor.maxAmt || riskFactor.maxPrem),riskFactor )"
@change="
stepperChange(
item.calFactorLst[riskFactorIndex].defaultValue,
index,
riskFactorIndex,
riskFactor.minAmt || riskFactor.minPrem,
riskFactor.maxAmt || riskFactor.maxPrem,
riskFactor
)
"
input-width="100"
:integer="false"
/>
@@ -71,17 +65,13 @@
<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
v-model="dutyItem.defaultDutyAmt"
:min="dutyItem.minDutyAmt"
:max=" dutyItem.maxDutyAmt"
:max="dutyItem.maxDutyAmt"
:show-plus="false"
:show-minus="false"
class="ml10 mr10"
@@ -118,63 +108,29 @@
<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
>
<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 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" />
@@ -258,13 +214,14 @@ export default {
}
//构建提交数据、渲染险种
this.chooseProducts = JSON.parse(localStorage.chooseProducts)
this.chooseProducts.map(item => {
if (item.mainRiskCode == 'GFRS_M0006') {
item.isHidden = true
}
if (item.mainRiskCode != 'GFRS_M0008') {
item.calFactorLst.map(i => {
this.defalutAmt = i.displayAmount
this.defalutAmt = i.displayAmount || 1
console.log(i.displayAmount)
console.log(i.defaultValue)
this.mult = Number(i.displayAmount) / Number(i.defaultValue)
@@ -282,6 +239,7 @@ export default {
}
this.mainRiskInfluenceAddRisk()
//初始化数据试算
this.getTrial()
},
@@ -549,7 +507,6 @@ export default {
}
}
//2、豁免险跟主险联动值减一
//2、豁免险跟主险联动豁免险缴费期间和保险期间同主险的缴费期间
let remitIndex = this.getRemitIndex()
if (!remitIndex) return
@@ -701,7 +658,12 @@ export default {
if (factor.code == 'inputPrem') {
trialInfo['prem'] = Number(this.defalutAmt) * Number(factor.moneyUnit)
} else {
trialInfo['amt'] = Number(this.defalutAmt) * Number(factor.moneyUnit)
if (item.isRemit == 0) {
trialInfo['amt'] = Number(factor.defaultValue) * Number(factor.moneyUnit)
} else {
trialInfo['amt'] = Number(this.defalutAmt) * Number(factor.moneyUnit)
}
// trialInfo['amt'] = Number(this.defalutAmt) * Number(factor.moneyUnit)
}
} else if (factor.type == 2) {
trialInfo.jobLevel = this.saleInsuredPersonInfo[factor.code]
@@ -721,6 +683,7 @@ export default {
}
})
console.log('trialInfo == ', trialInfo)
//通用规则1交费方式为一次交情无交费期限
if (trialInfo['payIntv'] == '0') {
trialInfo['payEndYear'] = '1000'
@@ -811,7 +774,7 @@ export default {
this.getTrial()
}
}
//被保人年龄如果在66-75之间
//被保人年龄如果在66-75之间
} else if (this.saleInsuredPersonInfo.age >= 66 && this.saleInsuredPersonInfo.age <= 75) {
//使用rules规则里的第一条控制保额份数
if (Number(this.defalutAmt) < Number(riskFactor.rules[0].minPrem) || Number(this.defalutAmt) > Number(riskFactor.rules[0].maxPrem)) {
@@ -829,7 +792,7 @@ export default {
}
}
}
//其他产品按照原先的逻辑判断
//其他产品按照原先的逻辑判断
} else {
if (Number(this.defalutAmt) < Number(min) || Number(this.defalutAmt) > Number(max)) {
this.$toast(localStorage.hint)