mirror of
http://112.124.100.131/GFRS/ebiz-h5.git
synced 2025-12-09 19:16:43 +08:00
当投被保险人为非同一人时,投保人可附加国富人寿附加投保人豁免保险费定期寿险、附加国富人寿附加豁免保险费重大疾病保险。
This commit is contained in:
@@ -19,6 +19,8 @@
|
||||
import { Cell, CellGroup, Tag, Radio, RadioGroup } from 'vant'
|
||||
import { calculatePremium } from '@/api/ebiz/common/common'
|
||||
import riskRules from './risk-rules'
|
||||
import { getAgentInfo } from '@/api/ebiz/my/my.js'
|
||||
|
||||
export default {
|
||||
name: 'addtionRiskList',
|
||||
components: {
|
||||
@@ -30,6 +32,7 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
branchTypeVal: '', //个险渠道G 中介渠道Z
|
||||
list: [],
|
||||
result: '',
|
||||
saleInsuredPersonInfo: null //投保人信息
|
||||
@@ -40,7 +43,14 @@ export default {
|
||||
if (this.$CacheUtils.getLocItem('saleInsuredPersonInfo')) {
|
||||
this.saleInsuredPersonInfo = JSON.parse(this.$CacheUtils.getLocItem('saleInsuredPersonInfo'))
|
||||
}
|
||||
|
||||
getAgentInfo({}).then(res => {
|
||||
// branchType N1、1代表个险渠道 和 N5、5 代表中介渠道,N代表内勤
|
||||
if (res.branchType == 'N1' || res.branchType == '1') {
|
||||
this.branchTypeVal = 'G'
|
||||
} else if (res.branchType == 'N5' || res.branchType == '5') {
|
||||
this.branchTypeVal = 'Z'
|
||||
}
|
||||
})
|
||||
this.filterAddRisk()
|
||||
},
|
||||
methods: {
|
||||
@@ -49,9 +59,18 @@ export default {
|
||||
if (localStorage.addtionRiskLst) {
|
||||
let addRiskCodes = localStorage.addRiskCodes && JSON.parse(localStorage.addRiskCodes)
|
||||
let addtionRiskLst = JSON.parse(localStorage.addtionRiskLst)
|
||||
let currentMainRiskInfo = this.getCurrentMainRiskInfo()
|
||||
addtionRiskLst.forEach(item => {
|
||||
if (addRiskCodes.includes(item.productCode)) {
|
||||
item.isHidden = 1
|
||||
} else {
|
||||
if (
|
||||
currentMainRiskInfo.mainRiskPayEndYearFlag == 'Y' &&
|
||||
currentMainRiskInfo.mainRiskPayEndYear == '1000' &&
|
||||
(item.productCode == 'GFRS_A0007' || item.productCode == 'GFRS_A0009')
|
||||
) {
|
||||
item.isHidden = 1
|
||||
}
|
||||
}
|
||||
})
|
||||
this.list = addtionRiskLst
|
||||
@@ -80,13 +99,13 @@ export default {
|
||||
let ruleExpression = localStorage.ruleExpression ? JSON.parse(localStorage.ruleExpression) : {}
|
||||
ruleExpression[resultData.productCode] = resultData.productTrialInfoDTO.ruleExpression
|
||||
localStorage.ruleExpression = JSON.stringify(ruleExpression)
|
||||
let ttThis = this;
|
||||
let ttThis = this
|
||||
for (let item of ruleExpression[resultData.productCode]) {
|
||||
let config = JSON.parse(item.ruleExpression)
|
||||
switch (config.eventType) {
|
||||
case 'loadFormat':
|
||||
let initFn = new Function(...config.funPar, config.funBody.join(''))
|
||||
let str = initFn.call(ttThis,resultData)
|
||||
let str = initFn.call(ttThis, resultData)
|
||||
if (str) {
|
||||
return this.$toast(str)
|
||||
}
|
||||
@@ -283,6 +302,7 @@ export default {
|
||||
let remitTypeLimit = resultData.productTrialInfoDTO.remitTypeLimit
|
||||
let relationToAppnt = this.saleInsuredPersonInfo.relationToAppnt
|
||||
let currentMainRiskInfo = this.getCurrentMainRiskInfo()
|
||||
let productCode = resultData.productCode
|
||||
if (relationToAppnt == 1 && remitType == '0' && !remitTypeLimit) {
|
||||
this.$toast('投被同人不能选取此款险种!')
|
||||
return true
|
||||
@@ -295,11 +315,20 @@ export default {
|
||||
this.$toast('目前主险交费期间类型,不适合选取此款险种!')
|
||||
return true
|
||||
}
|
||||
// branchTypeVal: '', //个险渠道G 中介渠道Z
|
||||
//国富人寿附加投保人豁免保险费定期寿险(B款) GFRS_A0007
|
||||
//国富人寿附加豁免保险费重大疾病保险(B款) GFRS_A0009
|
||||
if (this.branchTypeVal == 'Z' && (productCode == 'GFRS_A0007' || productCode == 'GFRS_A0009')) {
|
||||
if (relationToAppnt == 1) {
|
||||
this.$toast('投被同人不能选取此款险种!')
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
},
|
||||
//获取主险的保险期间、交费方式
|
||||
getCurrentMainRiskInfo() {
|
||||
let mainRiskPayIntv, mainRiskPayEndYearFlag
|
||||
let mainRiskPayIntv, mainRiskPayEndYearFlag, mainRiskPayEndYear
|
||||
let chooseProducts = JSON.parse(localStorage.chooseProducts)
|
||||
chooseProducts[0].calFactorLst.forEach(item => {
|
||||
if (item.code == 'payIntv') {
|
||||
@@ -307,11 +336,13 @@ export default {
|
||||
}
|
||||
if (item.code == 'payEndYear') {
|
||||
mainRiskPayEndYearFlag = item.payEndYearFlag
|
||||
mainRiskPayEndYear = item.payEndYear
|
||||
}
|
||||
})
|
||||
return {
|
||||
mainRiskPayIntv,
|
||||
mainRiskPayEndYearFlag
|
||||
mainRiskPayEndYearFlag,
|
||||
mainRiskPayEndYear
|
||||
}
|
||||
},
|
||||
//页面跳转
|
||||
|
||||
@@ -75,7 +75,9 @@
|
||||
<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">
|
||||
<span v-if="!(item.productCode == 'GFRS_M0024' || item.productCode == 'GFRS_M0040' || item.productCode == 'GFRS_M0044')" class="fs14 w100">{{ dutyItem.dutyName }}({{ dutyItem.suffix }})</span>
|
||||
<span v-if="!(item.productCode == 'GFRS_M0024' || item.productCode == 'GFRS_M0040' || item.productCode == 'GFRS_M0044')" class="fs14 w100"
|
||||
>{{ dutyItem.dutyName }}({{ dutyItem.suffix }})</span
|
||||
>
|
||||
<span v-else class="fs14 w100">{{ dutyItem.dutyName }}</span>
|
||||
<div class="flex relative">
|
||||
<van-stepper
|
||||
@@ -277,12 +279,12 @@
|
||||
<span style="font-weight:bold" v-else>保额(元):</span>
|
||||
<span class="fee red" v-if="trialList && trialList.length > 0">{{ trialList[index].showPrem | moneyFormat }}</span>
|
||||
</div>
|
||||
<div class="flex justify-content-fs pv10 border-bottom prem align-items-c" v-if="cvalidateFlag">
|
||||
<div class="flex justify-content-fs pv10 border-bottom prem align-items-c" v-if="item.isMainRisk == 0 && activeType == 'KMH' && isFrom != 'proposal'">
|
||||
<span>指定保单生效日</span>
|
||||
<van-radio-group v-model="activeRadio" class="pl20">
|
||||
<van-radio name="1" icon-size="1rem"></van-radio>
|
||||
</van-radio-group>
|
||||
<span class="pl5">{{cvalidateStr}}</span>
|
||||
<span class="pl5">2021年1月1日</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="bottom-btn bg-white">
|
||||
@@ -385,8 +387,6 @@ export default {
|
||||
return {
|
||||
activeRadio: '1',
|
||||
activeType: localStorage.getItem('active_type'),
|
||||
cvalidateFlag : false,
|
||||
cvalidateStr:'',
|
||||
chooseProducts: [],
|
||||
productIndex: '',
|
||||
calFactorIndex: '',
|
||||
@@ -445,7 +445,7 @@ export default {
|
||||
//初始化数据
|
||||
init() {
|
||||
// 获取是否从建议书过来的
|
||||
this.isFrom = window.localStorage.isFrom
|
||||
this.isFrom = localStorage.isFrom
|
||||
//获取投保人信息
|
||||
if (this.$CacheUtils.getLocItem('saleInsuredInfo')) {
|
||||
this.saleInsuredInfo = JSON.parse(this.$CacheUtils.getLocItem('saleInsuredInfo'))
|
||||
@@ -457,8 +457,6 @@ export default {
|
||||
//构建提交数据、渲染险种
|
||||
this.chooseProducts = JSON.parse(localStorage.chooseProducts)
|
||||
this.chooseProducts.map(item => {
|
||||
this.cvalidateFlag = item.isMainRisk == 0 && (this.activeType == 'KMH'||this.activeType == 'SQY') && this.isFrom != 'proposal'
|
||||
this.cvalidateStr = this.cvalidateFlag?this.activeType == 'KMH'?'2021-01-01':this.activeType == 'SQY'?'2021-06-01':'':''
|
||||
if (item.mainRiskCode == 'GFRS_M0006') {
|
||||
item.isHidden = true
|
||||
}
|
||||
@@ -504,8 +502,7 @@ export default {
|
||||
}
|
||||
})
|
||||
}
|
||||
if (this.mainRiskCode == 'GFRS_M0031' || this.mainRiskCode == 'GFRS_M0005' ||
|
||||
this.mainRiskCode == 'GFRS_M0042' || this.mainRiskCode == 'GFRS_M0043') {
|
||||
if (this.mainRiskCode == 'GFRS_M0031' || this.mainRiskCode == 'GFRS_M0005' || this.mainRiskCode == 'GFRS_M0042' || this.mainRiskCode == 'GFRS_M0043') {
|
||||
this.chooseProducts.map(item => {
|
||||
if (item.productCode == 'GFRS_A0008') {
|
||||
item.calFactorLst.map(item2 => {
|
||||
@@ -837,7 +834,7 @@ export default {
|
||||
if (currentEle.hasFlag) {
|
||||
currentEle[name + 'Flag'] = value.flag
|
||||
}
|
||||
this.hiddenPayEndYear(currentEle)
|
||||
// this.hiddenPayEndYear(currentEle)
|
||||
//特殊规则:设置豁免险
|
||||
this.getTrial()
|
||||
}
|
||||
@@ -998,14 +995,14 @@ export default {
|
||||
},
|
||||
/********start 通用规则、特殊规则处理 start******/
|
||||
//通用规则1:交费方式为一次交情,无交费期限
|
||||
hiddenPayEndYear(currentEle) {
|
||||
if (currentEle.code == 'payIntv') {
|
||||
if (this.chooseProducts[0].productCode === 'GFRS_M0015' && this.chooseProducts[this.productIndex].productCode === 'GFRS_A0006') {
|
||||
return
|
||||
}
|
||||
this.chooseProducts[this.productIndex]['isHidden'] = currentEle.payIntv == '0' ? true : false
|
||||
}
|
||||
},
|
||||
// hiddenPayEndYear(currentEle) {
|
||||
// if (currentEle.code == 'payIntv') {
|
||||
// if (this.chooseProducts[0].productCode === 'GFRS_M0015' && this.chooseProducts[this.productIndex].productCode === 'GFRS_A0006') {
|
||||
// return
|
||||
// }
|
||||
// this.chooseProducts[this.productIndex]['isHidden'] = currentEle.payIntv == '0' ? true : false
|
||||
// }
|
||||
// },
|
||||
//通用规则2:交费期限不能超过保险期间
|
||||
payExceedInsured(currentEle, currentFactor, currentVale) {
|
||||
let payEndYearVal, insuYearVal
|
||||
@@ -1017,9 +1014,14 @@ export default {
|
||||
insuYearVal = Number(currentVale)
|
||||
payEndYearVal = this.getPayEndYearOrInsuYear('payEndYear', currentFactor)
|
||||
}
|
||||
if (payEndYearVal > insuYearVal) {
|
||||
this.$toast('交费期间不能超过保险期间')
|
||||
return true
|
||||
//交费期限为一次性交清时,val为1000,直接跳过此规则
|
||||
if (payEndYearVal != 1000) {
|
||||
if (payEndYearVal > insuYearVal) {
|
||||
this.$toast('交费期间不能超过保险期间')
|
||||
return true
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
@@ -1546,7 +1548,7 @@ export default {
|
||||
} else {
|
||||
if ((Number(defalutValue) * 10000) % (Number(currentEle.limit) * 10000) != 0) {
|
||||
// this.defalutAmt = currentEle.rules[productIndex].displayAmount
|
||||
this.$toast('56周岁-60周岁最低基本保险金额为10000元。超过最低基本保险金额为10000元整数倍。')
|
||||
this.$toast('56周岁-60周岁最低基本保险金额为10000元。超过最低基本保险金额为10000元整数倍。')
|
||||
this.nextStepFlag = true
|
||||
} else {
|
||||
this.mainRiskInfluenceAddRisk()
|
||||
@@ -1563,7 +1565,7 @@ export default {
|
||||
} else {
|
||||
if ((Number(defalutValue) * 10000) % (Number(currentEle.limit) * 10000) != 0) {
|
||||
// this.defalutAmt = currentEle.rules[productIndex].displayAmount
|
||||
this.$toast('0周岁-55周岁最低基本保险金额为50000元。超过最低基本保险金额为10000元整数倍。')
|
||||
this.$toast('0周岁-55周岁最低基本保险金额为50000元。超过最低基本保险金额为10000元整数倍。')
|
||||
this.nextStepFlag = true
|
||||
} else {
|
||||
this.mainRiskInfluenceAddRisk()
|
||||
@@ -1610,44 +1612,7 @@ export default {
|
||||
}
|
||||
}
|
||||
//isTrial为0 ---暂时为富娃娃两全保险(万能型)专配 输入保费校验
|
||||
}else if (productCode == 'GFRS_M0040') {
|
||||
// 惠企保保额限制
|
||||
//被保险人年龄如果在41-60区间
|
||||
if (this.saleInsuredPersonInfo.age >= 41) {
|
||||
//使用rules规则里的第二条控制保额份数
|
||||
if (Number(defalutValue) < Number(riskFactor.rules[1].minPrem) || Number(defalutValue) > Number(riskFactor.rules[1].maxPrem)) {
|
||||
this.$toast('年龄在41周岁至60周岁被保险人,投保本险种时,最低基本保险金额为50000元。超过最低基本保险金额为10000元整数倍。')
|
||||
this.nextStepFlag = true
|
||||
} else {
|
||||
if ((Number(defalutValue) * 10000) % (Number(currentEle.limit) * 10000) != 0) {
|
||||
// this.defalutAmt = currentEle.rules[productIndex].displayAmount
|
||||
this.$toast('年龄在41周岁至60周岁被保险人,投保本险种时,最低基本保险金额为50000元。超过最低基本保险金额为10000元整数倍。')
|
||||
this.nextStepFlag = true
|
||||
} else {
|
||||
this.mainRiskInfluenceAddRisk()
|
||||
currentEle['amt'] = Number(defalutValue) * Number(currentEle.moneyUnit)
|
||||
this.getTrial()
|
||||
}
|
||||
}
|
||||
} else if (this.saleInsuredPersonInfo.age >= 0 && this.saleInsuredPersonInfo.age <= 40) {
|
||||
//使用rules规则里的第一条控制保额份数
|
||||
if (Number(defalutValue) < Number(riskFactor.rules[0].minPrem) || Number(defalutValue) > Number(riskFactor.rules[0].maxPrem)) {
|
||||
this.$toast('年龄在0-40周岁被保险人,投保本险种时,最低基本保险金额为100000元,超过最低基本保险金额为10000元整数倍。')
|
||||
this.nextStepFlag = true
|
||||
} else {
|
||||
if ((Number(defalutValue) * 10000) % (Number(currentEle.limit) * 10000) != 0) {
|
||||
// this.defalutAmt = currentEle.rules[productIndex].displayAmount
|
||||
this.$toast('年龄在0-40周岁被保险人,投保本险种时,最低基本保险金额为100000元,超过最低基本保险金额为10000元整数倍。')
|
||||
this.nextStepFlag = true
|
||||
} else {
|
||||
this.mainRiskInfluenceAddRisk()
|
||||
currentEle['amt'] = Number(defalutValue) * Number(currentEle.moneyUnit)
|
||||
this.getTrial()
|
||||
}
|
||||
}
|
||||
}
|
||||
//isTrial为0 ---暂时为富娃娃两全保险(万能型)专配 输入保费校验
|
||||
} else if (this.isTrial === '0' && this.chooseProducts[productIndex].isMainRisk == '0') {
|
||||
} else if (this.isTrial === '0' && this.chooseProducts[productIndex].isMainRisk == '0') {
|
||||
if (Number(defalutValue) < Number(min)) {
|
||||
this.$toast(`交费期间为${riskFactor.yearWay}年交时,最低保费为${Number(min) * Number(riskFactor.moneyUnit)}元`)
|
||||
this.nextStepFlag = true
|
||||
@@ -1783,8 +1748,11 @@ export default {
|
||||
riskItem['amt'] = this.trialList[index].amt
|
||||
} else {
|
||||
//国富人寿桂企保重大疾病保险产品专写
|
||||
if (this.trialList[index].productCode == 'GFRS_M0024' || this.trialList[index].productCode == 'GFRS_M0040'
|
||||
|| this.trialList[index].productCode == 'GFRS_M0044') {
|
||||
if (
|
||||
this.trialList[index].productCode == 'GFRS_M0024' ||
|
||||
this.trialList[index].productCode == 'GFRS_M0040' ||
|
||||
this.trialList[index].productCode == 'GFRS_M0044'
|
||||
) {
|
||||
riskItem['dutyLst'] = this.trialInfos[index].duty
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user