From e434540572c47877b16d63d60ecf039a7e27479c Mon Sep 17 00:00:00 2001 From: lyt Date: Thu, 16 Mar 2023 13:16:48 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E5=9B=BD=E5=AF=8C=E4=BA=BA=E5=AF=BF?= =?UTF-8?q?=E7=BB=BC=E5=90=88=E6=84=8F=E5=A4=96=E4=BC=A4=E5=AE=B3=E4=BF=9D?= =?UTF-8?q?=E9=99=A9=EF=BC=882023=E7=89=88=EF=BC=89=E3=80=91=E9=99=A9?= =?UTF-8?q?=E7=A7=8DGFRS=5FM0070=E7=9A=84=E8=B4=A3=E4=BB=BB=E7=9A=84?= =?UTF-8?q?=E9=AA=8C=E8=AF=81=E8=A7=84=E5=88=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/ebiz/common/CalculatePremium.vue | 61 ++++++++++++++++++++-- 1 file changed, 56 insertions(+), 5 deletions(-) diff --git a/src/views/ebiz/common/CalculatePremium.vue b/src/views/ebiz/common/CalculatePremium.vue index 934264858..7d7236bf0 100644 --- a/src/views/ebiz/common/CalculatePremium.vue +++ b/src/views/ebiz/common/CalculatePremium.vue @@ -396,6 +396,40 @@ const dutyRules = { msg: '意外住院津贴日额最低基本保险金额为10元/天,超过最低基本保险金额为10元/天整数倍,最高不得超过200元/天' } } + +//险种GFRS_M0070的责任的验证规则 +//默认 最低基本保险金额min 10000 整数倍要求mutiple 1000 +const dutdutyGFRS_M0070RulesyRules = { + 410800: { + min: 100000, + msg: '意外基本保险金额最低为100000元,超过最低基本保险金额为10000元整数倍' + }, + 410805: { + msg: '轨道列车意外基本保险金额最低为100000元,超过最低基本保险金额为10000元整数倍,并且小于等于意外基本保险金额的5倍' + }, + 410801: { + msg: '客运汽车意外基本保险金额最低为100000元,超过最低基本保险金额为10000元整数倍,并且小于等于意外基本保险金额的5倍' + }, + 410802: { + msg: '客运轮船意外基本保险金额最低为100000元,超过最低基本保险金额为10000元整数倍,并且小于等于意外基本保险金额的5倍' + }, + 410803: { + msg: '客运民航班机意外基本保险金额最低为100000元,超过最低基本保险金额为10000元整数倍,并且小于等于意外基本保险金额的10倍' + }, + 410804: { + msg: '自驾车意外基本保险金额最低为100000元,超过最低基本保险金额为10000元整数倍,并且小于等于意外基本保险金额的5倍' + }, + 410806: { + min: 2000, + msg: '意外伤害医疗基本保险金额最低为2000元,超过最低基本保险金额为1000元整数倍,并且小于等于意外基本保险金额的1/5倍' + }, + 410807: { + min: 10, + mutiple: 10, + msg: '意外住院津贴日额最低基本保险金额为10元/天,超过最低基本保险金额为10元/天整数倍,最高不得超过200元/天' + } +} + const dutyGFRS_A0004Rules = { 320205: { mainRisk: 'GFRS_M0005', @@ -543,7 +577,7 @@ export default { }, methods: { renewalShow(productCode) { - let codes = ['GFRS_M0016', 'GFRS_M0005', 'GFRS_M0018'] + let codes = ['GFRS_M0016', 'GFRS_M0005', 'GFRS_M0018','GFRS_M0070'] return codes.find((item) => { return productCode === item }) @@ -811,7 +845,7 @@ export default { let detailPromise = this.isFrom === 'proposal' ? localStorage.proposalMedical : await getOrderDetail({ orderNo }) this.chooseProducts.map((item) => { if ( - !(item.mainRiskCode === 'GFRS_M0016' || item.productCode === 'GFRS_A0004' || item.productCode === 'GFRS_A0008' || item.productCode === 'GFRS_A0005') + !(item.mainRiskCode === 'GFRS_M0016' ||item.mainRiskCode === 'GFRS_M0070' || item.productCode === 'GFRS_A0004' || item.productCode === 'GFRS_A0008' || item.productCode === 'GFRS_A0005') ) { //其他产品删掉两个字段 let calFactorLst = item.calFactorLst @@ -823,7 +857,7 @@ export default { } return } - if (item.mainRiskCode === 'GFRS_M0016' || item.productCode === 'GFRS_A0004' || item.productCode === 'GFRS_A0008' || item.productCode === 'GFRS_A0005') { + if (item.mainRiskCode === 'GFRS_M0016' || item.mainRiskCode === 'GFRS_M0070' ||item.productCode === 'GFRS_A0004' || item.productCode === 'GFRS_A0008' || item.productCode === 'GFRS_A0005') { let isMedical = null if (this.isFrom === 'proposal') { isMedical = detailPromise == '1' @@ -864,6 +898,7 @@ export default { dutyStepperChange(value, productIndex, calFactorIndex, dutyItemIndex, isChecked, min, max) { //这个险种使用其他验证方式 if (this.chooseProducts[productIndex].productCode === 'GFRS_M0016') return + if (this.chooseProducts[productIndex].productCode === 'GFRS_M0070') return // 004险种其他验证方式 if (this.chooseProducts[productIndex].productCode === 'GFRS_A0004') return // 008险种其他验证方式 @@ -1086,6 +1121,9 @@ export default { if (validateRiskCode === 'GFRS_M0016' && !this.valiDuty(inputValue, duty)) { //验证不通过 return + }else if (validateRiskCode === 'GFRS_M0070' && !this.valiDuty(inputValue, duty)) { + //验证不通过 + return } else if (validateRiskCode === 'GFRS_A0004' && !this.valiA0004Duty(inputValue, showHint, dutyItem)) { //验证不通过 险种为GFRS_A0004 责任编码为320205 return @@ -1110,7 +1148,7 @@ export default { this.valiAndSend(dutyItem, productIndex) } }, - //险种GFRS_M0016的责任的验证规则 + //险种GFRS_M0016\GFRS_M0070的责任的验证规则 valiDuty(value, duty) { if (this.mainRiskCode === 'GFRS_M0016') { value *= 10000 @@ -1125,6 +1163,19 @@ export default { this.nextStepFlag = false return true } + }else if(this.mainRiskCode === 'GFRS_M0070'){ + value *= 10000 + const rule = dutdutyGFRS_M0070RulesyRules[duty] + const mutiple = rule.mutiple || DUTY_DEFAULT_MUTIPLE + const min = rule.min || DUTY_DEFAULT_MIN + if (!value || value < min || value % mutiple !== 0) { + this.$toast(rule.msg) + this.nextStepFlag = true + return false + } else { + this.nextStepFlag = false + return true + } } }, //险种 GFRS_A0004 险种验证规则 @@ -2442,7 +2493,7 @@ export default { //下一步 async nextStep(isFrom) { //GFRS_M0016需要验证责任 - if (this.mainRiskCode === 'GFRS_M0016') { + if (this.mainRiskCode === 'GFRS_M0016' || this.mainRiskCode === 'GFRS_M0070') { let calFactorLst = this.chooseProducts[0].calFactorLst for (let i = 0; i < calFactorLst.length; i++) { if (calFactorLst[i].code === 'dutyGroup') {