From 25c877f586a31d4105e993400365a4b25df6708c Mon Sep 17 00:00:00 2001 From: yuweiqi Date: Mon, 20 Jan 2020 20:00:21 +0800 Subject: [PATCH] =?UTF-8?q?[FIX]=E5=AF=8C=E5=A8=83=E5=A8=83=E4=B8=87?= =?UTF-8?q?=E8=83=BD=E9=99=A9=E4=BF=9D=E8=B4=B9=E7=BB=99=E4=BF=9D=E9=A2=9D?= =?UTF-8?q?=E4=BC=A0=E7=BB=99=E5=90=8E=E7=AB=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/ebiz/common/CalculatePremium.vue | 47 +++++++++++----------- 1 file changed, 23 insertions(+), 24 deletions(-) diff --git a/src/views/ebiz/common/CalculatePremium.vue b/src/views/ebiz/common/CalculatePremium.vue index 249930ce2..de1dbcefe 100644 --- a/src/views/ebiz/common/CalculatePremium.vue +++ b/src/views/ebiz/common/CalculatePremium.vue @@ -28,7 +28,7 @@ {{ riskFactor.name + '(' + item.productTrialYearDTOS[payEndYearColumnsIndex]['suffix'] + ')' }} {{ riskFactor.name }}       { - this.defalutAmt = i.displayAmount || 1 - console.log('i.displayAmount ==', i.displayAmount) - console.log('i.defaultValue ==', i.defaultValue) + // this.defalutAmt = i.displayAmount || 1 + // console.log('i.displayAmount ==', i.displayAmount) + // console.log('i.defaultValue ==', i.defaultValue) this.mult = Number(i.displayAmount) / Number(i.defaultValue) }) } @@ -775,14 +775,13 @@ export default { } } else if (factor.type == 1) { if (factor.code == 'inputPrem') { - trialInfo['prem'] = factor.moneyUnit == undefined ? Number(this.defalutAmt) * Number(item.productTrialYearDTOS[this.payEndYearColumnsIndex].moneyUnit) : Number(this.defalutAmt) * Number(factor.moneyUnit) + trialInfo['prem'] = factor.moneyUnit == undefined ? Number(item.productTrialYearDTOS[this.payEndYearColumnsIndex].defaultValue) * Number(item.productTrialYearDTOS[this.payEndYearColumnsIndex].moneyUnit) : Number(factor.defaultValue) * Number(factor.moneyUnit) } else { if (item.isRemit == 0) { trialInfo['amt'] = Number(factor.defaultValue) * Number(factor.moneyUnit) } else { - trialInfo['amt'] = Number(this.defalutAmt) * Number(factor.moneyUnit) + trialInfo['amt'] = Number(factor.defaultValue) * Number(factor.moneyUnit) } - // trialInfo['amt'] = Number(this.defalutAmt) * Number(factor.moneyUnit) } } else if (factor.type == 2) { trialInfo.jobLevel = this.saleInsuredPersonInfo[factor.code] @@ -880,17 +879,17 @@ export default { //被保人年龄如果在50-65区间 if (this.saleInsuredPersonInfo.age >= 50 && this.saleInsuredPersonInfo.age <= 65) { //使用rules规则里的第二条控制保额份数 - if (Number(this.defalutAmt) < Number(riskFactor.rules[1].minPrem) || Number(this.defalutAmt) > Number(riskFactor.rules[1].maxPrem)) { + if (Number(currentEle.defaultValue) < Number(riskFactor.rules[1].minPrem) || Number(currentEle.defaultValue) > Number(riskFactor.rules[1].maxPrem)) { this.$toast(localStorage.hint) this.nextStepFlag = true } else { - if ((Number(this.defalutAmt) * 10000) % (Number(currentEle.limit) * 10000) != 0) { + if ((Number(currentEle.defaultValue) * 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) + currentEle['amt'] = Number(currentEle.defaultValue) * Number(currentEle.moneyUnit) // if (localStorage.isTrial === '1') { this.getTrial() // } @@ -899,17 +898,17 @@ export default { //被保人年龄如果在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)) { + if (Number(currentEle.defaultValue) < Number(riskFactor.rules[0].minPrem) || Number(currentEle.defaultValue) > Number(riskFactor.rules[0].maxPrem)) { this.$toast(localStorage.hint) this.nextStepFlag = true } else { - if ((Number(this.defalutAmt) * 10000) % (Number(currentEle.limit) * 10000) != 0) { + if ((Number(currentEle.defaultValue) * 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) + currentEle['amt'] = Number(currentEle.defaultValue) * Number(currentEle.moneyUnit) // if (localStorage.isTrial === '1') { this.getTrial() // } @@ -918,18 +917,18 @@ export default { } //isTrial为0 ---暂时为富娃娃两全保险(万能型)专配 输入保费校验 } else if (this.isTrial === '0' && this.chooseProducts[productIndex].isMainRisk == '0') { - if (Number(this.defalutAmt) < Number(min)) { + if (Number(currentEle.defaultValue) < Number(min)) { this.$toast(`交费期间为${riskFactor.yearWay}年交时,最低保费为${Number(min) * riskFactor.moneyUnit}元`) this.nextStepFlag = true } else { - if ((Number(this.defalutAmt) * 10000) % (Number(currentEle.limit) * 10000) != 0) { + if ((Number(currentEle.defaultValue) * 10000) % (Number(currentEle.limit) * 10000) != 0) { // this.defalutAmt = currentEle.rules[productIndex].displayAmount this.$toast(`超过最低保费部分金额需为1000元整数倍`) this.nextStepFlag = true } else { this.nextStepFlag = false this.mainRiskInfluenceAddRisk() - currentEle['amt'] = Number(this.defalutAmt) * Number(riskFactor.moneyUnit) + currentEle['amt'] = Number(currentEle.defaultValue) * Number(riskFactor.moneyUnit) // if (localStorage.isTrial === '1') { this.getTrial() // } @@ -937,17 +936,17 @@ export default { } //其他产品按照原先的逻辑判断 } else { - if (Number(this.defalutAmt) < Number(min) || Number(this.defalutAmt) > Number(max)) { + if (Number(currentEle.defaultValue) < Number(min) || Number(currentEle.defaultValue) > 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 + if ((Number(currentEle.defaultValue) * 10000) % (Number(currentEle.limit) * 10000) != 0) { + // currentEle.defaultValue = currentEle.rules[productIndex].displayAmount this.$toast(localStorage.hint) this.nextStepFlag = true } else { this.mainRiskInfluenceAddRisk() - currentEle['amt'] = Number(this.defalutAmt) * Number(currentEle.moneyUnit) + currentEle['amt'] = Number(currentEle.defaultValue) * Number(currentEle.moneyUnit) // if (localStorage.isTrial === '1') { this.getTrial() // } @@ -957,7 +956,7 @@ export default { // let currentEle = this.chooseProducts[this.productIndex].calFactorLst[this.calFactorIndex] // currentEle.defaultValue = value console.log('进来几次') - this.mult = Number(this.defalutAmt) / Number(defalutValue) + this.mult = Number(currentEle.defaultValue) / Number(defalutValue) }, //下一步 async nextStep() { @@ -1010,11 +1009,11 @@ export default { //万能型产品保费赋值给保额 //增加判断是否是从建议书跳转过来了的 if (localStorage.isFrom != 'proposal') { - if (this.trialList[index].productCode == ('GFRS_M0003' || 'GFRS_M0015')) { - // console.log('2222222222') + if (this.trialList[index].productCode == 'GFRS_M0003' || this.trialList[index].productCode == 'GFRS_M0015') { riskItem['amt'] = this.trialList[index].prem } } + //豁免险保额处理 if (item.isRemit == '0') { // console.log('33333333')