From 2e7c4197dd2b5cad48a938fd7f1e9e92dce5e887 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8B=BE=E9=80=9A?= Date: Wed, 15 Oct 2025 12:41:35 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90FIX=E3=80=91=E4=BF=9D=E8=B4=B9?= =?UTF-8?q?=E8=AE=A1=E7=AE=97=E8=B7=B3=E8=BD=AC=E4=BF=AE=E5=A4=8D=E5=8F=8A?= =?UTF-8?q?=E6=B5=8B=E8=AF=84=E6=8C=89=E9=92=AE=E7=BD=AE=E7=81=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/ebiz/common/CalculatePremium.vue | 76 ++++++++++++---------- src/views/ebiz/sale/questionEvaluate.vue | 58 +++++++++-------- 2 files changed, 74 insertions(+), 60 deletions(-) diff --git a/src/views/ebiz/common/CalculatePremium.vue b/src/views/ebiz/common/CalculatePremium.vue index cc21ba67b..f049cd604 100644 --- a/src/views/ebiz/common/CalculatePremium.vue +++ b/src/views/ebiz/common/CalculatePremium.vue @@ -759,7 +759,7 @@ export default { // this.cvalidateStr = this.cvalidateFlag?this.activeType == 'KMH'?'2021-01-01':this.activeType == 'SQY'?'2021-06-01':'':'' //GFRS-2552【需求】关于金掌桂投保流程增设指定生效日按钮的申请 const orderNo = this.$route.query.orderNo - let detailPromise = this.isFrom === 'proposal' ? localStorage.proposalMedical : await getOrderDetail({ orderNo,userAssessLogic:true }) + let detailPromise = this.isFrom === 'proposal' ? localStorage.proposalMedical : await getOrderDetail({ orderNo }) let collect = (data, code) => { data.forEach((item) => { if (item.code == code) { @@ -777,8 +777,6 @@ export default { //活动生效日期 this.cvalidateStr = detailPromise.orderDTO.orderInfoDTO.cvaliDate this.activeType = detailPromise.orderDTO.orderInfoDTO.activeType - this.assessFlag = detailPromise.orderDTO.orderInfoDTO.assessFlag - this.resultRiskType = detailPromise.orderDTO.orderInfoDTO.resultRiskType } this.cvalidateFlag = this.activeType && this.isFrom != 'proposal' //构建提交数据、渲染险种 @@ -3386,37 +3384,49 @@ export default { } else if (this.$route.query.proposalOrderNo) { thismyurl = '?proposalOrderNo=' + this.$route.query.proposalOrderNo } - console.log('this.assessFlag',this.assessFlag) - if(this.assessFlag === '0'){ //需要填写问卷 - localStorage.setItem('evalateFrom', 'toEvaluate') //通过该字段确定跳回几层 - this.$jump({ - flag: 'h5', - extra: { - url: location.origin + '/#' + `/sale/questionEvaluate?orderNo=${this.$route.query.orderNo}` - }, - routerInfo: { - path:`/sale/questionEvaluate?orderNo=${this.$route.query.orderNo}` + getOrderDetail({orderNo: this.$route.query.orderNo,userAssessLogic:true}).then((res) => { + if(res.result == '0'){ + this.assessFlag = res.orderDTO.orderInfoDTO.assessFlag + this.resultRiskType = res.orderDTO.orderInfoDTO.resultRiskType + console.log('this.assessFlag',this.assessFlag) + if(this.assessFlag === '0'){ //需要填写问卷 + localStorage.setItem('evalateFrom', 'toEvaluate') //通过该字段确定跳回几层 + this.$jump({ + flag: 'h5', + extra: { + url: location.origin + '/#' + `/sale/questionEvaluate?orderNo=${this.$route.query.orderNo}` + }, + routerInfo: { + path:`/sale/questionEvaluate?orderNo=${this.$route.query.orderNo}` + } + }) + }else if( this.assessFlag === '2'){ //2.不需要填写,超过次数限制弹提示,继续后续投保流程 + return this.$toast('已超过评估次数限制,无法重新评估') + }else if( this.assessFlag === '3'){ //3.不需要填写,已有有效期的问卷,需展示结论 + localStorage.setItem('evalateFrom', 'toResult') + this.showResultPopup = true + this.showHasTested = true + }else{ + this.$jump({ + flag: 'goBack', + extra: { + refresh: '1', + index: '-2' + }, + routerInfo: { + type: 2, + index: -2, + path: '/common/selectedProduct' + thismyurl + } + }) } - }) - }else if( this.assessFlag === '2'){ //2.不需要填写,超过次数限制弹提示,继续后续投保流程 - return this.$toast('已超过评估次数限制,无法重新评估') - }else if( this.assessFlag === '3'){ //3.不需要填写,已有有效期的问卷,需展示结论 - localStorage.setItem('evalateFrom', 'toResult') - this.showResultPopup = true - this.showHasTested = true - } - // this.$jump({ - // flag: 'goBack', - // extra: { - // refresh: '1', - // index: '-2' - // }, - // routerInfo: { - // type: 2, - // index: -2, - // path: '/common/selectedProduct' + thismyurl - // } - // }) + }else{ + this.$toast(res.resMessage) + } + }) + + + } else if (localStorage.isFrom == 'proposal') { let proposalOrderNo = this.$CacheUtils.getLocItem('proposalNo') || '' if (resultData.content.id) { diff --git a/src/views/ebiz/sale/questionEvaluate.vue b/src/views/ebiz/sale/questionEvaluate.vue index ab7343187..9bf3aa5b3 100644 --- a/src/views/ebiz/sale/questionEvaluate.vue +++ b/src/views/ebiz/sale/questionEvaluate.vue @@ -91,7 +91,7 @@
- 提交 + 提交
{ - console.log('item', item, !item) - // 检查每一项是否有值 - if (!item || (Array.isArray(item) && item.length === 0)) { - console.log('进入了', item, !item) - return false // 如果没有值,返回false,表示不满足条件 + console.log('检测到了长度', newVal) + if(newVal.length !== this.questionList.length){ + this.disabled = true + }else{ + if(Array.from(newVal).some(item=>!item)){ + console.log('检测到了有空值', Array.from(newVal)) + this.disabled = true + } else if(Array.from(newVal)[3].chooseDesc.split(',').length!=2|| + Array.from(newVal)[3].chooseDesc.split(',').some(item=>!item)|| + !Array.from(newVal)[4].chooseDesc + ){ + this.disabled = true + }else if(Array.from(newVal)[1].choose.length==0){ + this.disabled = true + }else if(Array.from(newVal)[1].choose.length>0&&Array.from(newVal)[1].choose.includes('B')){ + console.log('检测到了B', Array.from(newVal)[1]) + if(Array.from(newVal)[1].subOption=='Y' && !Array.from(newVal)[1].subOptionContent){ + this.disabled = true + }else if(Array.from(newVal)[1].subOption=='N'){ + this.disabled = false + }else if(!Array.from(newVal)[1].subOption){ + this.disabled = true } - - // 如果是数组,检查数组中是否所有元素都有值 - if (Array.isArray(item)) { - return item.every(subItem => subItem && subItem.trim() !== '') + else{ + this.disabled = false } - - return true // 有值,返回true,表示满足条件 - }); - console.log('disabled', this.disabled); - }else{ //如果长度不够,则认为没有填写完整,禁用掉提交按钮 - this.disabled = false + }else{ + this.disabled = false + } } } }, @@ -185,7 +190,7 @@ export default { }, CheckBoxExtraDesc:{ handler(newVal) { - if(!!newVal&&this.answerList[1].includes('B')) { + if(this.answerList[1].includes('B')) { // 创建一个新对象,保留原对象的所有属性,只修改subOption为空 const updatedItem = { ...this.assessQuestionnaireDtoList[1], @@ -198,8 +203,7 @@ export default { }, 'answerList.1': { handler(newVal) { - console.log('检测到了第一项数据', newVal) - + console.log('检测到了第一项数据', newVal) if(!newVal.includes('B')) { this.CheckBoxExtraDesc = '' this.CheckBoxExtraRadio =''