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 } },