diff --git a/src/components/ebiz/parentList/Parent.vue b/src/components/ebiz/parentList/Parent.vue index 3b380dc06..c93f364a0 100644 --- a/src/components/ebiz/parentList/Parent.vue +++ b/src/components/ebiz/parentList/Parent.vue @@ -15,7 +15,7 @@
-

{{ locationHashFlag !== -1 ? '暂无数据':'暂无数据,请在我的资料或申请流程中添加父母信息' }}

+

{{ locationHashFlag !== -1 ? '暂无数据' : '暂无数据,请在我的资料或申请流程中添加父母信息' }}

@@ -102,8 +102,22 @@ export default { getAllowanceBaseDetail(params).then(res => { // console.log(res, '详情') if (res.result == '0') { - // 获取享受人数据,然后传给父组件中的方法 - this.$emit('on-choose', res.content.allowanceBaseDTO.allowanceBaseEnjoyDTO) + // 获取选中的人(父亲或母亲)的申请人数据,享受人数据,账户信息数据,影像资料数据的数据对象, + // 然后传给父组件中的方法 + // 在账户信息页面出现一个问题,账户信息页面如果是'新增'数据,则账户信息数据对象中的id应该空的, + // 当从父母列表中选择数据,然后存入缓存,父母列表中对应的数据是存在这个id字段的数据的, + // 如果账户信息页面是从这个缓存中取值,那么id这个字段也会取出并赋值,这样的错误的 + // 因为id存在值的话,后台程序判断的是'编辑'操作,但是实际上是'新增'操作,这样的结果是控制台报错,无法跳转到影像资料页面 + // 所以在这里要先把id设置为空,防止出现这个问题 + // 只有在津贴申请的流程时,才执行这段代码,把id设置为空, + // 因为在津贴申请时,这个对象是要存入缓存的,缓存中这个id对应的值应该是空; + // 而我的资料流程是不用存缓存的,所以在我的资料流程中无需考虑父母列表信息,选中的人(父亲或母亲)的数据缓存情况 + if (this.locationHashFlag === -1) { + if (res.content.allowanceBaseDTO.allowanceBaseBankDTO !== null) { + res.content.allowanceBaseDTO.allowanceBaseBankDTO.id = '' + } + } + this.$emit('on-choose', res.content.allowanceBaseDTO) } }) }, diff --git a/src/views/ebiz/allowance/application/AccountInfo.vue b/src/views/ebiz/allowance/application/AccountInfo.vue index af39f9739..a40365df2 100644 --- a/src/views/ebiz/allowance/application/AccountInfo.vue +++ b/src/views/ebiz/allowance/application/AccountInfo.vue @@ -125,7 +125,7 @@ export default { mobile: '', // 手机号码 isSelf: 0 // 是否是享受人本人银行卡 1:是; 0:不是 }, - allowanceUserInfo: {}, // 定义存储申请人信息与享受人信息的数据的对象 + allowanceUserInfo: {}, // 定义存储申请人信息,享受人信息,账户信息的数据对象 areaList, isAreaListShow: false, // 控制显示或隐藏选择开户银行省市的弹窗的变量 isScan: false, // 控制显示或隐藏银行卡扫描页面的变量 @@ -133,7 +133,10 @@ export default { inputShow: true, //模糊查询功能 islistShow: false, //控制显示或隐藏选择银行的弹窗的变量 isPassedCardCheck: false, - allowancePageFlag: '2' // 定义顶部导航记录当前展示的是第几个页面或流程的标识 + allowancePageFlag: '2', // 定义顶部导航记录当前展示的是第几个页面或流程的标识 + // 从缓存中获取在父母列表中所选中的人(父亲或母亲)的申请人数据,享受人数据,账户信息数据,影像资料数据的数据对象 + // 如果没有这个缓存,'localStorageAllowanceParentInfo'这个变量的值应该为null + localStorageAllowanceParentInfo: JSON.parse(localStorage.getItem('allowanceParentInfo')) } }, created() { @@ -178,40 +181,49 @@ export default { // 将申请人的数据对象赋值给对象中的属性 applicantInfo: res.content.allowanceDTO.allowanceApplyDTO, // 将享受人的数据对象赋值给对象中的属性 - enjoyUserInfo: res.content.allowanceDTO.allowanceEnjoyDTO + enjoyUserInfo: res.content.allowanceDTO.allowanceEnjoyDTO, + // 将账户信息的数据对象赋值给对象中的属性 + bankInfo: res.content.allowanceDTO.allowanceBankDTO } + // 赋值持卡人姓名(享受人),获取享受人数据中的享受人姓名,并赋值给变量 + this.accountBankInfo.accountName = this.allowanceUserInfo.enjoyUserInfo.name // 判断是新增操作还是编辑操作的类型,根据不同操作类型执行不同的程序 if (this.$route.query.edit) { - // 把账户信息数据对象赋值给一个新的变量 - let data = res.content.allowanceDTO.allowanceBankDTO - // 赋值持卡人姓名(享受人),获取享受人数据中的享受人姓名,并赋值给变量 - this.accountBankInfo.accountName = this.allowanceUserInfo.enjoyUserInfo.name - // 赋值银行所在省编码 - this.accountBankInfo.bankProvinceCode = data.bankProvinceCode - // 赋值银行所在地区编码 - this.accountBankInfo.bankAreaCode = data.bankAreaCode - // 调用回显银行卡省市信息的方法 - this.showbackBankAddressStr(data.bankProvinceCode, data.bankAreaCode) - // 赋值银行卡号 - this.accountBankInfo.bankCardNo = data.bankCardNo - // 赋值银行名称 - this.accountBankInfo.bankName = data.bankName - // 赋值银行编码 - this.accountBankInfo.bankCode = data.bankCode - // 赋值手机号码 - this.accountBankInfo.mobile = data.mobile - // 赋值是否是享受人本人银行卡的单选项 - this.accountBankInfo.isSelf = data.isSelf - // 赋值id标识 - this.accountBankInfo.id = data.id + // 定义一个新的数据对象 + let data = {} + // 如果是编辑操作进入的页面,判断是否有点击'下一步'操作而保存过账户信息的数据;如果有,则使用这个保存的数据 + // 如果没有,则去判断是否存在'localStorageAllowanceParentInfo'这个缓存数据;如果有,则使用这个缓存中的数据 + // 如果这两个数据都不存在,则不执行下方if语句,无需调用给'accountBankInfo'对象中的变量进行赋值的方法, + // 页面输入项不用进行回显,输入项为空即可 + if (this.allowanceUserInfo.bankInfo !== null) { + // 把账户信息数据对象赋值给新的变量 + data = this.allowanceUserInfo.bankInfo + // 调用给'accountBankInfo'对象中的变量进行赋值的方法 + this.assignmentValueBankInfoFunc(data) + } else if (this.localStorageAllowanceParentInfo !== null) { + // 判断缓存对象中是否有账户信息的数据 + if (this.localStorageAllowanceParentInfo.allowanceBaseBankDTO !== null) { + // 把缓存对象中的账户信息数据对象赋值给一个新的变量 + let data = this.localStorageAllowanceParentInfo.allowanceBaseBankDTO + // 调用给'accountBankInfo'对象中的变量进行赋值的方法 + this.assignmentValueBankInfoFunc(data) + } + } //如果从津贴申请列表点击编辑按钮进入 if (this.$route.query.edit && !this.$route.query.allowancePageFlag) { this.allowancePageFlag = '2' localStorage.setItem('allowancePageFlag', this.allowancePageFlag) } } else { - // 获取享受人数据中的享受人姓名,并赋值给变量 - this.accountBankInfo.accountName = this.allowanceUserInfo.enjoyUserInfo.name + if (this.localStorageAllowanceParentInfo !== null) { + // 判断缓存对象中是否有账户信息的数据 + if (this.localStorageAllowanceParentInfo.allowanceBaseBankDTO !== null) { + // 把缓存对象中的账户信息数据对象赋值给一个新的变量 + let data = this.localStorageAllowanceParentInfo.allowanceBaseBankDTO + // 调用给'accountBankInfo'对象中的变量进行赋值的方法 + this.assignmentValueBankInfoFunc(data) + } + } localStorage.setItem('allowancePageFlag', this.allowancePageFlag) } } else { @@ -222,6 +234,33 @@ export default { this.$toast.clear() }, + /** + * @Description: 给'accountBankInfo'对象中的变量进行赋值的方法 + * @params: data--数据对象。这个数据可能是从接口返回数据,也可能是缓存中存储的数据,根据情况区分 + * @author:zhangqi + * @Date:2021-09-15 + */ + assignmentValueBankInfoFunc(data) { + // 赋值银行所在省编码 + this.accountBankInfo.bankProvinceCode = data.bankProvinceCode + // 赋值银行所在地区编码 + this.accountBankInfo.bankAreaCode = data.bankAreaCode + // 调用回显银行卡省市信息的方法 + this.showbackBankAddressStr(data.bankProvinceCode, data.bankAreaCode) + // 赋值银行卡号 + this.accountBankInfo.bankCardNo = data.bankCardNo + // 赋值银行名称 + this.accountBankInfo.bankName = data.bankName + // 赋值银行编码 + this.accountBankInfo.bankCode = data.bankCode + // 赋值手机号码 + this.accountBankInfo.mobile = data.mobile + // 赋值是否是享受人本人银行卡的单选项 + this.accountBankInfo.isSelf = data.isSelf + // 赋值id标识, 只有当时编辑操作的时候才对id进行赋值 + this.accountBankInfo.id = data.id + }, + /** * @Description: 根据银行卡省市编码,查询对应的省市名称的方法 * @author:zhangqi diff --git a/src/views/ebiz/allowance/application/AttachmentManagement.vue b/src/views/ebiz/allowance/application/AttachmentManagement.vue index a791adcb3..a800974e1 100644 --- a/src/views/ebiz/allowance/application/AttachmentManagement.vue +++ b/src/views/ebiz/allowance/application/AttachmentManagement.vue @@ -290,7 +290,10 @@ export default { // 是否可以点击下一步 isDisabled: true, // 定义顶部导航记录当前展示的是第几个页面或流程的标识 - allowancePageFlag: 3 + allowancePageFlag: 3, + // 从缓存中获取在父母列表中所选中的人(父亲或母亲)的申请人数据,享受人数据,账户信息数据,影像资料数据的数据对象 + // 如果没有这个缓存,'localStorageAllowanceParentInfo'这个变量的值应该为null + localStorageAllowanceParentInfo: JSON.parse(localStorage.getItem('allowanceParentInfo')) } }, created() { @@ -339,189 +342,40 @@ export default { // 将享受人的数据对象赋值给对象中的属性 enjoyUserInfo: res.content.allowanceDTO.allowanceEnjoyDTO, // 将银行账户信息的数据对象赋值给对象中的属性 - bankInfo: res.content.allowanceDTO.allowanceBankDTO + bankInfo: res.content.allowanceDTO.allowanceBankDTO, + // 将影像资料的数据数组集合赋值给对象中的属性 + mediaInfo: res.content.allowanceDTO.mediaUploadDTOLst } // 判断是新增操作还是编辑操作的类型,根据不同操作类型执行不同的程序 if (this.$route.query.edit) { - // 把影像资料数据数组集合赋值给一个新的变量 - let data = res.content.allowanceDTO.mediaUploadDTOLst - // 判断当前页面处在编辑状态下, - if (data !== null) { - // 循环数组集合,整合数据格式,并将对应的图片路径,赋值给对应的图片模块 - data.forEach(item => { - let name = '' - // 判断是属于申请人的图片还是属性享受人的图片,subBusinessType:0-申请人,1-享受人 - // 属于申请人的图片 - if (item.subBusinessType === '0') { - // 判断各种图片的证件类型 - // 申请人-身份证正面 - if (item.imageInfoType === '1') { - name = 'fileListIdFrontApplicant' - this.fileListIdFrontApplicant.push({ url: config.imgDomain + `/returnImageStream?a=b.jpg&imgPath=${item.rgssUrl}` }) - - // 申请人-身份证反面 - } else if (item.imageInfoType === '2') { - name = 'fileListIdBackApplicant' - this.fileListIdBackApplicant.push({ url: config.imgDomain + `/returnImageStream?a=b.jpg&imgPath=${item.rgssUrl}` }) - - // 申请人-户口本正面 - } else if (item.imageInfoType === '5') { - name = 'fileListIdFrontApplicant' - this.fileListIdFrontApplicant.push({ url: config.imgDomain + `/returnImageStream?a=b.jpg&imgPath=${item.rgssUrl}` }) - - // 申请人-户口本反面 - } else if (item.imageInfoType === '6') { - name = 'fileListIdBackApplicant' - this.fileListIdBackApplicant.push({ url: config.imgDomain + `/returnImageStream?a=b.jpg&imgPath=${item.rgssUrl}` }) - - // 申请人-护照 - } else if (item.imageInfoType === '8') { - name = 'fileListPassportApplicant' - this.fileListPassportApplicant.push({ url: config.imgDomain + `/returnImageStream?a=b.jpg&imgPath=${item.rgssUrl}` }) - - // 申请人-港澳居民来往内地通行证正面 - } else if (item.imageInfoType === '9') { - name = 'fileListIdFrontApplicant' - this.fileListIdFrontApplicant.push({ url: config.imgDomain + `/returnImageStream?a=b.jpg&imgPath=${item.rgssUrl}` }) - - // 申请人-港澳居民来往内地通行证反面 - } else if (item.imageInfoType === '13') { - name = 'fileListIdBackApplicant' - this.fileListIdBackApplicant.push({ url: config.imgDomain + `/returnImageStream?a=b.jpg&imgPath=${item.rgssUrl}` }) - - // 申请人-台湾居民来往大陆通行证正面 - } else if (item.imageInfoType === '10') { - name = 'fileListIdFrontApplicant' - this.fileListIdFrontApplicant.push({ url: config.imgDomain + `/returnImageStream?a=b.jpg&imgPath=${item.rgssUrl}` }) - - // 申请人-台湾居民来往大陆通行证反面 - } else if (item.imageInfoType === '14') { - name = 'fileListIdBackApplicant' - this.fileListIdBackApplicant.push({ url: config.imgDomain + `/returnImageStream?a=b.jpg&imgPath=${item.rgssUrl}` }) - - // 申请人-外国人永久居留身份证正面 - } else if (item.imageInfoType === '15') { - name = 'fileListIdFrontApplicant' - this.fileListIdFrontApplicant.push({ url: config.imgDomain + `/returnImageStream?a=b.jpg&imgPath=${item.rgssUrl}` }) - - // 申请人-外国人永久居留身份证反面 - } else if (item.imageInfoType === '16') { - name = 'fileListIdBackApplicant' - this.fileListIdBackApplicant.push({ url: config.imgDomain + `/returnImageStream?a=b.jpg&imgPath=${item.rgssUrl}` }) - - // 申请人-港澳台居民居住证正面 - } else if (item.imageInfoType === '17') { - name = 'fileListIdFrontApplicant' - this.fileListIdFrontApplicant.push({ url: config.imgDomain + `/returnImageStream?a=b.jpg&imgPath=${item.rgssUrl}` }) - - // 申请人-港澳台居民居住证反面 - } else if (item.imageInfoType === '18') { - name = 'fileListIdBackApplicant' - this.fileListIdBackApplicant.push({ url: config.imgDomain + `/returnImageStream?a=b.jpg&imgPath=${item.rgssUrl}` }) - - // 申请人-执业证 - } else if (item.imageInfoType === '25') { - name = 'fileListPracticeApplicant' - this.fileListPracticeApplicant.push({ url: config.imgDomain + `/returnImageStream?a=b.jpg&imgPath=${item.rgssUrl}` }) - } - - // 属于享受人的图片 - } else if (item.subBusinessType === '1') { - // 判断各种图片的证件类型 - // 享受人-身份证正面 - if (item.imageInfoType === '1') { - name = 'fileListIdFrontEnjoyUser' - this.fileListIdFrontEnjoyUser.push({ url: config.imgDomain + `/returnImageStream?a=b.jpg&imgPath=${item.rgssUrl}` }) - - // 享受人-身份证反面 - } else if (item.imageInfoType === '2') { - name = 'fileListIdBackEnjoyUser' - this.fileListIdBackEnjoyUser.push({ url: config.imgDomain + `/returnImageStream?a=b.jpg&imgPath=${item.rgssUrl}` }) - - // 享受人-户口本正面 - } else if (item.imageInfoType === '5') { - name = 'fileListIdFrontEnjoyUser' - this.fileListIdFrontEnjoyUser.push({ url: config.imgDomain + `/returnImageStream?a=b.jpg&imgPath=${item.rgssUrl}` }) - - // 享受人-户口本反面 - } else if (item.imageInfoType === '6') { - name = 'fileListIdBackEnjoyUser' - this.fileListIdBackEnjoyUser.push({ url: config.imgDomain + `/returnImageStream?a=b.jpg&imgPath=${item.rgssUrl}` }) - - // 享受人-护照 - } else if (item.imageInfoType === '8') { - name = 'fileListPassportEnjoyUser' - this.fileListPassportEnjoyUser.push({ url: config.imgDomain + `/returnImageStream?a=b.jpg&imgPath=${item.rgssUrl}` }) - - // 享受人-港澳居民来往内地通行证正面 - } else if (item.imageInfoType === '9') { - name = 'fileListIdFrontEnjoyUser' - this.fileListIdFrontEnjoyUser.push({ url: config.imgDomain + `/returnImageStream?a=b.jpg&imgPath=${item.rgssUrl}` }) - - // 享受人-港澳居民来往内地通行证反面 - } else if (item.imageInfoType === '13') { - name = 'fileListIdBackEnjoyUser' - this.fileListIdBackEnjoyUser.push({ url: config.imgDomain + `/returnImageStream?a=b.jpg&imgPath=${item.rgssUrl}` }) - - // 享受人-台湾居民来往大陆通行证正面 - } else if (item.imageInfoType === '10') { - name = 'fileListIdFrontEnjoyUser' - this.fileListIdFrontEnjoyUser.push({ url: config.imgDomain + `/returnImageStream?a=b.jpg&imgPath=${item.rgssUrl}` }) - - // 享受人-台湾居民来往大陆通行证反面 - } else if (item.imageInfoType === '14') { - name = 'fileListIdBackEnjoyUser' - this.fileListIdBackEnjoyUser.push({ url: config.imgDomain + `/returnImageStream?a=b.jpg&imgPath=${item.rgssUrl}` }) - - // 享受人-外国人永久居留身份证正面 - } else if (item.imageInfoType === '15') { - name = 'fileListIdFrontEnjoyUser' - this.fileListIdFrontEnjoyUser.push({ url: config.imgDomain + `/returnImageStream?a=b.jpg&imgPath=${item.rgssUrl}` }) - - // 享受人-外国人永久居留身份证反面 - } else if (item.imageInfoType === '16') { - name = 'fileListIdBackEnjoyUser' - this.fileListIdBackEnjoyUser.push({ url: config.imgDomain + `/returnImageStream?a=b.jpg&imgPath=${item.rgssUrl}` }) - - // 享受人-港澳台居民居住证正面 - } else if (item.imageInfoType === '17') { - name = 'fileListIdFrontEnjoyUser' - this.fileListIdFrontEnjoyUser.push({ url: config.imgDomain + `/returnImageStream?a=b.jpg&imgPath=${item.rgssUrl}` }) - - // 享受人-港澳台居民居住证反面 - } else if (item.imageInfoType === '18') { - name = 'fileListIdBackEnjoyUser' - this.fileListIdBackEnjoyUser.push({ url: config.imgDomain + `/returnImageStream?a=b.jpg&imgPath=${item.rgssUrl}` }) - - // 银行卡,保存图片的时候'银行卡'图片归属于了享受人对象 - } else if (item.imageInfoType === '3') { - name = 'fileListBank' - this.fileListBank.push({ url: config.imgDomain + `/returnImageStream?a=b.jpg&imgPath=${item.rgssUrl}` }) - - // 关系证明,保存图片的时候'关系证明'图片归属于了享受人对象 - } else if (item.imageInfoType === '27') { - name = 'fileListProve' - this.fileListProve.push({ url: config.imgDomain + `/returnImageStream?a=b.jpg&imgPath=${item.rgssUrl}` }) - - // 享受人无银行卡/手机号码的证明,保存图片的时候'享受人无银行卡/手机号码的证明'图片归属于了享受人对象 - } else if (item.imageInfoType === '26') { - name = 'fileListNoBankAndMobile' - this.fileListNoBankAndMobile.push({ url: config.imgDomain + `/returnImageStream?a=b.jpg&imgPath=${item.rgssUrl}` }) - } - } - let obj = { - name: name, - businessNo: item.businessNo, - businessType: '', - imageInfoType: item.imageInfoType, - rgssUrl: item.rgssUrl, - subBusinessType: item.subBusinessType, // 申请人-0,享受人-1 - subBusinessNo: item.subBusinessNo, // 申请人ID(申请人数据对象中的agentCode字段对应的值)/ 享受人ID(享受人数据对象中的id字段对应的值) - fileName: config.imgDomain + `/returnImageStream?a=b.jpg&imgPath=${item.rgssUrl}` - } - this.list.push(obj) - } - ) + // 定义一个新的数组集合 + let data = [] + // 如果是编辑操作进入的页面,判断是否有点击'下一步'操作而保存过影像资料的数据;如果有,则使用这个保存的数据 + // 如果没有,则去判断是否存在'localStorageAllowanceParentInfo'这个缓存数据;如果有,则使用这个缓存中的数据 + // 如果这两个数据都不存在,则不执行下方if语句,无需调用给每个图片变量进行赋值的方法 + if (this.allowanceUserInfo.mediaInfo !== null) { + // 把影像资料数据数组集合赋值给新的数组集合 + data = this.allowanceUserInfo.mediaInfo + // 调用给影像资料图片所对应的变量进行赋值的方法 + this.assignmentValueMediaInfoFunc(data) + } else if (this.localStorageAllowanceParentInfo !== null) { + // 判断缓存对象中是否有影像资料的数据 + if (this.localStorageAllowanceParentInfo.mediaUploadDTOLst !== null) { + // 把缓存对象中的影像资料数据赋值给新的数组集合 + data = this.localStorageAllowanceParentInfo.mediaUploadDTOLst + // 调用给影像资料图片所对应的变量进行赋值的方法 + this.assignmentValueMediaInfoFunc(data) + } + } + } else { + if (this.localStorageAllowanceParentInfo !== null) { + // 判断缓存对象中是否有影像资料的数据 + if (this.localStorageAllowanceParentInfo.mediaUploadDTOLst !== null) { + // 把缓存对象中的影像资料数据赋值给新的数组集合 + let data = this.localStorageAllowanceParentInfo.mediaUploadDTOLst + // 调用给影像资料图片所对应的变量进行赋值的方法 + this.assignmentValueMediaInfoFunc(data) + } } } // 调用从缓存中获取'基本信息'与'账户信息'在scan扫描后, @@ -548,6 +402,190 @@ export default { this.$toast.clear() }, + /** + * @Description: 给影像资料图片所对应的变量进行赋值的方法 + * @params: data--数据对象。这个数据可能是从接口返回数据,也可能是缓存中存储的数据,根据情况区分 + * @author:zhangqi + * @Date:2021-09-27 + */ + assignmentValueMediaInfoFunc(data) { + // 循环数组集合,整合数据格式,并将对应的图片路径,赋值给对应的图片模块 + data.forEach(item => { + let name = '' + // 判断是属于申请人的图片还是属性享受人的图片,subBusinessType:0-申请人,1-享受人 + // 属于申请人的图片 + if (item.subBusinessType === '0') { + // 判断各种图片的证件类型 + // 申请人-身份证正面 + if (item.imageInfoType === '1') { + name = 'fileListIdFrontApplicant' + this.fileListIdFrontApplicant.push({ url: config.imgDomain + `/returnImageStream?a=b.jpg&imgPath=${item.rgssUrl}` }) + + // 申请人-身份证反面 + } else if (item.imageInfoType === '2') { + name = 'fileListIdBackApplicant' + this.fileListIdBackApplicant.push({ url: config.imgDomain + `/returnImageStream?a=b.jpg&imgPath=${item.rgssUrl}` }) + + // 申请人-户口本正面 + } else if (item.imageInfoType === '5') { + name = 'fileListIdFrontApplicant' + this.fileListIdFrontApplicant.push({ url: config.imgDomain + `/returnImageStream?a=b.jpg&imgPath=${item.rgssUrl}` }) + + // 申请人-户口本反面 + } else if (item.imageInfoType === '6') { + name = 'fileListIdBackApplicant' + this.fileListIdBackApplicant.push({ url: config.imgDomain + `/returnImageStream?a=b.jpg&imgPath=${item.rgssUrl}` }) + + // 申请人-护照 + } else if (item.imageInfoType === '8') { + name = 'fileListPassportApplicant' + this.fileListPassportApplicant.push({ url: config.imgDomain + `/returnImageStream?a=b.jpg&imgPath=${item.rgssUrl}` }) + + // 申请人-港澳居民来往内地通行证正面 + } else if (item.imageInfoType === '9') { + name = 'fileListIdFrontApplicant' + this.fileListIdFrontApplicant.push({ url: config.imgDomain + `/returnImageStream?a=b.jpg&imgPath=${item.rgssUrl}` }) + + // 申请人-港澳居民来往内地通行证反面 + } else if (item.imageInfoType === '13') { + name = 'fileListIdBackApplicant' + this.fileListIdBackApplicant.push({ url: config.imgDomain + `/returnImageStream?a=b.jpg&imgPath=${item.rgssUrl}` }) + + // 申请人-台湾居民来往大陆通行证正面 + } else if (item.imageInfoType === '10') { + name = 'fileListIdFrontApplicant' + this.fileListIdFrontApplicant.push({ url: config.imgDomain + `/returnImageStream?a=b.jpg&imgPath=${item.rgssUrl}` }) + + // 申请人-台湾居民来往大陆通行证反面 + } else if (item.imageInfoType === '14') { + name = 'fileListIdBackApplicant' + this.fileListIdBackApplicant.push({ url: config.imgDomain + `/returnImageStream?a=b.jpg&imgPath=${item.rgssUrl}` }) + + // 申请人-外国人永久居留身份证正面 + } else if (item.imageInfoType === '15') { + name = 'fileListIdFrontApplicant' + this.fileListIdFrontApplicant.push({ url: config.imgDomain + `/returnImageStream?a=b.jpg&imgPath=${item.rgssUrl}` }) + + // 申请人-外国人永久居留身份证反面 + } else if (item.imageInfoType === '16') { + name = 'fileListIdBackApplicant' + this.fileListIdBackApplicant.push({ url: config.imgDomain + `/returnImageStream?a=b.jpg&imgPath=${item.rgssUrl}` }) + + // 申请人-港澳台居民居住证正面 + } else if (item.imageInfoType === '17') { + name = 'fileListIdFrontApplicant' + this.fileListIdFrontApplicant.push({ url: config.imgDomain + `/returnImageStream?a=b.jpg&imgPath=${item.rgssUrl}` }) + + // 申请人-港澳台居民居住证反面 + } else if (item.imageInfoType === '18') { + name = 'fileListIdBackApplicant' + this.fileListIdBackApplicant.push({ url: config.imgDomain + `/returnImageStream?a=b.jpg&imgPath=${item.rgssUrl}` }) + + // 申请人-执业证 + } else if (item.imageInfoType === '25') { + name = 'fileListPracticeApplicant' + this.fileListPracticeApplicant.push({ url: config.imgDomain + `/returnImageStream?a=b.jpg&imgPath=${item.rgssUrl}` }) + } + + // 属于享受人的图片 + } else if (item.subBusinessType === '1') { + // 判断各种图片的证件类型 + // 享受人-身份证正面 + if (item.imageInfoType === '1') { + name = 'fileListIdFrontEnjoyUser' + this.fileListIdFrontEnjoyUser.push({ url: config.imgDomain + `/returnImageStream?a=b.jpg&imgPath=${item.rgssUrl}` }) + + // 享受人-身份证反面 + } else if (item.imageInfoType === '2') { + name = 'fileListIdBackEnjoyUser' + this.fileListIdBackEnjoyUser.push({ url: config.imgDomain + `/returnImageStream?a=b.jpg&imgPath=${item.rgssUrl}` }) + + // 享受人-户口本正面 + } else if (item.imageInfoType === '5') { + name = 'fileListIdFrontEnjoyUser' + this.fileListIdFrontEnjoyUser.push({ url: config.imgDomain + `/returnImageStream?a=b.jpg&imgPath=${item.rgssUrl}` }) + + // 享受人-户口本反面 + } else if (item.imageInfoType === '6') { + name = 'fileListIdBackEnjoyUser' + this.fileListIdBackEnjoyUser.push({ url: config.imgDomain + `/returnImageStream?a=b.jpg&imgPath=${item.rgssUrl}` }) + + // 享受人-护照 + } else if (item.imageInfoType === '8') { + name = 'fileListPassportEnjoyUser' + this.fileListPassportEnjoyUser.push({ url: config.imgDomain + `/returnImageStream?a=b.jpg&imgPath=${item.rgssUrl}` }) + + // 享受人-港澳居民来往内地通行证正面 + } else if (item.imageInfoType === '9') { + name = 'fileListIdFrontEnjoyUser' + this.fileListIdFrontEnjoyUser.push({ url: config.imgDomain + `/returnImageStream?a=b.jpg&imgPath=${item.rgssUrl}` }) + + // 享受人-港澳居民来往内地通行证反面 + } else if (item.imageInfoType === '13') { + name = 'fileListIdBackEnjoyUser' + this.fileListIdBackEnjoyUser.push({ url: config.imgDomain + `/returnImageStream?a=b.jpg&imgPath=${item.rgssUrl}` }) + + // 享受人-台湾居民来往大陆通行证正面 + } else if (item.imageInfoType === '10') { + name = 'fileListIdFrontEnjoyUser' + this.fileListIdFrontEnjoyUser.push({ url: config.imgDomain + `/returnImageStream?a=b.jpg&imgPath=${item.rgssUrl}` }) + + // 享受人-台湾居民来往大陆通行证反面 + } else if (item.imageInfoType === '14') { + name = 'fileListIdBackEnjoyUser' + this.fileListIdBackEnjoyUser.push({ url: config.imgDomain + `/returnImageStream?a=b.jpg&imgPath=${item.rgssUrl}` }) + + // 享受人-外国人永久居留身份证正面 + } else if (item.imageInfoType === '15') { + name = 'fileListIdFrontEnjoyUser' + this.fileListIdFrontEnjoyUser.push({ url: config.imgDomain + `/returnImageStream?a=b.jpg&imgPath=${item.rgssUrl}` }) + + // 享受人-外国人永久居留身份证反面 + } else if (item.imageInfoType === '16') { + name = 'fileListIdBackEnjoyUser' + this.fileListIdBackEnjoyUser.push({ url: config.imgDomain + `/returnImageStream?a=b.jpg&imgPath=${item.rgssUrl}` }) + + // 享受人-港澳台居民居住证正面 + } else if (item.imageInfoType === '17') { + name = 'fileListIdFrontEnjoyUser' + this.fileListIdFrontEnjoyUser.push({ url: config.imgDomain + `/returnImageStream?a=b.jpg&imgPath=${item.rgssUrl}` }) + + // 享受人-港澳台居民居住证反面 + } else if (item.imageInfoType === '18') { + name = 'fileListIdBackEnjoyUser' + this.fileListIdBackEnjoyUser.push({ url: config.imgDomain + `/returnImageStream?a=b.jpg&imgPath=${item.rgssUrl}` }) + + // 银行卡,保存图片的时候'银行卡'图片归属于了享受人对象 + } else if (item.imageInfoType === '3') { + name = 'fileListBank' + this.fileListBank.push({ url: config.imgDomain + `/returnImageStream?a=b.jpg&imgPath=${item.rgssUrl}` }) + + // 关系证明,保存图片的时候'关系证明'图片归属于了享受人对象 + } else if (item.imageInfoType === '27') { + name = 'fileListProve' + this.fileListProve.push({ url: config.imgDomain + `/returnImageStream?a=b.jpg&imgPath=${item.rgssUrl}` }) + + // 享受人无银行卡/手机号码的证明,保存图片的时候'享受人无银行卡/手机号码的证明'图片归属于了享受人对象 + } else if (item.imageInfoType === '26') { + name = 'fileListNoBankAndMobile' + this.fileListNoBankAndMobile.push({ url: config.imgDomain + `/returnImageStream?a=b.jpg&imgPath=${item.rgssUrl}` }) + } + } + let obj = { + name: name, + businessNo: item.businessNo, + businessType: '', + imageInfoType: item.imageInfoType, + rgssUrl: item.rgssUrl, + subBusinessType: item.subBusinessType, // 申请人-0,享受人-1 + subBusinessNo: item.subBusinessNo, // 申请人ID(申请人数据对象中的agentCode字段对应的值)/ 享受人ID(享受人数据对象中的id字段对应的值) + fileName: config.imgDomain + `/returnImageStream?a=b.jpg&imgPath=${item.rgssUrl}` + } + this.list.push(obj) + } + ) + }, + /** * @Description: '基本信息'与'账户信息'中SCAN扫描会将申请人正反证件图片,享受人正反证件图片,银行卡图片等数据存在对应的缓存中, * @Description: 此方法是从缓存中获取'基本信息'与'账户信息'在SCAN扫描后, @@ -1227,8 +1265,13 @@ export default { window.localStorage.removeItem('imgBackPath') // 申请人证件反面 window.localStorage.removeItem('imgfrontInsuredPath') // 享受人证件正面 window.localStorage.removeItem('imgBackInsuredPath') // 享受人证件反面 + // 清除存储ORC扫描银行卡功能后存储的银行卡图片缓存 window.localStorage.removeItem('bankCardUrlPath') + + // 清除存储父母列表中所选中的人(父亲或母亲)的申请人数据,享受人数据,账户信息数据,影像资料数据的数据对象的缓存 + window.localStorage.removeItem('allowanceParentInfo') + // 关闭toast加载提示 this.$toast.clear() // 跳转到签字确认的 diff --git a/src/views/ebiz/allowance/application/BaseInfo.vue b/src/views/ebiz/allowance/application/BaseInfo.vue index 5fea97dd5..7754b0295 100644 --- a/src/views/ebiz/allowance/application/BaseInfo.vue +++ b/src/views/ebiz/allowance/application/BaseInfo.vue @@ -210,7 +210,9 @@ export default { isScanEnjoyUser: false, // 享受人人模块是否显示证件扫描组件 allowancePageFlag: '1', // 定义顶部导航记录当前展示的是第几个页面或流程的标识 colorButton: '#2E4591', // 定义享受人角色和性别选项的选项按钮的颜色 - typeButton: 'default' // 定义享受人角色和性别选项的选项按钮的类型 + typeButton: 'default', // 定义享受人角色和性别选项的选项按钮的类型 + // 定义存储父母列表中选中的人(父亲或母亲)的申请人数据,享受人数据,账户信息数据,影像资料数据的数据对象 + allowanceParentInfo: {} } }, created() { @@ -398,12 +400,12 @@ export default { /** * @Description: 在享受人姓名位置,点击最右侧图标,选择享受人并获取对应享受人信息的方法 - * @params: data--享受人的用户数据信息 + * @params: data--选中的人(父亲或母亲)的申请人数据,享受人数据,账户信息数据,影像资料数据的数据对象 * @author:zhangqi * @Date:2021-09-08 */ chooseParent(data) { - console.log('data :>> ', data) + // console.log('data :>> ', data) this.parentShowPicker = false this.$jump({ flag: 'navigation', @@ -412,14 +414,17 @@ export default { hiddenRight: '1' } }) + // 获取data对象中的享受人数据对象,并赋值给变量 + let enjoyDTOInfo = data.allowanceBaseEnjoyDTO // 将选择的享受人的数据,赋值给对应的变量 - this.enjoyUserInfo.name = data.name // 享受人姓名 - this.enjoyUserInfo.relationship = data.relationship // 享受人角色(与申请人的关系) - this.enjoyUserInfo.idType = data.idType // 享受人证件类型 - this.enjoyUserInfo.idNo = data.idNo // 享受人证件号码 - this.enjoyUserInfo.sex = String(data.sex) // 享受人性别 - this.enjoyUserInfo.birthday = data.birthday // 享受人出生日期 + this.enjoyUserInfo.name = enjoyDTOInfo.name // 享受人姓名 + this.enjoyUserInfo.relationship = enjoyDTOInfo.relationship // 享受人角色(与申请人的关系) + this.enjoyUserInfo.idType = enjoyDTOInfo.idType // 享受人证件类型 + this.enjoyUserInfo.idNo = enjoyDTOInfo.idNo // 享受人证件号码 + this.enjoyUserInfo.sex = String(enjoyDTOInfo.sex) // 享受人性别 + this.enjoyUserInfo.birthday = enjoyDTOInfo.birthday // 享受人出生日期 this.getRelatedData(this.enjoyUserInfo.idNo) // 调用校验证件号码是否合规的方法 + this.allowanceParentInfo = data // 将存储父母列表中选中的人(父亲或母亲)的申请人数据,享受人数据,账户信息数据,影像资料数据的数据对象赋值给变量 }, /** @@ -589,6 +594,11 @@ export default { } // 获取津贴申请流水号,并赋值给变量,当做一个参数,用于传入顶部导航组件 this.applicantInfo.allowanceNo = res.content.allowanceNo + // 判断存储选中的人(父亲或母亲)的申请人数据,享受人数据,账户信息数据,影像资料数据的数据对象中是否有数据 + if (Object.keys(this.allowanceParentInfo).length !== 0) { + // 将选中的人(父亲或母亲)的申请人数据,享受人数据,账户信息数据,影像资料数据的数据对象存到缓存中 + localStorage.setItem('allowanceParentInfo', JSON.stringify(this.allowanceParentInfo)) + } // 跳转到账户信息页面 this.$jump({ flag: 'h5', diff --git a/src/views/ebiz/allowance/application/process.vue b/src/views/ebiz/allowance/application/process.vue index d600c0c45..07b7613c4 100644 --- a/src/views/ebiz/allowance/application/process.vue +++ b/src/views/ebiz/allowance/application/process.vue @@ -1,48 +1,51 @@