diff --git a/src/api/ebiz/poster/poster.js b/src/api/ebiz/poster/poster.js index 0a6aaca6b..05de43d83 100644 --- a/src/api/ebiz/poster/poster.js +++ b/src/api/ebiz/poster/poster.js @@ -27,3 +27,12 @@ export function getPosterInfo(data) { data }) } + +// 获取分享图片 +export function shareUrl(data) { + return request({ + url: getUrl('/media/pster/shareUrl', 1), + method: 'post', + data + }) +} diff --git a/src/router/ebiz/sale.js b/src/router/ebiz/sale.js index 8031c3333..82b636888 100644 --- a/src/router/ebiz/sale.js +++ b/src/router/ebiz/sale.js @@ -22,6 +22,8 @@ const backShow = () => import('@/views/ebiz/sale/BackShow') const Test = () => import('@/views/ebiz/sale/test') const detail = () => import('@/views/ebiz/sale/Detail') const productTip = () => import('@/views/ebiz/sale/productTip') +let riskName = localStorage.riskName +console.log('sale/riskName==', riskName) export default [ { path: '/sale/list', @@ -137,7 +139,7 @@ export default [ name: 'productTip', component: productTip, meta: { - title: '金管家养老年金保险(万能型)产品说明书' + title: `${riskName}产品说明书` } }, { diff --git a/src/views/ebiz/common/AddRiskList.vue b/src/views/ebiz/common/AddRiskList.vue index 2e00a6c20..78d04e9a9 100644 --- a/src/views/ebiz/common/AddRiskList.vue +++ b/src/views/ebiz/common/AddRiskList.vue @@ -73,6 +73,9 @@ export default { let resultData = await calculatePremium({ productCodes: [riskProductCode], platform: 'app', type: '1' }) if (resultData.result == 0) { resultData = resultData.trialDTOS[0] + 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-否 /********start 附加险选择限制 start******/ //豁免险与其他附加险年龄险种 if (resultData.productTrialInfoDTO.isRemit == '0' && resultData.productTrialInfoDTO.remitType == '0') { diff --git a/src/views/ebiz/common/CalculatePremium.vue b/src/views/ebiz/common/CalculatePremium.vue index 25b554c46..aa7be90f6 100644 --- a/src/views/ebiz/common/CalculatePremium.vue +++ b/src/views/ebiz/common/CalculatePremium.vue @@ -18,15 +18,17 @@ -
+
+
{{ riskFactor.name + '(' + riskFactor.suffix + ')' }} {{ riskFactor.name }}       + +
+
+
+ {{ + riskFactor.name + '(' + item.productTrialYearDTOS[payEndYearColumnsIndex]['suffix'] + ')' + }} + {{ riskFactor.name }}       + +
+
+
+ +
+
+
{{ riskFactor.name }}
+
+
+ {{ dutyItem.dutyName }}({{ dutyItem.suffix }}) +
+ + +
+
+
+
+
+
+
@@ -121,10 +210,10 @@
首期保费(元):首期保费(元): - 保额(元): + 保额(元): {{ trialList[index].prem.toFixed(2) | moneyFormat }}
@@ -182,7 +271,11 @@ export default { mult: '', isFrom: '', // 默认钱数 - defalutAmt: '' + defalutAmt: '', + //是否需存在特殊配置 0-是 1-否 + isTrial: localStorage.isTrial, + //缴费期间对应index索引 + payEndYearColumnsIndex: 0 } }, mounted() { @@ -220,16 +313,14 @@ export default { } if (item.mainRiskCode != 'GFRS_M0008') { item.calFactorLst.map(i => { - this.defalutAmt = i.displayAmount || 1 - console.log(i.displayAmount) - console.log(i.defaultValue) + // this.defalutAmt = i.displayAmount || 1 + // console.log('i.displayAmount ==', i.displayAmount) + // console.log('i.defaultValue ==', i.defaultValue) this.mult = Number(i.displayAmount) / Number(i.defaultValue) }) } }) - // this.influenceAddRiskCodes - if (this.chooseProducts[0].influences && this.chooseProducts[0].influences.length > 0) { this.influences = this.chooseProducts[0].influences this.chooseProducts[0].influences.forEach(item => { @@ -238,7 +329,6 @@ export default { } this.mainRiskInfluenceAddRisk() - //初始化数据试算 this.getTrial() }, @@ -258,7 +348,7 @@ export default { // this.$toast(localStorage.hint) } else { // this.mainRiskInfluenceAddRisk() - // currentEle['amt'] = Number(currentEle.defaultValue) * Number(currentEle.moneyUnit) + // currentEle['amt'] = Number(defalutValue) * Number(currentEle.moneyUnit) // this.getTrial() if (isChecked) { ;[this.productIndex, this.calFactorIndex] = [productIndex, calFactorIndex] @@ -278,9 +368,11 @@ export default { } } }, + // blur(value) { + // console.log('哈哈哈',value) + // }, //弹框选择 toSelect(index, index1, columns) { - console.log(index, index1, columns) ;[this.popupShow, this.productIndex, this.calFactorIndex] = [true, index, index1] this.columns = columns }, @@ -297,6 +389,18 @@ export default { console.log('value', value) console.log('currentFactor', currentFactor) console.log('currentEle', currentEle) + + //特殊设置:如果需要填写的保费/保额校验规则跟缴费期间挂钩,当改变缴费期间时,将输入框的值恢复默认值1 + if (currentEle.code == 'payEndYear' && this.isTrial == '0') { + currentEle['columns'].forEach((item, index) => { + if (item.value == value.value) { + this.payEndYearColumnsIndex = index + } + }) + this.defalutAmt = 1 + } + console.log('payEndYearColumnsIndex == ', this.payEndYearColumnsIndex) + if (currentEle.showContent != value.text) { //通用规则校验 if (this.payExceedInsured(currentEle, currentFactor, value.value)) { @@ -605,6 +709,7 @@ export default { path: '/common/selectedProduct' } }) + localStorage.trialList = '' } else { this.chooseProducts.splice(index, 1) } @@ -653,14 +758,17 @@ export default { } } else if (factor.type == 1) { if (factor.code == 'inputPrem') { - trialInfo['prem'] = Number(this.defalutAmt) * Number(factor.moneyUnit) + trialInfo['prem'] = + this.isTrial == '0' + ? Number(item.productTrialYearDTOS[this.payEndYearColumnsIndex].displayAmount) * + Number(item.productTrialYearDTOS[this.payEndYearColumnsIndex].moneyUnit) + : Number(factor.displayAmount) * Number(factor.moneyUnit) } else { if (item.isRemit == 0) { - trialInfo['amt'] = Number(factor.defaultValue) * Number(factor.moneyUnit) + trialInfo['amt'] = Number(factor.displayAmount) * Number(factor.moneyUnit) } else { - trialInfo['amt'] = Number(this.defalutAmt) * Number(factor.moneyUnit) + trialInfo['amt'] = Number(factor.displayAmount) * Number(factor.moneyUnit) } - // trialInfo['amt'] = Number(this.defalutAmt) * Number(factor.moneyUnit) } } else if (factor.type == 2) { trialInfo.jobLevel = this.saleInsuredPersonInfo[factor.code] @@ -683,6 +791,7 @@ export default { console.log('trialInfo == ', trialInfo) //通用规则1:交费方式为一次交情,无交费期限 if (trialInfo['payIntv'] == '0') { + console.log(11111) trialInfo['payEndYear'] = '1000' trialInfo['payEndYearFlag'] = 'Y' // 福宝宝和万能险传A @@ -747,69 +856,103 @@ export default { console.log(defalutValue, productIndex, calFactorIndex, min, max) console.log(this.saleInsuredPersonInfo.age) console.log(riskFactor) - console.log(JSON.parse(localStorage.trialList)[0].productCode) - // debugger - let currentEle = this.chooseProducts[productIndex].calFactorLst[calFactorIndex] - + let currentEle = + localStorage.isTrial !== '1' && this.chooseProducts[productIndex].isMainRisk == '0' + ? this.chooseProducts[productIndex].productTrialYearDTOS[calFactorIndex] + : this.chooseProducts[productIndex].calFactorLst[calFactorIndex] //改动原因:孝心保产品有对年龄的特殊要求 //添加判断,是否是孝心保产品 - if (JSON.parse(localStorage.trialList)[0].productCode == 'GFRS_M0014') { + let productCode = localStorage.trialList == '' ? '' : JSON.parse(localStorage.trialList)[0].productCode + if (productCode == 'GFRS_M0014') { //被保人年龄如果在50-65区间 if (this.saleInsuredPersonInfo.age >= 50 && this.saleInsuredPersonInfo.age <= 65) { //使用rules规则里的第二条控制保额份数 - if (Number(this.defalutAmt) < Number(riskFactor.rules[1].minPrem) || Number(this.defalutAmt) > Number(riskFactor.rules[1].maxPrem)) { + if (Number(defalutValue) < Number(riskFactor.rules[1].minPrem) || Number(defalutValue) > Number(riskFactor.rules[1].maxPrem)) { this.$toast(localStorage.hint) this.nextStepFlag = true } else { - if ((Number(this.defalutAmt) * 10000) % (Number(currentEle.limit) * 10000) != 0) { + if ((Number(defalutValue) * 10000) % (Number(currentEle.limit) * 10000) != 0) { // this.defalutAmt = currentEle.rules[productIndex].displayAmount this.$toast(localStorage.hint) this.nextStepFlag = true } else { this.mainRiskInfluenceAddRisk() - currentEle['amt'] = Number(this.defalutAmt) * Number(currentEle.moneyUnit) + currentEle['amt'] = Number(defalutValue) * Number(currentEle.moneyUnit) this.getTrial() } } //被保人年龄如果在66-75之间 } else if (this.saleInsuredPersonInfo.age >= 66 && this.saleInsuredPersonInfo.age <= 75) { //使用rules规则里的第一条控制保额份数 - if (Number(this.defalutAmt) < Number(riskFactor.rules[0].minPrem) || Number(this.defalutAmt) > Number(riskFactor.rules[0].maxPrem)) { + if (Number(defalutValue) < Number(riskFactor.rules[0].minPrem) || Number(defalutValue) > Number(riskFactor.rules[0].maxPrem)) { this.$toast(localStorage.hint) this.nextStepFlag = true } else { - if ((Number(this.defalutAmt) * 10000) % (Number(currentEle.limit) * 10000) != 0) { + if ((Number(defalutValue) * 10000) % (Number(currentEle.limit) * 10000) != 0) { // this.defalutAmt = currentEle.rules[productIndex].displayAmount this.$toast(localStorage.hint) this.nextStepFlag = true } else { this.mainRiskInfluenceAddRisk() - currentEle['amt'] = Number(this.defalutAmt) * Number(currentEle.moneyUnit) + currentEle['amt'] = Number(defalutValue) * Number(currentEle.moneyUnit) this.getTrial() } } } + //isTrial为0 ---暂时为富娃娃两全保险(万能型)专配 输入保费校验 + } else if (this.isTrial === '0' && this.chooseProducts[productIndex].isMainRisk == '0') { + if (Number(defalutValue) < Number(min)) { + console.log('校验 == ', Number(defalutValue), Number(min), Number(min) * Number(riskFactor.moneyUnit)) + this.$toast(`交费期间为${riskFactor.yearWay}年交时,最低保费为${Number(min) * Number(riskFactor.moneyUnit)}元`) + this.nextStepFlag = true + } else { + if ((Number(defalutValue) * 10000) % (Number(currentEle.limit) * 10000) != 0) { + // this.defalutAmt = currentEle.rules[productIndex].displayAmount + this.$toast(`超过最低保费部分金额需为1000元整数倍`) + this.nextStepFlag = true + } else { + this.nextStepFlag = false + this.mainRiskInfluenceAddRisk() + currentEle['amt'] = Number(defalutValue) * Number(riskFactor.moneyUnit) + this.getTrial() + } + } //其他产品按照原先的逻辑判断 + } else if (this.isTrial === '0' && this.chooseProducts[productIndex].isMainRisk == '1') { + if (Number(defalutValue) < Number(min) || Number(defalutValue) > Number(max)) { + this.$toast('投保本险种最低基本保险金额为10000元,超过最低基本保险金额为1000元整数倍') + this.nextStepFlag = true + } else { + if ((Number(defalutValue) * 10000) % (Number(currentEle.limit) * 10000) != 0) { + // defalutValue = currentEle.rules[productIndex].displayAmount + this.$toast('投保本险种最低基本保险金额为10000元,超过最低基本保险金额为1000元整数倍') + this.nextStepFlag = true + } else { + this.mainRiskInfluenceAddRisk() + currentEle['amt'] = Number(defalutValue) * Number(currentEle.moneyUnit) + this.getTrial() + } + } } else { - if (Number(this.defalutAmt) < Number(min) || Number(this.defalutAmt) > Number(max)) { + if (Number(defalutValue) < Number(min) || Number(defalutValue) > Number(max)) { this.$toast(localStorage.hint) this.nextStepFlag = true } else { - if ((Number(this.defalutAmt) * 10000) % (Number(currentEle.limit) * 10000) != 0) { - // this.defalutAmt = currentEle.rules[productIndex].displayAmount + if ((Number(defalutValue) * 10000) % (Number(currentEle.limit) * 10000) != 0) { + // defalutValue = currentEle.rules[productIndex].displayAmount this.$toast(localStorage.hint) this.nextStepFlag = true } else { this.mainRiskInfluenceAddRisk() - currentEle['amt'] = Number(this.defalutAmt) * Number(currentEle.moneyUnit) + currentEle['amt'] = Number(defalutValue) * Number(currentEle.moneyUnit) this.getTrial() } } } // let currentEle = this.chooseProducts[this.productIndex].calFactorLst[this.calFactorIndex] - // currentEle.defaultValue = value + // defalutValue = value console.log('进来几次') - this.mult = Number(this.defalutAmt) / Number(defalutValue) + this.mult = Number(defalutValue) / Number(defalutValue) }, //下一步 async nextStep() { @@ -817,65 +960,67 @@ export default { let [mainRiskCode, riskDTOLst] = ['', []] let rollInResult = '' //校验预计转入保费结果 this.chooseProducts.forEach((item, index) => { - if (item.isMainRisk == 0) { - mainRiskCode = item.productCode - } - // this.trialInfos.map(trial=>{ - // trial.duty.map(dutylist=> { - // dutylist.dutyname - // }) - // }) - let riskItem = { - isMainRisk: item.isMainRisk, - riskName: item.riskName, - riskType: item.riskType, - riskCode: item.productCode, - mainRiskCode: mainRiskCode, - prem: this.trialList[index] && this.trialList[index].prem, - standPrem: this.trialList[index] && this.trialList[index].standPrem, - predictTransferPrem: item.predictTransferPrem, - thirdInsuraceNo: this.policyNo, - mult: this.mult - } - if (item.hasPredictTransferPrem && item.hasPredictTransferPrem === '0') { - //增加万能险 预计转入保费校验 - rollInResult = this.rollInCheck(item.predictTransferPrem) - } else { - rollInResult = true - } - //责任险保存参数构建 - if (this.trialList[index].duty) { - riskItem['dutyLst'] = this.trialList[index].duty - //930折中方案,责任险分档 - riskItem['amt'] = this.trialList[index].amt - } - //保费算保额 - console.log('this.trialList', this.trialList[index].trialType) - // debugger - if (this.trialList[index].trialType == '1' || this.trialList[index].trialType == '2') { - // console.log('11111111111111111') - // console.log(this.trialList[index].amt) - riskItem['amt'] = this.trialList[index].amt - } - // console.log(riskItem) - //万能型产品保费赋值给保额 - //增加判断是否是从建议书跳转过来了的 - if (localStorage.isFrom != 'proposal') { - if (this.trialList[index].productCode == 'GFRS_M0003') { - // console.log('2222222222') - riskItem['amt'] = this.trialList[index].prem + if (localStorage.trialList != '') { + if (item.isMainRisk == 0) { + mainRiskCode = item.productCode } + // this.trialInfos.map(trial=>{ + // trial.duty.map(dutylist=> { + // dutylist.dutyname + // }) + // }) + let riskItem = { + isMainRisk: item.isMainRisk, + riskName: item.riskName, + riskType: item.riskType, + riskCode: item.productCode, + mainRiskCode: mainRiskCode, + prem: this.trialList[index] && this.trialList[index].prem, + standPrem: this.trialList[index] && this.trialList[index].standPrem, + predictTransferPrem: item.predictTransferPrem, + thirdInsuraceNo: this.policyNo, + mult: this.mult + } + if (item.hasPredictTransferPrem && item.hasPredictTransferPrem === '0') { + //增加万能险 预计转入保费校验 + rollInResult = this.rollInCheck(item.predictTransferPrem) + } else { + rollInResult = true + } + //责任险保存参数构建 + if (this.trialList[index].duty) { + riskItem['dutyLst'] = this.trialList[index].duty + //930折中方案,责任险分档 + riskItem['amt'] = this.trialList[index].amt + } + //保费算保额 + console.log('this.trialList', this.trialList[index].trialType) + // debugger + if (this.trialList[index].trialType == '1' || this.trialList[index].trialType == '2') { + // console.log('11111111111111111') + // console.log(this.trialList[index].amt) + riskItem['amt'] = this.trialList[index].amt + } + // console.log(riskItem) + //万能型产品保费赋值给保额 + //增加判断是否是从建议书跳转过来了的 + if (localStorage.isFrom != 'proposal') { + if (this.trialList[index].productCode == 'GFRS_M0003' || this.trialList[index].productCode == 'GFRS_M0015') { + riskItem['amt'] = this.trialList[index].prem + } + } + + //豁免险保额处理 + if (item.isRemit == '0') { + // console.log('33333333') + 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) } - //豁免险保额处理 - if (item.isRemit == '0') { - // console.log('33333333') - 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) }) if (!rollInResult) { return diff --git a/src/views/ebiz/common/MainRiskList.vue b/src/views/ebiz/common/MainRiskList.vue index c2b16ad25..c20e35b6e 100644 --- a/src/views/ebiz/common/MainRiskList.vue +++ b/src/views/ebiz/common/MainRiskList.vue @@ -94,10 +94,12 @@ export default { }, //储存主险 async addMainRisk() { + localStorage.setItem('isTrial', '1') let riskProductCode = this.result.riskProductCode let resultData = await calculatePremium({ productCodes: [riskProductCode], platform: 'app', type: '1' }) if (resultData.result == 0) { resultData = resultData.trialDTOS[0] + localStorage.isTrial = resultData.productTrialInfoDTO.productTrialYearDTOS != null ? '0' : '1' localStorage.hint = resultData.hint if (resultData.productTrialInfoDTO.dutyGroup != null) { resultData.productTrialInfoDTO.dutyGroup.map(item => { @@ -132,26 +134,44 @@ export default { //保存附加险 localStorage.addtionRiskLst = JSON.stringify(resultData.productTrialInfoDTO.addtionRiskLst) - // console.log('resultData', resultData) localStorage.isAutoPay = resultData.isAutoPay localStorage.isRenew = resultData.isRenew + localStorage.isForceRenew = resultData.isForceRenew localStorage.isRelated = resultData.isRelated let calFactorLst = this.getFactorList(resultData) + let productTrialYearDTOS = resultData.productTrialInfoDTO.productTrialYearDTOS != null ? resultData.productTrialInfoDTO.productTrialYearDTOS : null let hasAddtionRisk = resultData.productTrialInfoDTO.addtionRiskLst ? true : false - let currentProductInfo = { - calFactorLst, - hasAddtionRisk, - isMainRisk: 0, - riskType: resultData.riskType, - riskName: this.result.riskName, - productCode: this.result.riskProductCode, - mainRiskCode: this.result.riskProductCode, - documentDTOS: resultData.productTrialInfoDTO.documentDTOS, - influences: resultData.productTrialInfoDTO.influences, - isRemit: resultData.productTrialInfoDTO.isRemit, - hasPredictTransferPrem: resultData.productTrialInfoDTO.hasPredictTransferPrem, //建议书使用 是否展示预计转入保费 - predictTransferPrem: null //建议书使用 预计转入保费字段 - } + let currentProductInfo = + localStorage.isTrial == '1' + ? { + calFactorLst, + hasAddtionRisk, + isMainRisk: 0, + riskType: resultData.riskType, + riskName: this.result.riskName, + productCode: this.result.riskProductCode, + mainRiskCode: this.result.riskProductCode, + documentDTOS: resultData.productTrialInfoDTO.documentDTOS, + influences: resultData.productTrialInfoDTO.influences, + isRemit: resultData.productTrialInfoDTO.isRemit, + hasPredictTransferPrem: resultData.productTrialInfoDTO.hasPredictTransferPrem, //建议书使用 是否展示预计转入保费 + predictTransferPrem: null //建议书使用 预计转入保费字段 + } + : { + productTrialYearDTOS, + calFactorLst, + hasAddtionRisk, + isMainRisk: 0, + riskType: resultData.riskType, + riskName: this.result.riskName, + productCode: this.result.riskProductCode, + mainRiskCode: this.result.riskProductCode, + documentDTOS: resultData.productTrialInfoDTO.documentDTOS, + influences: resultData.productTrialInfoDTO.influences, + isRemit: resultData.productTrialInfoDTO.isRemit, + hasPredictTransferPrem: resultData.productTrialInfoDTO.hasPredictTransferPrem, //建议书使用 是否展示预计转入保费 + predictTransferPrem: null //建议书使用 预计转入保费字段 + } //构建险种数组 let productsData @@ -194,13 +214,15 @@ export default { }) } else if (item.type == 1) { //按年龄选择 - productTrialInfoDTO[item.code].forEach(factor => { - item = Object.assign(item, factor) - }) - if (item.code == 'inputPrem') { - item['inputPrem'] = Number(item.minPrem) * Number(item.moneyUnit) - } else { - item['amt'] = Number(item.minAmt) * Number(item.moneyUnit) + if (productTrialInfoDTO[item.code] != null) { + productTrialInfoDTO[item.code].forEach(factor => { + item = Object.assign(item, factor) + }) + if (item.code == 'inputPrem') { + item['inputPrem'] = Number(item.minPrem) * Number(item.moneyUnit) + } else { + item['amt'] = Number(item.minAmt) * Number(item.moneyUnit) + } } } //规则储存 diff --git a/src/views/ebiz/poster/PosterPreview.vue b/src/views/ebiz/poster/PosterPreview.vue index 577585c6b..4ba40eab8 100644 --- a/src/views/ebiz/poster/PosterPreview.vue +++ b/src/views/ebiz/poster/PosterPreview.vue @@ -1,7 +1,7 @@ diff --git a/src/views/ebiz/proposal/Exhibition.vue b/src/views/ebiz/proposal/Exhibition.vue index 2c52f8e61..4c37708a8 100644 --- a/src/views/ebiz/proposal/Exhibition.vue +++ b/src/views/ebiz/proposal/Exhibition.vue @@ -356,12 +356,15 @@ export default { } if (risk.payEndYearFlag == 'Y') { + console.log(111) if (risk.payEndYear == '1000') { risk.payName = '一次交清' } else { + console.log(222) risk.payName = risk.payEndYear + '年' } } else { + console.log(333) risk.payName = risk.payEndYear + '岁' } // risk.demoValue[demoLabel.content] == dutyLst.dutyCode diff --git a/src/views/ebiz/proposal/InsuredPerson.vue b/src/views/ebiz/proposal/InsuredPerson.vue index d333a1da7..aa7d8514c 100644 --- a/src/views/ebiz/proposal/InsuredPerson.vue +++ b/src/views/ebiz/proposal/InsuredPerson.vue @@ -51,7 +51,10 @@ placeholder="被保人职业" /> -
+
+ +
+ 下一步 @@ -69,6 +72,7 @@ import { CellGroup, Field, Dialog, Toast } from 'vant' import getAge from '@/assets/js/utils/age.js' import beforeDate from '@/assets/js/utils/getBeforeDate.js' import { checkSex, checkRelation } from './rule' + export default { data() { return { @@ -111,7 +115,8 @@ export default { customerShowPicker: false, occupationShowPicker: false, currentPopupIndex: '', - disabled: false + disabled: false, + ageShow: '' //被保人显示年龄 } }, @@ -121,6 +126,15 @@ export default { this.init() }, mounted() {}, + watch: { + 'insured.age': { + handler(newVal) { + this.ageShow = newVal == '-1' ? '' : newVal + }, + deep: true, + immediate: true + } + }, methods: { init() { window.appCallBack = this.appCallBack @@ -135,6 +149,12 @@ export default { this.insured.age = getAge.getAge(this.insured.birthday, new Date()) this.insured.medical = '0' } + this.ageShow = this.insured.age == '-1' ? '0' : this.insured.age + }, + //设置被保人年龄显示 如果this.insured.age为 -1时显示为空,不为1时显示为正常输入值 + changeAgeInput(val) { + // this.ageShow = val == '-1' ? '0' : val + this.insured.age = val }, selectClick(index) { this.currentPopupIndex = index @@ -304,20 +324,24 @@ export default { hiddenRight: '1' } }) - let { customerName, customerSex, birthday, customerPhone, age, occupationName, occupationCode, lifeGrade, healthGrade, socialSecurity } = data + console.log('data == ', data) + let { customerName, customerSex, birthday, customerPhone, occupationName, occupationCode, lifeGrade, healthGrade, socialSecurity } = data + let age = getAge.getAge(data['birthday'], new Date()) let insured = { mobile: customerPhone, birthday, sex: String(customerSex), name: customerName, occupationName, - age: age ? age : '', + age: age, occupationCode, lifeGrade, healthGrade, medical: socialSecurity ? socialSecurity : '0' } + console.log('insured.age', insured.age) Object.assign(this.insured, insured) + console.log('insured == ', insured) } }, diff --git a/src/views/ebiz/sale/AccountInformation.vue b/src/views/ebiz/sale/AccountInformation.vue index e55eef3dc..bd166e78c 100644 --- a/src/views/ebiz/sale/AccountInformation.vue +++ b/src/views/ebiz/sale/AccountInformation.vue @@ -42,7 +42,7 @@ /> - +
温馨提示:该账户将用于首期、续期保费缴费 @@ -143,6 +143,8 @@ export default { isAutoPay: '', // 是否显示自动续保 isRenew: '', + //自动续保按钮是否不允许更改 + isForceRenew: false, changeCard: localStorage.changeCard } }, @@ -408,6 +410,9 @@ export default { this.isAutoPay = localStorage.isAutoPay // 是否显示自动续保 this.isRenew = localStorage.isRenew + //自动续保按钮是否禁用 + this.isForceRenew = localStorage.isForceRenew == '0' ? true : false + this.isChecked = localStorage.isForceRenew == '0' ? true : false }, mounted() { document.body.style.backgroundColor = '#F5F5F5' diff --git a/src/views/ebiz/sale/Detail.vue b/src/views/ebiz/sale/Detail.vue index 7a32e0add..22ea52848 100644 --- a/src/views/ebiz/sale/Detail.vue +++ b/src/views/ebiz/sale/Detail.vue @@ -60,7 +60,8 @@ - + + @@ -72,8 +73,8 @@ - - + + diff --git a/src/views/ebiz/sale/InsuranceInformation.vue b/src/views/ebiz/sale/InsuranceInformation.vue index 984482940..4449f739a 100644 --- a/src/views/ebiz/sale/InsuranceInformation.vue +++ b/src/views/ebiz/sale/InsuranceInformation.vue @@ -273,7 +273,7 @@ export default { } }) } else { - url = this.productCode == 'GFRS_M0003' ? 'productTip' : 'insuranceTip' + url = this.productCode == 'GFRS_M0003' || this.productCode == 'GFRS_M0015' ? 'productTip' : 'insuranceTip' this.$jump({ flag: 'h5', extra: { @@ -406,7 +406,7 @@ export default { if (that.changeCard) { url = 'SignatureConfirmation' } else { - url = this.productCode == 'GFRS_M0003' ? 'productTip' : 'insuranceTip' + url = this.productCode == 'GFRS_M0003' || this.productCode == 'GFRS_M0015' ? 'productTip' : 'insuranceTip' } this.$jump({ flag: 'h5', diff --git a/src/views/ebiz/sale/SignatureConfirmation.vue b/src/views/ebiz/sale/SignatureConfirmation.vue index 79a62ff7e..6368d1abd 100644 --- a/src/views/ebiz/sale/SignatureConfirmation.vue +++ b/src/views/ebiz/sale/SignatureConfirmation.vue @@ -230,6 +230,8 @@ export default { data() { let isWeixin = this.$utils.device().isWeixin //判断环境 return { + //保险产品名称 + riskName: '', // 员工信息 recmd: {}, // 投保时间 @@ -319,11 +321,6 @@ export default { this.relationToAppnt = this.$route.query.relationToAppnt this.isShow = false this.getOrderDetail().then(() => { - // console.log('this.appntSignStatus', this.appntSignStatus) - // console.log('this.appntSignStatus', this.appntSignStatus) - console.log('this.appntSignStatus', this.appntSignStatus) - console.log('this.shareCode', this.shareCode) - console.log('this.changeCard', this.changeCard) if ( (this.appntSignStatus == '3' && sessionStorage.getItem('shareCode') == '0') || (this.appntSignStatus == '3' && sessionStorage.getItem('shareCode') == '2') @@ -371,8 +368,9 @@ export default { window.localStorage.setItem('sign-val', val) window.localStorage.setItem('sign-appnt', JSON.stringify(that.appntSign)) if (val == '0' || val == '2') { - //idtype不为身份证或年纪小于18岁跳过人脸识别 - if (JSON.parse(this.$route.query.saleInsuredInfo).idType != '1' || JSON.parse(this.$route.query.saleInsuredInfo).age < '18') { + //idtype不为身份证跳过人脸识别 + // if (JSON.parse(this.$route.query.saleInsuredInfo).idType != '1' || JSON.parse(this.$route.query.saleInsuredInfo).age < '18') { + if (JSON.parse(this.$route.query.saleInsuredInfo).idType != '1') { that.goUrl() } else { this.idcardData.typeface = !this.idcardData.typeface @@ -382,7 +380,8 @@ export default { } else { window.localStorage.setItem('sign-val', val) window.localStorage.setItem('sign-insured', JSON.stringify(that.insuredSign)) - if (JSON.parse(this.$route.query.saleInsuredPersonInfo).idType != '1' || JSON.parse(this.$route.query.saleInsuredPersonInfo).age < '18') { + // if (JSON.parse(this.$route.query.saleInsuredPersonInfo).idType != '1' || JSON.parse(this.$route.query.saleInsuredPersonInfo).age < '18') { + if (JSON.parse(this.$route.query.saleInsuredPersonInfo).idType != '1') { that.insuredUrl() } else { this.idcardData.typeface = !this.idcardData.typeface @@ -394,7 +393,8 @@ export default { if (val == '0' || val == '2') { window.localStorage.setItem('sign-val', val) window.localStorage.setItem('sign-appnt', JSON.stringify(that.appntSign)) - if (this.saleInsuredInfo.idType != '1' || this.saleInsuredInfo.age < '18') { + if (this.saleInsuredInfo.idType != '1') { + // if (this.saleInsuredInfo.idType != '1' || this.saleInsuredInfo.age < '18') { that.goUrl() } else { // 原人脸识别 @@ -412,7 +412,8 @@ export default { } else { window.localStorage.setItem('sign-val', val) window.localStorage.setItem('sign-insured', JSON.stringify(that.insuredSign)) - if (this.saleInsuredPersonInfo.idType != '1' || this.saleInsuredPersonInfo.age < '18') { + if (this.saleInsuredPersonInfo.idType != '1') { + // if (this.saleInsuredPersonInfo.idType != '1' || this.saleInsuredPersonInfo.age < '18') { that.insuredUrl() } else { // 调原生人脸识别 @@ -436,7 +437,7 @@ export default { if (that.changeCard) { path = 'insuranceInformation' } else { - if (localStorage.productCode == 'GFRS_M0003') { + if (localStorage.productCode == 'GFRS_M0003' || localStorage.productCode == 'GFRS_M0015') { if (that.appntSign[0].documentStatus == 0) { path = 'insuranceInformation' } else if (that.appntSign[1].documentStatus == 2) { @@ -697,6 +698,7 @@ export default { let data = { orderNo: window.localStorage.getItem('orderNo') } + localStorage.setItem('riskName', '') return new Promise((resolve, reject) => { getOrderDetail(data).then(res => { if (res.result == '0') { @@ -707,6 +709,8 @@ export default { // 获取投保人信息 this.saleInsuredInfo = JSON.parse(window.localStorage.getItem('saleInsuredInfo')) this.relationToAppnt = this.saleInsuredPersonInfo.relationToAppnt //将缓存中的与被保人关系赋值给页面 + this.riskName = res.orderDTO.insuredDTOs[0].riskDTOLst[0].riskName + localStorage.riskName = this.riskName that.recmd = res.orderDTO.recmdDTO that.orderInfo = res.orderDTO.orderInfoDTO that.insured = res.orderDTO.insuredDTOs diff --git a/src/views/ebiz/sale/SignatureOfElectronic.vue b/src/views/ebiz/sale/SignatureOfElectronic.vue index a014e647d..cfa0a0f9a 100644 --- a/src/views/ebiz/sale/SignatureOfElectronic.vue +++ b/src/views/ebiz/sale/SignatureOfElectronic.vue @@ -15,7 +15,7 @@
投保人签名 :
- + {{ isSign ? '签名' : '已签名' }}
@@ -27,13 +27,13 @@ 本人确认已阅读 - {{`${pdfName}`}} + {{ `${pdfName}` }}
@@ -460,7 +460,7 @@ export default { pageNo: '1', index: '1', offset: this.caOffset, - pos: '3' + pos: '3' //设置偏移量 3表示右侧 }).then(data => { let temp = JSON.parse(data) // console.log(`--签名返回:val:${val},this.detailJump:${this.detailJump},this.relationToAppnt:${this.relationToAppnt},CA_state:${temp.state}`) @@ -491,7 +491,7 @@ export default { pageNo: '1', index: '1', offset: '-250', - pos: '3' + pos: '3' //设置偏移量 3表示右侧 }).then(data => { // console.log(`--签名返回:val:${val},this.detailJump:${this.detailJump},this.relationToAppnt:${this.relationToAppnt}`, JSON.stringify(data)) this.$toast.clear() @@ -581,7 +581,7 @@ export default { pageNo: '1', index: '1', offset: '50', - pos: '3' + pos: '3' //设置偏移量 3表示右侧 }).then(data => { // console.log(`--签名返回:val:${val},this.detailJump:${this.detailJump},this.relationToAppnt:${this.relationToAppnt}`, JSON.stringify(data)) this.$toast.clear() @@ -610,7 +610,7 @@ export default { ) window.location.href = this.$mainUrl + '/sign/index.html' }, - // 超录 + // 抄录 chaolu() { // 再微信 if (this.isWeixin) { @@ -678,7 +678,7 @@ export default { pageNo: '1', index: '1', offset: '10', - pos: '3', + pos: '3', //设置偏移量 3表示右侧 commentKeyword: '认真', commentText: '本人已阅读保险条款、产品说明书和投保提示书,了解本产品的特点和保单利益的不确定性', commentOffset: '28', @@ -708,7 +708,7 @@ export default { pageNo: '1', index: '1', offset: this.caOffset, - pos: '3', + pos: '3', //设置偏移量 3表示右侧 commentKeyword: '认真', commentText: '本人已阅读保险条款、产品说明书和投保提示书,了解本产品的特点和保单利益的不确定性', commentOffset: '28', @@ -751,7 +751,8 @@ export default { // 判断是不是万能险 let comment = window.localStorage.getItem('productCode') - if (comment == 'GFRS_M0003') { + // if (comment == 'GFRS_M0003') { + if (comment == 'GFRS_M0003' || comment == 'GFRS_M0015') { this.isComment = true } diff --git a/src/views/ebiz/sale/productTip.vue b/src/views/ebiz/sale/productTip.vue index 74f0a7e79..80ff15253 100644 --- a/src/views/ebiz/sale/productTip.vue +++ b/src/views/ebiz/sale/productTip.vue @@ -5,7 +5,7 @@ 本人确认已阅读 - 《国富人寿金管家养老年金保险(万能型)产品说明书》 + 《{{ riskName }}产品说明书》
@@ -60,7 +60,9 @@ export default { saleInsuredInfo: {}, // 是否从详情跳过来 如果为1 是 detailJump: '', - src: location.origin + '/pdfjs/web/viewer.html?file=' + src: location.origin + '/pdfjs/web/viewer.html?file=', + //保险产品名称 + riskName: localStorage.riskName } }, components: {