From a5b29f13c7eee9cbf76a8b6d8471478e90cbcdf4 Mon Sep 17 00:00:00 2001 From: yuweiqi Date: Sun, 19 Jan 2020 16:22:23 +0800 Subject: [PATCH] =?UTF-8?q?[FIX]=E8=A7=A3=E5=86=B3=E5=86=B2=E7=AA=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/ebiz/common/CalculatePremium.vue | 48 +++++++++++++--------- 1 file changed, 28 insertions(+), 20 deletions(-) diff --git a/src/views/ebiz/common/CalculatePremium.vue b/src/views/ebiz/common/CalculatePremium.vue index a6e6c9c87..3b04f3719 100644 --- a/src/views/ebiz/common/CalculatePremium.vue +++ b/src/views/ebiz/common/CalculatePremium.vue @@ -25,6 +25,7 @@ {{ riskFactor.name + '(' + riskFactor.suffix + ')' }} {{ riskFactor.name }}       + { if (item.mainRiskCode == 'GFRS_M0006') { item.isHidden = true } if (item.mainRiskCode != 'GFRS_M0008') { item.calFactorLst.map(i => { - this.defalutAmt = i.displayAmount + this.defalutAmt = i.displayAmount || 1 console.log(i.displayAmount) console.log(i.defaultValue) this.mult = Number(i.displayAmount) / Number(i.defaultValue) @@ -334,7 +335,7 @@ export default { this.mainRiskInfluenceAddRisk() //初始化数据试算 isTrial是否调后端保费试算 /sale/ insure/trial 接口标志,0-不调取 - if (localStorage.isTrial === '1') { + if (localStorage.isTrial === '') { this.getTrial() } }, @@ -363,7 +364,7 @@ export default { item.amt = Number(item.minDutyAmt) * Number(item.moneyUnit) }) this.mainRiskInfluenceAddRisk() - if (localStorage.isTrial === '1') { + if (localStorage.isTrial === '') { this.getTrial() } } else { @@ -376,9 +377,11 @@ export default { } } }, + // blur(value) { + // console.log('哈哈哈',value) + // }, //弹框选择 toSelect(index, index1, columns) { - console.log('===', index, index1, columns) ;[this.popupShow, this.productIndex, this.calFactorIndex] = [true, index, index1] this.columns = columns }, @@ -418,7 +421,7 @@ export default { } this.hiddenPayEndYear(currentEle) //特殊规则:设置豁免险 - if (localStorage.isTrial === '1') { + if (localStorage.isTrial === '') { this.getTrial() } } @@ -437,7 +440,7 @@ export default { return false } this.mainRiskInfluenceAddRisk() - if (localStorage.isTrial === '1') { + if (localStorage.isTrial === '') { this.getTrial() } }, @@ -606,7 +609,7 @@ export default { } } - //2、豁免险跟主险联动,值减一 + //2、豁免险跟主险联动,豁免险缴费期间和保险期间同主险的缴费期间 let remitIndex = this.getRemitIndex() if (!remitIndex) return @@ -619,13 +622,13 @@ export default { if (item.code == 'payEndYear') { item.hasFlag = '1' item.payEndYearFlag = 'Y' - item.payEndYear = Number(mainRiskInfo.payEndYear.payEndYear) - 1 + item.payEndYear = Number(mainRiskInfo.payEndYear.payEndYear) item.showContent = item.payEndYear + '年交' } if (item.code == 'insuYear') { item.hasFlag = '1' item.insuYearFlag = 'Y' - item.insuYear = Number(mainRiskInfo.payEndYear.payEndYear) - 1 + item.insuYear = Number(mainRiskInfo.payEndYear.payEndYear) item.showContent = item.insuYear + '年' } if (item.code == 'amt') { @@ -713,7 +716,7 @@ export default { } localStorage.chooseProducts = JSON.stringify(this.chooseProducts) - if (localStorage.isTrial === '1') { + if (localStorage.isTrial === '') { this.getTrial() } }) @@ -760,7 +763,12 @@ export default { if (factor.code == 'inputPrem') { trialInfo['prem'] = Number(this.defalutAmt) * Number(factor.moneyUnit) } else { - trialInfo['amt'] = Number(this.defalutAmt) * Number(factor.moneyUnit) + if (item.isRemit == 0) { + trialInfo['amt'] = Number(factor.defaultValue) * Number(factor.moneyUnit) + } else { + trialInfo['amt'] = Number(this.defalutAmt) * Number(factor.moneyUnit) + } + // trialInfo['amt'] = Number(this.defalutAmt) * Number(factor.moneyUnit) } } else if (factor.type == 2) { trialInfo.jobLevel = this.saleInsuredPersonInfo[factor.code] @@ -780,6 +788,7 @@ export default { } }) + console.log('trialInfo == ', trialInfo) //通用规则1:交费方式为一次交情,无交费期限 if (trialInfo['payIntv'] == '0') { trialInfo['payEndYear'] = '1000' @@ -847,13 +856,12 @@ export default { console.log(this.saleInsuredPersonInfo.age) console.log(riskFactor) let currentEle = - localStorage.isTrial == '0' && this.chooseProducts[productIndex].isMainRisk == '0' + localStorage.isTrial !== '' && this.chooseProducts[productIndex].isMainRisk == '0' ? this.chooseProducts[productIndex].productTrialYearDTOS[calFactorIndex] : this.chooseProducts[productIndex].calFactorLst[calFactorIndex] //改动原因:孝心保产品有对年龄的特殊要求 //添加判断,是否是孝心保产品 - let productCode = (localStorage.trialList !== undefined && localStorage.trialList != '') ? JSON.parse(localStorage.trialList)[0].productCode : '' - if (productCode == 'GFRS_M0014') { + if (localStorage.trialList != '' && JSON.parse(localStorage.trialList)[0].productCode == 'GFRS_M0014') { //被保人年龄如果在50-65区间 if (this.saleInsuredPersonInfo.age >= 50 && this.saleInsuredPersonInfo.age <= 65) { //使用rules规则里的第二条控制保额份数 @@ -868,7 +876,7 @@ export default { } else { this.mainRiskInfluenceAddRisk() currentEle['amt'] = Number(this.defalutAmt) * Number(currentEle.moneyUnit) - if (localStorage.isTrial === '1') { + if (localStorage.isTrial === '') { this.getTrial() } } @@ -887,7 +895,7 @@ export default { } else { this.mainRiskInfluenceAddRisk() currentEle['amt'] = Number(this.defalutAmt) * Number(currentEle.moneyUnit) - if (localStorage.isTrial === '1') { + if (localStorage.isTrial === '') { this.getTrial() } } @@ -906,7 +914,7 @@ export default { } else { this.mainRiskInfluenceAddRisk() currentEle['amt'] = Number(this.defalutAmt) * Number(currentEle.moneyUnit) - if (localStorage.isTrial === '1') { + if (localStorage.isTrial === '') { this.getTrial() } } @@ -924,7 +932,7 @@ export default { } else { this.mainRiskInfluenceAddRisk() currentEle['amt'] = Number(this.defalutAmt) * Number(currentEle.moneyUnit) - if (localStorage.isTrial === '1') { + if (localStorage.isTrial === '') { this.getTrial() } }