mirror of
http://112.124.100.131/GFRS/ebiz-h5.git
synced 2025-12-12 11:26:43 +08:00
责任保额份数变化时,添加延时器,延时后再调用试算
This commit is contained in:
@@ -809,7 +809,9 @@ export default {
|
|||||||
this.chooseProducts[productIndex].productCode === 'GFRS_A0009' ||
|
this.chooseProducts[productIndex].productCode === 'GFRS_A0009' ||
|
||||||
this.chooseProducts[productIndex].productCode === 'GFRS_A0010'
|
this.chooseProducts[productIndex].productCode === 'GFRS_A0010'
|
||||||
) {
|
) {
|
||||||
|
setTimeout(() => {
|
||||||
this.getTrial()
|
this.getTrial()
|
||||||
|
}, 500);
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
let currentEle = this.chooseProducts[productIndex].calFactorLst[calFactorIndex].rules[dutyItemIndex]
|
let currentEle = this.chooseProducts[productIndex].calFactorLst[calFactorIndex].rules[dutyItemIndex]
|
||||||
@@ -1299,6 +1301,67 @@ export default {
|
|||||||
|
|
||||||
return currentInfluences
|
return currentInfluences
|
||||||
},
|
},
|
||||||
|
trialBeforeRule() {
|
||||||
|
console.log('走试算前规则')
|
||||||
|
let that = this
|
||||||
|
if(this.chooseProducts[0].productCode == 'GFRS_M0035' || this.chooseProducts[0].productCode == 'GFRS_M0044' || this.chooseProducts[0].productCode == 'GFRS_M0040'){
|
||||||
|
if (this.trialList.length) {
|
||||||
|
let showPrem //计算后的保费
|
||||||
|
//(被保险人)国富人寿附加豁免保险费重大疾病保险(B款)GFRS_A0010
|
||||||
|
//(投保人)国富人寿附加豁免保险费重大疾病保险(B款) GFRS_A0009
|
||||||
|
//国富人寿附加两全保险条款 GFRS_A0011
|
||||||
|
//只有在搭配附加两全时,才能搭配被保险人附加豁免重疾B;
|
||||||
|
//获取两全险的保费
|
||||||
|
let showPrem001
|
||||||
|
this.trialList.forEach((item, index) => {
|
||||||
|
if (item.productCode == 'GFRS_A0011') {
|
||||||
|
showPrem001 = item.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)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
item.calFactorLst.map((item2) => {
|
||||||
|
if (item2.code == 'dutyGroup') {
|
||||||
|
item2.rules.map((item3) => {
|
||||||
|
item3.defaultDutyAmt = (showPrem / 10000).toFixed(6)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else if (item.productCode == 'GFRS_A0010') {
|
||||||
|
//(被保险人)国富人寿附加豁免保险费重大疾病保险(B款)GFRS_A0010
|
||||||
|
//投被同人,不同人:被保人豁免险搭配两全(有长险附加险时)时,可选责任为必选,豁免两全保费
|
||||||
|
if (showPrem001) {
|
||||||
|
showPrem = Number(showPrem001)
|
||||||
|
}else{
|
||||||
|
showPrem = Number(that.trialList[0].showPrem)
|
||||||
|
}
|
||||||
|
item.calFactorLst.map((item2) => {
|
||||||
|
if (item2.code == 'dutyGroup') {
|
||||||
|
item2.rules.map((item3) => {
|
||||||
|
item3.defaultDutyAmt = (showPrem / 10000).toFixed(6)
|
||||||
|
item3.defaultValue = '0'
|
||||||
|
item3.necess = true
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
//特殊规则3、设置豁免险
|
//特殊规则3、设置豁免险
|
||||||
setRemitRisk() {
|
setRemitRisk() {
|
||||||
let that = this
|
let that = this
|
||||||
@@ -1496,63 +1559,7 @@ export default {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(this.chooseProducts[0].productCode == 'GFRS_M0035' || this.chooseProducts[0].productCode == 'GFRS_M0044' || this.chooseProducts[0].productCode == 'GFRS_M0040'){
|
this.trialBeforeRule()
|
||||||
if (this.trialList.length) {
|
|
||||||
let showPrem //计算后的保费
|
|
||||||
//(被保险人)国富人寿附加豁免保险费重大疾病保险(B款)GFRS_A0010
|
|
||||||
//(投保人)国富人寿附加豁免保险费重大疾病保险(B款) GFRS_A0009
|
|
||||||
//国富人寿附加两全保险条款 GFRS_A0011
|
|
||||||
//只有在搭配附加两全时,才能搭配被保险人附加豁免重疾B;
|
|
||||||
//获取两全险的保费
|
|
||||||
let showPrem001
|
|
||||||
this.trialList.forEach((item, index) => {
|
|
||||||
if (item.productCode == 'GFRS_A0011') {
|
|
||||||
showPrem001 = item.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)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
item.calFactorLst.map((item2) => {
|
|
||||||
if (item2.code == 'dutyGroup') {
|
|
||||||
item2.rules.map((item3) => {
|
|
||||||
item3.defaultDutyAmt = (showPrem / 10000).toFixed(6)
|
|
||||||
})
|
|
||||||
}
|
|
||||||
})
|
|
||||||
} else if (item.productCode == 'GFRS_A0010') {
|
|
||||||
//(被保险人)国富人寿附加豁免保险费重大疾病保险(B款)GFRS_A0010
|
|
||||||
//投被同人,不同人:被保人豁免险搭配两全(有长险附加险时)时,可选责任为必选,豁免两全保费
|
|
||||||
if (showPrem001) {
|
|
||||||
showPrem = Number(showPrem001)
|
|
||||||
}else{
|
|
||||||
showPrem = Number(that.trialList[0].showPrem)
|
|
||||||
}
|
|
||||||
item.calFactorLst.map((item2) => {
|
|
||||||
if (item2.code == 'dutyGroup') {
|
|
||||||
item2.rules.map((item3) => {
|
|
||||||
item3.defaultDutyAmt = (showPrem / 10000).toFixed(6)
|
|
||||||
item3.defaultValue = '0'
|
|
||||||
item3.necess = true
|
|
||||||
})
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
//获取当前产品编码下的索引值
|
//获取当前产品编码下的索引值
|
||||||
getProductCodeIndex(productCode) {
|
getProductCodeIndex(productCode) {
|
||||||
@@ -1834,30 +1841,30 @@ export default {
|
|||||||
this.setRemitRisk()
|
this.setRemitRisk()
|
||||||
this.nextStepFlag = false
|
this.nextStepFlag = false
|
||||||
//针对八桂D产品 计算被保人重疾B附加险保额 ==其他附加险的保额 重新试算后面添加的其他附加险
|
//针对八桂D产品 计算被保人重疾B附加险保额 ==其他附加险的保额 重新试算后面添加的其他附加险
|
||||||
if (this.chooseProducts[0].mainRiskCode == 'GFRS_M0051' || this.chooseProducts[0].mainRiskCode == 'GFRS_M0044') {
|
// if ( this.chooseProducts[0].mainRiskCode == 'GFRS_M0051'||this.chooseProducts[0].mainRiskCode == 'GFRS_M0044') {
|
||||||
let tParams = this.getParams()
|
// let tParams = this.getParams()
|
||||||
// 开门红产品试算增加标识
|
// // 开门红产品试算增加标识
|
||||||
if (this.activeType == 'KMH' && this.isFrom != 'proposal') {
|
// if (this.activeType == 'KMH' && this.isFrom != 'proposal') {
|
||||||
for (let product of tParams.trialInfos) {
|
// for (let product of tParams.trialInfos) {
|
||||||
product.isKmh = '1'
|
// product.isKmh = '1'
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
let tResult = await trial(tParams)
|
// let tResult = await trial(tParams)
|
||||||
if (tResult.result == 0) {
|
// if (tResult.result == 0) {
|
||||||
if (tResult.flag === '1') {
|
// if (tResult.flag === '1') {
|
||||||
this.richChildrenFlag = true
|
// this.richChildrenFlag = true
|
||||||
}
|
// }
|
||||||
this.trialList = tResult.trialList
|
// this.trialList = tResult.trialList
|
||||||
localStorage.trialList = JSON.stringify(tResult.trialList)
|
// localStorage.trialList = JSON.stringify(tResult.trialList)
|
||||||
//设置豁免险保额
|
// //设置豁免险保额
|
||||||
this.setRemitRisk()
|
// this.setRemitRisk()
|
||||||
this.nextStepFlag = false
|
// this.nextStepFlag = false
|
||||||
}
|
// }
|
||||||
if(this.chooseProducts.length==2&&this.chooseProducts[1].productCode=='GFRS_A0010'){
|
// if(this.chooseProducts.length==2&&this.chooseProducts[1].productCode=='GFRS_A0010'){
|
||||||
this.$toast('当前未投保其他长险附加险,请删除该险种重新选择附加险!')
|
// this.$toast('当前未投保其他长险附加险,请删除该险种重新选择附加险!')
|
||||||
this.nextStepFlag = true
|
// this.nextStepFlag = true
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
// this.againGetTrial()
|
// this.againGetTrial()
|
||||||
} else {
|
} else {
|
||||||
this.nextStepFlag = true
|
this.nextStepFlag = true
|
||||||
|
|||||||
Reference in New Issue
Block a user