feat: 恢复 Rule 校验

This commit is contained in:
hz
2025-10-28 16:45:28 +08:00
parent 26c47cd886
commit 351c7a7fa8

View File

@@ -69,7 +69,7 @@ export default {
this.filterAddRisk()
},
methods: {
loadStorageData(){
loadStorageData() {
//获取投保人信息
if (this.$CacheUtils.getLocItem('saleInsuredPersonInfo')) {
this.saleInsuredPersonInfo = JSON.parse(this.$CacheUtils.getLocItem('saleInsuredPersonInfo'))
@@ -128,8 +128,7 @@ export default {
localStorage.isAutoPay = localStorage.isAutoPay === '0' ? '0' : resultData.isAutoPay //自动垫交
localStorage.isRenew = localStorage.isRenew === '0' ? '0' : resultData.isRenew //自动续保
localStorage.isForceRenew = localStorage.isForceRenew === '0' ? '0' : resultData.isForceRenew //自动续保默认是否选中 0-是 1-否
// todo : 取消 rule 校验
if (resultData.productTrialInfoDTO.ruleExpression && false) {
if (resultData.productTrialInfoDTO.ruleExpression) {
let ruleExpression = localStorage.ruleExpression ? JSON.parse(localStorage.ruleExpression) : {}
ruleExpression[resultData.productCode] = resultData.productTrialInfoDTO.ruleExpression
localStorage.ruleExpression = JSON.stringify(ruleExpression)
@@ -222,18 +221,19 @@ export default {
}
}*/
if (this.trialTest) {
//豁免险与其他附加险年龄险种
if (resultData.productTrialInfoDTO.isRemit == '0' && resultData.productTrialInfoDTO.remitType == '0') {
if (riskRules.ageLimit(resultData, this, 1)) {
return
}
} else {
if (riskRules.ageLimit(resultData, this)) {
return
}
//豁免险与其他附加险年龄险种
if (resultData.productTrialInfoDTO.isRemit == '0' && resultData.productTrialInfoDTO.remitType == '0') {
if (riskRules.ageLimit(resultData, this, 1)) {
return
}
} else {
if (riskRules.ageLimit(resultData, this)) {
return
}
}
// 投保试算的时候忽略社保和健康因子
if (!this.trialTest) {
if (riskRules.medicalLimit(resultData, this)) {
return
}
@@ -242,10 +242,12 @@ export default {
return
}
}
// if (riskRules.lifeGradeLimit(resultData, this)) {
// return
// }
//豁免险影响
if (this.remitLimit(resultData)) {
return
}
@@ -253,12 +255,12 @@ export default {
//validateAppntFlag 0-职业寿险等级需校验主合同的投保人1-职业寿险等级无需校验主合同的投保人
if (resultData.productInsuredDTO.validateAppntFlag == '0') {
//校验主合同投保人寿险职业等级
// 福宝宝产品寿险等级对主险影响
if (riskRules.lifeGradeLimitForBaby(resultData, this)) {
return
}
} else {
//校验主合同的被保险人寿险职业等级
console.log(1111, resultData)
if (riskRules.lifeGradeLimit(resultData, this)) {
return
}
@@ -381,8 +383,8 @@ export default {
let isRemit = resultData.productTrialInfoDTO.isRemit
let currentMainRiskInfo = this.getCurrentMainRiskInfo()
// 世纪无忧重疾(GFRS_M0046)交费至60/70周岁时不可附加两全险(GFRS_A0011)
if (resultData.productCode == 'GFRS_A0011' && this.mainRiskCode == 'GFRS_M0046') {
if (currentMainRiskInfo.mainRiskPayEndYearFlag == 'A') {
if (resultData.productCode === 'GFRS_A0011' && this.mainRiskCode === 'GFRS_M0046') {
if (currentMainRiskInfo.mainRiskPayEndYearFlag === 'A') {
this.$toast('目前主险交费期间类型,不适合选取此款险种!')
return true
}
@@ -401,7 +403,7 @@ export default {
this.$toast('目前主险交费方式类型,不适合选取此款险种!')
return true
}
if (currentMainRiskInfo.mainRiskPayEndYearFlag == 'A') {
if (currentMainRiskInfo.mainRiskPayEndYearFlag === 'A') {
this.$toast('目前主险交费期间类型,不适合选取此款险种!')
return true
}
@@ -409,14 +411,14 @@ export default {
//国富人寿附加投保人豁免保险费定期寿险B款 GFRS_A0007
//国富人寿附加豁免保险费重大疾病保险B款 GFRS_A0009
//国富人寿鑫享年年终身寿险--只针对这款产品
if (this.mainRiskCode == 'GFRS_M0036') {
if (this.mainRiskCode === 'GFRS_M0036') {
if (
this.branchTypeVal == 'Z' &&
(productCode == 'GFRS_A0007' ||
productCode == 'GFRS_A0009' ||
productCode == 'GFRS_A0010' ||
productCode == 'GFRS_A0013' ||
productCode == 'GFRS_A0014')
this.branchTypeVal === 'Z' &&
(productCode === 'GFRS_A0007' ||
productCode === 'GFRS_A0009' ||
productCode === 'GFRS_A0010' ||
productCode === 'GFRS_A0013' ||
productCode === 'GFRS_A0014')
) {
if (relationToAppnt == 1) {
this.$toast('投被同人不能选取此款险种!')