mirror of
http://112.124.100.131/GFRS/ebiz-h5.git
synced 2025-12-10 01:06:45 +08:00
[fix] 修改 在多个豁免附加险附加到主险时,主险发生变化,只有最有一个附加险的信息发生变化
This commit is contained in:
@@ -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,63 +1046,64 @@ export default {
|
||||
|
||||
//2、豁免险跟主险联动,豁免险缴费期间和保险期间同主险的缴费期间
|
||||
let remitIndex = this.getRemitIndex()
|
||||
if (!remitIndex) return
|
||||
|
||||
this.chooseProducts[remitIndex].calFactorLst.forEach(item => {
|
||||
if (item.code == 'payIntv') {
|
||||
for (let key in mainRiskInfo.payIntv) {
|
||||
item[key] = mainRiskInfo.payIntv[key]
|
||||
//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]
|
||||
}
|
||||
}
|
||||
if (item.code == 'payEndYear') {
|
||||
item.hasFlag = '1'
|
||||
item.payEndYearFlag = 'Y'
|
||||
item.payEndYear = Number(mainRiskInfo.payEndYear.payEndYear)
|
||||
item.showContent = item.payEndYear + '年交'
|
||||
}
|
||||
}
|
||||
if (item.code == 'payEndYear') {
|
||||
item.hasFlag = '1'
|
||||
item.payEndYearFlag = 'Y'
|
||||
item.payEndYear = Number(mainRiskInfo.payEndYear.payEndYear)
|
||||
item.showContent = item.payEndYear + '年交'
|
||||
}
|
||||
if (item.code == 'insuYear') {
|
||||
item.hasFlag = '1'
|
||||
item.insuYearFlag = 'Y'
|
||||
item.insuYear = Number(mainRiskInfo.payEndYear.payEndYear)
|
||||
item.showContent = item.insuYear + '年'
|
||||
}
|
||||
if (item.code == 'amt') {
|
||||
let trialList = JSON.parse(localStorage.trialList)
|
||||
item.amt = trialList[0].prem
|
||||
item.defaultValue = trialList[0].prem
|
||||
item.moneyUnit = 1
|
||||
item.suffix = '元'
|
||||
}
|
||||
if (this.chooseProducts[remitIndex].productCode == 'GFRS_A0003') {
|
||||
//此附加险的缴费期间=主险缴费期间;保险期间=主险保险期间
|
||||
if (item.code == 'insuYear') {
|
||||
item.hasFlag = '1'
|
||||
item.insuYearFlag = mainRiskInfo.insuYear.insuYearFlag
|
||||
item.insuYear = Number(mainRiskInfo.insuYear.insuYear)
|
||||
item.showContent = mainRiskInfo.insuYear.showContent
|
||||
item.insuYearFlag = 'Y'
|
||||
item.insuYear = Number(mainRiskInfo.payEndYear.payEndYear)
|
||||
item.showContent = item.insuYear + '年'
|
||||
}
|
||||
if (item.code == 'dutyGroup') {
|
||||
item.rules.forEach(v => {
|
||||
try {
|
||||
v.amt = mainRiskInfo.inputPrem.displayAmount * mainRiskInfo.inputPrem.moneyUnit
|
||||
} catch (e) {
|
||||
let trialList = JSON.parse(localStorage.trialList)
|
||||
v.amt = trialList[0].prem
|
||||
// v.amt = mainRiskInfo.inputAmt.displayAmount * mainRiskInfo.inputAmt.moneyUnit
|
||||
}
|
||||
v.defaultDutyAmt = (Number(v.amt) / v.moneyUnit).toFixed(6)
|
||||
// v.moneyUnit = 10000
|
||||
// v.suffix = '万元'
|
||||
})
|
||||
if (item.code == 'amt') {
|
||||
let trialList = JSON.parse(localStorage.trialList)
|
||||
item.amt = trialList[0].prem
|
||||
item.defaultValue = trialList[0].prem
|
||||
item.moneyUnit = 1
|
||||
item.suffix = '元'
|
||||
}
|
||||
}
|
||||
})
|
||||
if (this.chooseProducts[itemRemitIndex].productCode == 'GFRS_A0003') {
|
||||
//此附加险的缴费期间=主险缴费期间;保险期间=主险保险期间
|
||||
if (item.code == 'insuYear') {
|
||||
item.hasFlag = '1'
|
||||
item.insuYearFlag = mainRiskInfo.insuYear.insuYearFlag
|
||||
item.insuYear = Number(mainRiskInfo.insuYear.insuYear)
|
||||
item.showContent = mainRiskInfo.insuYear.showContent
|
||||
}
|
||||
if (item.code == 'dutyGroup') {
|
||||
item.rules.forEach(v => {
|
||||
try {
|
||||
v.amt = mainRiskInfo.inputPrem.displayAmount * mainRiskInfo.inputPrem.moneyUnit
|
||||
} catch (e) {
|
||||
let trialList = JSON.parse(localStorage.trialList)
|
||||
v.amt = trialList[0].prem
|
||||
// v.amt = mainRiskInfo.inputAmt.displayAmount * mainRiskInfo.inputAmt.moneyUnit
|
||||
}
|
||||
v.defaultDutyAmt = (Number(v.amt) / v.moneyUnit).toFixed(6)
|
||||
// v.moneyUnit = 10000
|
||||
// v.suffix = '万元'
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
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
|
||||
@@ -1537,11 +1539,11 @@ export default {
|
||||
// console.log('33333333')
|
||||
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
|
||||
}
|
||||
|
||||
|
||||
// console.log(riskItem)
|
||||
console.log(this.trialInfos[index])
|
||||
riskItem = Object.assign(riskItem, this.trialInfos[index])
|
||||
|
||||
Reference in New Issue
Block a user