diff --git a/src/assets/js/utils/data-dictionary.js b/src/assets/js/utils/data-dictionary.js index f87467774..fec893a1a 100644 --- a/src/assets/js/utils/data-dictionary.js +++ b/src/assets/js/utils/data-dictionary.js @@ -3793,6 +3793,26 @@ export default { { code: "riskAC_M", label: "元" + }, + { + code: "CardiovascularCerebrovascularDiseasesInsurance", + label: "元" + }, + { + code: "childrenSpecificDiseaseInsurance", + label: "元" + }, + { + code: "maleSpecificDiseaseInsurance", + label: "元" + }, + { + code: "femaleSpecificDiseaseInsurance", + label: "元" + }, + { + code: "supplementarySpecificDiseaseInsurance", + label: "元" } ], // 卡单与短期险重新投保选择职业类别时,两个模块职业类型数据的排序不同,创建这个数据字典,用于在选择职业类别时,作为一个参数传入组件, diff --git a/src/views/ebiz/common/CalculatePremium.vue b/src/views/ebiz/common/CalculatePremium.vue index ce54b8b9c..36b4e4db3 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,42 @@ 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 + ii.defaultValue = '0' + } else { + ii.defaultValue = '0' + } + }else{ + if(this.saleInsuredPersonInfo.sex == '0'){ + if(ii.duty == '311505'){ + ii.necess = true + ii.defaultValue = '0' + } + if(ii.duty == '311504' || ii.duty == '311506'){ + ii.defaultValue = '0' + } + } else { + if(ii.duty == '311506'){ + ii.defaultValue = '0' + ii.necess = true + } + if(ii.duty == '311504' || ii.duty == '311505'){ + ii.defaultValue = '0' + } + } + } + }) + } + } + }) + } if (item.mainRiskCode == 'GFRS_M0046') { if (this.saleInsuredPersonInfo.relationToAppnt == 1) { this.isEnterAddtionRiskListFunc() @@ -774,25 +812,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 +874,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('')) @@ -2650,6 +2589,42 @@ export default { this.getTrial() } } + else if (productCode == 'GFRS_M0076') { + if (this.saleInsuredPersonInfo.insuredAge >= 51 && this.saleInsuredPersonInfo.insuredAge <= 60) { + //使用rules规则里的第二条控制保额份数 + // 年龄在51周岁及以上被保险人,投保本险种时,最低基本保险金额为10000元。超过最低基本保险金额为10000元整数倍。 + if (Number(defalutValue) < Number(riskFactor.rules[1].minPrem) || Number(defalutValue) > Number(riskFactor.rules[1].maxPrem)) { + this.$toast('51周岁-60周岁最低基本保险金额为'+ (Number(riskFactor.rules[1].minPrem) * 10000) +'元,最高投保金额为'+ (Number(riskFactor.rules[1].maxPrem) * 10000) +'元。') + this.nextStepFlag = true + } else { + if ((Number(defalutValue) * 10000) % (Number(currentEle.limit) * 10000) != 0) { + // this.defalutAmt = currentEle.rules[productIndex].displayAmount + this.$toast('51周岁-60周岁最低基本保险金额为'+ (Number(riskFactor.rules[1].minPrem) * 10000) +'元,最高投保金额为'+ (Number(riskFactor.rules[1].maxPrem) * 10000) +'元。超过最低基本保险金额为'+ (Number(riskFactor.rules[1].limit) * 10000) +'元整数倍。') + this.nextStepFlag = true + } else { + this.mainRiskInfluenceAddRisk() + currentEle['amt'] = Number(defalutValue) * Number(currentEle.moneyUnit) + this.getTrial() + } + } + //年龄在0-50周岁被保险人,投保本险种时,最低基本保险金额为50000元,超过最低基本保险金额为10000元整数倍。 + } else if (this.saleInsuredPersonInfo.insuredAge >= 0 && this.saleInsuredPersonInfo.insuredAge <= 50) { + //使用rules规则里的第一条控制保额份数 + if (Number(defalutValue) < Number(riskFactor.rules[0].minPrem) || Number(defalutValue) > Number(riskFactor.rules[0].maxPrem)) { + this.$toast('出生满 28 天至 50周岁最低基本保险金额为'+ (Number(riskFactor.rules[0].minPrem) * 10000) +'元,最高投保金额为'+ (Number(riskFactor.rules[0].maxPrem) * 10000) +'元。') + this.nextStepFlag = true + } else { + if ((Number(defalutValue) * 10000) % (Number(currentEle.limit) * 10000) != 0) { + this.$toast('出生满 28 天至 50周岁最低基本保险金额为'+ (Number(riskFactor.rules[0].minPrem) * 10000) +'元,最高投保金额为'+ (Number(riskFactor.rules[0].maxPrem) * 10000) +'元。超过最低基本保险金额为'+ (Number(riskFactor.rules[0].limit) * 10000) +'元整数倍。') + this.nextStepFlag = true + } else { + this.mainRiskInfluenceAddRisk() + currentEle['amt'] = Number(defalutValue) * Number(currentEle.moneyUnit) + this.getTrial() + } + } + } + } else if (this.isTrial === '0' && this.chooseProducts[productIndex].isMainRisk == '0') { if (Number(defalutValue) < Number(min)) { if (riskFactor.yearWay == "一次性交清") { @@ -2809,6 +2784,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 +2847,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 } })