From b3f5afddaf1ccfa5de3517fa79dce15f0e936b7f Mon Sep 17 00:00:00 2001 From: hz Date: Tue, 2 Dec 2025 15:14:06 +0800 Subject: [PATCH] =?UTF-8?q?fix(saleFlowProImprove):=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E6=8A=95=E4=BF=9D=E4=BA=BA=E4=BF=A1=E6=81=AF=E7=BB=84=E4=BB=B6?= =?UTF-8?q?=E9=80=BB=E8=BE=91=E5=88=A4=E6=96=AD=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 修改薪资来源判断逻辑,确保字符串比较准确性 - 优化文件上传组件动态导入方式,提升代码可维护性 - 增加外国人护照头像面展示条件判断 - 引入Dialog组件支持弹窗提示功能 - 完善身份证图片回显逻辑,支持初始化加载 - 修复关系人判断逻辑,使用严格相等运算符 - 清理无用注释代码,提高代码整洁度 - 调整测试环境URL拼接策略,区分正式与测试环境处理方式 --- .../ebiz/saleFlowProImprove/InsuredInfo.vue | 10 ++--- .../ebiz/saleFlowProImprove/InsuredPerson.vue | 2 + .../components/PhotoScanner.vue | 39 ++++++++++--------- 3 files changed, 27 insertions(+), 24 deletions(-) diff --git a/src/views/ebiz/saleFlowProImprove/InsuredInfo.vue b/src/views/ebiz/saleFlowProImprove/InsuredInfo.vue index 77ca1aba6..1c2d11773 100644 --- a/src/views/ebiz/saleFlowProImprove/InsuredInfo.vue +++ b/src/views/ebiz/saleFlowProImprove/InsuredInfo.vue @@ -1945,25 +1945,25 @@ export default { imageType: () => imageType, subBusinessType: () => subBusinessType, isShowOthenSalarySource() { - return this.userInfo.salarySource == '4' + return String(this.userInfo.salarySource) === '4' }, + /**文件上传组件详情信息*/ uploadComponentInfo() { const idType = this.userInfo.idType - const PhotoScanner = () => import('./components/PhotoScanner.vue') const subTask = `${this.taskID}_uploadImage` const IdentityCardScan = { - component: 'IdentityCardScan', + component: () => import('./components/IdentityCardScan.vue'), props: { subTask, role: user.applicant }, event: { getScanInfo: this.getIdentityInfo } } if (this.idImage) IdentityCardScan.props.idImage = this.idImage const PhotoScan = { - component: PhotoScanner, + component: () => import('./components/PhotoScanner.vue'), props: { role: user.applicant, subTask }, event: { getScanInfo: this.getIdentityInfo } } - + if (this.idImage) PhotoScan.props.idImage = this.idImage return !idType ? IdentityCardScan : Number(idType) === 1 ? IdentityCardScan : PhotoScan }, idImage() { diff --git a/src/views/ebiz/saleFlowProImprove/InsuredPerson.vue b/src/views/ebiz/saleFlowProImprove/InsuredPerson.vue index 374608bb1..1d4889a73 100644 --- a/src/views/ebiz/saleFlowProImprove/InsuredPerson.vue +++ b/src/views/ebiz/saleFlowProImprove/InsuredPerson.vue @@ -2158,6 +2158,7 @@ export default { props: { role: user.insured, subTask }, event: { getScanInfo: this.getIdentityInfo } } + if (this.idImage) PhotoScan.props.idImage = this.idImage return !idType ? IdentityCardScan : Number(idType) === 1 ? IdentityCardScan : PhotoScan }, @@ -2172,6 +2173,7 @@ export default { } const base = isDev ? 'https://iagentsales-test2.e-guofu.com/' : '' + // 测试环境采用截取地址的方式获取 url , 正式环境下采用 rgssUrl const frontRgssUrl = isDev ? base + applicantFront.rgssUrl.replace('/opt/ebiz/static', '') : applicantFront.rgssUrl const backRgssUrl = isDev ? base + applicantBack.rgssUrl.replace('/opt/ebiz/static', '') : applicantBack.rgssUrl diff --git a/src/views/ebiz/saleFlowProImprove/components/PhotoScanner.vue b/src/views/ebiz/saleFlowProImprove/components/PhotoScanner.vue index 86cc27599..274a62bfe 100644 --- a/src/views/ebiz/saleFlowProImprove/components/PhotoScanner.vue +++ b/src/views/ebiz/saleFlowProImprove/components/PhotoScanner.vue @@ -47,6 +47,7 @@ +
import DataDictionary from '@/assets/js/utils/data-dictionary' -import { Field, Uploader } from 'vant' +import { Dialog, Field, Uploader } from 'vant' import { saveInformation, uploadImg2 } from '@/api/ebiz/sale/sale' import { applicant, beneficiaries, insured } from '@/views/ebiz/saleFlowProImprove/js/state' import { subBusinessType as user } from '@/views/ebiz/saleFlowProImprove/js/enum' @@ -82,7 +83,8 @@ export default { props: { role: { type: String, default: user.applicant }, subTask: { type: String, default: '' }, - userInfo: { type: Object, default: () => ({}) } + userInfo: { type: Object, default: () => ({}) }, + idImage: { type: Object, default: () => ({}) } }, inject: ['nextStepProcesserContainer'], data() { @@ -229,12 +231,6 @@ export default { } else if (detail.name === 'fileLIstImgInsured') { this.fileLIstImgInsured = [] this.deleteImg(file, 'fileLIstImgInsured') - // } else if (detail.name === 'fileListOtherOne') { - // this.fileListOtherOne = [] - // } else if (detail.name === 'fileListOtherTwo') { - // this.fileListOtherTwo = [] - // } else if (detail.name === 'fileListOtherThree') { - // this.fileListOtherThree = [] } else if (detail.name === 'saleInsuredInfoOther') { this.saleInsuredInfoOther = [] this.deleteImg(file, 'saleInsuredInfoOther') @@ -444,6 +440,17 @@ export default { } }, watch: { + idImage: { + deep: true, + handler(value) { + const { frontID, backID } = value + if (!frontID.exist || !backID.exist) return + + this.fileListIdFront = [{ url: frontID.imagePath, isImage: true }] + this.fileListIdBack = [{ url: backID.imagePath, isImage: true }] + }, + immediate: true + }, listenChange(val) { let that = this @@ -464,22 +471,16 @@ export default { const isInsuredComplete = (fileListIdFrontInsured.length !== 0 && fileListIdBackInsured.length !== 0) || fileLIstImgInsured.length !== 0 const isOtherComplete = saleInsuredInfoOther.length !== 0 || saleInsuredPersonInfoOther.length !== 0 - if ( + that.isDisabled = !( radio !== '' && ((isApplicantComplete && isInsuredComplete) || (isOtherComplete && (isApplicantComplete || isInsuredComplete)) || - (this.relationToAppnt == '1' && (isApplicantComplete || isInsuredComplete || isOtherComplete))) - ) { - that.isDisabled = false - } else { - that.isDisabled = true - } + (String(this.relationToAppnt) === '1' && (isApplicantComplete || isInsuredComplete || isOtherComplete))) + ) }, //监听受益人影像list的变化,控制下一步按钮是否可点击 bnfInfo: { - handler(val, oldval) { - // console.log(val, 'val监听到but') - // console.log(oldval, 'oldval监听到but') + handler(val) { let that = this if (val.length > 0) { for (let index = 0; index < val.length; index++) { @@ -489,7 +490,7 @@ export default { return false } } - } else if (val.length == 0) { + } else if (val.length === 0) { that.isDisabledBnf = false } },