[fix]【更换人脸识别厂商】模拟签名文档时出现参数缺失问题bug

This commit is contained in:
yuweiqi
2020-05-28 10:26:25 +08:00
parent 6097a4958f
commit 120c44d80d

View File

@@ -403,26 +403,27 @@ export default {
this.changeCard = localStorage.getItem('changeCard')
this.relationToAppnt = this.$route.query.relationToAppnt
this.isShow = false
await this.getOrderDetail()
console.log('初始化this.appntSign ==', this.appntSign)
if (
(this.appntSignStatus == '3' && sessionStorage.getItem('shareCode') == '0') ||
(this.appntSignStatus == '3' && sessionStorage.getItem('shareCode') == '2')
) {
// this.$toast('签名成功,请联系业务员进行后续流程!')
Dialog.alert({ title: '提示', message: '签名成功,请联系业务员进行后续流程!' })
} else if (this.insuredSignStatus == '3' && sessionStorage.getItem('shareCode') == '1') {
Dialog.alert({ title: '提示', message: '签名成功,请联系业务员进行后续流程!' })
}
if (this.changeCard && this.appntSign.documentStatus == '1') {
Dialog.alert({ title: '提示', message: '确认完成,请联系业务员完成后续流程!' })
}
// localStorage['faceAuthWeXin-requestId'] localStorage['faceAuthWeXin-bizToken']--微信端人脸识别获取腾讯认证url接口获得认证相关参数
if (localStorage['faceAuthWeXin-requestId'] && localStorage['faceAuthWeXin-bizToken'] && this.$route.query.faceAuthCountWeixin != undefined) {
this.getRecognitionResult(JSON.parse(localStorage['faceAuthWeXin-requestId']), JSON.parse(localStorage['faceAuthWeXin-bizToken']))
}
this.getOrderDetail().then(() => {
setTimeout(() => {
console.log('初始化this.appntSign ==', this.appntSign)
if (
(this.appntSignStatus == '3' && sessionStorage.getItem('shareCode') == '0') ||
(this.appntSignStatus == '3' && sessionStorage.getItem('shareCode') == '2')
) {
// this.$toast('签名成功,请联系业务员进行后续流程!')
Dialog.alert({ title: '提示', message: '签名成功,请联系业务员进行后续流程!' })
} else if (this.insuredSignStatus == '3' && sessionStorage.getItem('shareCode') == '1') {
Dialog.alert({ title: '提示', message: '签名成功,请联系业务员进行后续流程!' })
}
if (this.changeCard && this.appntSign.documentStatus == '1') {
Dialog.alert({ title: '提示', message: '确认完成,请联系业务员完成后续流程!' })
}
// localStorage['faceAuthWeXin-requestId'] localStorage['faceAuthWeXin-bizToken']--微信端人脸识别获取腾讯认证url接口获得认证相关参数
if (localStorage['faceAuthWeXin-requestId'] && localStorage['faceAuthWeXin-bizToken'] && this.$route.query.faceAuthCountWeixin != undefined) {
this.getRecognitionResult(JSON.parse(localStorage['faceAuthWeXin-requestId']), JSON.parse(localStorage['faceAuthWeXin-bizToken']))
}
}, 5000)
})
if (sessionStorage.shareCode == '1') {
console.log('进来被保险人')
this.tipsName = JSON.parse(localStorage.saleInsuredPersonInfo).name
@@ -956,59 +957,60 @@ export default {
}
localStorage.setItem('riskName', '')
return new Promise(resolve => {
getOrderDetail(data).then(res => {
if (res.result == '0') {
//弹框展示是否有社保、赔付比例和免赔额信息
const isMedical = res.orderDTO.insuredDTOs[0].medical === '0'
const mainRiskCode = res.orderDTO.insuredDTOs[0].riskDTOLst[0].mainRiskCode
// const isShowDialog = mainRiskCode === 'GFRS_M0005' || mainRiskCode === 'GFRS_M0016'
const isShowDialog = mainRiskCode === 'GFRS_M0016'
if (
!!res.orderDTO.productDTO &&
!!res.orderDTO.productDTO.special &&
!!res.orderDTO.productDTO.special.content &&
res.orderDTO.productDTO.special.content !== ''
) {
// const message = res.orderDTO.productDTO.special.content
// Dialog({ message })
let content = res.orderDTO.productDTO.special.content
// {
// title: '标题',
// message: '内容',
// confirmButtonText: '确认',
// messageAlign: 'left'
// }
// title 需要标题则配置,不需要则不要配置
// message 内容,\n换行
// confirmButtonText确认按钮的文字
// messageAlign 对齐方式,固定左对齐,为'left'
try {
const config = JSON.parse(content)
config.message = '  ' + config.message
config.message = config.message.split('\\n').join('\n  ')
setTimeout(() => {
getOrderDetail(data).then(res => {
if (res.result == '0') {
//弹框展示是否有社保、赔付比例和免赔额信息
const isMedical = res.orderDTO.insuredDTOs[0].medical === '0'
const mainRiskCode = res.orderDTO.insuredDTOs[0].riskDTOLst[0].mainRiskCode
// const isShowDialog = mainRiskCode === 'GFRS_M0005' || mainRiskCode === 'GFRS_M0016'
const isShowDialog = mainRiskCode === 'GFRS_M0016'
if (
!!res.orderDTO.productDTO &&
!!res.orderDTO.productDTO.special &&
!!res.orderDTO.productDTO.special.content &&
res.orderDTO.productDTO.special.content !== ''
) {
// const message = res.orderDTO.productDTO.special.content
// Dialog({ message })
let content = res.orderDTO.productDTO.special.content
// {
// title: '', //需要标题则配置,不需要则不要配置
// message: '提示的主体文本',
// confirmButtonText: '确认按钮的问题',
// messageAlign: 'left' //对齐方式,左对齐
// title: '标题',
// message: '内容',
// confirmButtonText: '确认',
// messageAlign: 'left'
// }
Dialog(config)
} catch (error) {
const message = '  ' + content
Dialog({
message: message.split('\\n').join('\n  '),
confirmButtonText: '本人已阅读并同意上述特别约定内容',
messageAlign: 'left'
})
// title 需要标题则配置,不需要则不要配置
// message 内容,\n换行
// confirmButtonText确认按钮的文字
// messageAlign 对齐方式,固定左对齐,为'left'
try {
const config = JSON.parse(content)
config.message = '  ' + config.message
config.message = config.message.split('\\n').join('\n  ')
// {
// title: '', //需要标题则配置,不需要则不要配置
// message: '提示的主体文本',
// confirmButtonText: '确认按钮的问题',
// messageAlign: 'left' //对齐方式,左对齐
// }
Dialog(config)
} catch (error) {
const message = '  ' + content
Dialog({
message: message.split('\\n').join('\n  '),
confirmButtonText: '本人已阅读并同意上述特别约定内容',
messageAlign: 'left'
})
}
// const message = '  ' + res.orderDTO.productDTO.special.content
// Dialog({
// message: message.split('\\n').join('\n  '),
// confirmButtonText: '本人已阅读并同意上述特别约定内容',
// messageAlign: 'left'
// })
}
// const message = '  ' + res.orderDTO.productDTO.special.content
// Dialog({
// message: message.split('\\n').join('\n  '),
// confirmButtonText: '本人已阅读并同意上述特别约定内容',
// messageAlign: 'left'
// })
}
/* if (isShowDialog) {
/* if (isShowDialog) {
//记录每次弹框的订单号。再次进入页面,订单号改变才会弹窗。
let lastOrderNo = localStorage.lastOrderNo
if (lastOrderNo !== data.orderNo) {
@@ -1029,71 +1031,72 @@ export default {
Dialog({ message })
}
}*/
localStorage.setItem('lastOrderNo', data.orderNo)
localStorage.setItem('AppntidType', res.orderDTO.appntDTO.idType)
this.$toast.clear()
this.$utils.intLocalStorage(res)
// 获取被保险人信息recmd
this.saleInsuredPersonInfo = JSON.parse(window.localStorage.getItem('saleInsuredPersonInfo'))
// 获取投保人信息
this.saleInsuredInfo = JSON.parse(window.localStorage.getItem('saleInsuredInfo'))
this.relationToAppnt = this.saleInsuredPersonInfo.relationToAppnt //将缓存中的与被保险人关系赋值给页面
this.riskName = res.orderDTO.insuredDTOs[0].riskDTOLst[0].riskName
localStorage.riskName = this.riskName
that.recmd = res.orderDTO.recmdDTO
that.orderInfo = res.orderDTO.orderInfoDTO
that.insured = res.orderDTO.insuredDTOs
//存code区分万能型产品
localStorage.setItem('productCode', that.insured[0].riskDTOLst[0].mainRiskCode)
// nsuredDTOs[0].riskDTOLst
if (this.relationToAppnt != '1') {
this.activeNames.push(res.orderDTO.insuredDTOs.length + 1)
} else {
this.activeNames.push('1')
}
that.appnt = res.orderDTO.appntDTO
that.date = res.orderDTO.orderInfoDTO.appntDateLabel
res.orderDTO.ebizSignDTOS.map(item => {
if (item.signType == '0' || item.signType == '2') {
if (!localStorage.changeCard) {
if (item.documentCode != '5') {
that.appntSign.push(item) //投保
that.addKey(item)
localStorage.setItem('lastOrderNo', data.orderNo)
localStorage.setItem('AppntidType', res.orderDTO.appntDTO.idType)
this.$toast.clear()
this.$utils.intLocalStorage(res)
// 获取被保险人信息recmd
this.saleInsuredPersonInfo = JSON.parse(window.localStorage.getItem('saleInsuredPersonInfo'))
// 获取投保人信息
this.saleInsuredInfo = JSON.parse(window.localStorage.getItem('saleInsuredInfo'))
this.relationToAppnt = this.saleInsuredPersonInfo.relationToAppnt //将缓存中的与被保险人关系赋值给页面
this.riskName = res.orderDTO.insuredDTOs[0].riskDTOLst[0].riskName
localStorage.riskName = this.riskName
that.recmd = res.orderDTO.recmdDTO
that.orderInfo = res.orderDTO.orderInfoDTO
that.insured = res.orderDTO.insuredDTOs
//存code区分万能型产品
localStorage.setItem('productCode', that.insured[0].riskDTOLst[0].mainRiskCode)
// nsuredDTOs[0].riskDTOLst
if (this.relationToAppnt != '1') {
this.activeNames.push(res.orderDTO.insuredDTOs.length + 1)
} else {
this.activeNames.push('1')
}
that.appnt = res.orderDTO.appntDTO
that.date = res.orderDTO.orderInfoDTO.appntDateLabel
res.orderDTO.ebizSignDTOS.map(item => {
if (item.signType == '0' || item.signType == '2') {
if (!localStorage.changeCard) {
if (item.documentCode != '5') {
that.appntSign.push(item) //投保
that.addKey(item)
}
} else {
//阅读授权书
if (item.documentCode == '5') {
that.appntSign = item //投保
}
}
} else {
//阅读授权书
if (item.documentCode == '5') {
that.appntSign = item //投保
that.insuredSign.push(item) //被保
}
})
if (!that.changeCard) {
//将投保人数组排序
that.appntSign.sort(function(a, b) {
return a.key - b.key
})
//获取投保和被保险人电子投保单签字状态
that.appntSign.map(item => {
// 判断是否双录
if (item.documentCode == '6') {
localStorage.doubleRecordFlag = '1'
}
}
} else {
that.insuredSign.push(item) //被保
if (item.documentCode == '2') {
that.appntSignStatus = item.documentStatus
}
})
that.insuredSign.map(item => {
if (item.documentCode == '2') {
that.insuredSignStatus = item.documentStatus
}
})
}
})
if (!that.changeCard) {
//将投保人数组排序
that.appntSign.sort(function(a, b) {
return a.key - b.key
})
//获取投保和被保险人电子投保单签字状态
that.appntSign.map(item => {
// 判断是否双录
if (item.documentCode == '6') {
localStorage.doubleRecordFlag = '1'
}
if (item.documentCode == '2') {
that.appntSignStatus = item.documentStatus
}
})
that.insuredSign.map(item => {
if (item.documentCode == '2') {
that.insuredSignStatus = item.documentStatus
}
})
resolve('success')
}
resolve('success')
}
})
})
}, 5000)
})
},
//自定义key值排序用