From 5d13235c8f0564c4c3d5812f855e17b89001d93d Mon Sep 17 00:00:00 2001 From: yuweiqi Date: Fri, 22 May 2020 14:26:09 +0800 Subject: [PATCH 01/14] =?UTF-8?q?[FIX]=E7=94=B5=E6=8A=95-=E6=A1=82?= =?UTF-8?q?=E4=BC=81-=E8=B4=A3=E4=BB=BB=E4=BF=9D=E8=B4=B9=E4=BF=9D?= =?UTF-8?q?=E5=AD=98=E4=BA=A7=E5=93=81=E6=8E=A5=E5=8F=A3=E8=AF=B7=E6=B1=82?= =?UTF-8?q?=E5=8F=82=E6=95=B0=E9=97=AE=E9=A2=98=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/ebiz/common/CalculatePremium.vue | 48 ++++++++++++++-------- 1 file changed, 30 insertions(+), 18 deletions(-) diff --git a/src/views/ebiz/common/CalculatePremium.vue b/src/views/ebiz/common/CalculatePremium.vue index bfd497cda..b76d40715 100644 --- a/src/views/ebiz/common/CalculatePremium.vue +++ b/src/views/ebiz/common/CalculatePremium.vue @@ -49,7 +49,7 @@ /> -
{ // console.log(ruleExpression[itemKey]); - let rules = ruleExpression[itemKey]; - rules.eventList = []; - rules.forEach( item => { + let rules = ruleExpression[itemKey] + rules.eventList = [] + rules.forEach(item => { let config = '' - config = JSON.parse(item.ruleExpression); + config = JSON.parse(item.ruleExpression) // let errorMsg = item.errorMsg; // config = { // eventName: 'GFRS_M0020_payEndYear_insuYear', @@ -534,8 +534,8 @@ export default { // '}'], // funPar: ['par','ParKey','Par'], // } - // console.log("config",config); - this.$on(config.eventName, new Function( ...config.funPar, config.funBody.join(''))); + // console.log("config",config); + this.$on(config.eventName, new Function(...config.funPar, config.funBody.join(''))) rules.eventList.push(config.eventName) }) }) @@ -688,7 +688,7 @@ export default { return false } // console.log("productCode ==>" , productCode) - + // if(this.ruleExpression[productCode]){ // this.errorMsg = [] // this.ruleExpression[productCode].eventList.forEach(item => { @@ -701,28 +701,28 @@ export default { // } // } let productCode = this.chooseProducts[this.productIndex].productCode - if(this.ruleExpression[productCode]){ + if (this.ruleExpression[productCode]) { this.errorMsg = [] let currentFactor = this.chooseProducts[this.productIndex].calFactorLst let currentEle = currentFactor[this.calFactorIndex] this.ruleExpression[productCode].eventList.forEach(item => { - this.$emit(item,currentFactor,currentEle.code,value); + this.$emit(item, currentFactor, currentEle.code, value) }) - if(this.errorMsg.length > 0){ - this.$toast(this.errorMsg[0]); + if (this.errorMsg.length > 0) { + this.$toast(this.errorMsg[0]) this.errorMsg = [] this.popupShow = false return false } } - + // 后台配置 的 js函数 验证 // if(hasR){ // if(currentEle.code == 'payEndYear' || currentEle.code == 'insuYear'){ // this.payEndYear(currentEle.code,value.value,this.tmpInsuYear.insuYear + this.tmpInsuYear.insuYearFlag) // } // } - + currentEle.showContent = value.text let name = currentEle.code currentEle[name] = value.value @@ -1457,6 +1457,11 @@ export default { riskItem['dutyLst'] = this.trialList[index].duty //930折中方案,责任险分档 riskItem['amt'] = this.trialList[index].amt + } else { + //国富人寿桂企保重大疾病保险产品专写 + if (this.trialList[index].productCode == 'GFRS_M0024') { + riskItem['dutyLst'] = this.trialInfos[index].duty + } } //保费算保额 console.log('this.trialList', this.trialList[index].trialType) @@ -1485,7 +1490,6 @@ export default { this.trialInfos[index].amt = this.trialList[0].prem } // console.log(riskItem) - console.log(this.trialInfos[index]) riskItem = Object.assign(riskItem, this.trialInfos[index]) // console.log(riskItem) riskDTOLst.push(riskItem) @@ -1494,6 +1498,14 @@ export default { if (!rollInResult) { return } + + //国富人寿桂企保重大疾病保险产品专写 + this.trialInfos.map((v, i) => { + if (v.productCode == 'GFRS_M0024') { + delete riskDTOLst[i].duty + } + }) + // console.log('riskDTOLst', riskDTOLst) //建议书需要添加全部投保人信息,电投只需要投保人ID let insuredDTOItem = Object.assign(this.saleInsuredPersonInfo, { riskDTOLst: riskDTOLst }) From df763197d077e5a24e943f6b1a02db5232eb89ea Mon Sep 17 00:00:00 2001 From: yuweiqi Date: Fri, 22 May 2020 15:36:02 +0800 Subject: [PATCH 02/14] =?UTF-8?q?[FIX]=E3=80=90=E7=94=B5=E6=8A=95-?= =?UTF-8?q?=E6=A1=82=E4=BC=81=E3=80=91=E6=A1=82=E4=BC=81=E4=BA=A7=E5=93=81?= =?UTF-8?q?=E2=80=94=E2=80=94GFRS=5FM0024=E2=80=94=E2=80=94=E4=B8=8D?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E8=B4=A3=E4=BB=BB=E4=BF=9D=E8=B4=B9=E5=8F=8A?= =?UTF-8?q?=EF=BC=88=E4=B8=87=E5=85=83=EF=BC=89=EF=BC=8C=E5=8F=AA=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E8=B4=A3=E4=BB=BB=E5=90=8D=E7=A7=B0=E5=8F=8A=E5=8B=BE?= =?UTF-8?q?=E9=80=89=E6=A1=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/ebiz/common/CalculatePremium.vue | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/views/ebiz/common/CalculatePremium.vue b/src/views/ebiz/common/CalculatePremium.vue index b76d40715..43350d8b1 100644 --- a/src/views/ebiz/common/CalculatePremium.vue +++ b/src/views/ebiz/common/CalculatePremium.vue @@ -63,13 +63,16 @@ @click="toSelect(index, riskFactorIndex, riskFactor.columns)" />
+
{{ riskFactor.name }}
- {{ dutyItem.dutyName }}({{ dutyItem.suffix }}) + {{ dutyItem.dutyName }}({{ dutyItem.suffix }}) + {{ dutyItem.dutyName }}
Date: Sat, 23 May 2020 15:24:33 +0800 Subject: [PATCH 03/14] =?UTF-8?q?[NEW]=E3=80=90=E7=94=B5=E6=8A=95-?= =?UTF-8?q?=E6=A1=82=E4=BC=81=E3=80=91=E5=A2=9E=E5=8A=A0=E6=8A=95=E4=BF=9D?= =?UTF-8?q?=E4=BA=BA=E4=BF=A1=E6=81=AF=E5=B7=A5=E4=BD=9C=E5=8D=95=E4=BD=8D?= =?UTF-8?q?=E9=80=89=E6=8B=A9=E6=A1=86=EF=BC=9B=E5=A2=9E=E5=8A=A0=E4=BB=A3?= =?UTF-8?q?=E7=90=86=E4=BA=BA=E5=94=AE=E5=8D=96=E6=9D=83=E9=99=90=E6=A0=A1?= =?UTF-8?q?=E9=AA=8C=EF=BC=9B=E5=A2=9E=E5=8A=A0=E6=8A=95=E4=BF=9D=E4=BA=BA?= =?UTF-8?q?=E5=B7=A5=E4=BD=9C=E5=8D=95=E4=BD=8D=E6=8A=95=E4=BF=9D=E8=B5=84?= =?UTF-8?q?=E6=A0=BC=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/ebiz/common/common.js | 9 ++ src/api/ebiz/sale/sale.js | 8 ++ src/assets/js/business-common.js | 1 + src/views/ebiz/common/MainRiskList.vue | 23 ++++- src/views/ebiz/common/risk-rules.js | 59 ++++++++++- src/views/ebiz/product/ProductDetail.vue | 15 ++- src/views/ebiz/proposal/ProposalInfo.vue | 18 +++- src/views/ebiz/sale/InsuredInfo.vue | 119 ++++++++++++++++++----- 8 files changed, 211 insertions(+), 41 deletions(-) diff --git a/src/api/ebiz/common/common.js b/src/api/ebiz/common/common.js index 5cd00508a..d554da983 100644 --- a/src/api/ebiz/common/common.js +++ b/src/api/ebiz/common/common.js @@ -27,6 +27,15 @@ export function trial(data) { }) } +//产品售卖权限校验 +export function productCheck(data) { + return request({ + url: getUrl('/sale/product/check', 1), + method: 'post', + data + }) +} + //订单详情 export function orderDetail(data) { return request({ diff --git a/src/api/ebiz/sale/sale.js b/src/api/ebiz/sale/sale.js index 269c01e7f..3a01683d2 100644 --- a/src/api/ebiz/sale/sale.js +++ b/src/api/ebiz/sale/sale.js @@ -195,3 +195,11 @@ export function getPayState(data) { }) } +// 获取产品允许投保人单位列表 +export function getCompany(data) { + return request({ + url: getUrl('/sale/product/company', 1), + method: 'post', + data + }) +} diff --git a/src/assets/js/business-common.js b/src/assets/js/business-common.js index 84c3ee530..67045bc54 100644 --- a/src/assets/js/business-common.js +++ b/src/assets/js/business-common.js @@ -504,6 +504,7 @@ export default { } let age = utilsAge.getAge(appntDTO.birthday, new Date()) localStorage.saleInsuredInfo = JSON.stringify({ + workcompany: appntDTO.workcompany, birthday: appntDTO.birthday, name: appntDTO.name, sex: appntDTO.sex, diff --git a/src/views/ebiz/common/MainRiskList.vue b/src/views/ebiz/common/MainRiskList.vue index a99e48afb..7bf7a69fb 100644 --- a/src/views/ebiz/common/MainRiskList.vue +++ b/src/views/ebiz/common/MainRiskList.vue @@ -19,7 +19,7 @@