mirror of
http://112.124.100.131/GFRS/ebiz-h5.git
synced 2025-12-10 15:06:45 +08:00
fix(saleFlowProImprove): 修复投保人信息组件逻辑判断问题
- 修改薪资来源判断逻辑,确保字符串比较准确性 - 优化文件上传组件动态导入方式,提升代码可维护性 - 增加外国人护照头像面展示条件判断 - 引入Dialog组件支持弹窗提示功能 - 完善身份证图片回显逻辑,支持初始化加载 - 修复关系人判断逻辑,使用严格相等运算符 - 清理无用注释代码,提高代码整洁度 - 调整测试环境URL拼接策略,区分正式与测试环境处理方式
This commit is contained in:
@@ -1945,25 +1945,25 @@ export default {
|
|||||||
imageType: () => imageType,
|
imageType: () => imageType,
|
||||||
subBusinessType: () => subBusinessType,
|
subBusinessType: () => subBusinessType,
|
||||||
isShowOthenSalarySource() {
|
isShowOthenSalarySource() {
|
||||||
return this.userInfo.salarySource == '4'
|
return String(this.userInfo.salarySource) === '4'
|
||||||
},
|
},
|
||||||
|
/**文件上传组件详情信息*/
|
||||||
uploadComponentInfo() {
|
uploadComponentInfo() {
|
||||||
const idType = this.userInfo.idType
|
const idType = this.userInfo.idType
|
||||||
const PhotoScanner = () => import('./components/PhotoScanner.vue')
|
|
||||||
const subTask = `${this.taskID}_uploadImage`
|
const subTask = `${this.taskID}_uploadImage`
|
||||||
const IdentityCardScan = {
|
const IdentityCardScan = {
|
||||||
component: 'IdentityCardScan',
|
component: () => import('./components/IdentityCardScan.vue'),
|
||||||
props: { subTask, role: user.applicant },
|
props: { subTask, role: user.applicant },
|
||||||
event: { getScanInfo: this.getIdentityInfo }
|
event: { getScanInfo: this.getIdentityInfo }
|
||||||
}
|
}
|
||||||
if (this.idImage) IdentityCardScan.props.idImage = this.idImage
|
if (this.idImage) IdentityCardScan.props.idImage = this.idImage
|
||||||
|
|
||||||
const PhotoScan = {
|
const PhotoScan = {
|
||||||
component: PhotoScanner,
|
component: () => import('./components/PhotoScanner.vue'),
|
||||||
props: { role: user.applicant, subTask },
|
props: { role: user.applicant, subTask },
|
||||||
event: { getScanInfo: this.getIdentityInfo }
|
event: { getScanInfo: this.getIdentityInfo }
|
||||||
}
|
}
|
||||||
|
if (this.idImage) PhotoScan.props.idImage = this.idImage
|
||||||
return !idType ? IdentityCardScan : Number(idType) === 1 ? IdentityCardScan : PhotoScan
|
return !idType ? IdentityCardScan : Number(idType) === 1 ? IdentityCardScan : PhotoScan
|
||||||
},
|
},
|
||||||
idImage() {
|
idImage() {
|
||||||
|
|||||||
@@ -2158,6 +2158,7 @@ export default {
|
|||||||
props: { role: user.insured, subTask },
|
props: { role: user.insured, subTask },
|
||||||
event: { getScanInfo: this.getIdentityInfo }
|
event: { getScanInfo: this.getIdentityInfo }
|
||||||
}
|
}
|
||||||
|
if (this.idImage) PhotoScan.props.idImage = this.idImage
|
||||||
|
|
||||||
return !idType ? IdentityCardScan : Number(idType) === 1 ? IdentityCardScan : PhotoScan
|
return !idType ? IdentityCardScan : Number(idType) === 1 ? IdentityCardScan : PhotoScan
|
||||||
},
|
},
|
||||||
@@ -2172,6 +2173,7 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const base = isDev ? 'https://iagentsales-test2.e-guofu.com/' : ''
|
const base = isDev ? 'https://iagentsales-test2.e-guofu.com/' : ''
|
||||||
|
// 测试环境采用截取地址的方式获取 url , 正式环境下采用 rgssUrl
|
||||||
const frontRgssUrl = isDev ? base + applicantFront.rgssUrl.replace('/opt/ebiz/static', '') : applicantFront.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
|
const backRgssUrl = isDev ? base + applicantBack.rgssUrl.replace('/opt/ebiz/static', '') : applicantBack.rgssUrl
|
||||||
|
|
||||||
|
|||||||
@@ -47,6 +47,7 @@
|
|||||||
</van-field>
|
</van-field>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- 外国人护照头像面 --->
|
||||||
<div v-if="item.id === 4">
|
<div v-if="item.id === 4">
|
||||||
<div @click="test('fileLIstImg', '8', '0', currentUserID, currentUser.idType)">
|
<div @click="test('fileLIstImg', '8', '0', currentUserID, currentUser.idType)">
|
||||||
<van-uploader
|
<van-uploader
|
||||||
@@ -73,7 +74,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import DataDictionary from '@/assets/js/utils/data-dictionary'
|
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 { saveInformation, uploadImg2 } from '@/api/ebiz/sale/sale'
|
||||||
import { applicant, beneficiaries, insured } from '@/views/ebiz/saleFlowProImprove/js/state'
|
import { applicant, beneficiaries, insured } from '@/views/ebiz/saleFlowProImprove/js/state'
|
||||||
import { subBusinessType as user } from '@/views/ebiz/saleFlowProImprove/js/enum'
|
import { subBusinessType as user } from '@/views/ebiz/saleFlowProImprove/js/enum'
|
||||||
@@ -82,7 +83,8 @@ export default {
|
|||||||
props: {
|
props: {
|
||||||
role: { type: String, default: user.applicant },
|
role: { type: String, default: user.applicant },
|
||||||
subTask: { type: String, default: '' },
|
subTask: { type: String, default: '' },
|
||||||
userInfo: { type: Object, default: () => ({}) }
|
userInfo: { type: Object, default: () => ({}) },
|
||||||
|
idImage: { type: Object, default: () => ({}) }
|
||||||
},
|
},
|
||||||
inject: ['nextStepProcesserContainer'],
|
inject: ['nextStepProcesserContainer'],
|
||||||
data() {
|
data() {
|
||||||
@@ -229,12 +231,6 @@ export default {
|
|||||||
} else if (detail.name === 'fileLIstImgInsured') {
|
} else if (detail.name === 'fileLIstImgInsured') {
|
||||||
this.fileLIstImgInsured = []
|
this.fileLIstImgInsured = []
|
||||||
this.deleteImg(file, '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') {
|
} else if (detail.name === 'saleInsuredInfoOther') {
|
||||||
this.saleInsuredInfoOther = []
|
this.saleInsuredInfoOther = []
|
||||||
this.deleteImg(file, 'saleInsuredInfoOther')
|
this.deleteImg(file, 'saleInsuredInfoOther')
|
||||||
@@ -444,6 +440,17 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
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) {
|
listenChange(val) {
|
||||||
let that = this
|
let that = this
|
||||||
|
|
||||||
@@ -464,22 +471,16 @@ export default {
|
|||||||
const isInsuredComplete = (fileListIdFrontInsured.length !== 0 && fileListIdBackInsured.length !== 0) || fileLIstImgInsured.length !== 0
|
const isInsuredComplete = (fileListIdFrontInsured.length !== 0 && fileListIdBackInsured.length !== 0) || fileLIstImgInsured.length !== 0
|
||||||
const isOtherComplete = saleInsuredInfoOther.length !== 0 || saleInsuredPersonInfoOther.length !== 0
|
const isOtherComplete = saleInsuredInfoOther.length !== 0 || saleInsuredPersonInfoOther.length !== 0
|
||||||
|
|
||||||
if (
|
that.isDisabled = !(
|
||||||
radio !== '' &&
|
radio !== '' &&
|
||||||
((isApplicantComplete && isInsuredComplete) ||
|
((isApplicantComplete && isInsuredComplete) ||
|
||||||
(isOtherComplete && (isApplicantComplete || isInsuredComplete)) ||
|
(isOtherComplete && (isApplicantComplete || isInsuredComplete)) ||
|
||||||
(this.relationToAppnt == '1' && (isApplicantComplete || isInsuredComplete || isOtherComplete)))
|
(String(this.relationToAppnt) === '1' && (isApplicantComplete || isInsuredComplete || isOtherComplete)))
|
||||||
) {
|
)
|
||||||
that.isDisabled = false
|
|
||||||
} else {
|
|
||||||
that.isDisabled = true
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
//监听受益人影像list的变化,控制下一步按钮是否可点击
|
//监听受益人影像list的变化,控制下一步按钮是否可点击
|
||||||
bnfInfo: {
|
bnfInfo: {
|
||||||
handler(val, oldval) {
|
handler(val) {
|
||||||
// console.log(val, 'val监听到but')
|
|
||||||
// console.log(oldval, 'oldval监听到but')
|
|
||||||
let that = this
|
let that = this
|
||||||
if (val.length > 0) {
|
if (val.length > 0) {
|
||||||
for (let index = 0; index < val.length; index++) {
|
for (let index = 0; index < val.length; index++) {
|
||||||
@@ -489,7 +490,7 @@ export default {
|
|||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (val.length == 0) {
|
} else if (val.length === 0) {
|
||||||
that.isDisabledBnf = false
|
that.isDisabledBnf = false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user