mirror of
http://112.124.100.131/GFRS/ebiz-h5.git
synced 2025-12-11 01:36:43 +08:00
fix(saleFlowProImprove): 修复投保人信息组件逻辑判断问题
- 修改薪资来源判断逻辑,确保字符串比较准确性 - 优化文件上传组件动态导入方式,提升代码可维护性 - 增加外国人护照头像面展示条件判断 - 引入Dialog组件支持弹窗提示功能 - 完善身份证图片回显逻辑,支持初始化加载 - 修复关系人判断逻辑,使用严格相等运算符 - 清理无用注释代码,提高代码整洁度 - 调整测试环境URL拼接策略,区分正式与测试环境处理方式
This commit is contained in:
@@ -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() {
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -47,6 +47,7 @@
|
||||
</van-field>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 外国人护照头像面 --->
|
||||
<div v-if="item.id === 4">
|
||||
<div @click="test('fileLIstImg', '8', '0', currentUserID, currentUser.idType)">
|
||||
<van-uploader
|
||||
@@ -73,7 +74,7 @@
|
||||
|
||||
<script>
|
||||
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
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user