From f2376cecfc95c5c548e1ea82772439e05e722efa Mon Sep 17 00:00:00 2001 From: "yang.huaxiang" Date: Tue, 16 Mar 2021 13:52:54 +0800 Subject: [PATCH] =?UTF-8?q?=E6=83=A0=E4=BC=81=E4=BF=9D=E4=BA=A7=E5=93=81?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=E8=B0=83=E6=95=B4:=20=E6=83=A0=E6=A1=82?= =?UTF-8?q?=E4=BF=9D=E8=A1=A5=E5=85=85=E5=A4=84=E7=90=86=20--=E6=8F=90?= =?UTF-8?q?=E4=BA=A4=E4=BA=BA=EF=BC=9A=E9=98=B3=E5=8D=8E=E7=A5=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/ebiz/common/MainRiskList.vue | 7 +++++++ src/views/ebiz/common/risk-rules.js | 20 +++++++++++++++++++- src/views/ebiz/sale/InsuredInfo.vue | 3 ++- src/views/ebiz/sale/InsuredPerson.vue | 1 + 4 files changed, 29 insertions(+), 2 deletions(-) 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) {