From 90109354aa6136d514d9df7328261577cb96d15d Mon Sep 17 00:00:00 2001 From: shishengjie Date: Fri, 1 Nov 2019 15:35:18 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=BB=BA=E8=AE=AE=E4=B9=A6?= =?UTF-8?q?=E5=88=A9=E7=9B=8A=E6=BC=94=E7=A4=BA=E6=A1=A3=E4=BD=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/ebiz/SelectRadio.vue | 1 + src/views/ebiz/common/CalculatePremium.vue | 33 +++++-- src/views/ebiz/common/MainRiskList.vue | 6 +- src/views/ebiz/proposal/Exhibition.vue | 77 +++++++-------- .../ebiz/proposal/js/exhibitionMethod.js | 99 +++++++++++++++++++ 5 files changed, 168 insertions(+), 48 deletions(-) create mode 100644 src/views/ebiz/proposal/js/exhibitionMethod.js diff --git a/src/components/ebiz/SelectRadio.vue b/src/components/ebiz/SelectRadio.vue index cf33b37ba..5ae80d7b2 100644 --- a/src/components/ebiz/SelectRadio.vue +++ b/src/components/ebiz/SelectRadio.vue @@ -51,6 +51,7 @@ export default { return } this.$emit('update:value', value) + this.$emit('radioChange', value) } }, computed: { diff --git a/src/views/ebiz/common/CalculatePremium.vue b/src/views/ebiz/common/CalculatePremium.vue index 397fb758b..be6dc1cd7 100644 --- a/src/views/ebiz/common/CalculatePremium.vue +++ b/src/views/ebiz/common/CalculatePremium.vue @@ -62,7 +62,8 @@ - + +
首期保费(元): @@ -87,7 +88,6 @@ import { Tag, Icon, Dialog, ActionSheet, Popup, Picker, Stepper, Field } from 'v import { trial } from '@/api/ebiz/common/common' import { saveOrUpdateOrderInfo } from '@/api/ebiz/sale/sale' import { saveProposal } from '@/api/ebiz/proposal/proposal.js' - export default { name: 'calculatePremium', components: { @@ -155,7 +155,6 @@ export default { }) } this.mainRiskInfluenceAddRisk() - //初始化数据试算 this.getTrial() }, @@ -586,6 +585,7 @@ export default { async nextStep() { //组装险种提交数据 let [mainRiskCode, riskDTOLst] = ['', []] + let rollInResult = '' //校验预计转入保费结果 this.chooseProducts.forEach((item, index) => { if (item.isMainRisk == 0) { mainRiskCode = item.productCode @@ -597,7 +597,14 @@ export default { riskCode: item.productCode, mainRiskCode: mainRiskCode, prem: this.trialList[index] && this.trialList[index].prem, - standPrem: this.trialList[index] && this.trialList[index].standPrem + standPrem: this.trialList[index] && this.trialList[index].standPrem, + predictTransferPrem: item.predictTransferPrem + } + if (item.hasPredictTransferPrem && item.hasPredictTransferPrem === '0') { + //增加万能险 预计转入保费校验 + rollInResult = this.rollInCheck(item.predictTransferPrem) + } else { + rollInResult = true } //责任险保存参数构建 if (this.trialList[index].duty) { @@ -616,7 +623,10 @@ export default { riskItem = Object.assign(riskItem, this.trialInfos[index]) riskDTOLst.push(riskItem) }) - console.log('riskDTOLst', riskDTOLst) + if (!rollInResult) { + return + } + // console.log('riskDTOLst', riskDTOLst) //建议书需要添加全部投保人信息,电投只需要投保人ID let insuredDTOItem = Object.assign(this.saleInsuredPersonInfo, { riskDTOLst: riskDTOLst }) let params = { @@ -643,7 +653,6 @@ export default { this.saleInsuredPersonInfo.insuredId = resultData.content.id localStorage.saleInsuredPersonInfo = JSON.stringify(this.saleInsuredPersonInfo) } - this.$jump({ flag: 'goBack', extra: { @@ -659,13 +668,23 @@ export default { } else { this.$toast(resultData.resultMessage) } + }, + rollInCheck(value) { + let regExp = /^[1-9]+[0-9]*$/ + let result = regExp.test(value) + if (result) { + return true + } else { + this.$toast.fail('请输入正确的预计转入保费') + return false + } } }, watch: { chooseProducts: { deep: true, handler: function(newVal) { - console.log('xin', newVal) + // console.log('xin', newVal) this.chooseProducts = newVal } } diff --git a/src/views/ebiz/common/MainRiskList.vue b/src/views/ebiz/common/MainRiskList.vue index 797a0555e..d2edd6057 100644 --- a/src/views/ebiz/common/MainRiskList.vue +++ b/src/views/ebiz/common/MainRiskList.vue @@ -98,6 +98,7 @@ export default { resultData = resultData.trialDTOS[0] /********start 主险选择限制 start******/ + if (riskRules.ageLimit(resultData, this)) { return } @@ -128,7 +129,9 @@ export default { mainRiskCode: this.result.riskProductCode, documentDTOS: resultData.productTrialInfoDTO.documentDTOS, influences: resultData.productTrialInfoDTO.influences, - isRemit: resultData.productTrialInfoDTO.isRemit + isRemit: resultData.productTrialInfoDTO.isRemit, + hasPredictTransferPrem: resultData.productTrialInfoDTO.hasPredictTransferPrem, //建议书使用 是否展示预计转入保费 + predictTransferPrem: null //建议书使用 预计转入保费字段 } //构建险种数组 @@ -140,6 +143,7 @@ export default { productsData = [currentProductInfo] } //保存选择险种 + localStorage.chooseProducts = JSON.stringify(productsData) this.jumpTo() } diff --git a/src/views/ebiz/proposal/Exhibition.vue b/src/views/ebiz/proposal/Exhibition.vue index 2af894970..d5fdfc7ef 100644 --- a/src/views/ebiz/proposal/Exhibition.vue +++ b/src/views/ebiz/proposal/Exhibition.vue @@ -131,6 +131,8 @@
+ +
拖动按钮查看不同年龄的保单利益
@@ -150,8 +152,10 @@ -