From e144c763754c7417718bd9c1fc8f3bebf7e2458d Mon Sep 17 00:00:00 2001 From: hz <3451701311@qq.com> Date: Wed, 29 Oct 2025 11:54:45 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E4=BA=A4=E8=B4=B9?= =?UTF-8?q?=E6=96=B9=E5=BC=8F=E5=BC=82=E5=B8=B8=E5=8F=98=E5=8A=A8=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/CalculatePremium.vue | 35 ++++++++----------- 1 file changed, 15 insertions(+), 20 deletions(-) diff --git a/src/views/ebiz/productFlowImprove/components/CalculatePremium.vue b/src/views/ebiz/productFlowImprove/components/CalculatePremium.vue index b51efddb4..57e4faa33 100644 --- a/src/views/ebiz/productFlowImprove/components/CalculatePremium.vue +++ b/src/views/ebiz/productFlowImprove/components/CalculatePremium.vue @@ -575,17 +575,17 @@ export default { * @returns {boolean} */ passUserInfoCheck() { - const info = this.saleInsuredPersonInfo - const keys = Object.keys(info) - const res = keys.filter(key => { - const msg = info[key] - return msg != null && msg !== '' - }) - // debugger - console.log(res, info) - if (res !== -1) { - return res.length === keys.length - } else return false + const hasCompleteInfo = [this.saleInsuredPersonInfo, this.saleInsuredInfo].some(info => { + if (!info || typeof info !== 'object') return false; + const keys = Object.keys(info); + + return keys.every(key => { + const value = info[key]; + return value != null && value !== '' && value !== 'null'; + }); + }); + + return hasCompleteInfo } }, mounted() { @@ -1255,9 +1255,6 @@ export default { }, //确认选择字段 async onConfirm(value) { - const res = [this.productIndex, this.calFactorIndex].find(item => item === '') - if (res !== -1) this.toSelect(0, 0, 0) - this.columns = [] this.popupShow = false // let productCode = this.chooseProducts[this.productIndex].productCode @@ -1319,10 +1316,9 @@ export default { this.isEnterAddtionRiskListFunc() } } else { - // todo: 不知道什么业务详情, 暂时不给显示附加险 - // this.isEnterAddtionRisk = true + this.isEnterAddtionRisk = true } - if (currentEle.showContent !== value.text) { + if (currentEle.showContent != value.text) { //通用规则校验 if (this.payExceedInsured(currentEle, currentFactor, value.value)) { this.popupShow = false @@ -1378,7 +1374,6 @@ export default { if (currentEle.hasFlag) { currentEle[name + 'Flag'] = value.flag } - // this.hiddenPayEndYear(currentEle) //特殊规则:设置豁免险 this.getTrial() @@ -3609,7 +3604,7 @@ export default { handler: function(obj) { const { birthday } = obj this.saleInsuredPersonInfo.insuredAge = utilsAge.getAge(birthday, new Date()) - console.log('投保人当前年龄是 ', this.saleInsuredPersonInfo.insuredAge) + if (this.passUserInfoCheck) this.onConfirm() } }, saleInsuredInfo: { @@ -3617,7 +3612,7 @@ export default { handler: function(obj) { const { birthday } = obj this.saleInsuredInfo.insuredAge = utilsAge.getAge(birthday, new Date()) - console.log('被保人当前年龄是 ', this.saleInsuredPersonInfo.insuredAge) + if (this.passUserInfoCheck) this.onConfirm() } } }