【金融机构客户尽职调查和客户身份资料及交易记录保存管理办法要求需求】添加受益人影像

This commit is contained in:
li.yuetong
2022-02-23 09:42:05 +08:00
parent 78fefb5677
commit ba797e8893
4 changed files with 335 additions and 73 deletions

View File

@@ -64,7 +64,7 @@
ref="birthday"
:readonly="isInsured && birthdayLimit"
></FieldDatePicter>
<!-- <FieldDatePicter
<FieldDatePicter
v-validate="'required'"
label="证件起始日期"
name="证件起始日期"
@@ -76,7 +76,7 @@
ref="certificateValidate"
:flag="true"
:readonly="isInsured || idLimit"
></FieldDatePicter> -->
></FieldDatePicter>
<FieldDatePicter
:v-validate="{ required: certiexpiredateRequired }"
label="证件截止日期"
@@ -578,24 +578,24 @@ export default {
//证件起始截止日期
onDateConfirm(val, type) {
switch (type) {
// case '0':
// {
// //证件起始日期
// //如果录入日期早于出生日期或晚于当前日期
// if (Date.parse(val) > Date.parse(new Date()) || Date.parse(val) < Date.parse(this.userInfo.birthday)) {
// this.userInfo.certificateValidate = ''
// this.$refs.certificateValidate.date = ''
// return this.$toast('证件起始日期填写错误')
// }
case '0':
{
//证件起始日期
//如果录入日期早于出生日期或晚于当前日期
if (Date.parse(val) > Date.parse(new Date()) || Date.parse(val) < Date.parse(this.userInfo.birthday)) {
this.userInfo.certificateValidate = ''
this.$refs.certificateValidate.date = ''
return this.$toast('证件起始日期填写错误')
}
// // 计算年龄
// // 长期按钮是否禁用
// if (this.userInfo.idType == '1') {
// let age = utilsAge.getAge(this.userInfo.birthday, new Date())
// this.effectiveDateTypeAble = age <= 45
// }
// }
// break
// 计算年龄
// 长期按钮是否禁用
if (this.userInfo.idType == '1') {
let age = utilsAge.getAge(this.userInfo.birthday, new Date())
this.effectiveDateTypeAble = age <= 45
}
}
break
case '1':
{
//证件截止日期
@@ -613,6 +613,32 @@ export default {
this.$refs.certiexpiredate.date = ''
return this.$toast('亲,请您核实受益人身份证件有效期~')
}
//不同证件类型的判断
if (this.userInfo.idType) {
//获取年龄
let age = utilsAge.getAge(this.userInfo.birthday, new Date())
console.log(age)
//年龄在16-25周岁之间
if (age >= 16 && age <= 25) {
if (new Date(val).getFullYear() - new Date(this.userInfo.certificateValidate).getFullYear() != 10) {
this.userInfo.certiexpiredate = ''
this.$refs.certiexpiredate.date = ''
return this.$toast('16周岁~25周岁的证件有效期为10年')
}
//年龄在26-45周岁之间
} else if (age >= 26 && age <= 45) {
if (new Date(val).getFullYear() - new Date(this.userInfo.certificateValidate).getFullYear() != 20) {
this.userInfo.certiexpiredate = ''
this.$refs.certiexpiredate.date = ''
return this.$toast('26周岁~45周岁的证件有效期为20年')
}
//此外的年龄段不支持
} else {
this.userInfo.certiexpiredate = ''
this.$refs.certiexpiredate.date = ''
return this.$toast('身份证不支持此年龄段')
}
}
}
break
case '2':

View File

@@ -271,6 +271,65 @@
</div>
</div> -->
<!-- 受益人类型 -->
<div>
<div class="flex bg-white p10 align-items-c">
<span>请点击+上传受益人身份证件</span>
</div>
<div class="m20 bg-white">
<div v-for="(item, index) in idType" :key="index">
<div v-for="(item01, index01) in saleBtnfPersonInfo" :key="index01">
<div v-if="item.id == item01.idType">
<div v-if="item.id == '1' || item.id == '2' || item.id == '3' || item.id == '5' || item.id == '6' || item.id == '8' || item.id == '9'">
<van-cell-group>
<van-field required :label="item.id == '2' ? `${item01.name}+${item.text}户主页` : `${item01.name}+${item.text}正面`" disabled />
</van-cell-group>
<div @click="test('fileListIdFrontBeneficiary', item01.idType, item01.bnfId)">
<van-uploader
:name="'fileListIdFrontBeneficiary'+index01"
v-model="bnfInfo[index01].fileListIdFrontBeneficiary"
:after-read="afterRead"
:before-delete="beforeDelete"
@delete="deleteImg"
class="mt10 ml20"
:max-count="1"
/>
</div>
<van-cell-group>
<van-field required :label="item.id == '2' ? `${item01.name}+${item.text}本人页` : `${item01.name}+${item.text}反面`" disabled />
</van-cell-group>
<div @click="test('fileListIdBackBeneficiary', item01.idType, item01.bnfId)">
<van-uploader
:name="'fileListIdBackBeneficiary'+index01"
v-model="bnfInfo[index01].fileListIdBackBeneficiary"
:after-read="afterRead"
:before-delete="beforeDelete"
@delete="deleteImg"
class="mt10 ml20"
:max-count="1"
/>
</div>
</div>
<div v-if="item.id == '4'">
<van-cell-group>
<van-field required :label="`${item01.name}+${item.text}头像页`" disabled />
</van-cell-group>
<div @click="test('fileLIstImgBeneficiary', item01.idType, item01.bnfId)">
<van-uploader
:name="'fileLIstImgBeneficiary'+index01"
v-model="bnfInfo[index01].fileLIstImgBeneficiary"
:after-read="afterRead"
:before-delete="beforeDelete"
@delete="deleteImg"
class="mt10 ml20"
:max-count="1"
/>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- <div v-if="typebeneficiary == true">
<div class="flex bg-white p10 align-items-c">
<span>受益人附件</span>
@@ -341,7 +400,7 @@
type="danger"
class="attachmentManagement-next"
size="large"
:disabled="isDisabled"
:disabled="!(isDisabled == false && isDisabledBnf == false)"
@click="next"
@touchstart="beforeNext(isDisabled)"
v-no-more-click="1000"
@@ -371,14 +430,14 @@ export default {
fileListNotifyInsured: [],
// 投保人异常告知
fileListNotify: [],
// 身份证正面
// 投保人身份证正面
fileListIdFront: [
// { url: 'https://img.yzcdn.cn/vant/cat.jpeg' }
// Uploader 根据文件后缀来判断是否为图片文件
],
// 身份证反面
// 投保人身份证反面
fileListIdBack: [],
// 其他类型页面
// 投保人其他类型页面
fileLIstImg: [],
// 投保人选择的必选其他
saleInsuredInfoOther: [],
@@ -396,6 +455,15 @@ export default {
fileListBankInsured: [],
// 被保险人其他类型页面
fileLIstImgInsured: [],
// 受益人身份证正面
fileListIdFrontBeneficiary: [],
// 受益人身份证反面
fileListIdBackBeneficiary: [],
// 受益人其他类型页面
fileLIstImgBeneficiary: [],
// 受益人
bnfInfo:[],
isDisabledBnf:true,
// 受益人
// fileListtypebeneficiary: [],
// fileLIstImgInsrued
@@ -413,6 +481,8 @@ export default {
saleInsuredPersonInfo: {},
// 投保人信息
saleInsuredInfo: {},
// 受益人信息
saleBtnfPersonInfo: {},
// 图片流
file: '',
// 图片名称
@@ -426,6 +496,8 @@ export default {
list: [],
// 是哪个证件类型
id: '',
//受益人id
bnfId:'',
// 投保人被保险人是否是一个人 1为同一个人
relationToAppnt: '',
changeCard: localStorage.changeCard,
@@ -448,6 +520,28 @@ export default {
this.saleInsuredInfo = res.orderDTO.appntDTO
//被保险人信息
this.saleInsuredPersonInfo = res.orderDTO.insuredDTOs[0]
//收益人信息
this.saleBtnfPersonInfo = this.saleInsuredPersonInfo.bnfDTOs
//bnfInfo 受益人影像数据反显,护照属于其他类型,护照以外的证件区分正反面
this.saleBtnfPersonInfo.forEach((item, index, arr) => {
if(item.idType == '4'){
this.bnfInfo.push(
{
// 受益人其他类型页面
fileLIstImgBeneficiary: []
}
)
}else{
this.bnfInfo.push(
{
// 受益人身份证正面
fileListIdFrontBeneficiary: [],
// 受益人身份证反面
fileListIdBackBeneficiary: []
}
)
}
})
// localStorage.saleInsuredPersonInfo = JSON.stringify(res.orderDTO.insuredDTOs[0])
// 核保老师确认只有财务告知第8项社保问题选【是】不用展示上传资料按钮其他健康告知或财务告知选【是】都可以展示上传资料按钮
if (this.saleInsuredInfo.impartDTO.impartItemDTOS && this.saleInsuredInfo.impartDTO.impartItemDTOS.length > 0) {
@@ -745,6 +839,34 @@ export default {
// return
// }
// })
} else if (detail.name.indexOf('fileListIdFrontBeneficiary') != -1) {
//单独处理受益人影像删除通过name值查询到当前收益指的索引值下标操作data数据中定义的数据
let detailIndex = detail.name.substring(26,detail.name.length)
this.fileListIdFrontBeneficiary = []
this.bnfInfo.forEach((item, index) => {
if(index == detailIndex){
item.fileListIdFrontBeneficiary = []
}
})
this.deleteImg(file, 'fileListIdFrontBeneficiary')
} else if (detail.name.indexOf('fileListIdBackBeneficiary') != -1) {
let detailIndex = detail.name.substring(25,detail.name.length)
this.fileListIdBackBeneficiary = []
this.bnfInfo.forEach((item, index) => {
if(index == detailIndex){
item.fileListIdBackBeneficiary = []
}
})
this.deleteImg(file, 'fileListIdBackBeneficiary')
} else if (detail.name.indexOf('fileLIstImgBeneficiary') != -1) {
let detailIndex = detail.name.substring(22,detail.name.length)
this.fileLIstImgBeneficiary = []
this.bnfInfo.forEach((item, index) => {
if(index == detailIndex){
item.fileLIstImgBeneficiary = []
}
})
this.deleteImg(file, 'fileLIstImgBeneficiary')
} else if (detail.name == 'fileListNotify') {
this.fileListNotify.forEach((item, index, arr) => {
if (item.name == file.name) {
@@ -766,8 +888,9 @@ export default {
}
})
},
test(type, id) {
test(type, id, bnfId) {
let that = this
that.bnfId = bnfId
that.id = id
switch (type) {
case 'fileListIdFront':
@@ -806,6 +929,15 @@ export default {
case 'saleInsuredInfoOther':
that.type = type
break
case 'fileListIdFrontBeneficiary':
that.type = type
break
case 'fileListIdBackBeneficiary':
that.type = type
break
case 'fileLIstImgBeneficiary':
that.type = type
break
default:
that.type = type
}
@@ -822,18 +954,32 @@ export default {
if (item.fileName == file.name && nameList == item.name) {
array.splice(index, 1)
}
//单独处理受益人影像删除通过bnfId查询到删除某条数据
if(nameList == 'fileListIdFrontBeneficiary' || nameList == 'fileListIdBackBeneficiary' || nameList == 'fileLIstImgBeneficiary'){
if (item.fileName == file.name && item.subBusinessNo == that.bnfId) {
array.splice(index, 1)
}
}
})
},
afterRead(file) {
let that = this
// console.log(type)
// 此时可以自行将文件上传至服务器
that.file = file.content
that.imgName = Math.floor(Math.random() * 100).toString() + new Date().getTime() + file.file.name //为图片名加随机数 与时间戳
file.name = that.imgName
that.uploadImg()
},
//校验受益人影像是否完整上传
checkBtnInfo(item){
for(var key in item){
console.log(!item[key])
if(item[key].length == 0){
return false
}
}
return true
},
// 转化base64格式为文件格式
dataURLtoFile(dataurl, filename) {
//将base64转换为文件
@@ -1062,6 +1208,76 @@ export default {
}
this.imageType = imageInfoType
that.list.push(obj)
} else if (
that.type == 'fileListIdFrontBeneficiary' ||
that.type == 'fileListIdBackBeneficiary' ||
that.type == 'fileLIstImgBeneficiary'
) {
// 是收益人
// 证件类型
let imageInfoType = ''
let name = ''
if (that.type == 'fileListIdFrontBeneficiary' && that.id == '1') {
name = 'fileListIdFrontBeneficiary'
imageInfoType = '1'
} else if (that.type == 'fileListIdBackBeneficiary' && that.id == '1') {
name = 'fileListIdBackBeneficiary'
imageInfoType = '2'
} else if (that.type == 'fileListIdFrontBeneficiary' && that.id == '2') {
name = 'fileListIdFrontBeneficiary'
imageInfoType = '5'
} else if (that.type == 'fileListIdBackBeneficiary' && that.id == '2') {
name = 'fileListIdBackBeneficiary'
imageInfoType = '6'
} else if (that.type == 'fileListIdFrontBeneficiary' && that.id == '3') {
name = 'fileListIdFrontBeneficiary'
imageInfoType = '7'
} else if (that.type == 'fileListIdBackBeneficiary' && that.id == '3') {
name = 'fileListIdBackBeneficiary'
imageInfoType = '12'
} else if (that.type == 'fileLIstImgBeneficiary' && that.id == '4') {
name = 'fileLIstImgBeneficiary'
imageInfoType = '8'
} else if (that.type == 'fileListIdFrontBeneficiary' && that.id == '5') {
name = 'fileListIdFrontBeneficiary'
imageInfoType = '9'
} else if (that.type == 'fileListIdBackBeneficiary' && that.id == '5') {
name = 'fileListIdBackBeneficiary'
imageInfoType = '13'
} else if (that.type == 'fileListIdFrontBeneficiary' && that.id == '6') {
name = 'fileListIdFrontBeneficiary'
imageInfoType = '10'
} else if (that.type == 'fileListIdBackBeneficiary' && that.id == '6') {
name = 'fileListIdBackBeneficiary'
imageInfoType = '14'
} else if (that.type == 'fileListIdFrontBeneficiary' && that.id == '8') {
name = 'fileListIdFrontBeneficiary'
imageInfoType = '15'
} else if (that.type == 'fileListIdBackBeneficiary' && that.id == '8') {
name = 'fileListIdBackBeneficiary'
imageInfoType = '16'
} else if (that.type == 'fileListIdFrontBeneficiary' && that.id == '9') {
name = 'fileListIdFrontBeneficiary'
imageInfoType = '17'
} else if (that.type == 'fileListIdBackBeneficiary' && that.id == '9') {
name = 'fileListIdBackBeneficiary'
imageInfoType = '18'
}
let obj = {
name: name,
businessNo: that.orderNo,
businessType: '',
imageInfoType: imageInfoType,
rgssUrl: encodeURI(res.path).replace(/\+/g, '%2B'),
subBusinessType: '3',
subBusinessNo: that.bnfId,
fileName: that.imgName,
}
this.imageType = imageInfoType
that.list.push(obj)
} else if (that.type == 'fileListOther') {
// 是其他
let type = '2'
@@ -1581,6 +1797,26 @@ export default {
}
}
},
//监听受益人影像list的变化控制下一步按钮是否可点击
bnfInfo: {
handler(val, oldval) {
console.log(val,'val监听到but')
console.log(oldval,'oldval监听到but')
let that = this
if(val.length > 0){
for (let index = 0; index < val.length; index++) {
let item = val[index]
that.isDisabledBnf = !this.checkBtnInfo(item)
if(this.checkBtnInfo(item) == false){
return false
}
}
}else if (val.length == 0){
that.isDisabledBnf = false
}
},
deep: true
}
},
components: {
[Cell.name]: Cell,

View File

@@ -861,31 +861,31 @@ export default {
return this.$toast('亲,请您核实投保人身份证件有效期~')
}
//不同证件类型的判断
// if (this.userInfo.idType) {
// //获取年龄
// let age = utilsAge.getAge(this.userInfo.birthday, new Date())
// console.log(age)
// //年龄在16-25周岁之间
// if (age >= 16 && age <= 25) {
// if (new Date(val).getFullYear() - new Date(this.userInfo.certificateValidate).getFullYear() != 10) {
// this.userInfo.certiexpiredate = ''
// this.$refs.certiexpiredate.date = ''
// return this.$toast('16周岁~25周岁的证件有效期为10年')
// }
// //年龄在26-45周岁之间
// } else if (age >= 26 && age <= 45) {
// if (new Date(val).getFullYear() - new Date(this.userInfo.certificateValidate).getFullYear() != 20) {
// this.userInfo.certiexpiredate = ''
// this.$refs.certiexpiredate.date = ''
// return this.$toast('26周岁~45周岁的证件有效期为20年')
// }
// //此外的年龄段不支持
// } else {
// this.userInfo.certiexpiredate = ''
// this.$refs.certiexpiredate.date = ''
// return this.$toast('身份证不支持此年龄段')
// }
// }
if (this.userInfo.idType) {
//获取年龄
let age = utilsAge.getAge(this.userInfo.birthday, new Date())
console.log(age)
//年龄在16-25周岁之间
if (age >= 16 && age <= 25) {
if (new Date(val).getFullYear() - new Date(this.userInfo.certificateValidate).getFullYear() != 10) {
this.userInfo.certiexpiredate = ''
this.$refs.certiexpiredate.date = ''
return this.$toast('16周岁~25周岁的证件有效期为10年')
}
//年龄在26-45周岁之间
} else if (age >= 26 && age <= 45) {
if (new Date(val).getFullYear() - new Date(this.userInfo.certificateValidate).getFullYear() != 20) {
this.userInfo.certiexpiredate = ''
this.$refs.certiexpiredate.date = ''
return this.$toast('26周岁~45周岁的证件有效期为20年')
}
//此外的年龄段不支持
} else {
this.userInfo.certiexpiredate = ''
this.$refs.certiexpiredate.date = ''
return this.$toast('身份证不支持此年龄段')
}
}
}
break
case '2':

View File

@@ -1064,28 +1064,28 @@ export default {
}
//不同证件类型的判断
// if (this.userInfo.idType) {
// //获取年龄
// let age = utilsAge.getAge(this.userInfo.birthday, new Date())
// //年龄在16-25周岁之间
// if (age >= 16 && age <= 25) {
// if (new Date(val).getFullYear() - new Date(this.userInfo.certificateValidate).getFullYear() != 10) {
// this.userInfo.certiexpiredate = ''
// this.$refs.certiexpiredate.date = ''
// return this.$toast('16周岁~25周岁的证件有效期为10年')
// }
// //年龄在26-45周岁之间
// } else if (age >= 26 && age <= 45) {
// if (new Date(val).getFullYear() - new Date(this.userInfo.certificateValidate).getFullYear() != 20) {
// this.userInfo.certiexpiredate = ''
// this.$refs.certiexpiredate.date = ''
// return this.$toast('26周岁~45周岁的证件有效期为20年')
// }
// //此外的年龄段不支持
// } else {
// return this.$toast('身份证不支持此年龄段')
// }
// }
if (this.userInfo.idType) {
//获取年龄
let age = utilsAge.getAge(this.userInfo.birthday, new Date())
//年龄在16-25周岁之间
if (age >= 16 && age <= 25) {
if (new Date(val).getFullYear() - new Date(this.userInfo.certificateValidate).getFullYear() != 10) {
this.userInfo.certiexpiredate = ''
this.$refs.certiexpiredate.date = ''
return this.$toast('16周岁~25周岁的证件有效期为10年')
}
//年龄在26-45周岁之间
} else if (age >= 26 && age <= 45) {
if (new Date(val).getFullYear() - new Date(this.userInfo.certificateValidate).getFullYear() != 20) {
this.userInfo.certiexpiredate = ''
this.$refs.certiexpiredate.date = ''
return this.$toast('26周岁~45周岁的证件有效期为20年')
}
//此外的年龄段不支持
} else {
return this.$toast('身份证不支持此年龄段')
}
}
}
break
case '2':