mirror of
http://112.124.100.131/GFRS/ebiz-h5.git
synced 2025-12-10 15:06:45 +08:00
GFRS-2618【前端】修改前端部分bug--提交人:张齐
This commit is contained in:
@@ -3632,8 +3632,8 @@ export default {
|
||||
|
||||
// 津贴申请-享受人角色的枚举(父母津贴申请功能专用)
|
||||
allowanceEnjoyUserRole: [
|
||||
{ id: '0', text: '父亲' },
|
||||
{ id: '1', text: '母亲' }
|
||||
{ id: 'F', text: '父亲' },
|
||||
{ id: 'M', text: '母亲' }
|
||||
],
|
||||
// <!--------- 津贴申请专用 end --------->
|
||||
imageInfoType:[
|
||||
|
||||
@@ -573,8 +573,6 @@ export default {
|
||||
fileName: config.imgDomain + `/returnImageStream?a=b.jpg&imgPath=${window.localStorage.getItem('imgfrontPath')}`
|
||||
}
|
||||
this.list.push(obj)
|
||||
} else {
|
||||
this.fileListIdFrontApplicant = []
|
||||
}
|
||||
|
||||
// 申请人身份证反面
|
||||
@@ -594,8 +592,6 @@ export default {
|
||||
fileName: config.imgDomain + `/returnImageStream?a=b.jpg&imgPath=${window.localStorage.getItem('imgBackPath')}`
|
||||
}
|
||||
this.list.push(obj)
|
||||
} else {
|
||||
this.fileListIdBackApplicant = []
|
||||
}
|
||||
|
||||
// 享受人身份证正面
|
||||
@@ -615,8 +611,6 @@ export default {
|
||||
fileName: config.imgDomain + `/returnImageStream?a=b.jpg&imgPath=${window.localStorage.getItem('imgfrontInsuredPath')}`
|
||||
}
|
||||
this.list.push(obj)
|
||||
} else {
|
||||
this.fileListIdFrontEnjoyUser = []
|
||||
}
|
||||
|
||||
// 享受人身份证反面
|
||||
@@ -636,8 +630,6 @@ export default {
|
||||
fileName: config.imgDomain + `/returnImageStream?a=b.jpg&imgPath=${window.localStorage.getItem('imgBackInsuredPath')}`
|
||||
}
|
||||
this.list.push(obj)
|
||||
} else {
|
||||
this.fileListIdBackEnjoyUser = []
|
||||
}
|
||||
|
||||
// 银行卡
|
||||
@@ -658,8 +650,6 @@ export default {
|
||||
fileName: config.imgDomain + `/returnImageStream?a=b.jpg&imgPath=${window.localStorage.getItem('bankCardUrlPath')}`
|
||||
}
|
||||
this.list.push(obj)
|
||||
} else {
|
||||
this.fileListBank = []
|
||||
}
|
||||
},
|
||||
|
||||
@@ -751,12 +741,23 @@ export default {
|
||||
// 删除关系证明图片
|
||||
} else if (detail.name == 'fileListProve') {
|
||||
this.fileListProve.map((item, index, array) => {
|
||||
// 图片新增上传时,删除其中一张关系证明图片的执行的方法
|
||||
if (file.file) {
|
||||
if (item.name == file.name) {
|
||||
array.splice(index, 1)
|
||||
this.deleteImg(file, 'fileListProve')
|
||||
} else {
|
||||
return
|
||||
}
|
||||
} else {
|
||||
// 图片返显时,删除其中一张关系证明图片的执行的方法
|
||||
if (item.url == file.url) {
|
||||
array.splice(index, 1)
|
||||
this.deleteImg(file, 'fileListProve')
|
||||
} else {
|
||||
return
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
// 删除无银行卡/手机号码的证明图片
|
||||
|
||||
@@ -185,8 +185,8 @@ export default {
|
||||
relationship: '', // 享受人角色(与申请人的关系)
|
||||
// 享受人角色(与申请人的关系)的选择项
|
||||
relationshipRadio: [
|
||||
{ value: '0', label: '父亲' },
|
||||
{ value: '1', label: '母亲' }
|
||||
{ value: 'F', label: '父亲' },
|
||||
{ value: 'M', label: '母亲' }
|
||||
],
|
||||
sex: '', // 享受人的性别
|
||||
// 享受人性别的选择项
|
||||
@@ -235,6 +235,16 @@ export default {
|
||||
* @Date:2021-09-14
|
||||
*/
|
||||
init() {
|
||||
// 清除存储ORC扫描的图片的缓存,
|
||||
// 防止重新开始进行津贴流程申请时,会携带之前的ORC图片缓存,在影像资料页面进行图片回显,这样回显的图片是不正确的
|
||||
// 清除存储ORC扫描申请人和享受人证件功能后存储的申请人和享受人证件图片缓存。
|
||||
localStorage.removeItem('imgfrontPath') // 申请人证件正面
|
||||
localStorage.removeItem('imgBackPath') // 申请人证件反面
|
||||
localStorage.removeItem('imgfrontInsuredPath') // 享受人证件正面
|
||||
localStorage.removeItem('imgBackInsuredPath') // 享受人证件反面
|
||||
// 清除存储ORC扫描银行卡功能后存储的银行卡图片缓存
|
||||
localStorage.removeItem('bankCardUrlPath') // 银行卡
|
||||
|
||||
// 判断是新增操作还是编辑操作的类型,根据不同操作类型调用不同接口查询数据
|
||||
if (this.$route.query.edit) {
|
||||
// 从路由参数中获取'allowanceNo'津贴流水号,定义参数格式
|
||||
@@ -404,7 +414,7 @@ export default {
|
||||
})
|
||||
// 将选择的享受人的数据,赋值给对应的变量
|
||||
this.enjoyUserInfo.name = data.name // 享受人姓名
|
||||
this.enjoyUserInfo.relationship = String(data.relationship) // 享受人角色(与申请人的关系)
|
||||
this.enjoyUserInfo.relationship = data.relationship // 享受人角色(与申请人的关系)
|
||||
this.enjoyUserInfo.idType = data.idType // 享受人证件类型
|
||||
this.enjoyUserInfo.idNo = data.idNo // 享受人证件号码
|
||||
this.enjoyUserInfo.sex = String(data.sex) // 享受人性别
|
||||
@@ -430,7 +440,7 @@ export default {
|
||||
return this.$toast(idToData(val).text)
|
||||
} else {
|
||||
// 如果合规会自动填充享受人角色,性别,出生日期等信息
|
||||
this.enjoyUserInfo.relationship = idToData(val).sex // 性别男,表示的角色为父亲
|
||||
this.enjoyUserInfo.relationship = idToData(val).relationship
|
||||
this.enjoyUserInfo.sex = idToData(val).sex
|
||||
this.enjoyUserInfo.birthday = idToData(val).birthday
|
||||
}
|
||||
@@ -530,11 +540,11 @@ export default {
|
||||
}
|
||||
}
|
||||
// 判断当享受人角色为父亲,性别为女时,要进行提示
|
||||
if (this.enjoyUserInfo.relationship == 0 && this.enjoyUserInfo.sex == 1) {
|
||||
if (this.enjoyUserInfo.relationship == 'F' && this.enjoyUserInfo.sex == 1) {
|
||||
return this.$toast('享受人为父亲,性别不可为女,请修改。')
|
||||
}
|
||||
// 判断当享受人角色为母亲,性别为男时,要进行提示
|
||||
if (this.enjoyUserInfo.relationship == 1 && this.enjoyUserInfo.sex == 0) {
|
||||
if (this.enjoyUserInfo.relationship == 'M' && this.enjoyUserInfo.sex == 0) {
|
||||
return this.$toast('享受人为母亲,性别不可为男,请修改。')
|
||||
}
|
||||
// 计算享受人年龄
|
||||
|
||||
@@ -53,10 +53,17 @@ function closeBtn(that) {
|
||||
export function getApplicantIdentityInfo(that, data) {
|
||||
// 正面
|
||||
if (data.name && data.name != '待识别') {
|
||||
if (that.applicantInfo.name === data.name) {
|
||||
that.applicantInfo.name = data.name
|
||||
that.applicantInfo.idNo = data.idNo
|
||||
// that.applicantInfo.birthday = `${data.birthYear}-${data.birthMonth}-${data.birthDay}`
|
||||
// that.applicantInfo.sex = data.gender == '男' ? '0' : '1'
|
||||
} else {
|
||||
that.$toast('身份证姓名和申请人姓名不一致,请重新上传。')
|
||||
// 如果身份证姓名和申请人姓名不一致,要清除OCR扫描后存储的申请人证件正面的图片的缓存,不能将其带入到影像资料页面中进行回显
|
||||
localStorage.removeItem('imgfrontPath') // 申请人证件正面
|
||||
localStorage.removeItem('imgBackPath') // 申请人证件反面
|
||||
}
|
||||
}
|
||||
// 反面
|
||||
// if (data.startDate && data.startDate != '待识别') {}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import changeFifteenToEighteen from '@/assets/js/utils/changeFifteenToEighteen'
|
||||
import idNoCheck from '@/assets/js/utils/idNoCheck'
|
||||
import utilsAge from '@/assets/js/utils/age'
|
||||
|
||||
//身份证带出出生日期,性别,年龄
|
||||
export function idToData(idNo) {
|
||||
//非空
|
||||
@@ -27,10 +28,12 @@ export function idToData(idNo) {
|
||||
let birthday = getBirthById(idNo)
|
||||
let age = utilsAge.getAge(birthday, new Date())
|
||||
let sex = getSexById(idNo)
|
||||
let relationship = getRelationshipById(idNo)
|
||||
return {
|
||||
birthday,
|
||||
age,
|
||||
sex
|
||||
sex,
|
||||
relationship
|
||||
}
|
||||
}
|
||||
|
||||
@@ -52,3 +55,14 @@ function getSexById(idNo) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function getRelationshipById(idNo) {
|
||||
// 获取性别
|
||||
if (idNo.charAt(16) >= '0' && idNo.charAt(16) <= '9') {
|
||||
if (parseInt(idNo.charAt(16)) % 2 == 0) {
|
||||
return 'M'
|
||||
} else {
|
||||
return 'F'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -570,7 +570,9 @@ export default {
|
||||
// 删除关系证明图片
|
||||
} else if (detail.name == 'fileListProve') {
|
||||
this.fileListProve.map((item, index, array) => {
|
||||
if (item.url == file.url) {
|
||||
// 我的资料与津贴申请不同,因为我的资料-影像资料页面不会涉及到图片回显的功能,
|
||||
// 所以用'name'属性判断,然后进行删除图片即可实现
|
||||
if (item.name == file.name) {
|
||||
array.splice(index, 1)
|
||||
this.deleteImg(file, 'fileListProve')
|
||||
} else {
|
||||
|
||||
@@ -184,8 +184,8 @@ export default {
|
||||
relationship: '', // 享受人角色(与申请人的关系)
|
||||
// 享受人角色(与申请人的关系)的选择项
|
||||
relationshipRadio: [
|
||||
{ value: '0', label: '父亲' },
|
||||
{ value: '1', label: '母亲' }
|
||||
{ value: 'F', label: '父亲' },
|
||||
{ value: 'M', label: '母亲' }
|
||||
],
|
||||
sex: '', // 享受人的性别
|
||||
// 享受人性别的选择项
|
||||
@@ -404,7 +404,7 @@ export default {
|
||||
// 将选择的享受人的数据,赋值给对应的变量
|
||||
this.enjoyUserInfo.id = data.id // 新增或修改我的资料的唯一标识,用于当做参数传给顶部导航组件,也用于在点击下一步时,传给后台,后台去判断是新增操作还是编辑操作
|
||||
this.enjoyUserInfo.name = data.name // 享受人姓名
|
||||
this.enjoyUserInfo.relationship = String(data.relationship) // 享受人角色(与申请人的关系)
|
||||
this.enjoyUserInfo.relationship = data.relationship // 享受人角色(与申请人的关系)
|
||||
this.enjoyUserInfo.idType = data.idType // 享受人证件类型
|
||||
this.enjoyUserInfo.idNo = data.idNo // 享受人证件号码
|
||||
this.enjoyUserInfo.sex = String(data.sex) // 享受人性别
|
||||
@@ -430,7 +430,7 @@ export default {
|
||||
return this.$toast(idToData(val).text)
|
||||
} else {
|
||||
// 如果合规会自动填充享受人角色,性别,出生日期等信息
|
||||
this.enjoyUserInfo.relationship = idToData(val).sex // 性别男,表示的角色为父亲
|
||||
this.enjoyUserInfo.relationship = idToData(val).relationship
|
||||
this.enjoyUserInfo.sex = idToData(val).sex
|
||||
this.enjoyUserInfo.birthday = idToData(val).birthday
|
||||
}
|
||||
@@ -530,11 +530,11 @@ export default {
|
||||
}
|
||||
}
|
||||
// 判断当享受人角色为父亲,性别为女时,要进行提示
|
||||
if (this.enjoyUserInfo.relationship == 0 && this.enjoyUserInfo.sex == 1) {
|
||||
if (this.enjoyUserInfo.relationship == 'F' && this.enjoyUserInfo.sex == 1) {
|
||||
return this.$toast('享受人为父亲,性别不可为女,请修改。')
|
||||
}
|
||||
// 判断当享受人角色为母亲,性别为男时,要进行提示
|
||||
if (this.enjoyUserInfo.relationship == 1 && this.enjoyUserInfo.sex == 0) {
|
||||
if (this.enjoyUserInfo.relationship == 'M' && this.enjoyUserInfo.sex == 0) {
|
||||
return this.$toast('享受人为母亲,性别不可为男,请修改。')
|
||||
}
|
||||
// 计算享受人年龄
|
||||
|
||||
Reference in New Issue
Block a user