+
{{ riskFactor.name + '(' + riskFactor.suffix + ')' }}
@@ -51,9 +52,10 @@
/>
+
+
+
+
+
{{ riskFactor.name }}
@@ -1357,6 +1375,7 @@ export default {
})
}
}
+ //之所以catch是因为有些参数值不存在,导致报错,豁免险除(国富人寿附加投保人豁免保险费定期寿险(B款)保险条款 GFRS_A0007)试算拼参数时,amt保额都重置为null
if (this.chooseProducts[itemRemitIndex].productCode == 'GFRS_A0001' || this.chooseProducts[itemRemitIndex].productCode == 'GFRS_A0007') {
try {
if (mainRiskInfo.inputPrem.displayAmount && mainRiskInfo.inputPrem.moneyUnit) {
@@ -1387,6 +1406,22 @@ export default {
item.amt = trialList[0].prem
}
item.defaultDutyAmt = (Number(item.amt) / item.moneyUnit).toFixed(6)
+
+ // 国富人寿附加投保人豁免保险费定期寿险(B款)保险条款 GFRS_A0007
+ // 保额----豁免主险+附加两全的保费
+ // 国富人寿附加两全保险条款 GFRS_A0011
+ //重新再调一次试算,因保额为文本框没有change事件,所以保额变化后少一次调用试算,所以特此手动重新调用一次
+ let trialList = JSON.parse(localStorage.trialList)
+ let showPrem
+ trialList.forEach((item, index) => {
+ if (item.productCode == 'GFRS_A0011') {
+ showPrem = item.showPrem //获取两全险的保费
+ }
+ })
+ if (this.chooseProducts[itemRemitIndex].productCode == 'GFRS_A0007' && showPrem) {
+ item.amt = trialList[0].prem + showPrem
+ item.defaultValue = trialList[0].prem + showPrem
+ }
}
})
}
@@ -1425,15 +1460,15 @@ export default {
if (this.trialList.length) {
let showPrem //计算后的保费
- let showPrem001 //两全险的保费
- this.chooseProducts.forEach((item, index) => {
- //(被保险人)国富人寿附加豁免保险费重大疾病保险(B款)GFRS_A0010
- //(投保人)国富人寿附加豁免保险费重大疾病保险(B款) GFRS_A0009
- //国富人寿附加两全保险条款 GFRS_A0011
- //只有在搭配附加两全时,才能搭配被保险人附加豁免重疾B;
- //获取两全险的保费
+ //(被保险人)国富人寿附加豁免保险费重大疾病保险(B款)GFRS_A0010
+ //(投保人)国富人寿附加豁免保险费重大疾病保险(B款) GFRS_A0009
+ //国富人寿附加两全保险条款 GFRS_A0011
+ //只有在搭配附加两全时,才能搭配被保险人附加豁免重疾B;
+ //获取两全险的保费
+ let showPrem001
+ this.trialList.forEach((item, index) => {
if (item.productCode == 'GFRS_A0011') {
- showPrem001 = that.trialList[index].showPrem
+ showPrem001 = item.showPrem //获取两全险的保费
}
})
this.chooseProducts.forEach((item, index) => {
@@ -1468,6 +1503,26 @@ export default {
})
}
},
+ //获取当前产品编码下的索引值
+ getProductCodeIndex(productCode) {
+ let remitIndex = ''
+ this.chooseProducts.forEach((item, index) => {
+ if (item.productCode == productCode) {
+ remitIndex = index
+ }
+ })
+ return remitIndex
+ },
+ //获取当前产品编码下的整条数据
+ getProductCodeItem(productCode) {
+ let remitItem = {}
+ this.chooseProducts.forEach((item, index) => {
+ if (item.productCode == productCode) {
+ remitItem = item
+ }
+ })
+ return remitItem
+ },
getRemitIndex() {
let remitIndex = []
this.chooseProducts.forEach((item, index) => {
@@ -1682,18 +1737,40 @@ export default {
this.nextStepFlag = false
}
}
+ this.againGetTrial()
} else {
this.nextStepFlag = true
this.$toast(resultData.resultMessage)
}
localStorage.chooseProducts = JSON.stringify(this.chooseProducts)
},
+ //重新再调一次试算,因保额为文本框没有change事件,所以保额变化后少一次调用试算,所以特此手动重新调用一次
+ async againGetTrial() {
+ // ---------国富人寿附加两全保险条款---
+ let getProductCodeIndex = this.getProductCodeIndex('GFRS_A0007')
+ if (getProductCodeIndex !='') { //是否有两全
+ let params = this.getParams()
+ let resultData01 = await trial(params)
+ if (resultData01.result == 0) {
+ if (resultData01.flag === '1') {
+ this.richChildrenFlag = true
+ }
+ this.trialList = resultData01.trialList
+ localStorage.trialList = JSON.stringify(resultData01.trialList)
+ //设置豁免险保额
+ this.setRemitRisk()
+ this.nextStepFlag = false
+ } else {
+ this.nextStepFlag = true
+ this.$toast(resultData01.resultMessage)
+ }
+ }
+ },
//获取试算参数
getParams() {
let params = {
trialInfos: []
}
-
this.chooseProducts.forEach((item) => {
let trialInfo = {}
item.calFactorLst.forEach((factor) => {
@@ -1714,7 +1791,13 @@ export default {
: Number(factor.displayAmount) * Number(factor.moneyUnit)
} else {
if (item.isRemit == 0) {
- trialInfo['amt'] = null
+ if (item.productCode == 'GFRS_A0007') {
+ if (factor.code == 'amt') {
+ trialInfo['amt'] = factor.amt
+ }
+ } else {
+ trialInfo['amt'] = null
+ }
} else {
trialInfo['amt'] = Number(factor.displayAmount) * Number(factor.moneyUnit)
}