附件上传受益人证件上传失败数据清空

(cherry picked from commit 5b22441468)
This commit is contained in:
liu.xiaofeng@ebiz-digits.com
2023-06-20 15:17:56 +08:00
parent e0abe58b22
commit 201df94f58

View File

@@ -1037,347 +1037,389 @@ export default {
// console.log(res) // console.log(res)
if (res.result == '0') { if (res.result == '0') {
this.$toast.clear() this.$toast.clear()
// res.responseObject.imgList.map(item => { if(res.path){
if ( if (
that.type == 'fileListIdFront' || that.type == 'fileListIdFront' ||
that.type == 'fileListIdBack' || that.type == 'fileListIdBack' ||
that.type == 'fileLIstImg' || that.type == 'fileLIstImg' ||
that.type == 'fileListBank' || that.type == 'fileListBank' ||
// that.type == 'fileListBankBack' || // that.type == 'fileListBankBack' ||
that.type == 'fileListNotify' || that.type == 'fileListNotify' ||
that.type == 'saleInsuredInfoOther' that.type == 'saleInsuredInfoOther'
) { ) {
// 是投保人 let imageInfoType = ''
// console.log(that.file) let name = ''
// 证件类型 // if (that.type == 'fileListIdFront' && that.id == '1') {
let imageInfoType = '' // imageInfoType = '1'
let name = '' // } else if (that.type == 'fileListIdBack' && that.id == '1') {
// if (that.type == 'fileListIdFront' && that.id == '1') { // imageInfoType = '2'
// imageInfoType = '1' // } else if (that.type == 'fileListBank') {
// } else if (that.type == 'fileListIdBack' && that.id == '1') { // imageInfoType = '3'
// imageInfoType = '2' // } else if (that.type == 'fileListIdFront' && that.id == '2') {
// } else if (that.type == 'fileListBank') { // imageInfoType = '5'
// imageInfoType = '3' // } else if (that.type == 'fileListIdBack' && that.id == '2') {
// } else if (that.type == 'fileListIdFront' && that.id == '2') { // imageInfoType = '6'
// imageInfoType = '5' // } else if (that.type == 'fileLIstImg' && that.id == '3') {
// } else if (that.type == 'fileListIdBack' && that.id == '2') { // imageInfoType = '7'
// imageInfoType = '6' // } else if (that.type == 'fileLIstImg' && that.id == '4') {
// } else if (that.type == 'fileLIstImg' && that.id == '3') { // imageInfoType = '8'
// imageInfoType = '7' // } else if (that.type == 'fileLIstImg' && that.id == '5') {
// } else if (that.type == 'fileLIstImg' && that.id == '4') { // imageInfoType = '9'
// imageInfoType = '8' // } else if (that.type == 'fileLIstImg' && that.id == '6') {
// } else if (that.type == 'fileLIstImg' && that.id == '5') { // imageInfoType = '10'
// imageInfoType = '9' // } else if (that.type == 'saleInsuredInfoOther' && that.id == '7') {
// } else if (that.type == 'fileLIstImg' && that.id == '6') { // imageInfoType = '11'
// imageInfoType = '10' // }
// } else if (that.type == 'saleInsuredInfoOther' && that.id == '7') { if (that.type == 'fileListIdFront' && that.id == '1') {
// imageInfoType = '11' //身份证正面
// } name = 'fileListIdFront'
if (that.type == 'fileListIdFront' && that.id == '1') { imageInfoType = '1'
//身份证正面 } else if (that.type == 'fileListIdBack' && that.id == '1') {
name = 'fileListIdFront' //身份证反面
imageInfoType = '1' name = 'fileListIdBack'
} else if (that.type == 'fileListIdBack' && that.id == '1') { imageInfoType = '2'
//身份证反面 } else if (that.type == 'fileListIdFront' && that.id == '2') {
name = 'fileListIdBack' //户口本正面
imageInfoType = '2' name = 'fileListIdFront'
} else if (that.type == 'fileListIdFront' && that.id == '2') { imageInfoType = '5'
//户口本正面 } else if (that.type == 'fileListIdBack' && that.id == '2') {
name = 'fileListIdFront' //户口本反面
imageInfoType = '5' name = 'fileListIdBack'
} else if (that.type == 'fileListIdBack' && that.id == '2') { imageInfoType = '6'
//户口本反面 } else if (that.type == 'fileListIdFront' && that.id == '3') {
name = 'fileListIdBack' //出生证正面
imageInfoType = '6' name = 'fileListIdFront'
} else if (that.type == 'fileListIdFront' && that.id == '3') { imageInfoType = '7'
//出生证正面 } else if (that.type == 'fileListIdBack' && that.id == '3') {
name = 'fileListIdFront' //出生证反面
imageInfoType = '7' name = 'fileListIdBack'
} else if (that.type == 'fileListIdBack' && that.id == '3') { imageInfoType = '12'
//出生证反面 } else if (that.type == 'fileLIstImg' && that.id == '4') {
name = 'fileListIdBack' //护照面
imageInfoType = '12' name = 'fileLIstImg'
} else if (that.type == 'fileLIstImg' && that.id == '4') { imageInfoType = '8'
//护照面 } else if (that.type == 'fileListIdFront' && that.id == '5') {
name = 'fileLIstImg' //港澳居民来往内地通行证正面
imageInfoType = '8' name = 'fileListIdFront'
} else if (that.type == 'fileListIdFront' && that.id == '5') { imageInfoType = '9'
//港澳居民来往内地通行证正面 } else if (that.type == 'fileListIdBack' && that.id == '5') {
name = 'fileListIdFront' //港澳居民来往内地通行证反面
imageInfoType = '9' name = 'fileListIdBack'
} else if (that.type == 'fileListIdBack' && that.id == '5') { imageInfoType = '13'
//港澳居民来往内地通行证反面 } else if (that.type == 'fileListIdFront' && that.id == '6') {
name = 'fileListIdBack' //台湾居民来往大陆通行证正面
imageInfoType = '13' name = 'fileListIdFront'
} else if (that.type == 'fileListIdFront' && that.id == '6') { imageInfoType = '10'
//台湾居民来往大陆通行证正面 } else if (that.type == 'fileListIdBack' && that.id == '6') {
name = 'fileListIdFront' //台湾居民来往大陆通行证反面
imageInfoType = '10' name = 'fileListIdBack'
} else if (that.type == 'fileListIdBack' && that.id == '6') { imageInfoType = '14'
//台湾居民来往大陆通行证反面 } else if (that.type == 'fileListIdFront' && that.id == '8') {
name = 'fileListIdBack' //外国人永久居留身份证正面
imageInfoType = '14' name = 'fileListIdFront'
} else if (that.type == 'fileListIdFront' && that.id == '8') { imageInfoType = '15'
//外国人永久居留身份证正面 } else if (that.type == 'fileListIdBack' && that.id == '8') {
name = 'fileListIdFront' //外国人永久居留身份证反面
imageInfoType = '15' name = 'fileListIdBack'
} else if (that.type == 'fileListIdBack' && that.id == '8') { imageInfoType = '16'
//外国人永久居留身份证反面 } else if (that.type == 'fileListIdFront' && that.id == '9') {
name = 'fileListIdBack' //港澳台居民居住证正面
imageInfoType = '16' name = 'fileListIdFront'
} else if (that.type == 'fileListIdFront' && that.id == '9') { imageInfoType = '17'
//港澳台居民居住证正面 } else if (that.type == 'fileListIdBack' && that.id == '9') {
name = 'fileListIdFront' //港澳台居民居住证反面
imageInfoType = '17' name = 'fileListIdBack'
} else if (that.type == 'fileListIdBack' && that.id == '9') { imageInfoType = '18'
//港澳台居民居住证反面 } else if (that.type == 'fileListBank') {
name = 'fileListIdBack' //银行卡正面
imageInfoType = '18' name = 'fileListBank'
} else if (that.type == 'fileListBank') { imageInfoType = '3'
//银行卡正面 // } else if (that.type == 'fileListBankBack') {
name = 'fileListBank' // //银行卡反面
imageInfoType = '3' // imageInfoType = '19'
// } else if (that.type == 'fileListBankBack') { } else if (that.type == 'fileListNotify') {
// //银行卡反面 name = 'fileListNotify'
// imageInfoType = '19' imageInfoType = '24'
}
let obj = {
name: name,
businessNo: that.orderNo,
businessType: '',
imageInfoType: imageInfoType,
// window.localStorage.setItem('bankCardUrlInsuredPath', encodeURI(JSON.parse(data).path).replace(/\+/g, '%2B'))
rgssUrl: encodeURI(res.path).replace(/\+/g, '%2B'),
subBusinessType: '0',
subBusinessNo: that.saleInsuredInfo.appntId,
fileName: that.imgName,
}
this.imageType = imageInfoType
that.list.push(obj)
} else if (
that.type == 'fileListIdFrontInsured' ||
that.type == 'fileListIdBackInsured' ||
that.type == 'fileListBankInsured' ||
that.type == 'fileLIstImgInsured' ||
that.type == 'fileListNotifyInsured' ||
that.type == 'saleInsuredPersonInfoOther'
) {
// 是被保险人
// 证件类型
let imageInfoType = ''
let name = ''
if (that.type == 'fileListIdFrontInsured' && that.id == '1') {
name = 'fileListIdFrontInsured'
imageInfoType = '1'
} else if (that.type == 'fileListIdBackInsured' && that.id == '1') {
name = 'fileListIdBackInsured'
imageInfoType = '2'
} else if (that.type == 'fileListIdFrontInsured' && that.id == '2') {
name = 'fileListIdFrontInsured'
imageInfoType = '5'
} else if (that.type == 'fileListIdBackInsured' && that.id == '2') {
name = 'fileListIdBackInsured'
imageInfoType = '6'
} else if (that.type == 'fileListIdFrontInsured' && that.id == '3') {
name = 'fileListIdFrontInsured'
imageInfoType = '7'
} else if (that.type == 'fileListIdBackInsured' && that.id == '3') {
name = 'fileListIdBackInsured'
imageInfoType = '12'
} else if (that.type == 'fileLIstImgInsured' && that.id == '4') {
name = 'fileLIstImgInsured'
imageInfoType = '8'
} else if (that.type == 'fileListIdFrontInsured' && that.id == '5') {
name = 'fileListIdFrontInsured'
imageInfoType = '9'
} else if (that.type == 'fileListIdBackInsured' && that.id == '5') {
name = 'fileListIdBackInsured'
imageInfoType = '13'
} else if (that.type == 'fileListIdFrontInsured' && that.id == '6') {
name = 'fileListIdFrontInsured'
imageInfoType = '10'
} else if (that.type == 'fileListIdBackInsured' && that.id == '6') {
name = 'fileListIdBackInsured'
imageInfoType = '14'
} else if (that.type == 'fileListIdFrontInsured' && that.id == '8') {
name = 'fileListIdFrontInsured'
imageInfoType = '15'
} else if (that.type == 'fileListIdBackInsured' && that.id == '8') {
name = 'fileListIdBackInsured'
imageInfoType = '16'
} else if (that.type == 'fileListIdFrontInsured' && that.id == '9') {
name = 'fileListIdFrontInsured'
imageInfoType = '17'
} else if (that.type == 'fileListIdBackInsured' && that.id == '9') {
name = 'fileListIdBackInsured'
imageInfoType = '18'
} else if (that.type == 'fileListNotifyInsured') {
name = 'fileListNotifyInsured'
imageInfoType = '24'
}
let obj = {
name: name,
businessNo: that.orderNo,
businessType: '',
imageInfoType: imageInfoType,
rgssUrl: encodeURI(res.path).replace(/\+/g, '%2B'),
subBusinessType: '1',
subBusinessNo: that.saleInsuredPersonInfo.insuredId,
fileName: that.imgName,
}
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'
let name = 'fileListOther'
let obj = {
name: name,
businessNo: that.orderNo,
businessType: name,
imageInfoType: '11',
rgssUrl: encodeURI(res.path).replace(/\+/g, '%2B'),
subBusinessType: type,
subBusinessNo: '',
fileName: that.imgName,
}
that.list.push(obj)
// } else if (that.type == 'fileListtypebeneficiary') {
// // 是受益人
// let type = '3'
// let obj = {
// businessNo: that.orderNo,
// businessType: '',
// imageInfoType: '21',
// rgssUrl: encodeURI(res.path).replace(/\+/g, '%2B'),
// subBusinessType: type,
// subBusinessNo: '',
// fileName: that.imgName
// }
// that.list.push(obj)
} else if (that.type == 'fileListNotify') { } else if (that.type == 'fileListNotify') {
name = 'fileListNotify' // 健康告知异常类资料
imageInfoType = '24' // let obj = {
} // name: 'fileListNotify',
let obj = { // businessNo: that.orderNo,
name: name, // businessType: '',
businessNo: that.orderNo, // imageInfoType: '24',
businessType: '', // rgssUrl: encodeURI(res.path).replace(/\+/g, '%2B'),
imageInfoType: imageInfoType, // subBusinessType: '0',
// window.localStorage.setItem('bankCardUrlInsuredPath', encodeURI(JSON.parse(data).path).replace(/\+/g, '%2B')) // subBusinessNo: '',
rgssUrl: encodeURI(res.path).replace(/\+/g, '%2B'), // fileName: that.imgName,
subBusinessType: '0', // }
subBusinessNo: that.saleInsuredInfo.appntId, // that.list.push(obj)
fileName: that.imgName,
}
this.imageType = imageInfoType
that.list.push(obj)
} else if (
that.type == 'fileListIdFrontInsured' ||
that.type == 'fileListIdBackInsured' ||
that.type == 'fileListBankInsured' ||
that.type == 'fileLIstImgInsured' ||
that.type == 'fileListNotifyInsured' ||
that.type == 'saleInsuredPersonInfoOther'
) {
// 是被保险人
// 证件类型
let imageInfoType = ''
let name = ''
if (that.type == 'fileListIdFrontInsured' && that.id == '1') {
name = 'fileListIdFrontInsured'
imageInfoType = '1'
} else if (that.type == 'fileListIdBackInsured' && that.id == '1') {
name = 'fileListIdBackInsured'
imageInfoType = '2'
} else if (that.type == 'fileListIdFrontInsured' && that.id == '2') {
name = 'fileListIdFrontInsured'
imageInfoType = '5'
} else if (that.type == 'fileListIdBackInsured' && that.id == '2') {
name = 'fileListIdBackInsured'
imageInfoType = '6'
} else if (that.type == 'fileListIdFrontInsured' && that.id == '3') {
name = 'fileListIdFrontInsured'
imageInfoType = '7'
} else if (that.type == 'fileListIdBackInsured' && that.id == '3') {
name = 'fileListIdBackInsured'
imageInfoType = '12'
} else if (that.type == 'fileLIstImgInsured' && that.id == '4') {
name = 'fileLIstImgInsured'
imageInfoType = '8'
} else if (that.type == 'fileListIdFrontInsured' && that.id == '5') {
name = 'fileListIdFrontInsured'
imageInfoType = '9'
} else if (that.type == 'fileListIdBackInsured' && that.id == '5') {
name = 'fileListIdBackInsured'
imageInfoType = '13'
} else if (that.type == 'fileListIdFrontInsured' && that.id == '6') {
name = 'fileListIdFrontInsured'
imageInfoType = '10'
} else if (that.type == 'fileListIdBackInsured' && that.id == '6') {
name = 'fileListIdBackInsured'
imageInfoType = '14'
} else if (that.type == 'fileListIdFrontInsured' && that.id == '8') {
name = 'fileListIdFrontInsured'
imageInfoType = '15'
} else if (that.type == 'fileListIdBackInsured' && that.id == '8') {
name = 'fileListIdBackInsured'
imageInfoType = '16'
} else if (that.type == 'fileListIdFrontInsured' && that.id == '9') {
name = 'fileListIdFrontInsured'
imageInfoType = '17'
} else if (that.type == 'fileListIdBackInsured' && that.id == '9') {
name = 'fileListIdBackInsured'
imageInfoType = '18'
} else if (that.type == 'fileListNotifyInsured') {
name = 'fileListNotifyInsured'
imageInfoType = '24'
} }
let obj = {
name: name,
businessNo: that.orderNo,
businessType: '',
imageInfoType: imageInfoType,
rgssUrl: encodeURI(res.path).replace(/\+/g, '%2B'),
subBusinessType: '1',
subBusinessNo: that.saleInsuredPersonInfo.insuredId,
fileName: that.imgName,
}
this.imageType = imageInfoType
that.list.push(obj)
} else if (
that.type == 'fileListIdFrontBeneficiary' ||
that.type == 'fileListIdBackBeneficiary' ||
that.type == 'fileLIstImgBeneficiary'
) {
// 是收益人
// 证件类型
let imageInfoType = '' let imgPath = res.path
let name = '' //只有身份证件才进行ocr校验
if(that.type == 'fileListIdFront' || that.type == 'fileListIdBack' || that.type == 'fileLIstImg' ||
if (that.type == 'fileListIdFrontBeneficiary' && that.id == '1') { that.type == 'fileListIdFrontInsured' || that.type == 'fileListIdBackInsured' || that.type == 'fileLIstImgInsured'
name = 'fileListIdFrontBeneficiary' || that.type == 'fileListIdFrontBeneficiary'|| that.type == 'fileListIdBackBeneficiary'){
imageInfoType = '1' if(that.id == '1' && this.imageType == '1' && that.type == 'fileListIdFront'){
} else if (that.type == 'fileListIdBackBeneficiary' && that.id == '1') { //投保人身份证正面
name = 'fileListIdBackBeneficiary' this.IDCardOCRValite(that.id, this.orderNo, imgPath, 'FRONT', 'appentFront')
imageInfoType = '2' }else if(that.id == '1' && this.imageType == '2' && that.type == 'fileListIdBack'){
} else if (that.type == 'fileListIdFrontBeneficiary' && that.id == '2') { //投保人身份证反面
name = 'fileListIdFrontBeneficiary' this.IDCardOCRValite(that.id, this.orderNo, imgPath, 'BACK', 'appentBack')
imageInfoType = '5' }else if(that.id == '1' && this.imageType == '1' && that.type == 'fileListIdFrontInsured'){
} else if (that.type == 'fileListIdBackBeneficiary' && that.id == '2') { //被保人身份证正面
name = 'fileListIdBackBeneficiary' this.IDCardOCRValite(that.id, this.orderNo, imgPath, 'FRONT', 'insuredFront')
imageInfoType = '6' }else if(that.id == '1' && this.imageType == '2' && that.type == 'fileListIdBackInsured'){
} else if (that.type == 'fileListIdFrontBeneficiary' && that.id == '3') { //被保人身份证反面
name = 'fileListIdFrontBeneficiary' this.IDCardOCRValite(that.id, this.orderNo, imgPath, 'BACK', 'insuredBack')
imageInfoType = '7' }else if(that.id == '1' && this.imageType == '1' && that.type == 'fileListIdFrontBeneficiary'){
} else if (that.type == 'fileListIdBackBeneficiary' && that.id == '3') { //受益人身份证正面
name = 'fileListIdBackBeneficiary' this.IDCardOCRValite(that.id, this.orderNo, imgPath, 'FRONT', 'beneficiaryFront')
imageInfoType = '12' }else if(that.id == '1' && this.imageType == '2' && that.type == 'fileListIdBackBeneficiary'){
} else if (that.type == 'fileLIstImgBeneficiary' && that.id == '4') { //受益人身份证反面
name = 'fileLIstImgBeneficiary' this.IDCardOCRValite(that.id, this.orderNo, imgPath, 'BACK', 'beneficiaryBack')
imageInfoType = '8' }else {
} else if (that.type == 'fileListIdFrontBeneficiary' && that.id == '5') { //其他素材(护照,户口本,港澳身份证等)
name = 'fileListIdFrontBeneficiary' this.IDCardOCRValite(that.id, this.orderNo, imgPath, "OTHER", '')
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'
} }
}else{
let obj = { switch (that.type) {
name: name, case 'fileListIdFront':
businessNo: that.orderNo, that.fileListIdFront = []
businessType: '', break
imageInfoType: imageInfoType, case 'fileListIdBack':
rgssUrl: encodeURI(res.path).replace(/\+/g, '%2B'), that.fileListIdBack = []
subBusinessType: '3', break
subBusinessNo: that.bnfId, case 'fileLIstImg':
fileName: that.imgName, that.fileLIstImg = []
break
case 'fileListBank':
that.fileListBank = []
break
case 'fileListOther':
that.fileListOther = []
break
case 'fileListIdFrontInsured':
that.fileListIdFrontInsured = []
break
case 'fileListIdBackInsured':
that.fileListIdBackInsured = []
break
case 'fileListBankInsured':
that.fileListBankInsured = []
break
case 'fileLIstImgInsured':
that.fileLIstImgInsured = []
break
case 'saleInsuredInfoOther':
that.saleInsuredInfoOther = []
break
case 'saleInsuredPersonInfoOther':
that.saleInsuredPersonInfoOther = []
break
case 'fileListIdFrontBeneficiary':
that.fileListIdFrontBeneficiary = []
break
case 'fileListIdBackBeneficiary':
that.fileListIdBackBeneficiary = []
break
case 'fileLIstImgBeneficiary':
that.fileLIstImgBeneficiary = []
break
} }
this.imageType = imageInfoType this.$toast.clear()
that.list.push(obj)
} else if (that.type == 'fileListOther') {
// 是其他
let type = '2'
let name = 'fileListOther'
let obj = {
name: name,
businessNo: that.orderNo,
businessType: name,
imageInfoType: '11',
rgssUrl: encodeURI(res.path).replace(/\+/g, '%2B'),
subBusinessType: type,
subBusinessNo: '',
fileName: that.imgName,
}
that.list.push(obj)
// } else if (that.type == 'fileListtypebeneficiary') {
// // 是受益人
// let type = '3'
// let obj = {
// businessNo: that.orderNo,
// businessType: '',
// imageInfoType: '21',
// rgssUrl: encodeURI(res.path).replace(/\+/g, '%2B'),
// subBusinessType: type,
// subBusinessNo: '',
// fileName: that.imgName
// }
// that.list.push(obj)
} else if (that.type == 'fileListNotify') {
// 健康告知异常类资料
// let obj = {
// name: 'fileListNotify',
// businessNo: that.orderNo,
// businessType: '',
// imageInfoType: '24',
// rgssUrl: encodeURI(res.path).replace(/\+/g, '%2B'),
// subBusinessType: '0',
// subBusinessNo: '',
// fileName: that.imgName,
// }
// that.list.push(obj)
} }
let imgPath = res.path
//只有身份证件才进行ocr校验
if(that.type == 'fileListIdFront' || that.type == 'fileListIdBack' || that.type == 'fileLIstImg' ||
that.type == 'fileListIdFrontInsured' || that.type == 'fileListIdBackInsured' || that.type == 'fileLIstImgInsured'
|| that.type == 'fileListIdFrontBeneficiary'|| that.type == 'fileListIdBackBeneficiary'){
if(that.id == '1' && this.imageType == '1' && that.type == 'fileListIdFront'){
//投保人身份证正面
this.IDCardOCRValite(that.id, this.orderNo, imgPath, 'FRONT', 'appentFront')
}else if(that.id == '1' && this.imageType == '2' && that.type == 'fileListIdBack'){
//投保人身份证反面
this.IDCardOCRValite(that.id, this.orderNo, imgPath, 'BACK', 'appentBack')
}else if(that.id == '1' && this.imageType == '1' && that.type == 'fileListIdFrontInsured'){
//被保人身份证正面
this.IDCardOCRValite(that.id, this.orderNo, imgPath, 'FRONT', 'insuredFront')
}else if(that.id == '1' && this.imageType == '2' && that.type == 'fileListIdBackInsured'){
//被保人身份证反面
this.IDCardOCRValite(that.id, this.orderNo, imgPath, 'BACK', 'insuredBack')
}else if(that.id == '1' && this.imageType == '1' && that.type == 'fileListIdFrontBeneficiary'){
//受益人身份证正面
this.IDCardOCRValite(that.id, this.orderNo, imgPath, 'FRONT', 'beneficiaryFront')
}else if(that.id == '1' && this.imageType == '2' && that.type == 'fileListIdBackBeneficiary'){
//受益人身份证反面
this.IDCardOCRValite(that.id, this.orderNo, imgPath, 'BACK', 'beneficiaryBack')
}else {
//其他素材(护照,户口本,港澳身份证等)
this.IDCardOCRValite(that.id, this.orderNo, imgPath, "OTHER", '')
}
}
} else { } else {
switch (that.type) { switch (that.type) {
case 'fileListIdFront': case 'fileListIdFront':
@@ -1413,6 +1455,15 @@ export default {
case 'saleInsuredPersonInfoOther': case 'saleInsuredPersonInfoOther':
that.saleInsuredPersonInfoOther = [] that.saleInsuredPersonInfoOther = []
break break
case 'fileListIdFrontBeneficiary':
that.fileListIdFrontBeneficiary = []
break
case 'fileListIdBackBeneficiary':
that.fileListIdBackBeneficiary = []
break
case 'fileLIstImgBeneficiary':
that.fileLIstImgBeneficiary = []
break
} }
this.$toast.clear() this.$toast.clear()
this.$toast(res.resultMessage) this.$toast(res.resultMessage)