From e6bc912ec616340c5ff728663b2ea9959b9cae1d Mon Sep 17 00:00:00 2001
From: liyuetong
Date: Tue, 26 Oct 2021 15:16:39 +0800
Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=E9=99=A9=E7=A7=8D=E6=97=B6?=
=?UTF-8?q?=EF=BC=8C=E5=88=A0=E9=99=A4=E4=B8=A4=E5=85=A8=E6=97=B6=EF=BC=8C?=
=?UTF-8?q?(=E8=A2=AB=E4=BF=9D=E9=99=A9=E4=BA=BA)=E5=9B=BD=E5=AF=8C?=
=?UTF-8?q?=E4=BA=BA=E5=AF=BF=E9=99=84=E5=8A=A0=E8=B1=81=E5=85=8D=E4=BF=9D?=
=?UTF-8?q?=E9=99=A9=E8=B4=B9=E9=87=8D=E5=A4=A7=E7=96=BE=E7=97=85=E4=BF=9D?=
=?UTF-8?q?=E9=99=A9(B=E6=AC=BE=EF=BC=89=E4=B8=80=E5=B9=B6=E5=88=A0?=
=?UTF-8?q?=E9=99=A4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/ebiz/common/CalculatePremium.vue | 147 +++++++++++----------
1 file changed, 74 insertions(+), 73 deletions(-)
diff --git a/src/views/ebiz/common/CalculatePremium.vue b/src/views/ebiz/common/CalculatePremium.vue
index d5b18d3b5..a035610c5 100644
--- a/src/views/ebiz/common/CalculatePremium.vue
+++ b/src/views/ebiz/common/CalculatePremium.vue
@@ -1588,8 +1588,10 @@ export default {
className: 'dialog-delete'
})
.then(() => {
+ let currentGFRS_A0011
if (this.chooseProducts[index].isMainRisk == 0) {
this.chooseProducts = []
+ localStorage.chooseProducts = JSON.stringify(this.chooseProducts)
this.$jump({
flag: 'goBack',
extra: {
@@ -1603,10 +1605,10 @@ export default {
}
})
localStorage.trialList = ''
- } else {
+ }else{
+ currentGFRS_A0011 = this.chooseProducts[index].productCode == 'GFRS_A0011'?true:false //当前删除的是否是两全
this.chooseProducts.splice(index, 1)
}
-
if (
this.chooseProducts[0].mainRiskCode == 'GFRS_M0051' ||
this.chooseProducts[0].mainRiskCode == 'GFRS_M0044' ||
@@ -1614,53 +1616,54 @@ export default {
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 (currentGFRS_A0011 && JSON.stringify(this.chooseProducts).includes('GFRS_A0010')) {
+ this.chooseProducts.forEach((item, index01) => {
+ if(item.productCode == 'GFRS_A0010'){
+ this.chooseProducts.splice(index01, 1)
}
- }
+ })
+ // Dialog.alert({
+ // title: '提示',
+ // message: '当前未投保其他长险附加险,将删除该险种重新选择附加险!'
+ // }).then(() => {
+ // })
}
- 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: '当前未投保其他长险附加险,将删除该险种重新选择附加险!'
- }).then(() => {
- this.chooseProducts.splice(1, 1)
- localStorage.chooseProducts = JSON.stringify(this.chooseProducts)
- this.getTrial()
- })
- // 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)
- ) {
- this.$toast('当前未投保其他长险附加险,请删除该险种重新选择附加险!')
- this.nextStepFlag = true
- this.chooseProducts.splice(1, 2)
- localStorage.chooseProducts = JSON.stringify(this.chooseProducts)
- // this.getTrial()
- }
- }
+
+ // 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 (
+ // (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: '当前未投保其他长险附加险,将删除该险种重新选择附加险!'
+ // }).then(() => {
+ // this.chooseProducts.splice(1, 1)
+ // localStorage.chooseProducts = JSON.stringify(this.chooseProducts)
+ // this.getTrial()
+ // })
+ // // this.$toast('当前未投保其他长险附加险,请删除该险种重新选择附加险!')
+ // // this.nextStepFlag = true
+ // }
+ }
localStorage.chooseProducts = JSON.stringify(this.chooseProducts)
this.getTrial()
})
@@ -1788,34 +1791,32 @@ export default {
//设置豁免险保额
this.setRemitRisk()
this.nextStepFlag = false
- //针对八桂D产品 计算被保人重疾B附加险保额 ==其他附加险的保额 重新试算后面添加的其他附加险
- if ( this.chooseProducts[0].mainRiskCode == 'GFRS_M0051'||this.chooseProducts[0].mainRiskCode == 'GFRS_M0044') {
- let tParams = this.getParams()
- // 开门红产品试算增加标识
- if (this.activeType == 'KMH' && this.isFrom != 'proposal') {
- for (let product of tParams.trialInfos) {
- product.isKmh = '1'
- }
- }
- let tResult = await trial(tParams)
- if (tResult.result == 0) {
- if (tResult.flag === '1') {
- this.richChildrenFlag = true
- }
- this.trialList = tResult.trialList
- localStorage.trialList = JSON.stringify(tResult.trialList)
- //设置豁免险保额
- this.setRemitRisk()
- this.nextStepFlag = false
- }
- if(this.chooseProducts.length==2&&this.chooseProducts[1].productCode=='GFRS_A0010'){
- this.$toast('当前未投保其他长险附加险,请删除该险种重新选择附加险!')
- this.nextStepFlag = true
- }
-
+ //针对八桂D产品 计算被保人重疾B附加险保额 ==其他附加险的保额 重新试算后面添加的其他附加险
+ if ( this.chooseProducts[0].mainRiskCode == 'GFRS_M0051'||this.chooseProducts[0].mainRiskCode == 'GFRS_M0044') {
+ let tParams = this.getParams()
+ // 开门红产品试算增加标识
+ if (this.activeType == 'KMH' && this.isFrom != 'proposal') {
+ for (let product of tParams.trialInfos) {
+ product.isKmh = '1'
}
-
- this.againGetTrial()
+ }
+ let tResult = await trial(tParams)
+ if (tResult.result == 0) {
+ if (tResult.flag === '1') {
+ this.richChildrenFlag = true
+ }
+ this.trialList = tResult.trialList
+ localStorage.trialList = JSON.stringify(tResult.trialList)
+ //设置豁免险保额
+ this.setRemitRisk()
+ this.nextStepFlag = false
+ }
+ if(this.chooseProducts.length==2&&this.chooseProducts[1].productCode=='GFRS_A0010'){
+ this.$toast('当前未投保其他长险附加险,请删除该险种重新选择附加险!')
+ this.nextStepFlag = true
+ }
+ }
+ // this.againGetTrial()
} else {
this.nextStepFlag = true
this.$toast(resultData.resultMessage)