mirror of
http://112.124.100.131/GFRS/ebiz-h5.git
synced 2025-12-23 05:16:43 +08:00
投被不同人:投保人豁免险单独搭配主险时,投保人豁免险,豁免主险保费,当投保人豁免险加两全时,豁免主险保费加两全保费
This commit is contained in:
@@ -77,13 +77,31 @@
|
||||
<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' || item.productCode == 'GFRS_M0046'|| item.productCode == 'GFRS_M0051')" class="fs14 w100"
|
||||
<span
|
||||
v-if="
|
||||
!(
|
||||
item.productCode == 'GFRS_M0024' ||
|
||||
item.productCode == 'GFRS_M0040' ||
|
||||
item.productCode == 'GFRS_M0044' ||
|
||||
item.productCode == 'GFRS_M0046' ||
|
||||
item.productCode == 'GFRS_M0051'
|
||||
)
|
||||
"
|
||||
class="fs14 w100"
|
||||
>{{ dutyItem.dutyName }}({{ dutyItem.suffix }})</span
|
||||
>
|
||||
<span v-else class="fs14 w100">{{ dutyItem.dutyName }}</span>
|
||||
<div class="flex relative">
|
||||
<van-stepper
|
||||
v-if="!(item.productCode == 'GFRS_M0024' || item.productCode == 'GFRS_M0040' || item.productCode == 'GFRS_M0044' || item.productCode == 'GFRS_M0046'|| item.productCode == 'GFRS_M0051')"
|
||||
v-if="
|
||||
!(
|
||||
item.productCode == 'GFRS_M0024' ||
|
||||
item.productCode == 'GFRS_M0040' ||
|
||||
item.productCode == 'GFRS_M0044' ||
|
||||
item.productCode == 'GFRS_M0046' ||
|
||||
item.productCode == 'GFRS_M0051'
|
||||
)
|
||||
"
|
||||
v-model="dutyItem.defaultDutyAmt"
|
||||
:min="dutyItem.minDutyAmt"
|
||||
:max="dutyItem.maxDutyAmt"
|
||||
@@ -446,7 +464,7 @@ export default {
|
||||
methods: {
|
||||
renewalShow(productCode) {
|
||||
let codes = ['GFRS_M0016', 'GFRS_M0005', 'GFRS_M0018']
|
||||
return codes.find(item => {
|
||||
return codes.find((item) => {
|
||||
return productCode === item
|
||||
})
|
||||
},
|
||||
@@ -478,13 +496,13 @@ export default {
|
||||
this.chooseProducts = JSON.parse(localStorage.chooseProducts)
|
||||
this.chooseProducts.forEach((item, index) => {
|
||||
if (item.isCrossChannel == '1') {
|
||||
this.isCrossChannel = item.isCrossChannel;
|
||||
this.isCrossChannel = item.isCrossChannel
|
||||
}
|
||||
if (item.mainRiskCode == 'GFRS_M0006') {
|
||||
item.isHidden = true
|
||||
}
|
||||
if (item.mainRiskCode != 'GFRS_M0008') {
|
||||
item.calFactorLst.map(i => {
|
||||
item.calFactorLst.map((i) => {
|
||||
// this.defalutAmt = i.displayAmount || 1
|
||||
if (i.code == 'inputPrem') {
|
||||
this.mult = Math.ceil(Number(i.displayAmount) / Number(i.defaultValue))
|
||||
@@ -493,12 +511,12 @@ export default {
|
||||
}
|
||||
if (item.mainRiskCode == 'GFRS_M0046') {
|
||||
if (this.saleInsuredPersonInfo.relationToAppnt == 1) {
|
||||
this.isEnterAddtionRiskListFunc();
|
||||
this.isEnterAddtionRiskListFunc()
|
||||
}
|
||||
}
|
||||
let payEndYearVal
|
||||
//初始化时交费期间为一次性交清时,在就是中介渠道, 附加险GFRS_A0007,GFRS_A0009去掉后,附加险list就为空--隐藏’附‘icon
|
||||
item.calFactorLst.map(i => {
|
||||
item.calFactorLst.map((i) => {
|
||||
if (i.code == 'payEndYear') {
|
||||
if (i.payEndYear == '1000' && i.payEndYearFlag == 'Y') {
|
||||
this.isEnterAddtionRiskListFunc()
|
||||
@@ -514,7 +532,7 @@ export default {
|
||||
if (payEndYearVal == item.yearWay + '年交') {
|
||||
that.payEndYearColumnsIndex = index
|
||||
}
|
||||
});
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@@ -538,11 +556,11 @@ export default {
|
||||
}
|
||||
})
|
||||
if (this.mainRiskCode == 'GFRS_M0005') {
|
||||
this.chooseProducts.map(item => {
|
||||
this.chooseProducts.map((item) => {
|
||||
if (item.productCode == 'GFRS_A0004') {
|
||||
item.calFactorLst.map(item2 => {
|
||||
item.calFactorLst.map((item2) => {
|
||||
if (item2.code == 'dutyGroup') {
|
||||
item2.rules.map(item3 => {
|
||||
item2.rules.map((item3) => {
|
||||
if (item3.duty == '320205') {
|
||||
item3.maxDutyAmt = '1'
|
||||
}
|
||||
@@ -553,11 +571,11 @@ export default {
|
||||
})
|
||||
}
|
||||
if (this.mainRiskCode == 'GFRS_M0031' || this.mainRiskCode == 'GFRS_M0005' || this.mainRiskCode == 'GFRS_M0042' || this.mainRiskCode == 'GFRS_M0043') {
|
||||
this.chooseProducts.map(item => {
|
||||
this.chooseProducts.map((item) => {
|
||||
if (item.productCode == 'GFRS_A0008') {
|
||||
item.calFactorLst.map(item2 => {
|
||||
item.calFactorLst.map((item2) => {
|
||||
if (item2.code == 'dutyGroup') {
|
||||
item2.rules.map(item3 => {
|
||||
item2.rules.map((item3) => {
|
||||
if (item3.duty == '320404') {
|
||||
item3.maxDutyAmt = '1'
|
||||
}
|
||||
@@ -571,10 +589,10 @@ export default {
|
||||
//GFRS_M0016需要展示免赔额和赔付比例,并需要根据是否有社保调整数值
|
||||
// let mainRiskCode = chooseProducts[0].mainRiskCode
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
this.dogetLimitAndGetRate().then(res => {
|
||||
this.dogetLimitAndGetRate().then((res) => {
|
||||
if (this.chooseProducts[0].influences && this.chooseProducts[0].influences.length > 0) {
|
||||
this.influences = this.chooseProducts[0].influences
|
||||
this.chooseProducts[0].influences.forEach(item => {
|
||||
this.chooseProducts[0].influences.forEach((item) => {
|
||||
this.influenceAddRiskCodes.push(item.productCode)
|
||||
})
|
||||
}
|
||||
@@ -582,16 +600,17 @@ export default {
|
||||
//初始化数据试算
|
||||
this.getTrial()
|
||||
})
|
||||
console.log(this.trialList, '')
|
||||
|
||||
// 判断是否 含有 后台配置js验证函数
|
||||
if (localStorage.ruleExpression) {
|
||||
let ruleExpression = JSON.parse(localStorage.ruleExpression)
|
||||
this.ruleExpression = ruleExpression
|
||||
let productCodes = Object.keys(ruleExpression)
|
||||
productCodes.forEach(itemKey => {
|
||||
productCodes.forEach((itemKey) => {
|
||||
let rules = ruleExpression[itemKey]
|
||||
rules.eventList = []
|
||||
rules.forEach(item => {
|
||||
rules.forEach((item) => {
|
||||
let config = ''
|
||||
config = JSON.parse(item.ruleExpression)
|
||||
// let errorMsg = item.errorMsg;
|
||||
@@ -704,7 +723,7 @@ export default {
|
||||
async dogetLimitAndGetRate() {
|
||||
const orderNo = this.$CacheUtils.getLocItem('orderNo')
|
||||
let detailPromise = this.isFrom === 'proposal' ? localStorage.proposalMedical : await getOrderDetail({ orderNo })
|
||||
this.chooseProducts.map(item => {
|
||||
this.chooseProducts.map((item) => {
|
||||
if (
|
||||
!(item.mainRiskCode === 'GFRS_M0016' || item.productCode === 'GFRS_A0004' || item.productCode === 'GFRS_A0008' || item.productCode === 'GFRS_A0005')
|
||||
) {
|
||||
@@ -726,9 +745,9 @@ export default {
|
||||
isMedical = detailPromise.orderDTO.insuredDTOs[0].medical == '0'
|
||||
}
|
||||
// 赔付比例和免赔额
|
||||
item.calFactorLst.map(i => {
|
||||
item.calFactorLst.map((i) => {
|
||||
if (i.code === 'getLimit') {
|
||||
let tempColumns = i.columns.filter(itemC => {
|
||||
let tempColumns = i.columns.filter((itemC) => {
|
||||
return itemC.medical == Math.abs(isMedical - 1).toString()
|
||||
})
|
||||
if (tempColumns.length !== 0) {
|
||||
@@ -739,7 +758,7 @@ export default {
|
||||
}
|
||||
//赔付比例
|
||||
if (i.code === 'getRate') {
|
||||
let tempColumns = i.columns.filter(itemC => {
|
||||
let tempColumns = i.columns.filter((itemC) => {
|
||||
return itemC.medical == Math.abs(isMedical - 1).toString()
|
||||
})
|
||||
if (tempColumns.length !== 0) {
|
||||
@@ -763,7 +782,7 @@ export default {
|
||||
if (this.chooseProducts[productIndex].productCode === 'GFRS_A0004') return
|
||||
// 008险种其他验证方式
|
||||
if (this.chooseProducts[productIndex].productCode === 'GFRS_A0008') return
|
||||
if (this.chooseProducts[productIndex].productCode === 'GFRS_A0003' || this.chooseProducts[productIndex].productCode === 'GFRS_A0009') {
|
||||
if (this.chooseProducts[productIndex].productCode === 'GFRS_A0003' || this.chooseProducts[productIndex].productCode === 'GFRS_A0009'|| this.chooseProducts[productIndex].productCode === 'GFRS_A0010') {
|
||||
this.getTrial()
|
||||
return
|
||||
}
|
||||
@@ -787,7 +806,7 @@ export default {
|
||||
if (isChecked) {
|
||||
;[this.productIndex, this.calFactorIndex] = [productIndex, calFactorIndex]
|
||||
let currentEle = this.chooseProducts[productIndex].calFactorLst[calFactorIndex].rules
|
||||
currentEle.forEach(item => {
|
||||
currentEle.forEach((item) => {
|
||||
item.amt = Number(item.minDutyAmt) * Number(item.moneyUnit)
|
||||
})
|
||||
this.mainRiskInfluenceAddRisk()
|
||||
@@ -795,7 +814,7 @@ export default {
|
||||
} else {
|
||||
;[this.productIndex, this.calFactorIndex] = [productIndex, calFactorIndex]
|
||||
let currentEle = this.chooseProducts[productIndex].calFactorLst[calFactorIndex].rules
|
||||
currentEle.forEach(item => {
|
||||
currentEle.forEach((item) => {
|
||||
item.amt = Number(item.minDutyAmt) * Number(item.moneyUnit)
|
||||
})
|
||||
}
|
||||
@@ -835,7 +854,7 @@ export default {
|
||||
this.isClearAddtionRiskListFunc()
|
||||
} else if (this.chooseProducts[this.productIndex].mainRiskCode == 'GFRS_M0046') {
|
||||
if (this.saleInsuredPersonInfo.relationToAppnt == 1) {
|
||||
this.isEnterAddtionRiskListFunc();
|
||||
this.isEnterAddtionRiskListFunc()
|
||||
}
|
||||
} else {
|
||||
this.isEnterAddtionRisk = true
|
||||
@@ -872,7 +891,7 @@ export default {
|
||||
this.errorMsg = []
|
||||
let currentFactor = this.chooseProducts[this.productIndex].calFactorLst
|
||||
let currentEle = currentFactor[this.calFactorIndex]
|
||||
this.ruleExpression[productCode].eventList.forEach(item => {
|
||||
this.ruleExpression[productCode].eventList.forEach((item) => {
|
||||
this.$emit(item, currentFactor, currentEle.code, value)
|
||||
})
|
||||
if (this.errorMsg.length > 0) {
|
||||
@@ -906,7 +925,7 @@ export default {
|
||||
//交费期间为一次性交清时,清空豁免险GFRS_A0007,GFRS_A0009,并更新localStorage
|
||||
isClearAddtionRiskListFunc() {
|
||||
let chooseProductsNew = []
|
||||
this.chooseProducts.forEach(item01 => {
|
||||
this.chooseProducts.forEach((item01) => {
|
||||
if (item01.productCode != 'GFRS_A0007' && item01.productCode != 'GFRS_A0009') {
|
||||
chooseProductsNew.push(item01)
|
||||
}
|
||||
@@ -918,13 +937,12 @@ export default {
|
||||
},
|
||||
// 交通责任险复选框变化
|
||||
changeChecked(productIndex, calFactorIndex, dutyItemIndex, dutyItem) {
|
||||
let isChecked = this.chooseProducts[productIndex].calFactorLst[calFactorIndex].rules.some(item => {
|
||||
let isChecked = this.chooseProducts[productIndex].calFactorLst[calFactorIndex].rules.some((item) => {
|
||||
return item.necess == true
|
||||
})
|
||||
if (!isChecked) {
|
||||
this.chooseProducts[productIndex].calFactorLst[calFactorIndex].rules[dutyItemIndex]['necess'] = !this.chooseProducts[productIndex].calFactorLst[
|
||||
calFactorIndex
|
||||
].rules[dutyItemIndex]['necess']
|
||||
this.chooseProducts[productIndex].calFactorLst[calFactorIndex].rules[dutyItemIndex]['necess'] =
|
||||
!this.chooseProducts[productIndex].calFactorLst[calFactorIndex].rules[dutyItemIndex]['necess']
|
||||
return false
|
||||
}
|
||||
this.valiAndSend(dutyItem, productIndex)
|
||||
@@ -1105,7 +1123,7 @@ export default {
|
||||
isEnterAddtionRiskListFunc() {
|
||||
let addtionRiskLst = JSON.parse(localStorage.addtionRiskLst)
|
||||
if (addtionRiskLst) {
|
||||
let list = [];
|
||||
let list = []
|
||||
addtionRiskLst.forEach((item, index) => {
|
||||
if (item.productCode != 'GFRS_A0007' && item.productCode != 'GFRS_A0009') {
|
||||
list.push(item)
|
||||
@@ -1120,7 +1138,7 @@ export default {
|
||||
},
|
||||
getPayEndYearOrInsuYear(flag, currentFactor) {
|
||||
let returnVal
|
||||
currentFactor.forEach(item => {
|
||||
currentFactor.forEach((item) => {
|
||||
if (item.code == flag) {
|
||||
returnVal = item[flag]
|
||||
}
|
||||
@@ -1168,10 +1186,10 @@ export default {
|
||||
}
|
||||
},
|
||||
setAddtionRiskMaxAmt(mainRiskAmt, index) {
|
||||
this.chooseProducts[index].calFactorLst.forEach(item => {
|
||||
this.chooseProducts[index].calFactorLst.forEach((item) => {
|
||||
if (item.code == 'amt' || item.code == 'planCode') {
|
||||
let columnsValArr = []
|
||||
item.columns.forEach(option => {
|
||||
item.columns.forEach((option) => {
|
||||
columnsValArr.push(Number(option.amt))
|
||||
if (Number(option.amt) > mainRiskAmt * 10000) {
|
||||
option.disabled = true
|
||||
@@ -1184,7 +1202,7 @@ export default {
|
||||
let currentAmt = this.getAmtByPlanCode(item.columns, item.planCode)
|
||||
if (mainRiskAmt * 10000 < currentAmt) {
|
||||
let minVal = columnsValArr.min()
|
||||
item.columns.forEach(option => {
|
||||
item.columns.forEach((option) => {
|
||||
if (option.amt == minVal) {
|
||||
item.showContent = option.text
|
||||
item.planCode = option.value
|
||||
@@ -1197,7 +1215,7 @@ export default {
|
||||
},
|
||||
getAmtByPlanCode(columns, planCode) {
|
||||
let amt = ''
|
||||
columns.forEach(item => {
|
||||
columns.forEach((item) => {
|
||||
if (item.value == planCode) {
|
||||
amt = item.amt
|
||||
}
|
||||
@@ -1205,7 +1223,7 @@ export default {
|
||||
return amt
|
||||
},
|
||||
setInputAddtionRiskMaxAmt(mainRiskAmt, index) {
|
||||
this.chooseProducts[index].calFactorLst.forEach(item => {
|
||||
this.chooseProducts[index].calFactorLst.forEach((item) => {
|
||||
if (item.type == 1) {
|
||||
item.maxAmt = Math.min(mainRiskAmt, item.oldMaxAmt)
|
||||
//减保额份数
|
||||
@@ -1217,7 +1235,7 @@ export default {
|
||||
},
|
||||
getMainRiskAmt() {
|
||||
let mainRiskAmt
|
||||
this.chooseProducts[0].calFactorLst.forEach(item => {
|
||||
this.chooseProducts[0].calFactorLst.forEach((item) => {
|
||||
if (item.type == 1) {
|
||||
mainRiskAmt = item.defaultValue
|
||||
}
|
||||
@@ -1226,7 +1244,7 @@ export default {
|
||||
},
|
||||
getInfluencesItem(productCode) {
|
||||
let currentInfluences
|
||||
this.chooseProducts[0].influences.forEach(item => {
|
||||
this.chooseProducts[0].influences.forEach((item) => {
|
||||
if (item.productCode == productCode) {
|
||||
currentInfluences = item
|
||||
}
|
||||
@@ -1236,6 +1254,7 @@ export default {
|
||||
},
|
||||
//特殊规则3、设置豁免险
|
||||
setRemitRisk() {
|
||||
let that = this
|
||||
//1、一次性交清和交费期间单位为A时,删除豁免险
|
||||
let mainRiskInfo = this.getMainRiskInfo()
|
||||
let mainRiskPayIntv = mainRiskInfo.payIntv.payIntv
|
||||
@@ -1254,7 +1273,7 @@ export default {
|
||||
let remitIndex = this.getRemitIndex()
|
||||
//if (!remitIndex) return
|
||||
for (let itemRemitIndex of remitIndex) {
|
||||
this.chooseProducts[itemRemitIndex].calFactorLst.forEach(item => {
|
||||
this.chooseProducts[itemRemitIndex].calFactorLst.forEach((item) => {
|
||||
if (item.code == 'payIntv') {
|
||||
for (let key in mainRiskInfo.payIntv) {
|
||||
item[key] = mainRiskInfo.payIntv[key]
|
||||
@@ -1288,7 +1307,7 @@ export default {
|
||||
item.showContent = mainRiskInfo.insuYear.showContent
|
||||
}
|
||||
if (item.code == 'dutyGroup') {
|
||||
item.rules.forEach(v => {
|
||||
item.rules.forEach((v) => {
|
||||
try {
|
||||
if (mainRiskInfo.inputPrem.displayAmount && mainRiskInfo.inputPrem.moneyUnit) {
|
||||
v.amt = mainRiskInfo.inputPrem.displayAmount * mainRiskInfo.inputPrem.moneyUnit
|
||||
@@ -1296,8 +1315,8 @@ export default {
|
||||
// 解决这个问题--建议书添加 附加豁免保险费重大疾病保险 不展示险种保费
|
||||
// inputPrem 这个里面的规则删除导致的
|
||||
let payEndYearVal
|
||||
this.chooseProducts.map(item => {
|
||||
item.calFactorLst.map(i => {
|
||||
this.chooseProducts.map((item) => {
|
||||
item.calFactorLst.map((i) => {
|
||||
if (i.code == 'payEndYear') {
|
||||
payEndYearVal = i.showContent
|
||||
}
|
||||
@@ -1330,8 +1349,8 @@ export default {
|
||||
// 解决这个问题--建议书添加 附加豁免保险费重大疾病保险 不展示险种保费
|
||||
// inputPrem 这个里面的规则删除导致的
|
||||
let payEndYearVal01
|
||||
this.chooseProducts.map(item01 => {
|
||||
item01.calFactorLst.map(i => {
|
||||
this.chooseProducts.map((item01) => {
|
||||
item01.calFactorLst.map((i) => {
|
||||
if (i.code == 'payEndYear') {
|
||||
payEndYearVal01 = i.showContent
|
||||
}
|
||||
@@ -1354,7 +1373,22 @@ export default {
|
||||
}
|
||||
})
|
||||
}
|
||||
let product = this.chooseProducts.find(item => {
|
||||
|
||||
// 3.针对于国富人寿附加两全保险附加险(GFRS_A0011),缴费期间期间要等于主险的缴费期间
|
||||
this.chooseProducts.forEach((item) => {
|
||||
if (item.productCode == 'GFRS_A0011') {
|
||||
item.calFactorLst.map((item2) => {
|
||||
if (item2.code == 'payEndYear') {
|
||||
item2.hasFlag = '1'
|
||||
item2.payEndYearFlag = 'Y'
|
||||
item2.payEndYear = Number(mainRiskInfo.payEndYear.payEndYear)
|
||||
item2.showContent = item2.payEndYear + '年交'
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
let product = this.chooseProducts.find((item) => {
|
||||
return item.productCode === 'GFRS_A0006'
|
||||
})
|
||||
if (product && this.richChildrenFlag) {
|
||||
@@ -1362,7 +1396,7 @@ export default {
|
||||
product.calFactorLst[2].showContent = '月交'
|
||||
product.calFactorLst[0].columns[0].text = '月交'
|
||||
product.calFactorLst[2].columns[0].text = '月交'
|
||||
let remitProduct = this.trialList.find(item => {
|
||||
let remitProduct = this.trialList.find((item) => {
|
||||
return item.productCode === 'GFRS_A0006'
|
||||
})
|
||||
if (remitProduct) {
|
||||
@@ -1371,6 +1405,51 @@ export default {
|
||||
remitProduct.payIntv = 1
|
||||
}
|
||||
}
|
||||
|
||||
if (this.trialList.length) {
|
||||
let showPrem //计算后的保费
|
||||
let showPrem001 //两全险的保费
|
||||
this.chooseProducts.forEach((item, index) => {
|
||||
//(被保险人)国富人寿附加豁免保险费重大疾病保险(B款)GFRS_A0010
|
||||
//(投保人)国富人寿附加豁免保险费重大疾病保险(B款) GFRS_A0009
|
||||
//国富人寿附加两全保险条款 GFRS_A0011
|
||||
//只有在搭配附加两全时,才能搭配被保险人附加豁免重疾B;
|
||||
//获取两全险的保费
|
||||
if (item.productCode == 'GFRS_A0011') {
|
||||
showPrem001 = that.trialList[index].showPrem
|
||||
}
|
||||
})
|
||||
this.chooseProducts.forEach((item, index) => {
|
||||
if (item.productCode == 'GFRS_A0010' || item.productCode == 'GFRS_A0009') {
|
||||
//(投保人)国富人寿附加豁免保险费重大疾病保险(B款)
|
||||
// 投被不同人:投保人豁免险单独搭配主险时,投保人豁免险,豁免主险保费,当投保人豁免险加两全时,豁免主险保费加两全保费
|
||||
if (item.productCode == 'GFRS_A0009') {
|
||||
if (this.saleInsuredPersonInfo.relationToAppnt != 1) {
|
||||
//不同人
|
||||
if (showPrem001) {
|
||||
//加两全时
|
||||
showPrem = Number(showPrem001) + Number(that.trialList[0].showPrem)
|
||||
} else {
|
||||
showPrem = Number(that.trialList[0].showPrem)
|
||||
}
|
||||
}
|
||||
} else if (item.productCode == 'GFRS_A0010') {
|
||||
//(被保险人)国富人寿附加豁免保险费重大疾病保险(B款)GFRS_A0010
|
||||
//投被同人,不同人:被保人豁免险搭配两全时,可选责任为必选,豁免两全保费
|
||||
showPrem = Number(showPrem001)
|
||||
}
|
||||
item.calFactorLst.map((item2) => {
|
||||
if (item2.code == 'dutyGroup') {
|
||||
item2.rules.map((item3) => {
|
||||
item3.defaultDutyAmt = (showPrem / 10000).toFixed(6)
|
||||
item3.defaultValue = '0'
|
||||
item3.necess = true
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
getRemitIndex() {
|
||||
let remitIndex = []
|
||||
@@ -1383,7 +1462,7 @@ export default {
|
||||
},
|
||||
getMainRiskInfo() {
|
||||
let mainRiskInfo = {}
|
||||
this.chooseProducts[0].calFactorLst.forEach(item => {
|
||||
this.chooseProducts[0].calFactorLst.forEach((item) => {
|
||||
mainRiskInfo[item.code] = item
|
||||
})
|
||||
return mainRiskInfo
|
||||
@@ -1447,26 +1526,35 @@ export default {
|
||||
this.chooseProducts.splice(index, 1)
|
||||
}
|
||||
|
||||
if ( this.chooseProducts[0].mainRiskCode == 'GFRS_M0051'||this.chooseProducts[0].mainRiskCode == 'GFRS_M0044'
|
||||
|| this.chooseProducts[0].mainRiskCode == 'GFRS_M0035'||this.chooseProducts[0].mainRiskCode == 'GFRS_M0038'
|
||||
|| this.chooseProducts[0].mainRiskCode == 'GFRS_M0040'){
|
||||
let risks = this.chooseProducts;
|
||||
let longRisks=[];
|
||||
if (
|
||||
this.chooseProducts[0].mainRiskCode == 'GFRS_M0051' ||
|
||||
this.chooseProducts[0].mainRiskCode == 'GFRS_M0044' ||
|
||||
this.chooseProducts[0].mainRiskCode == 'GFRS_M0035' ||
|
||||
this.chooseProducts[0].mainRiskCode == 'GFRS_M0038' ||
|
||||
this.chooseProducts[0].mainRiskCode == 'GFRS_M0040'
|
||||
) {
|
||||
let risks = this.chooseProducts
|
||||
let longRisks = []
|
||||
//拿到长险附加险数组
|
||||
for (let i = 1; i < risks.length; i++) {
|
||||
for (let j = 0; j < risks[i].calFactorLst.length; j++) {
|
||||
if (risks[i].calFactorLst[j].code === 'insuYear') {
|
||||
if (((risks[i].calFactorLst[j].insuYearFlag == 'Y' && risks[i].calFactorLst[j].insuYear > 1)
|
||||
|| risks[i].calFactorLst[j].insuYearFlag == 'A')
|
||||
&&risks[i].productCode!='GFRS_A0010') {
|
||||
longRisks.push(risks[i].productCode);
|
||||
if (
|
||||
((risks[i].calFactorLst[j].insuYearFlag == 'Y' && risks[i].calFactorLst[j].insuYear > 1) || risks[i].calFactorLst[j].insuYearFlag == 'A') &&
|
||||
risks[i].productCode != 'GFRS_A0010'
|
||||
) {
|
||||
longRisks.push(risks[i].productCode)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if((this.chooseProducts.length==2&&this.chooseProducts[1].productCode=='GFRS_A0010')
|
||||
||(this.chooseProducts.length==3&&JSON.stringify(this.chooseProducts).includes("GFRS_A0010")&&JSON.stringify(this.chooseProducts).includes("GFRS_A0009"))
|
||||
||(longRisks.length<=0&&this.chooseProducts.length>1)){
|
||||
if (
|
||||
(this.chooseProducts.length == 2 && this.chooseProducts[1].productCode == 'GFRS_A0010') ||
|
||||
(this.chooseProducts.length == 3 &&
|
||||
JSON.stringify(this.chooseProducts).includes('GFRS_A0010') &&
|
||||
JSON.stringify(this.chooseProducts).includes('GFRS_A0009')) ||
|
||||
(longRisks.length <= 0 && this.chooseProducts.length > 1)
|
||||
) {
|
||||
Dialog.alert({
|
||||
title: '提示',
|
||||
message: '当前未投保其他长险附加险,将删除该险种重新选择附加险!'
|
||||
@@ -1478,8 +1566,12 @@ export default {
|
||||
// this.$toast('当前未投保其他长险附加险,请删除该险种重新选择附加险!')
|
||||
// this.nextStepFlag = true
|
||||
}
|
||||
if(this.chooseProducts.length==3&&JSON.stringify(this.chooseProducts).includes("GFRS_A0010")&&JSON.stringify(this.chooseProducts).includes("GFRS_A0009")
|
||||
||(longRisks.length<=0&&this.chooseProducts.length>1)){
|
||||
if (
|
||||
(this.chooseProducts.length == 3 &&
|
||||
JSON.stringify(this.chooseProducts).includes('GFRS_A0010') &&
|
||||
JSON.stringify(this.chooseProducts).includes('GFRS_A0009')) ||
|
||||
(longRisks.length <= 0 && this.chooseProducts.length > 1)
|
||||
) {
|
||||
this.$toast('当前未投保其他长险附加险,请删除该险种重新选择附加险!')
|
||||
this.nextStepFlag = true
|
||||
this.chooseProducts.splice(1, 2)
|
||||
@@ -1515,22 +1607,22 @@ export default {
|
||||
|
||||
let age = this.saleInsuredPersonInfo.age
|
||||
let trialFlag = true
|
||||
params.trialInfos.forEach(item => {
|
||||
params.trialInfos.forEach((item) => {
|
||||
if (item.productCode == 'GFRS_A0011') {
|
||||
if (item.insuYear == '60' && item.payEndYear == '30' && age > 30) {
|
||||
this.nextStepFlag = true
|
||||
this.$toast('被保险人年龄不适合该交费期间或保险期间!')
|
||||
trialFlag = false
|
||||
}
|
||||
else if(item.insuYear == '70' && item.payEndYear =='30' && age > 40){
|
||||
} else if (item.insuYear == '70' && item.payEndYear == '30' && age > 40) {
|
||||
this.nextStepFlag = true
|
||||
this.$toast('被保险人年龄不适合该交费期间或保险期间!')
|
||||
trialFlag = false
|
||||
}
|
||||
else if((item.insuYear == '80' && item.payEndYear =='15' && age > 55)
|
||||
|| (item.insuYear == '80' && item.payEndYear =='19' && age > 50)
|
||||
|| (item.insuYear == '80' && item.payEndYear =='20' && age > 50)
|
||||
|| (item.insuYear == '80' && item.payEndYear =='30' && age > 40)){
|
||||
} else if (
|
||||
(item.insuYear == '80' && item.payEndYear == '15' && age > 55) ||
|
||||
(item.insuYear == '80' && item.payEndYear == '19' && age > 50) ||
|
||||
(item.insuYear == '80' && item.payEndYear == '20' && age > 50) ||
|
||||
(item.insuYear == '80' && item.payEndYear == '30' && age > 40)
|
||||
) {
|
||||
this.nextStepFlag = true
|
||||
this.$toast('被保险人年龄不适合该交费期间或保险期间!')
|
||||
trialFlag = false
|
||||
@@ -1566,9 +1658,9 @@ export default {
|
||||
trialInfos: []
|
||||
}
|
||||
|
||||
this.chooseProducts.forEach(item => {
|
||||
this.chooseProducts.forEach((item) => {
|
||||
let trialInfo = {}
|
||||
item.calFactorLst.forEach(factor => {
|
||||
item.calFactorLst.forEach((factor) => {
|
||||
if (factor.type == 0) {
|
||||
if (factor.hasFlag == '1') {
|
||||
trialInfo[factor.code] = factor[factor.code]
|
||||
@@ -1595,7 +1687,7 @@ export default {
|
||||
trialInfo.jobLevel = this.saleInsuredPersonInfo[factor.code]
|
||||
} else if (factor.type == 3) {
|
||||
let result = []
|
||||
factor.rules.forEach(dutyItem => {
|
||||
factor.rules.forEach((dutyItem) => {
|
||||
if (dutyItem.necess) {
|
||||
// trialInfo['amt'] = this.trialList[index].amt
|
||||
result.push({
|
||||
@@ -1668,7 +1760,7 @@ export default {
|
||||
selectAddtionRisk() {
|
||||
//存储附加险列表
|
||||
let addRiskCodes = []
|
||||
this.chooseProducts.forEach(item => {
|
||||
this.chooseProducts.forEach((item) => {
|
||||
if (item.isMainRisk == 1) {
|
||||
addRiskCodes.push(item.productCode)
|
||||
}
|
||||
@@ -1677,7 +1769,7 @@ export default {
|
||||
addRiskCodes = addRiskCodes.concat(JSON.parse(localStorage.oldAddRiskCodes))
|
||||
}
|
||||
//930折中方案,豁免险挂订单
|
||||
addRiskCodes = addRiskCodes.filter(riskCode => {
|
||||
addRiskCodes = addRiskCodes.filter((riskCode) => {
|
||||
return riskCode != 'DCRS_A0001'
|
||||
})
|
||||
|
||||
@@ -2015,7 +2107,6 @@ export default {
|
||||
riskItem['amt'] = this.trialList[index].prem
|
||||
}
|
||||
}
|
||||
|
||||
//豁免险保额处理
|
||||
if (item.isRemit == '0') {
|
||||
this.trialInfos[index].amt = this.trialList[0].prem
|
||||
@@ -2048,8 +2139,13 @@ export default {
|
||||
|
||||
//国富人寿桂企保重大疾病保险产品专写
|
||||
this.trialInfos.map((v, i) => {
|
||||
if (v.productCode == 'GFRS_M0024' || v.productCode == 'GFRS_M0040' || v.productCode == 'GFRS_M0044'
|
||||
|| v.productCode == 'GFRS_M0046'|| v.productCode == 'GFRS_M0051') {
|
||||
if (
|
||||
v.productCode == 'GFRS_M0024' ||
|
||||
v.productCode == 'GFRS_M0040' ||
|
||||
v.productCode == 'GFRS_M0044' ||
|
||||
v.productCode == 'GFRS_M0046' ||
|
||||
v.productCode == 'GFRS_M0051'
|
||||
) {
|
||||
delete riskDTOLst[i].duty
|
||||
}
|
||||
})
|
||||
@@ -2070,11 +2166,11 @@ export default {
|
||||
|
||||
// 富娃娃&一年定寿交费方式,交费区间固定为月交
|
||||
if (this.richChildrenFlag) {
|
||||
let product = params.orderDTO.insuredDTOs[0].riskDTOLst.find(item => {
|
||||
let product = params.orderDTO.insuredDTOs[0].riskDTOLst.find((item) => {
|
||||
return item.productCode === 'GFRS_M0015'
|
||||
})
|
||||
if (product) {
|
||||
let trialProduct = params.orderDTO.insuredDTOs[0].riskDTOLst.find(item => {
|
||||
let trialProduct = params.orderDTO.insuredDTOs[0].riskDTOLst.find((item) => {
|
||||
return item.productCode === 'GFRS_A0006'
|
||||
})
|
||||
if (trialProduct) {
|
||||
@@ -2090,9 +2186,9 @@ export default {
|
||||
if (localStorage.isFrom == 'proposal') {
|
||||
// 从建议书进入, 豁免险保费空值特殊处理
|
||||
let prdCodes = ['GFRS_A0001', 'GFRS_A0007']
|
||||
params.orderDTO.insuredDTOs[0].riskDTOLst.forEach(item => {
|
||||
params.orderDTO.insuredDTOs[0].riskDTOLst.forEach((item) => {
|
||||
if (prdCodes.includes(item.productCode)) {
|
||||
this.trialList.forEach(element => {
|
||||
this.trialList.forEach((element) => {
|
||||
if (item.productCode == element.productCode) {
|
||||
item.amt = element.amt
|
||||
}
|
||||
@@ -2108,7 +2204,7 @@ export default {
|
||||
//电投
|
||||
if (localStorage.isFrom == 'sale') {
|
||||
if (resultData.deleteFlag == '0') {
|
||||
localStorage.salePageFlag = '3';
|
||||
localStorage.salePageFlag = '3'
|
||||
}
|
||||
this.$jump({
|
||||
flag: 'goBack',
|
||||
@@ -2126,7 +2222,7 @@ export default {
|
||||
let proposalOrderNo = this.$CacheUtils.getLocItem('orderNo') || ''
|
||||
let url = `/common/selectedProduct?proposalOrderNo=${proposalOrderNo}`
|
||||
if (resultData.content.id) {
|
||||
this.saleInsuredPersonInfo.insuredId = resultData.content.id;
|
||||
this.saleInsuredPersonInfo.insuredId = resultData.content.id
|
||||
this.$CacheUtils.setLocItem('saleInsuredPersonInfo', JSON.stringify(this.saleInsuredPersonInfo))
|
||||
}
|
||||
this.$jump({
|
||||
|
||||
Reference in New Issue
Block a user