[fix] 修改 在多个豁免附加险附加到主险时,主险发生变化,只有最有一个附加险的信息发生变化

This commit is contained in:
tian.guangyuan
2020-05-20 15:34:07 +08:00
parent 3642433b5a
commit 19b2de1636

View File

@@ -573,13 +573,13 @@ export default {
let initFn = new Function('that', config.initBody.join(''))
initFn(this)
}
if(config.otherRisk){
for(let item of config.otherRisk){
if(!ruleExpression[item] || !ruleExpression[item].eventList){
if (config.otherRisk) {
for (let item of config.otherRisk) {
if (!ruleExpression[item] || !ruleExpression[item].eventList) {
ruleExpression[item] = {
eventList : [config.eventName]
eventList: [config.eventName]
}
}else{
} else {
ruleExpression[item].eventList.push(config.eventName)
}
}
@@ -1046,9 +1046,9 @@ export default {
//2、豁免险跟主险联动豁免险缴费期间和保险期间同主险的缴费期间
let remitIndex = this.getRemitIndex()
if (!remitIndex) return
this.chooseProducts[remitIndex].calFactorLst.forEach(item => {
//if (!remitIndex) return
for(let itemRemitIndex of remitIndex){
this.chooseProducts[itemRemitIndex].calFactorLst.forEach(item => {
if (item.code == 'payIntv') {
for (let key in mainRiskInfo.payIntv) {
item[key] = mainRiskInfo.payIntv[key]
@@ -1073,7 +1073,7 @@ export default {
item.moneyUnit = 1
item.suffix = '元'
}
if (this.chooseProducts[remitIndex].productCode == 'GFRS_A0003') {
if (this.chooseProducts[itemRemitIndex].productCode == 'GFRS_A0003') {
//此附加险的缴费期间=主险缴费期间;保险期间=主险保险期间
if (item.code == 'insuYear') {
item.hasFlag = '1'
@@ -1097,12 +1097,13 @@ export default {
}
}
})
}
},
getRemitIndex() {
let remitIndex
let remitIndex = []
this.chooseProducts.forEach((item, index) => {
if (item.isRemit == 0) {
remitIndex = index
remitIndex.push(index)
}
})
return remitIndex
@@ -1293,6 +1294,7 @@ export default {
medical: JSON.parse(localStorage.getItem('saleInsuredPersonInfo')).medical
})
params.trialInfos.push(trialInfo)
})
this.trialInfos = params.trialInfos
return params
@@ -1538,7 +1540,7 @@ export default {
this.trialInfos[index].amt = this.trialList[0].prem
}
if(item.productCode == 'GFRS_A0003'){
if (item.productCode == 'GFRS_A0003') {
this.trialInfos[index].amt = this.trialList[index].amt
}