From f68982f5cba0288707ba3e0c213e9f22c53dcd50 Mon Sep 17 00:00:00 2001 From: "liu.xiaofeng@ebiz-digits.com" Date: Mon, 14 Aug 2023 16:35:17 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90GFRS-3784=E3=80=91=E4=BF=9D=E8=B4=B9?= =?UTF-8?q?=E8=AF=95=E7=AE=97=E9=A1=B5=E9=9D=A2=20=E8=B4=A3=E4=BB=BB?= =?UTF-8?q?=E6=AD=A5=E8=BF=9B=E5=99=A8=20=E5=A2=9E=E5=8A=A0=E5=88=A4?= =?UTF-8?q?=E6=96=AD=20=E4=BA=A7=E5=93=81GFRS=5FM0077=20=E9=9A=90=E8=97=8F?= =?UTF-8?q?=E8=BE=93=E5=85=A5=E6=A1=86=20=E3=80=90GFRS-3784=E3=80=91?= =?UTF-8?q?=E4=BF=9D=E8=B4=B9=E8=AF=95=E7=AE=97=E9=A1=B5=E9=9D=A2=20?= =?UTF-8?q?=E8=B4=A3=E4=BB=BB=E6=AD=A5=E8=BF=9B=E5=99=A8=20=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E5=88=A4=E6=96=AD=20=E4=BA=A7=E5=93=81GFRS=5FM0077=20?= =?UTF-8?q?=E6=A0=B9=E6=8D=AE=E8=A2=AB=E4=BF=9D=E4=BA=BA=E5=B9=B4=E9=BE=84?= =?UTF-8?q?=E4=BB=A5=E5=8F=8A=E6=80=A7=E5=88=AB=E8=AE=BE=E7=BD=AE=E9=BB=98?= =?UTF-8?q?=E8=AE=A4=E9=80=89=E4=B8=AD=E5=BE=97=E8=B4=A3=E4=BB=BB=E5=88=A4?= =?UTF-8?q?=E6=96=AD=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/ebiz/common/CalculatePremium.vue | 145 ++++++--------------- 1 file changed, 37 insertions(+), 108 deletions(-) diff --git a/src/views/ebiz/common/CalculatePremium.vue b/src/views/ebiz/common/CalculatePremium.vue index ce54b8b9c..5ea19ab1b 100644 --- a/src/views/ebiz/common/CalculatePremium.vue +++ b/src/views/ebiz/common/CalculatePremium.vue @@ -13,9 +13,9 @@ 主险 附加险 {{ item.riskName }} - + + 附 + @@ -109,6 +109,7 @@ item.productCode == 'GFRS_M0051' || item.productCode == 'GFRS_M0054' || item.productCode == 'GFRS_M0073' || + item.productCode == 'GFRS_M0077' || item.productCode == 'GFRS_M0057' ) " @@ -127,6 +128,7 @@ item.productCode == 'GFRS_M0051' || item.productCode == 'GFRS_M0054' || item.productCode == 'GFRS_M0073' || + item.productCode == 'GFRS_M0077' || item.productCode == 'GFRS_M0057' ) " @@ -747,6 +749,31 @@ export default { } }) } + if (item.mainRiskCode == 'GFRS_M0077') { + item.calFactorLst.map((i) => { + if (i.code == 'dutyGroup') { + if(i.rules && i.rules.length != 0) { + i.rules.forEach(ii=>{ + if(this.saleInsuredPersonInfo.insuredAge < 18) { + if(ii.duty == '311504'){ + ii.necess = true + } + }else{ + if(this.saleInsuredPersonInfo.sex == '0'){ + if(ii.duty == '311505'){ + ii.necess = true + } + } else { + if(ii.duty == '311506'){ + ii.necess = true + } + } + } + }) + } + } + }) + } if (item.mainRiskCode == 'GFRS_M0046') { if (this.saleInsuredPersonInfo.relationToAppnt == 1) { this.isEnterAddtionRiskListFunc() @@ -774,25 +801,11 @@ export default { } } - // if (item.productCode == 'GFRS_A0003') { - // //该附加险的责任保额=主险的保费 - // item.calFactorLst.map(v => { - // if (v.code == 'dutyGroup' && v.rules.length > 0) { - // v.rules.map(y => { - // if (y.defaultDutyAmt === null) { - // y.defaultDutyAmt = (JSON.parse(localStorage.trialList)[0].prem / 10000).toFixed(6) - // } - // y.moneyUnit = 10000 - // y.changeWithMainRisk = true //责任险保额=主险保费,不允许用户手动更改 - // }) - // } - // }) - // } - //保存主险险种编号 - if (item.isMainRisk == 0) { - this.mainRiskCode = item.mainRiskCode - } - }) + //保存主险险种编号 + if (item.isMainRisk == 0) { + this.mainRiskCode = item.mainRiskCode + } + }) if (this.mainRiskCode == 'GFRS_M0005') { this.chooseProducts.map((item) => { if (item.productCode == 'GFRS_A0004') { @@ -850,91 +863,6 @@ export default { rules.forEach((item) => { let config = '' config = JSON.parse(item.ruleExpression) - // let errorMsg = item.errorMsg; - // config = { - // eventName: 'GFRS_M0020_payEndYear_insuYear', - // eventType: 'onConfirm', - // funBody: [ - // 'let ageMap = {', - // ' "10Y":{"30Y": 55,"70A": 55,"88A": 55},', - // ' "20Y":{ "30Y": 55, "70A": 50, "88A": 55 }, ', - // ' "30Y":{ "30Y": 45, "70A": 40, "88A": 45 },', - // '};', - // 'let payEndYear = "";', - // 'let insuYear = "";', - // 'let age = this.saleInsuredPersonInfo.insuredAge;', - // 'let parObj = {};', - // 'par.map(item => {', - // ' parObj[item.code] = item;', - // '});', - // 'if(ParKey == "payEndYear"){', - // ' payEndYear = Par.value + Par.flag;', - // ' lintAgeObj = ageMap[payEndYear];', - // ' let flag = true, num = parObj.insuYear.columns.length;', - // ' parObj.insuYear.columns.forEach(item => {', - // ' let lintAge = lintAgeObj[ item.value + item.flag ];', - // ' if( age > lintAge ){', - // ' item.disabled = true;', - // ' num = num - 1 ;', - // ' }else{', - // ' if(flag){', - // ' parObj.insuYear.insuYear = item.value;', - // ' parObj.insuYear.insuYearFlag = item.flag;', - // ' parObj.insuYear.showContent = item.text;', - // ' flag = false;', - // ' };', - // ' item.disabled = false;', - // ' };', - // ' });', - // ' if(!num){', - // ' this.errorMsg.push("被保险人年龄不符合当前所选交费期间");', - // ' payEndYear = parObj.payEndYear.payEndYear + parObj.payEndYear.payEndYearFlag;', - // ' lintAgeObj = ageMap[payEndYear];', - // ' parObj.insuYear.columns.forEach(item => {', - // ' let lintAge = lintAgeObj[ item.value + item.flag ];', - // ' if( age > lintAge ){', - // ' item.disabled = true;', - // ' }else{', - // ' item.disabled = false;', - // ' };', - // ' });', - // ' return false;', - // ' };', - // ' return true;', - // '}'], - // funPar: ['par','ParKey','Par'], - // } - // config = { - // eventName: 'GFRS_A0003_noMainCode', - // eventType: 'init', - // initBody: [ - // 'for(let item of that.chooseProducts){', - // ' if(item.productCode == "GFRS_A0003"){', - // ' for(let itemC of item.calFactorLst){', - // ' if(itemC.code == "dutyGroup"){', - // ' for(let itemR of itemC.rules){', - // ' that.$emit("GFRS_A0003_noMainCode", itemR, that.mainRiskCode)', - // ' }', - // ' }', - // ' }', - // ' }', - // ' }', - // ], - // funBody: [ - // 'let noMainCode = {', - // ' "GFRS_M0004" : true,', - // ' "GFRS_M0011" : true', - // '};', - // 'let noduty = {', - // ' "310101" : true', - // '};', - // 'if(noMainCode[mainRiskCode] && noduty[dutyItem.duty]){', - // ' dutyItem.necess = false;', - // ' dutyItem.isDisabled = true;', - // '}', - // ], - // funPar:['dutyItem', 'mainRiskCode'], - // } this.$on(config.eventName, new Function(...config.funPar, config.funBody.join(''))) if (config.eventType == 'init') { let initFn = new Function('that', config.initBody.join('')) @@ -2809,6 +2737,7 @@ export default { this.trialList[index].productCode == 'GFRS_M0051' || this.trialList[index].productCode == 'GFRS_M0054' || this.trialList[index].productCode == 'GFRS_M0073' || + this.trialList[index].productCode == 'GFRS_M0077' || this.trialList[index].productCode == 'GFRS_M0057' ) { riskItem['dutyLst'] = this.trialInfos[index].duty @@ -2871,7 +2800,7 @@ export default { //国富人寿桂企保重大疾病保险产品专写 this.trialInfos.map((v, i) => { if (v.productCode == 'GFRS_M0024' || v.productCode == 'GFRS_M0040' || v.productCode == 'GFRS_M0044' - || v.productCode == 'GFRS_M0046'|| v.productCode == 'GFRS_M0051'|| v.productCode == 'GFRS_M0057' || v.productCode == 'GFRS_M0073') { + || v.productCode == 'GFRS_M0046'|| v.productCode == 'GFRS_M0051'|| v.productCode == 'GFRS_M0057' || v.productCode == 'GFRS_M0073'|| v.productCode == 'GFRS_M0077') { delete riskDTOLst[i].duty } })