diff --git a/src/views/ebiz/common/MainRiskList.vue b/src/views/ebiz/common/MainRiskList.vue index 68118ccbc..591b3a252 100644 --- a/src/views/ebiz/common/MainRiskList.vue +++ b/src/views/ebiz/common/MainRiskList.vue @@ -183,6 +183,13 @@ export default { /********start 主险选择限制 start******/ + // 检验投被人关系 惠企保特殊校验 + if (riskProductCode == 'GFRS_M0040') { + if (riskRules.relationLimit(resultData, JSON.parse(this.$CacheUtils.getLocItem('saleInsuredPersonInfo')).relationToAppnt, this)) { + return + } + } + if (riskRules.ageLimit(resultData, this)) { return } diff --git a/src/views/ebiz/common/risk-rules.js b/src/views/ebiz/common/risk-rules.js index c015725e7..1f3d3a62d 100644 --- a/src/views/ebiz/common/risk-rules.js +++ b/src/views/ebiz/common/risk-rules.js @@ -1,8 +1,26 @@ import { productCheck } from '@/api/ebiz/common/common' import { getCompany } from '@/api/ebiz/sale/sale' import CacheUtils from '@/assets/js/utils/cacheUtils' - +import DataDictionary from '@/assets/js/utils/data-dictionary' export default { + //投、被保险人关系险种的限制 + relationLimit(resultData, relationToAppnt, vm) { + var flag = '1' + let tips + DataDictionary.hqbRelationToAppnt.forEach(item => { + if (flag == '1'){ + if (item.id == relationToAppnt){ + flag == '0' + } + } + }) + if (flag == '1') { + tips = '惠企保产品被保险人与投保人的关系必须伟本人、配偶、子女!' + vm.$toast(tips) + return true + } + return false + }, //投、被保险人年龄对险种的限制 ageLimit(resultData, vm, isApplicant) { let age, tips diff --git a/src/views/ebiz/sale/InsuredInfo.vue b/src/views/ebiz/sale/InsuredInfo.vue index 1e4c7f572..1be8282b4 100644 --- a/src/views/ebiz/sale/InsuredInfo.vue +++ b/src/views/ebiz/sale/InsuredInfo.vue @@ -1245,6 +1245,7 @@ export default { //------------------------专为桂企写死--begin---------------// if (this.specilFlag == '1') { params.orderDTO.orderInfoDTO.productCode = 'GFRS_M0040' + str = 'specilFlag=1&' //params.orderDTO.orderInfoDTO.productCode = 'GFRS_M0024' } // ------------------------专为桂企写死--end---------------// @@ -1257,7 +1258,7 @@ export default { //如果从保单列表编辑按钮或者新增保单进入 localStorage.salePageFlag = '2' } else { - str = 'edit=1&salePageFlag=2' + str = str + 'edit=1&salePageFlag=2' } localStorage.orderNo = resultData.orderNo // localStorage.insuredDetail = JSON.stringify(this.userInfo) diff --git a/src/views/ebiz/sale/InsuredPerson.vue b/src/views/ebiz/sale/InsuredPerson.vue index 1917ff386..cecfaef6a 100644 --- a/src/views/ebiz/sale/InsuredPerson.vue +++ b/src/views/ebiz/sale/InsuredPerson.vue @@ -588,6 +588,7 @@ export default { } }, created() { + this.specilFlag = this.$route.query.specilFlag //如果是编辑/导航进来 // if (this.$route.query.edit) { if (localStorage.orderNo) {