diff --git a/src/views/ebiz/common/CalculatePremium.vue b/src/views/ebiz/common/CalculatePremium.vue index f2681077f..c98cfd999 100644 --- a/src/views/ebiz/common/CalculatePremium.vue +++ b/src/views/ebiz/common/CalculatePremium.vue @@ -13,31 +13,16 @@ 主险 附加险 {{ item.riskName }} - - + + -
+
- {{ riskFactor.name + '(' + riskFactor.suffix + ')' }} + {{ riskFactor.name + '(' + riskFactor.suffix + ')' }} {{ riskFactor.name }}       @@ -70,17 +64,13 @@
{{ riskFactor.name }}
-
+
{{ dutyItem.dutyName }}({{ dutyItem.suffix }})
+ +
+
+
+
+ {{ riskFactor.name + '(' + riskFactor.suffix + ')' }} + {{ riskFactor.name }}       + + +
+
+
+ +
+
+
{{ riskFactor.name }}
+
+
+ {{ dutyItem.dutyName }}({{ dutyItem.suffix }}) +
+ + +
+
+
+
+
+
+
- - + +
- -
- + +
+
首期保费(元): + v-if="(trialList.length > 0 && trialList[index].trialType == 0) || (trialList.length > 0 && trialList[index].trialType == 2) || isTrial === '0'" + >首期保费(元): 保额(元): - {{ trialList[index].prem.toFixed(2) | moneyFormat }} + {{ trialList[index].prem.toFixed(2) | moneyFormat }} + 0.00
- 完成 + 完成
@@ -226,7 +269,9 @@ export default { mult: '', isFrom: '', // 默认钱数 - defalutAmt: '' + defalutAmt: '', + //是否需要调试算接口标志 0-不需要调取 + isTrial: localStorage.isTrial } }, mounted() { @@ -281,8 +326,10 @@ export default { } this.mainRiskInfluenceAddRisk() - //初始化数据试算 - this.getTrial() + //初始化数据试算 isTrial是否调后端保费试算 /sale/ insure/trial 接口标志,0-不调取 + if (localStorage.isTrial === '') { + this.getTrial() + } }, // 责任保额份数变化 dutyStepperChange(value, productIndex, calFactorIndex, dutyItemIndex, isChecked, min, max) { @@ -309,7 +356,9 @@ export default { item.amt = Number(item.minDutyAmt) * Number(item.moneyUnit) }) this.mainRiskInfluenceAddRisk() - this.getTrial() + if (localStorage.isTrial === '') { + this.getTrial() + } } else { ;[this.productIndex, this.calFactorIndex] = [productIndex, calFactorIndex] let currentEle = this.chooseProducts[productIndex].calFactorLst[calFactorIndex].rules @@ -362,7 +411,9 @@ export default { } this.hiddenPayEndYear(currentEle) //特殊规则:设置豁免险 - this.getTrial() + if (localStorage.isTrial === '') { + this.getTrial() + } } this.popupShow = false @@ -379,7 +430,9 @@ export default { return false } this.mainRiskInfluenceAddRisk() - this.getTrial() + if (localStorage.isTrial === '') { + this.getTrial() + } }, // 计步器聚焦 focusStep() { @@ -652,7 +705,9 @@ export default { } localStorage.chooseProducts = JSON.stringify(this.chooseProducts) - this.getTrial() + if (localStorage.isTrial === '') { + this.getTrial() + } }) .catch(() => {}) }, @@ -804,10 +859,12 @@ export default { } else { this.mainRiskInfluenceAddRisk() currentEle['amt'] = Number(this.defalutAmt) * Number(currentEle.moneyUnit) - this.getTrial() + if (localStorage.isTrial === '') { + this.getTrial() + } } } - //被保人年龄如果在66-75之间 + //被保人年龄如果在66-75之间 } else if (this.saleInsuredPersonInfo.age >= 66 && this.saleInsuredPersonInfo.age <= 75) { //使用rules规则里的第一条控制保额份数 if (Number(this.defalutAmt) < Number(riskFactor.rules[0].minPrem) || Number(this.defalutAmt) > Number(riskFactor.rules[0].maxPrem)) { @@ -821,11 +878,32 @@ export default { } else { this.mainRiskInfluenceAddRisk() currentEle['amt'] = Number(this.defalutAmt) * Number(currentEle.moneyUnit) + if (localStorage.isTrial === '') { + this.getTrial() + } + } + } + } + //isTrial为0 ---暂时为富娃娃两全保险(万能型专配)输入保费校验 + } else if (this.isTrial === '0' && this.chooseProducts[productIndex].isMainRisk == '0') { + if (Number(this.defalutAmt) < Number(min) || Number(this.defalutAmt) > Number(max)) { + // this.$toast(localStorage.hint) + this.$toast(4444444) + this.nextStepFlag = true + } else { + if ((Number(this.defalutAmt) * 10000) % (Number(currentEle.limit) * 10000) != 0) { + // this.defalutAmt = currentEle.rules[productIndex].displayAmount + this.$toast(localStorage.hint) + this.nextStepFlag = true + } else { + this.mainRiskInfluenceAddRisk() + currentEle['amt'] = Number(this.defalutAmt) * Number(currentEle.moneyUnit) + if (localStorage.isTrial === '') { this.getTrial() } } } - //其他产品按照原先的逻辑判断 + //其他产品按照原先的逻辑判断 } else { if (Number(this.defalutAmt) < Number(min) || Number(this.defalutAmt) > Number(max)) { this.$toast(localStorage.hint) @@ -838,7 +916,9 @@ export default { } else { this.mainRiskInfluenceAddRisk() currentEle['amt'] = Number(this.defalutAmt) * Number(currentEle.moneyUnit) - this.getTrial() + if (localStorage.isTrial === '') { + this.getTrial() + } } } } @@ -897,7 +977,7 @@ export default { //万能型产品保费赋值给保额 //增加判断是否是从建议书跳转过来了的 if (localStorage.isFrom != 'proposal') { - if (this.trialList[index].productCode == 'GFRS_M0003') { + if (this.trialList[index].productCode == 'GFRS_M0003' || 'GFRS_M0015') { // console.log('2222222222') riskItem['amt'] = this.trialList[index].prem } diff --git a/src/views/ebiz/common/MainRiskList.vue b/src/views/ebiz/common/MainRiskList.vue index 2b1e02b5f..5d230deec 100644 --- a/src/views/ebiz/common/MainRiskList.vue +++ b/src/views/ebiz/common/MainRiskList.vue @@ -94,11 +94,13 @@ export default { }, //储存主险 async addMainRisk() { + localStorage.setItem('isTrial', '') let riskProductCode = this.result.riskProductCode let resultData = await calculatePremium({ productCodes: [riskProductCode], platform: 'app', type: '1' }) if (resultData.result == 0) { resultData = resultData.trialDTOS[0] localStorage.hint = resultData.hint + localStorage.isTrial = resultData.productTrialInfoDTO.isTrial if (resultData.productTrialInfoDTO.dutyGroup != null) { resultData.productTrialInfoDTO.dutyGroup.map(item => { if (item.dutyName == '意外身故/伤残保险金') { @@ -132,26 +134,43 @@ export default { //保存附加险 localStorage.addtionRiskLst = JSON.stringify(resultData.productTrialInfoDTO.addtionRiskLst) - // console.log('resultData', resultData) localStorage.isAutoPay = resultData.isAutoPay localStorage.isRenew = resultData.isRenew localStorage.isRelated = resultData.isRelated let calFactorLst = this.getFactorList(resultData) + let productTrialYearDTOS = localStorage.isTrial === '' ? null : resultData.productTrialInfoDTO.productTrialYearDTOS let hasAddtionRisk = resultData.productTrialInfoDTO.addtionRiskLst ? true : false - let currentProductInfo = { - calFactorLst, - hasAddtionRisk, - isMainRisk: 0, - riskType: resultData.riskType, - riskName: this.result.riskName, - productCode: this.result.riskProductCode, - mainRiskCode: this.result.riskProductCode, - documentDTOS: resultData.productTrialInfoDTO.documentDTOS, - influences: resultData.productTrialInfoDTO.influences, - isRemit: resultData.productTrialInfoDTO.isRemit, - hasPredictTransferPrem: resultData.productTrialInfoDTO.hasPredictTransferPrem, //建议书使用 是否展示预计转入保费 - predictTransferPrem: null //建议书使用 预计转入保费字段 - } + let currentProductInfo = + localStorage.isTrial === '' + ? { + calFactorLst, + hasAddtionRisk, + isMainRisk: 0, + riskType: resultData.riskType, + riskName: this.result.riskName, + productCode: this.result.riskProductCode, + mainRiskCode: this.result.riskProductCode, + documentDTOS: resultData.productTrialInfoDTO.documentDTOS, + influences: resultData.productTrialInfoDTO.influences, + isRemit: resultData.productTrialInfoDTO.isRemit, + hasPredictTransferPrem: resultData.productTrialInfoDTO.hasPredictTransferPrem, //建议书使用 是否展示预计转入保费 + predictTransferPrem: null //建议书使用 预计转入保费字段 + } + : { + productTrialYearDTOS, + calFactorLst, + hasAddtionRisk, + isMainRisk: 0, + riskType: resultData.riskType, + riskName: this.result.riskName, + productCode: this.result.riskProductCode, + mainRiskCode: this.result.riskProductCode, + documentDTOS: resultData.productTrialInfoDTO.documentDTOS, + influences: resultData.productTrialInfoDTO.influences, + isRemit: resultData.productTrialInfoDTO.isRemit, + hasPredictTransferPrem: resultData.productTrialInfoDTO.hasPredictTransferPrem, //建议书使用 是否展示预计转入保费 + predictTransferPrem: null //建议书使用 预计转入保费字段 + } //构建险种数组 let productsData