GFRS-2618【前端】1.对接津贴列表右上角‘我的资料’功能。2.新增回显OCR扫描证回显证件图片功能 --提交人:张齐

This commit is contained in:
zhangqi1
2021-09-23 17:09:59 +08:00
parent 69c7b78364
commit 3d9f3c1aea
5 changed files with 201 additions and 32 deletions

View File

@@ -13,8 +13,6 @@ const approvalList = () => import('@/views/ebiz/allowance/approval/List')
const approvalDetail = () => import('@/views/ebiz/allowance/Detail')
const parentList = () => import('@/components/ebiz/parentList/Parent')
export default [
//津贴申请
{
@@ -118,15 +116,5 @@ export default [
title: '津贴申请详情',
index: 1
}
},
// 父母列表页面
{
path: '/allowance/myInfo/parentList',
name: 'parentList',
component: parentList,
meta: {
title: '父母列表',
index: 1
}
}
]

View File

@@ -524,13 +524,14 @@ export default {
)
}
}
// 调用从缓存中获取'基本信息'与'账户信息'在scan扫描后
// 存储的申请人正反证件图片,享受人正反证件图片,银行卡图片等缓存数据的方法
// 为了防止此接口与此方法之间存在数据异步调用的问题,所以此方法在此接口执行完成后进行调用
this.getScanCardByLocalStorageFunc()
} else {
this.$toast(res.resultMessage)
}
})
// 调用从缓存中获取'基本信息'与'账户信息'在scan扫描后
// 存储的申请人正反证件图片,享受人正反证件图片,银行卡图片等缓存数据的方法
this.getScanCardByLocalStorageFunc()
// 根据不同情况将顶部导航记录当前展示的是第几个页面或流程的标识的值存入对应的缓存中
if (!this.$route.query.edit) {
//如果不是编辑/导航条跳转进来的
@@ -555,6 +556,90 @@ export default {
* @Date:2021-09-18
*/
getScanCardByLocalStorageFunc() {
// 申请人身份证正面
if (window.localStorage.getItem('imgfrontPath') != null) {
let imgfront = {
url: config.imgDomain + `/returnImageStream?a=b.jpg&imgPath=${window.localStorage.getItem('imgfrontPath')}`
}
this.fileListIdFrontApplicant.push(imgfront)
let obj = {
name: 'fileListIdFrontApplicant',
businessNo: this.$route.query.allowanceNo,
businessType: '',
imageInfoType: '1',
rgssUrl: window.localStorage.getItem('imgfrontPath'),
subBusinessType: '0', // 申请人-0享受人-1
subBusinessNo: this.allowanceUserInfo.applicantInfo.agentCode, // 申请人ID申请人数据对象中的agentCode字段对应的值/ 享受人ID享受人数据对象中的id字段对应的值
fileName: config.imgDomain + `/returnImageStream?a=b.jpg&imgPath=${window.localStorage.getItem('imgfrontPath')}`
}
this.list.push(obj)
} else {
this.fileListIdFrontApplicant = []
}
// 申请人身份证反面
if (window.localStorage.getItem('imgBackPath') != null) {
let imgfront = {
url: config.imgDomain + `/returnImageStream?a=b.jpg&imgPath=${window.localStorage.getItem('imgBackPath')}`
}
this.fileListIdBackApplicant.push(imgfront)
let obj = {
name: 'fileListIdBackApplicant',
businessNo: this.$route.query.allowanceNo,
businessType: '',
imageInfoType: '2',
rgssUrl: window.localStorage.getItem('imgBackPath'),
subBusinessType: '0', // 申请人-0享受人-1
subBusinessNo: this.allowanceUserInfo.applicantInfo.agentCode, // 申请人ID申请人数据对象中的agentCode字段对应的值/ 享受人ID享受人数据对象中的id字段对应的值
fileName: config.imgDomain + `/returnImageStream?a=b.jpg&imgPath=${window.localStorage.getItem('imgBackPath')}`
}
this.list.push(obj)
} else {
this.fileListIdBackApplicant = []
}
// 享受人身份证正面
if (window.localStorage.getItem('imgfrontInsuredPath') != null) {
let imgfront = {
url: config.imgDomain + `/returnImageStream?a=b.jpg&imgPath=${window.localStorage.getItem('imgfrontInsuredPath')}`
}
this.fileListIdFrontEnjoyUser.push(imgfront)
let obj = {
name: 'fileListIdFrontEnjoyUser',
businessNo: this.$route.query.allowanceNo,
businessType: '',
imageInfoType: '1',
rgssUrl: window.localStorage.getItem('imgfrontInsuredPath'),
subBusinessType: '1', // 申请人-0享受人-1
subBusinessNo: this.allowanceUserInfo.enjoyUserInfo.id, // 申请人ID申请人数据对象中的agentCode字段对应的值/ 享受人ID享受人数据对象中的id字段对应的值
fileName: config.imgDomain + `/returnImageStream?a=b.jpg&imgPath=${window.localStorage.getItem('imgfrontInsuredPath')}`
}
this.list.push(obj)
} else {
this.fileListIdFrontEnjoyUser = []
}
// 享受人身份证反面
if (window.localStorage.getItem('imgBackInsuredPath') != null) {
let imgfront = {
url: config.imgDomain + `/returnImageStream?a=b.jpg&imgPath=${window.localStorage.getItem('imgBackInsuredPath')}`
}
this.fileListIdBackEnjoyUser.push(imgfront)
let obj = {
name: 'fileListIdBackEnjoyUser',
businessNo: this.$route.query.allowanceNo,
businessType: '',
imageInfoType: '2',
rgssUrl: window.localStorage.getItem('imgBackPath'),
subBusinessType: '1', // 申请人-0享受人-1
subBusinessNo: this.allowanceUserInfo.enjoyUserInfo.id, // 申请人ID申请人数据对象中的agentCode字段对应的值/ 享受人ID享受人数据对象中的id字段对应的值
fileName: config.imgDomain + `/returnImageStream?a=b.jpg&imgPath=${window.localStorage.getItem('imgBackInsuredPath')}`
}
this.list.push(obj)
} else {
this.fileListIdBackEnjoyUser = []
}
// 银行卡
if (window.localStorage.getItem('bankCardUrlPath') != null) {
let bankCardUrl = {
@@ -1136,12 +1221,11 @@ export default {
localStorage.allowancePageFlag = '4'
}
// window.localStorage.removeItem('imgfront')
// window.localStorage.removeItem('imgBackPath')
// window.localStorage.removeItem('imgfrontPath')
// window.localStorage.removeItem('imgfrontInsured')
// window.localStorage.removeItem('imgfrontInsuredPath')
// window.localStorage.removeItem('imgBackInsuredPath')
// window.localStorage.removeItem('bankCardUrl')
// 清除存储ORC扫描申请人和享受人证件功能后存储的申请人和享受人证件图片缓存
window.localStorage.removeItem('imgfrontPath') // 申请人证件正面
window.localStorage.removeItem('imgBackPath') // 申请人证件反面
window.localStorage.removeItem('imgfrontInsuredPath') // 享受人证件正面
window.localStorage.removeItem('imgBackInsuredPath') // 享受人证件反面
// 清除存储ORC扫描银行卡功能后存储的银行卡图片缓存
window.localStorage.removeItem('bankCardUrlPath')
// 关闭toast加载提示

View File

@@ -8,8 +8,12 @@ export function selectComp(that, index, type = '') {
} else if (index == 2) {
;[that.occupationShowPicker, title] = [true, '职业类别']
} else if (index == 3) {
// 申请人
localStorage.scanFromInsured = 'true'
;[that.isScanApplicant, title] = [true, '身份证扫描']
} else if (index == 4) {
// 享受人
localStorage.scanFromInsured = 'false'
;[that.isScanEnjoyUser, title] = [true, '身份证扫描']
}

View File

@@ -343,13 +343,14 @@ export default {
// 将银行账户信息的数据对象赋值给对象中的属性
bankInfo: res.content.allowanceBaseDTO.allowanceBaseBankDTO
}
// 调用从缓存中获取'基本信息'与'账户信息'在scan扫描后
// 存储的申请人正反证件图片,享受人正反证件图片,银行卡图片等缓存数据的方法
// 为了防止此接口与此方法之间存在数据异步调用的问题,所以此方法在此接口执行完成后进行调用
this.getScanCardByLocalStorageFunc()
} else {
this.$toast(res.resultMessage)
}
})
// 调用从缓存中获取'基本信息'与'账户信息'在scan扫描后
// 存储的申请人正反证件图片,享受人正反证件图片,银行卡图片等缓存数据的方法
this.getScanCardByLocalStorageFunc()
// 根据不同情况将顶部导航记录当前展示的是第几个页面或流程的标识的值存入对应的缓存中
if (!this.$route.query.edit) {
//如果不是编辑/导航条跳转进来的
@@ -374,6 +375,90 @@ export default {
* @Date:2021-09-18
*/
getScanCardByLocalStorageFunc() {
// 申请人身份证正面
if (window.localStorage.getItem('imgfrontPath') != null) {
let imgfront = {
url: config.imgDomain + `/returnImageStream?a=b.jpg&imgPath=${window.localStorage.getItem('imgfrontPath')}`
}
this.fileListIdFrontApplicant.push(imgfront)
let obj = {
name: 'fileListIdFrontApplicant',
businessNo: this.$route.query.enjoyId,
businessType: '',
imageInfoType: '1',
rgssUrl: window.localStorage.getItem('imgfrontPath'),
subBusinessType: '0', // 申请人-0享受人-1
subBusinessNo: this.allowanceUserInfo.applicantInfo.agentCode, // 申请人ID申请人数据对象中的agentCode字段对应的值/ 享受人ID享受人数据对象中的id字段对应的值
fileName: config.imgDomain + `/returnImageStream?a=b.jpg&imgPath=${window.localStorage.getItem('imgfrontPath')}`
}
this.list.push(obj)
} else {
this.fileListIdFrontApplicant = []
}
// 申请人身份证反面
if (window.localStorage.getItem('imgBackPath') != null) {
let imgfront = {
url: config.imgDomain + `/returnImageStream?a=b.jpg&imgPath=${window.localStorage.getItem('imgBackPath')}`
}
this.fileListIdBackApplicant.push(imgfront)
let obj = {
name: 'fileListIdBackApplicant',
businessNo: this.$route.query.enjoyId,
businessType: '',
imageInfoType: '2',
rgssUrl: window.localStorage.getItem('imgBackPath'),
subBusinessType: '0', // 申请人-0享受人-1
subBusinessNo: this.allowanceUserInfo.applicantInfo.agentCode, // 申请人ID申请人数据对象中的agentCode字段对应的值/ 享受人ID享受人数据对象中的id字段对应的值
fileName: config.imgDomain + `/returnImageStream?a=b.jpg&imgPath=${window.localStorage.getItem('imgBackPath')}`
}
this.list.push(obj)
} else {
this.fileListIdBackApplicant = []
}
// 享受人身份证正面
if (window.localStorage.getItem('imgfrontInsuredPath') != null) {
let imgfront = {
url: config.imgDomain + `/returnImageStream?a=b.jpg&imgPath=${window.localStorage.getItem('imgfrontInsuredPath')}`
}
this.fileListIdFrontEnjoyUser.push(imgfront)
let obj = {
name: 'fileListIdFrontEnjoyUser',
businessNo: this.$route.query.enjoyId,
businessType: '',
imageInfoType: '1',
rgssUrl: window.localStorage.getItem('imgfrontInsuredPath'),
subBusinessType: '1', // 申请人-0享受人-1
subBusinessNo: this.allowanceUserInfo.enjoyUserInfo.id, // 申请人ID申请人数据对象中的agentCode字段对应的值/ 享受人ID享受人数据对象中的id字段对应的值
fileName: config.imgDomain + `/returnImageStream?a=b.jpg&imgPath=${window.localStorage.getItem('imgfrontInsuredPath')}`
}
this.list.push(obj)
} else {
this.fileListIdFrontEnjoyUser = []
}
// 享受人身份证反面
if (window.localStorage.getItem('imgBackInsuredPath') != null) {
let imgfront = {
url: config.imgDomain + `/returnImageStream?a=b.jpg&imgPath=${window.localStorage.getItem('imgBackInsuredPath')}`
}
this.fileListIdBackEnjoyUser.push(imgfront)
let obj = {
name: 'fileListIdBackEnjoyUser',
businessNo: this.$route.query.enjoyId,
businessType: '',
imageInfoType: '2',
rgssUrl: window.localStorage.getItem('imgBackPath'),
subBusinessType: '1', // 申请人-0享受人-1
subBusinessNo: this.allowanceUserInfo.enjoyUserInfo.id, // 申请人ID申请人数据对象中的agentCode字段对应的值/ 享受人ID享受人数据对象中的id字段对应的值
fileName: config.imgDomain + `/returnImageStream?a=b.jpg&imgPath=${window.localStorage.getItem('imgBackInsuredPath')}`
}
this.list.push(obj)
} else {
this.fileListIdBackEnjoyUser = []
}
// 银行卡
if (window.localStorage.getItem('bankCardUrlPath') != null) {
let bankCardUrl = {
@@ -948,12 +1033,11 @@ export default {
saveOrUpdateAllowanceBase(params).then((res) => {
if (res.result == '0') {
// window.localStorage.removeItem('imgfront')
// window.localStorage.removeItem('imgBackPath')
// window.localStorage.removeItem('imgfrontPath')
// window.localStorage.removeItem('imgfrontInsured')
// window.localStorage.removeItem('imgfrontInsuredPath')
// window.localStorage.removeItem('imgBackInsuredPath')
// window.localStorage.removeItem('bankCardUrl')
// 清除存储ORC扫描申请人和享受人证件功能后存储的申请人和享受人证件图片缓存
window.localStorage.removeItem('imgfrontPath') // 申请人证件正面
window.localStorage.removeItem('imgBackPath') // 申请人证件反面
window.localStorage.removeItem('imgfrontInsuredPath') // 享受人证件正面
window.localStorage.removeItem('imgBackInsuredPath') // 享受人证件反面
// 清除存储ORC扫描银行卡功能后存储的银行卡图片缓存
window.localStorage.removeItem('bankCardUrlPath')
// 关闭toast加载提示
@@ -962,12 +1046,16 @@ export default {
that.$jump({
flag: 'h5',
extra: {
url: location.origin + '/#/allowance/myInfo/parentList?isOpenDialog=1',
url: location.origin + '/#/allowance/myInfo/BaseInfo?parentShowPicker=true&isOpenDialog=true',
pullRefresh: '1',
backToFirst: '1'
},
routerInfo: {
path: '/allowance/myInfo/parentList?isOpenDialog=1'
path: '/allowance/myInfo/BaseInfo',
query: {
parentShowPicker: true,
isOpenDialog: true
}
}
})
} else {

View File

@@ -234,6 +234,10 @@ export default {
* @Date:2021-09-14
*/
init() {
// 判断是否是从list列表页点击右上方我的资料按钮跳转到本页面的
if (this.$route.query.parentShowPicker) {
this.selectClick('1')
}
// 判断是新增操作还是编辑操作的类型,根据不同操作类型调用不同接口查询数据
if (this.$route.query.edit) {
// 从路由参数中获取'enjoyId'我的资料唯一标识,定义参数格式
@@ -398,6 +402,7 @@ export default {
}
})
// 将选择的享受人的数据,赋值给对应的变量
this.enjoyUserInfo.id = data.id // 新增或修改我的资料的唯一标识,用于当做参数传给顶部导航组件,也用于在点击下一步时,传给后台,后台去判断是新增操作还是编辑操作
this.enjoyUserInfo.name = data.name // 享受人姓名
this.enjoyUserInfo.relationship = String(data.relationship) // 享受人角色(与申请人的关系)
this.enjoyUserInfo.idType = data.idType // 享受人证件类型