diff --git a/src/views/ebiz/common/CalculatePremium.vue b/src/views/ebiz/common/CalculatePremium.vue index ab5b1d595..9f3459779 100644 --- a/src/views/ebiz/common/CalculatePremium.vue +++ b/src/views/ebiz/common/CalculatePremium.vue @@ -5,16 +5,28 @@ {{ saleInsuredPersonInfo.name }} {{ saleInsuredPersonInfo.sex == 0 ? '男' : '女' }} {{ saleInsuredPersonInfo.age }}岁 - {{ saleInsuredPersonInfo.occupationName }} + {{ saleInsuredPersonInfo.occupationName }}
主险 附加险 - {{ item.riskName }} - - + {{ item.riskName }} + +
@@ -22,8 +34,11 @@
- {{ riskFactor.name + '(' + riskFactor.suffix + ')' }} - {{ riskFactor.name }}       + {{ riskFactor.name + '(' + riskFactor.suffix + ')' }} + {{ riskFactor.name }}      
{{ riskFactor.name }}
-
+
{{ dutyItem.dutyName }}({{ dutyItem.suffix }})
- - + +
- -
- + +
+
- 首期保费(元): - - - 保额(元): - - {{ trialList[index].prem.toFixed(2) | moneyFormat }} + >首期保费(元): + 保额(元): + {{ trialList[index].prem.toFixed(2) | moneyFormat }}
- 完成 + 完成
@@ -171,8 +221,8 @@ export default { influenceAddRiskCodes: [], influences: [], nextStepFlag: false, - isRelated: localStorage.isRelated === '0',//关联保单号 - policyNo: '', + isRelated: localStorage.isRelated === '0', //关联保单号 + policyNo: '', // 份数 mult: '', isFrom: '', @@ -197,7 +247,7 @@ export default { //初始化数据 init() { // 获取是否从建议书过来的 - this.isFrom = localStorage.isFrom + this.isFrom = localStorage.isFrom //获取投保人信息 if (localStorage.saleInsuredInfo) { this.saleInsuredInfo = JSON.parse(localStorage.saleInsuredInfo) @@ -212,15 +262,15 @@ export default { if (item.mainRiskCode == 'GFRS_M0006') { item.isHidden = true } - if(item.mainRiskCode != 'GFRS_M0008') { - item.calFactorLst.map(i => { - this.defalutAmt = i.displayAmount - console.log(i.displayAmount) - console.log(i.defaultValue) - this.mult = Number(i.displayAmount) / Number(i.defaultValue) - }) - } - }) + if (item.mainRiskCode != 'GFRS_M0008') { + item.calFactorLst.map(i => { + this.defalutAmt = i.displayAmount + console.log(i.displayAmount) + console.log(i.defaultValue) + this.mult = Number(i.displayAmount) / Number(i.defaultValue) + }) + } + }) // this.influenceAddRiskCodes @@ -239,22 +289,21 @@ export default { dutyStepperChange(value, productIndex, calFactorIndex, dutyItemIndex, isChecked, min, max) { let currentEle = this.chooseProducts[productIndex].calFactorLst[calFactorIndex].rules[dutyItemIndex] if (value < min || value > max) { - this.$toast(localStorage.hint) + this.$toast(localStorage.hint) } else { if ((Number(value) * 10000) % (Number(currentEle.limit) * 10000) != 0) { Dialog.alert({ message: localStorage.hint - }).then(()=> { + }).then(() => { currentEle.defaultDutyAmt = currentEle.minDutyAmt }) - - // this.$toast(localStorage.hint) + // this.$toast(localStorage.hint) } else { // this.mainRiskInfluenceAddRisk() // currentEle['amt'] = Number(currentEle.defaultValue) * Number(currentEle.moneyUnit) // this.getTrial() - if (isChecked) { + if (isChecked) { ;[this.productIndex, this.calFactorIndex] = [productIndex, calFactorIndex] let currentEle = this.chooseProducts[productIndex].calFactorLst[calFactorIndex].rules currentEle.forEach(item => { @@ -271,8 +320,6 @@ export default { } } } - - }, // blur(value) { // console.log('哈哈哈',value) @@ -674,7 +721,7 @@ export default { }) //通用规则1:交费方式为一次交情,无交费期限 - if (trialInfo['payIntv'] == '0') { + if (trialInfo['payIntv'] == '0') { trialInfo['payEndYear'] = '1000' trialInfo['payEndYearFlag'] = 'Y' // 福宝宝和万能险传A @@ -735,17 +782,17 @@ export default { }) }, //保额份数变化 - stepperChange(defalutValue, productIndex, calFactorIndex, min, max ) { + stepperChange(defalutValue, productIndex, calFactorIndex, min, max) { // debugger - let currentEle = this.chooseProducts[productIndex].calFactorLst[calFactorIndex] + let currentEle = this.chooseProducts[productIndex].calFactorLst[calFactorIndex] if (Number(this.defalutAmt) < Number(min) || Number(this.defalutAmt) > Number(max)) { + this.$toast(localStorage.hint) + 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 { - 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) @@ -756,8 +803,6 @@ export default { // currentEle.defaultValue = value console.log('进来几次') this.mult = Number(this.defalutAmt) / Number(defalutValue) - - }, //下一步 async nextStep() { @@ -807,10 +852,13 @@ export default { } // console.log(riskItem) //万能型产品保费赋值给保额 - // if (this.trialList[index].productCode == 'GFRS_M0003') { - // // console.log('2222222222') - // riskItem['amt'] = this.trialList[index].prem - // } + //增加判断是否是从建议书跳转过来了的 + if (localStorage.isFrom != 'proposal') { + if (this.trialList[index].productCode == 'GFRS_M0003') { + // console.log('2222222222') + riskItem['amt'] = this.trialList[index].prem + } + } //豁免险保额处理 if (item.isRemit == '0') { // console.log('33333333')