点击加载事件恢复

This commit is contained in:
liu.xiaofeng@ebiz-digits.com
2023-09-07 11:25:30 +08:00
parent a024a67995
commit 151f793f99
11 changed files with 500 additions and 367 deletions

View File

@@ -131,19 +131,13 @@ export default {
}, },
// 获取签名状态 // 获取签名状态
getOrderDetail() { getOrderDetail() {
openLoading()
let that = this let that = this
let data = { let data = {
orderNo: that.$route.query.orderNo orderNo: that.$route.query.orderNo
} }
this.$toast.loading({
duration: 0, // 持续展示 toast
forbidClick: true, // 禁用背景点击
loadingType: 'spinner',
message: '加载中……'
})
return new Promise((resolve) => { return new Promise((resolve) => {
getOrderDetail1(data).then(res => { getOrderDetail1(data).then(res => {
this.$toast.clear()
if (res.result == '0') { if (res.result == '0') {
res.orderDTO.ebizSignDTOS.map(item => { res.orderDTO.ebizSignDTOS.map(item => {
if (item.signType == '0' || item.signType == '2') { if (item.signType == '0' || item.signType == '2') {

View File

@@ -2,6 +2,7 @@
<div class="insuranceInformation-container pb50 redRadioCheckbox"> <div class="insuranceInformation-container pb50 redRadioCheckbox">
<van-notice-bar :scrollable="false" v-if="!Time" class="notice">{{ `提示阅读时长需在${this.Time ? this.time : this.number}秒以上` }}</van-notice-bar> <van-notice-bar :scrollable="false" v-if="!Time" class="notice">{{ `提示阅读时长需在${this.Time ? this.time : this.number}秒以上` }}</van-notice-bar>
<iframe :src="src + pdfUrl" class="iframe"></iframe> <iframe :src="src + pdfUrl" class="iframe"></iframe>
<van-radio-group v-model="radio" class="pb10 pt20 pl30 fs14"> <van-radio-group v-model="radio" class="pb10 pt20 pl30 fs14">
<van-radio name="1" @click="click"> <van-radio name="1" @click="click">
本人确认已阅读 本人确认已阅读
@@ -74,7 +75,11 @@ export default {
[NoticeBar.name]: NoticeBar [NoticeBar.name]: NoticeBar
}, },
mounted() { mounted() {
let that = this
that.timeOut()
document.body.style.backgroundColor = '#fff' document.body.style.backgroundColor = '#fff'
},
async created() {
if (!this.isWeixin) { if (!this.isWeixin) {
setTimeout(() => { setTimeout(() => {
// eslint-disable-next-line no-undef // eslint-disable-next-line no-undef
@@ -93,33 +98,53 @@ export default {
if (this.isWeixin) { if (this.isWeixin) {
that.relationToAppnt = JSON.parse(this.$CacheUtils.getLocItem('saleInsuredPersonInfo')).relationToAppnt that.relationToAppnt = JSON.parse(this.$CacheUtils.getLocItem('saleInsuredPersonInfo')).relationToAppnt
} }
if (this.detailJump != '1') { if (this.detailJump != '1') {
// 投被保险人是否同人 // 投被保险人是否同人
that.relationToAppnt = JSON.parse(this.$CacheUtils.getLocItem('saleInsuredPersonInfo')).relationToAppnt that.relationToAppnt = JSON.parse(this.$CacheUtils.getLocItem('saleInsuredPersonInfo')).relationToAppnt
// 获取被保险人信息
// that.saleInsuredPersonInfo = JSON.parse(this.$CacheUtils.getLocItem('saleInsuredPersonInfo'))
} }
// if (this.detailJump != '1') {
// this.getOrderDetail()
// }
if (this.isWeixin) { if (this.isWeixin) {
let imgBase64Data = sessionStorage.getItem('twoimgBase64Data') let imgBase64Data = sessionStorage.getItem('twoimgBase64Data')
let wxSigned = JSON.parse(sessionStorage.getItem('twowxSigned')) let wxSigned = JSON.parse(sessionStorage.getItem('twowxSigned'))
// let wxSigned = false
let signInfo = JSON.parse(localStorage.getItem('signInfo')) let signInfo = JSON.parse(localStorage.getItem('signInfo'))
console.log('`````````````````````````````````')
console.log('imgBase64Data: twoimgBase64Data:' + imgBase64Data)
console.log('wxSigned: ' + wxSigned)
if (wxSigned) { if (wxSigned) {
console.log('第二次进入电子保单')
console.log('````````````````````````````````')
this.getOrderDetail().then(() => { this.getOrderDetail().then(() => {
this.Time = true this.Time = true
this.isOver = true this.isOver = true
this.radio = '1' this.radio = '1'
this.base64 = imgBase64Data this.base64 = imgBase64Data
this.isDisabledComplite = false this.isDisabledComplite = false
console.log('signInfo.status:' + signInfo.status)
if (signInfo.status == '0') { if (signInfo.status == '0') {
// this.appntSign.documentStatus = '3'
console.log('``````````````````')
//因签字后微信端签字面板无法返回状态,导致签字状态不变,下一步按钮无法点击 //因签字后微信端签字面板无法返回状态,导致签字状态不变,下一步按钮无法点击
this.$set(this.appntSign, 'documentStatus', '3') this.$set(this.appntSign, 'documentStatus', '3')
console.log('appntSign.documentStatus: ' + this.appntSign.documentStatus)
this.isSign = false this.isSign = false
this.isDisabledComplite = false this.isDisabledComplite = false
// this.isDisable = false
} else { } else {
this.$set(this.insuredSign, 'documentStatus', '3') this.$set(this.insuredSign, 'documentStatus', '3')
// this.insuredSign.documentStatus = '3'
this.isDisabledComplite = false this.isDisabledComplite = false
this.isSign = false this.isSign = false
} }
}) })
} else { } else {
console.log('第一次进入电子保单')
this.timeOut() this.timeOut()
this.getOrderDetail() this.getOrderDetail()
} }
@@ -129,10 +154,6 @@ export default {
this.getOrderDetail() this.getOrderDetail()
} }
} }
this.timeOut()
},
created() {
}, },
methods: { methods: {
appCallBack(data) { appCallBack(data) {
@@ -188,12 +209,6 @@ export default {
let data = { let data = {
orderNo: that.$route.query.orderNo orderNo: that.$route.query.orderNo
} }
this.$toast.loading({
duration: 0, // 持续展示 toast
forbidClick: true, // 禁用背景点击
loadingType: 'spinner',
message: '加载中……'
})
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
getOrderDetail(data).then(res => { getOrderDetail(data).then(res => {
if (res.result == '0') { if (res.result == '0') {

View File

@@ -74,11 +74,12 @@ export default {
[Dialog.name]: Dialog, [Dialog.name]: Dialog,
[NoticeBar.name]: NoticeBar [NoticeBar.name]: NoticeBar
}, },
created() { mounted() {
let that = this
}, that.timeOut()
async mounted() {
document.body.style.backgroundColor = '#fff' document.body.style.backgroundColor = '#fff'
},
async created() {
if (!this.isWeixin) { if (!this.isWeixin) {
setTimeout(() => { setTimeout(() => {
// eslint-disable-next-line no-undef // eslint-disable-next-line no-undef
@@ -97,32 +98,52 @@ export default {
if (this.isWeixin) { if (this.isWeixin) {
that.relationToAppnt = JSON.parse(this.$CacheUtils.getLocItem('saleInsuredPersonInfo')).relationToAppnt that.relationToAppnt = JSON.parse(this.$CacheUtils.getLocItem('saleInsuredPersonInfo')).relationToAppnt
} }
if (this.detailJump != '1') { if (this.detailJump != '1') {
// 投被保险人是否同人 // 投被保险人是否同人
that.relationToAppnt = JSON.parse(this.$CacheUtils.getLocItem('saleInsuredPersonInfo')).relationToAppnt that.relationToAppnt = JSON.parse(this.$CacheUtils.getLocItem('saleInsuredPersonInfo')).relationToAppnt
// 获取被保险人信息
// that.saleInsuredPersonInfo = JSON.parse(this.$CacheUtils.getLocItem('saleInsuredPersonInfo'))
} }
// if (this.detailJump != '1') {
// this.getOrderDetail()
// }
if (this.isWeixin) { if (this.isWeixin) {
let imgBase64Data = sessionStorage.getItem('twoimgBase64Data') let imgBase64Data = sessionStorage.getItem('twoimgBase64Data')
let wxSigned = JSON.parse(sessionStorage.getItem('twowxSigned')) let wxSigned = JSON.parse(sessionStorage.getItem('twowxSigned'))
// let wxSigned = false
let signInfo = JSON.parse(localStorage.getItem('signInfo')) let signInfo = JSON.parse(localStorage.getItem('signInfo'))
console.log('`````````````````````````````````')
console.log('imgBase64Data: twoimgBase64Data:' + imgBase64Data)
console.log('wxSigned: ' + wxSigned)
if (wxSigned) { if (wxSigned) {
console.log('第二次进入电子保单')
console.log('````````````````````````````````')
this.getOrderDetail().then(() => { this.getOrderDetail().then(() => {
this.Time = true this.Time = true
this.isOver = true this.isOver = true
this.radio = '1' this.radio = '1'
this.base64 = imgBase64Data this.base64 = imgBase64Data
this.isDisabledComplite = false this.isDisabledComplite = false
console.log('signInfo.status:' + signInfo.status)
if (signInfo.status == '0') { if (signInfo.status == '0') {
// this.appntSign.documentStatus = '3'
console.log('``````````````````')
this.$set(this.appntSign, 'documentStatus', '3') this.$set(this.appntSign, 'documentStatus', '3')
console.log('appntSign.documentStatus: ' + this.appntSign.documentStatus)
this.isSign = false this.isSign = false
this.isDisabledComplite = false this.isDisabledComplite = false
// this.isDisable = false
} else { } else {
this.$set(this.insuredSign, 'documentStatus', '3') this.$set(this.insuredSign, 'documentStatus', '3')
// this.insuredSign.documentStatus = '3'
this.isDisabledComplite = false this.isDisabledComplite = false
this.isSign = false this.isSign = false
} }
}) })
} else { } else {
console.log('第一次进入电子保单')
this.timeOut() this.timeOut()
this.getOrderDetail() this.getOrderDetail()
} }
@@ -132,7 +153,6 @@ export default {
this.getOrderDetail() this.getOrderDetail()
} }
} }
this.timeOut()
}, },
methods: { methods: {
appCallBack(data) { appCallBack(data) {

View File

@@ -83,70 +83,89 @@ export default {
[Dialog.name]: Dialog, [Dialog.name]: Dialog,
[NoticeBar.name]: NoticeBar [NoticeBar.name]: NoticeBar
}, },
created() { mounted() {
},
async mounted() {
let that = this let that = this
that.timeOut()
document.body.style.backgroundColor = '#fff' document.body.style.backgroundColor = '#fff'
},
async created() {
// 当前代理人渠道--个险渠道,中介渠道 // 当前代理人渠道--个险渠道,中介渠道
let dataReturn = await riskRules.getAgentInfoFunc(this) let dataReturn = await riskRules.getAgentInfoFunc(this)
this.branchTypeVal = dataReturn.branchTypeVal this.branchTypeVal = dataReturn.branchTypeVal
if (!that.isWeixin) { if (!this.isWeixin) {
setTimeout(() => { setTimeout(() => {
// eslint-disable-next-line no-undef // eslint-disable-next-line no-undef
EWebBridge.webCallAppInJs('webview_left_button', { EWebBridge.webCallAppInJs('webview_left_button', {
img: that.$assetsUrl + 'images/del-close-btn@3x.png', img: this.$assetsUrl + 'images/del-close-btn@3x.png',
intercept: '1' //是否拦截原生返回事件 1是 其他否 intercept: '1' //是否拦截原生返回事件 1是 其他否
}) })
}, 100) }, 100)
window.appCallBack = that.appCallBack window.appCallBack = this.appCallBack
} }
let that = this
that.detailJump = window.localStorage.getItem('detailJump') that.detailJump = window.localStorage.getItem('detailJump')
that.signVal = window.localStorage.getItem('sign-val') that.signVal = window.localStorage.getItem('sign-val')
// 获取投保人信息 // 获取投保人信息
that.saleInsuredInfo = JSON.parse(that.$CacheUtils.getLocItem('saleInsuredInfo')) that.saleInsuredInfo = JSON.parse(this.$CacheUtils.getLocItem('saleInsuredInfo'))
if (that.isWeixin) { if (this.isWeixin) {
that.relationToAppnt = JSON.parse(that.$CacheUtils.getLocItem('saleInsuredPersonInfo')).relationToAppnt that.relationToAppnt = JSON.parse(this.$CacheUtils.getLocItem('saleInsuredPersonInfo')).relationToAppnt
} }
if (that.detailJump != '1') { if (this.detailJump != '1') {
// 投被保险人是否同人 // 投被保险人是否同人
that.relationToAppnt = JSON.parse(that.$CacheUtils.getLocItem('saleInsuredPersonInfo')).relationToAppnt that.relationToAppnt = JSON.parse(this.$CacheUtils.getLocItem('saleInsuredPersonInfo')).relationToAppnt
// 获取被保险人信息
// that.saleInsuredPersonInfo = JSON.parse(this.$CacheUtils.getLocItem('saleInsuredPersonInfo'))
} }
// if (this.detailJump != '1') {
// this.getOrderDetail()
// }
if (this.isWeixin) { if (this.isWeixin) {
let imgBase64Data = sessionStorage.getItem('twoimgBase64Data') let imgBase64Data = sessionStorage.getItem('twoimgBase64Data')
let wxSigned = JSON.parse(sessionStorage.getItem('twowxSigned')) let wxSigned = JSON.parse(sessionStorage.getItem('twowxSigned'))
// let wxSigned = false
let signInfo = JSON.parse(localStorage.getItem('signInfo')) let signInfo = JSON.parse(localStorage.getItem('signInfo'))
console.log('`````````````````````````````````')
console.log('imgBase64Data: twoimgBase64Data:' + imgBase64Data)
console.log('wxSigned: ' + wxSigned)
if (wxSigned) { if (wxSigned) {
that.getOrderDetail().then(() => { console.log('第二次进入电子保单')
that.Time = true console.log('````````````````````````````````')
that.isOver = true this.getOrderDetail().then(() => {
that.radio = '1' this.Time = true
that.base64 = imgBase64Data this.isOver = true
that.isDisabledComplite = false this.radio = '1'
this.base64 = imgBase64Data
this.isDisabledComplite = false
console.log('signInfo.status:' + signInfo.status)
if (signInfo.status == '0') { if (signInfo.status == '0') {
that.$set(that.appntSign, 'documentStatus', '3') // this.appntSign.documentStatus = '3'
that.isSign = false console.log('``````````````````')
that.isDisabledComplite = false this.$set(this.appntSign, 'documentStatus', '3')
console.log('appntSign.documentStatus: ' + this.appntSign.documentStatus)
this.isSign = false
this.isDisabledComplite = false
// this.isDisable = false
} else { } else {
that.$set(that.insuredSign, 'documentStatus', '3') this.$set(this.insuredSign, 'documentStatus', '3')
that.isDisabledComplite = false // this.insuredSign.documentStatus = '3'
that.isSign = false this.isDisabledComplite = false
this.isSign = false
} }
}) })
} else { } else {
that.timeOut() console.log('第一次进入电子保单')
that.getOrderDetail() this.timeOut()
this.getOrderDetail()
} }
} else { } else {
that.timeOut() this.timeOut()
if (that.detailJump != '1') { if (this.detailJump != '1') {
that.getOrderDetail() this.getOrderDetail()
} }
} }
that.timeOut()
}, },
methods: { methods: {
appCallBack(data) { appCallBack(data) {
@@ -202,15 +221,8 @@ export default {
let data = { let data = {
orderNo: that.$route.query.orderNo orderNo: that.$route.query.orderNo
} }
this.$toast.loading({
duration: 0, // 持续展示 toast
forbidClick: true, // 禁用背景点击
loadingType: 'spinner',
message: '加载中……'
})
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
getOrderDetail(data).then(res => { getOrderDetail(data).then(res => {
this.$toast.clear()
if (res.result == '0') { if (res.result == '0') {
if(res.orderDTO.universalRiskNotifyDTO && res.orderDTO.universalRiskNotifyDTO.isUniversalRiskNotifyShowPoint){ if(res.orderDTO.universalRiskNotifyDTO && res.orderDTO.universalRiskNotifyDTO.isUniversalRiskNotifyShowPoint){
this.isUniversalRiskNotifyShowPoint = res.orderDTO.universalRiskNotifyDTO.isUniversalRiskNotifyShowPoint this.isUniversalRiskNotifyShowPoint = res.orderDTO.universalRiskNotifyDTO.isUniversalRiskNotifyShowPoint

View File

@@ -56,10 +56,9 @@ export default {
[NoticeBar.name]: NoticeBar [NoticeBar.name]: NoticeBar
}, },
created() { created() {
this.init()
}, },
async mounted() { mounted() {
await this.init()
let readingType = localStorage.getItem('readingProtocolType') let readingType = localStorage.getItem('readingProtocolType')
if (readingType && readingType === '1') { if (readingType && readingType === '1') {
this.protocol = true this.protocol = true
@@ -87,7 +86,7 @@ export default {
} }
}, },
methods: { methods: {
init(){ async init(){
this.getOrderDetail() this.getOrderDetail()
}, },
timeOut() { timeOut() {
@@ -111,18 +110,11 @@ export default {
// 获取PDF的路径 // 获取PDF的路径
getOrderDetail() { getOrderDetail() {
let that = this let that = this
this.$toast.loading({
duration: 0, // 持续展示 toast
forbidClick: true, // 禁用背景点击
loadingType: 'spinner',
message: '加载中……'
})
let data = { let data = {
orderNo: that.$route.query.orderNo orderNo: that.$route.query.orderNo
} }
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
getOrderDetail(data).then(res => { getOrderDetail(data).then(res => {
this.$toast.clear()
if (res.result == '0') { if (res.result == '0') {
res.orderDTO.ebizSignDTOS.map(item => { res.orderDTO.ebizSignDTOS.map(item => {
if (item.documentCode == '12') { if (item.documentCode == '12') {

View File

@@ -458,7 +458,6 @@ export default {
this.relationToAppnt = this.$route.query.relationToAppnt this.relationToAppnt = this.$route.query.relationToAppnt
this.isShow = false this.isShow = false
await this.getOrderDetail() await this.getOrderDetail()
console.log('初始化this.appntSign ==', this.appntSign)
if ( if (
(this.appntSignStatus == '3' && sessionStorage.getItem('shareCode') == '0') || (this.appntSignStatus == '3' && sessionStorage.getItem('shareCode') == '0') ||
(this.appntSignStatus == '3' && sessionStorage.getItem('shareCode') == '2') (this.appntSignStatus == '3' && sessionStorage.getItem('shareCode') == '2')
@@ -657,6 +656,27 @@ export default {
}, },
// 人脸识别 // 人脸识别
async start_ocr(val) { async start_ocr(val) {
// val 0投保人 1被保险人 2本人
// return this.$dialog
// .alert({
// className: 'dialog-alert',
// title: '提示',
// message: '为维护您的合法权益,请您务必认真观看防范销售误导视频。',
// confirmButtonColor: '#ee0a24',
// confirmButtonText: '确认'
// })
// .then(() => {
// this.$jump({
// flag: 'navigation',
// extra: {
// title: '防范销售误导',
// hiddenRight: '1'
// }
// })
// this.videoShow = true
// this.isVideo = true
// this.isVideoUrl = 'goUrl'
// })
console.log('人脸识别') console.log('人脸识别')
console.log(val) console.log(val)
let that = this let that = this
@@ -667,10 +687,9 @@ export default {
//idtype不为身份证跳过人脸识别 //idtype不为身份证跳过人脸识别
if (JSON.parse(this.$CacheUtils.getLocItem('saleInsuredInfo')).idType != '1') { if (JSON.parse(this.$CacheUtils.getLocItem('saleInsuredInfo')).idType != '1') {
that.goUrl() that.goUrl()
} } else {
else {
// 白名单校验 // 白名单校验
let res = await getWhitelist({ const res = await getWhitelist({
idNo: this.saleInsuredInfo.idNo, idNo: this.saleInsuredInfo.idNo,
name: this.saleInsuredInfo.name, name: this.saleInsuredInfo.name,
whiteType: 'sale_face_show' whiteType: 'sale_face_show'
@@ -688,16 +707,9 @@ export default {
//RID 状态--有效 //RID 状态--有效
if (this.realPeopleRidInfo.appntRidFlag && this.realPeopleRidInfo.appntRidFlag == '0') { if (this.realPeopleRidInfo.appntRidFlag && this.realPeopleRidInfo.appntRidFlag == '0') {
// 手机号鉴权 --通过 // 手机号鉴权 --通过
let insuredData = JSON.parse(this.$CacheUtils.getLocItem('saleInsuredPersonInfo')) let res = await this.realPeopleCheckMobile('appnt')
let data = { if (res && res.result == '0') {
name: insuredData.name, that.goUrl()
idType: insuredData.idType,
idNo: insuredData.idNo,
mobile: insuredData.mobile
}
let res1 = await checkPhone(data)
if (res1 && res1.result == '0') {
that.insuredUrl()
return return
} }
} }
@@ -727,7 +739,7 @@ export default {
that.insuredUrl() that.insuredUrl()
} else { } else {
// 白名单校验 // 白名单校验
let res = await getWhitelist({ const res = await getWhitelist({
idNo: this.saleInsuredPersonInfo.idNo, idNo: this.saleInsuredPersonInfo.idNo,
name: this.saleInsuredPersonInfo.name, name: this.saleInsuredPersonInfo.name,
whiteType: 'sale_face_show' whiteType: 'sale_face_show'
@@ -779,7 +791,7 @@ export default {
} }
} }
// 白名单校验 // 白名单校验
let res = await getWhitelist({ const res = await getWhitelist({
idNo: this.saleInsuredInfo.idNo, idNo: this.saleInsuredInfo.idNo,
name: this.saleInsuredInfo.name, name: this.saleInsuredInfo.name,
whiteType: 'sale_face_show' whiteType: 'sale_face_show'
@@ -1746,18 +1758,9 @@ export default {
}) })
}, },
getRecognitionResult(requestId, bizToken) { getRecognitionResult(requestId, bizToken) {
this.$toast.loading({
// 持续展示 toast
duration: 0,
// 禁用背景点击s
forbidClick: true,
loadingType: 'spinner',
message: '加载中……'
})
return new Promise(() => { return new Promise(() => {
getRecognitionResult({ requestId, bizToken }).then( getRecognitionResult({ requestId, bizToken }).then(
(res) => { (res) => {
this.$toast.clear()
if (res.result == '0') { if (res.result == '0') {
this.recognizeResult = res.result this.recognizeResult = res.result
} else { } else {

View File

@@ -881,8 +881,147 @@ export default {
} }
} }
}, },
created() { async created() {
let data = {
orderNo: this.$route.query.orderNo
}
getOrderDetail(data).then(res => {
if (res.result == '0') {
let array = []
res.orderDTO.ebizSignDTOS.map(item => {
array.push(item.documentCode)
})
this.isPersonalInformation = array.findIndex(item => item === '12')
}
})
if (!this.isWeixin) {
setTimeout(() => {
// eslint-disable-next-line no-undef
EWebBridge.webCallAppInJs('webview_left_button', {
img: this.$assetsUrl + 'images/del-close-btn@3x.png',
intercept: '1' //是否拦截原生返回事件 1是 其他否
})
}, 100)
window.appCallBack = this.appCallBack
}
let that = this
// 获取当前时间的时间戳
// var day2 = new Date()
// var day = day2.setTime(day2.getTime())
// console.log(day)
// console.log(new Date('2020-01-01 23:59:59').getTime())
// if (day > new Date('2020-01-01 23:59:59').getTime()) {
// this.dayShow = true
// }
// 获取产品编码
// this.chooseProductCodes = JSON.parse(localStorage.chooseProductCodes)
that.detailJump = window.localStorage.getItem('detailJump')
if (this.detailJump == '1') {
this.pdfUrl = encodeURIComponent(config.imgDomain + `/returnDirectStream?imgPath=${localStorage.getItem('insurance-policyUrl')}`)
}
that.signVal = window.localStorage.getItem('sign-val')
// 判断是不是万能险
let comment = window.localStorage.getItem('productCode')
// if (comment == 'GFRS_M0003') {
if (comment == 'GFRS_M0003' || comment == 'GFRS_M0015' || comment == 'GFRS_M0017') {
this.isComment = true
}
// 获取投保人信息
that.saleInsuredInfo = JSON.parse(this.$CacheUtils.getLocItem('saleInsuredInfo'))
// 在微信
if (this.isWeixin) {
// 在微信且不是回执签收
if (this.detailJump != '1') {
that.relationToAppnt = JSON.parse(this.$CacheUtils.getLocItem('saleInsuredPersonInfo')).relationToAppnt
let imgBase64Data = sessionStorage.getItem('imgBase64Data')
let wxSigned = sessionStorage.getItem('wxSigned')
let signInfo = JSON.parse(localStorage.getItem('signInfo'))
console.log('`````````````````````````````````')
console.log('imgBase64Data:twoimgBase64Data ' + imgBase64Data)
console.log('wxSigned: ' + wxSigned)
if (wxSigned) {
console.log('第二次进入电子保单!')
console.log('that222222222222', that)
this.getOrderDetail().then(() => {
this.Time = true
this.isOver = true
this.radio = '1'
this.base64 = imgBase64Data
this.isDisabledComplite = false
console.log('signInfo.status:' + signInfo.status)
if (signInfo.status == '0') {
// this.appntSign.documentStatus = '3'
console.log('``````````````````')
this.$set(this.appntSign, 'documentStatus', '3')
console.log('appntSign.documentStatus: ' + this.appntSign.documentStatus)
this.isSign = false
this.isDisabledComplite = false
// this.isDisable = false
} else {
this.$set(this.insuredSign, 'documentStatus', '3')
// this.insuredSign.documentStatus = '3'
this.isDisabledComplite = false
this.isSign = false
}
})
} else {
console.log('````````````````````````')
console.log('第一次进入电子保单')
this.timeOut()
this.getOrderDetail()
}
} else {
// 在微信而且是回执签收
document.title = '保险合同签收回执电子确认书签名'
let imgBase64Data = sessionStorage.getItem('imgBase64Data')
let wxSigned = sessionStorage.getItem('wxSigned')
let signInfo = JSON.parse(localStorage.getItem('signInfo'))
console.log('`````````````````````````````````')
console.log('imgBase64Data:twoimgBase64Data ' + imgBase64Data)
console.log('wxSigned: ' + wxSigned)
if (wxSigned) {
console.log('第二次进入电子保单!')
console.log('that222222222222', that)
this.Time = true
this.isOver = true
this.radioSure = '1'
this.base64 = imgBase64Data
this.isDisabledComplite = false
console.log('signInfo.status:' + signInfo.status)
if (signInfo.status == '0') {
// this.appntSign.documentStatus = '3'
console.log('``````````````````')
this.$set(this.appntSign, 'documentStatus', '3')
console.log('appntSign.documentStatus: ' + this.appntSign.documentStatus)
this.isSign = false
this.isDisabledComplite = false
this.isSubmit = false
} else {
this.$set(this.insuredSign, 'documentStatus', '3')
// this.insuredSign.documentStatus = '3'
this.isDisabledComplite = false
this.isSign = false
}
}
}
} else {
// 不在微信且不是回执签收
if (this.detailJump != '1') {
// 投被保险人是否同人
that.relationToAppnt = JSON.parse(this.$CacheUtils.getLocItem('saleInsuredPersonInfo')).relationToAppnt
// 获取被保险人信息
that.saleInsuredPersonInfo = JSON.parse(this.$CacheUtils.getLocItem('saleInsuredPersonInfo'))
this.timeOut()
this.getOrderDetail()
} else {
// 不在微信但是在回执签收
document.title = '保险合同签收回执电子确认书签名'
}
}
}, },
computed: { computed: {
listenChange() { listenChange() {
@@ -941,109 +1080,19 @@ export default {
} }
} }
}, },
async mounted() { mounted() {
document.body.style.backgroundColor = '#fff' document.body.style.backgroundColor = '#fff'
let data = {
orderNo: this.$route.query.orderNo // console.log('---签名投保单PDFurl:', this.pdfUrl, 'insurance-policyUrl', window.localStorage.getItem('insurance-policyUrl'))
} // this.pdfUrl = "http://10.10.100.98:7012/updown/returnDirectStream?imgPath=Ra4LpmZv2h6FrwZPS48QIETiI2AcWWLx6RavVjoAkoMMdje9Cf6YWX3FlAKn%2FwOBIMX%2BfXJaM6sn%0D%0AiUe41vurjQJ65teJQwdrc2wcOn%2FJtQSVGLphInLPv0HGtHpZ3OhD"
getOrderDetail(data).then(res => { // this.src = 'http://139.199.50.151:7000/pdfjs/web/viewer.html?file='
if (res.result == '0') { // console.log('------pdf url:', this.src + this.pdfUrl)
let array = [] //实例化
res.orderDTO.ebizSignDTOS.map(item => { // this.pdfh5 = new Pdfh5('#pdf', {
array.push(item.documentCode) // pdfurl: config.imgDomain + `/returnDirectStream?imgPath=${window.localStorage.getItem('insurance-policyUrl')}`
}) // // pdfurl: res.data.content.content
this.isPersonalInformation = array.findIndex(item => item === '12') // })
} // 获取签名信息
})
if (!this.isWeixin) {
setTimeout(() => {
EWebBridge.webCallAppInJs('webview_left_button', {
img: this.$assetsUrl + 'images/del-close-btn@3x.png',
intercept: '1' //是否拦截原生返回事件 1是 其他否
})
}, 100)
window.appCallBack = this.appCallBack
}
let that = this
that.detailJump = window.localStorage.getItem('detailJump')
if (this.detailJump == '1') {
this.pdfUrl = encodeURIComponent(config.imgDomain + `/returnDirectStream?imgPath=${localStorage.getItem('insurance-policyUrl')}`)
}
that.signVal = window.localStorage.getItem('sign-val')
// 判断是不是万能险
let comment = window.localStorage.getItem('productCode')
if (comment == 'GFRS_M0003' || comment == 'GFRS_M0015' || comment == 'GFRS_M0017') {
this.isComment = true
}
// 获取投保人信息
that.saleInsuredInfo = JSON.parse(this.$CacheUtils.getLocItem('saleInsuredInfo'))
// 在微信
if (this.isWeixin) {
// 在微信且不是回执签收
if (this.detailJump != '1') {
that.relationToAppnt = JSON.parse(this.$CacheUtils.getLocItem('saleInsuredPersonInfo')).relationToAppnt
let imgBase64Data = sessionStorage.getItem('imgBase64Data')
let wxSigned = sessionStorage.getItem('wxSigned')
let signInfo = JSON.parse(localStorage.getItem('signInfo'))
if (wxSigned) {
this.getOrderDetail().then(() => {
this.Time = true
this.isOver = true
this.radio = '1'
this.base64 = imgBase64Data
this.isDisabledComplite = false
if (signInfo.status == '0') {
this.$set(this.appntSign, 'documentStatus', '3')
this.isSign = false
this.isDisabledComplite = false
} else {
this.$set(this.insuredSign, 'documentStatus', '3')
this.isDisabledComplite = false
this.isSign = false
}
})
} else {
this.timeOut()
this.getOrderDetail()
}
} else {
// 在微信而且是回执签收
document.title = '保险合同签收回执电子确认书签名'
let imgBase64Data = sessionStorage.getItem('imgBase64Data')
let wxSigned = sessionStorage.getItem('wxSigned')
let signInfo = JSON.parse(localStorage.getItem('signInfo'))
if (wxSigned) {
this.Time = true
this.isOver = true
this.radioSure = '1'
this.base64 = imgBase64Data
this.isDisabledComplite = false
if (signInfo.status == '0') {
this.$set(this.appntSign, 'documentStatus', '3')
this.isSign = false
this.isDisabledComplite = false
this.isSubmit = false
} else {
this.$set(this.insuredSign, 'documentStatus', '3')
this.isDisabledComplite = false
this.isSign = false
}
}
}
} else {
// 不在微信且不是回执签收
if (this.detailJump != '1') {
// 投被保险人是否同人
that.relationToAppnt = JSON.parse(this.$CacheUtils.getLocItem('saleInsuredPersonInfo')).relationToAppnt
// 获取被保险人信息
that.saleInsuredPersonInfo = JSON.parse(this.$CacheUtils.getLocItem('saleInsuredPersonInfo'))
this.timeOut()
this.getOrderDetail()
} else {
// 不在微信但是在回执签收
document.title = '保险合同签收回执电子确认书签名'
}
}
}, },
beforeRouteLeave(to, from, next) { beforeRouteLeave(to, from, next) {
document.body.style.backgroundColor = '' document.body.style.backgroundColor = ''

View File

@@ -556,7 +556,34 @@ export default {
} }
}, },
created() { created() {
if (!this.isWeixin) {
setTimeout(() => {
// eslint-disable-next-line no-undef
EWebBridge.webCallAppInJs('webview_left_button', {
img: this.$assetsUrl + 'images/del-close-btn@3x.png',
intercept: '1' //是否拦截原生返回事件 1是 其他否
})
}, 100)
window.appCallBack = this.appCallBack
}
let that = this
that.detailJump = window.localStorage.getItem('detailJump')
that.signVal = window.localStorage.getItem('sign-val')
// 获取投保人信息
that.saleInsuredInfo = JSON.parse(this.$CacheUtils.getLocItem('saleInsuredInfo'))
if (this.isWeixin) {
that.relationToAppnt = JSON.parse(this.$CacheUtils.getLocItem('saleInsuredPersonInfo')).relationToAppnt
}
if (this.detailJump != '1') {
// 投被保险人是否同人
that.relationToAppnt = JSON.parse(this.$CacheUtils.getLocItem('saleInsuredPersonInfo')).relationToAppnt
// 获取被保险人信息
that.saleInsuredPersonInfo = JSON.parse(this.$CacheUtils.getLocItem('saleInsuredPersonInfo'))
}
}, },
computed: { computed: {
listenChange() { listenChange() {
@@ -596,30 +623,6 @@ export default {
} }
}, },
async mounted() { async mounted() {
if (!this.isWeixin) {
setTimeout(() => {
// eslint-disable-next-line no-undef
EWebBridge.webCallAppInJs('webview_left_button', {
img: this.$assetsUrl + 'images/del-close-btn@3x.png',
intercept: '1' //是否拦截原生返回事件 1是 其他否
})
}, 100)
window.appCallBack = this.appCallBack
}
let that = this
that.detailJump = window.localStorage.getItem('detailJump')
that.signVal = window.localStorage.getItem('sign-val')
// 获取投保人信息
that.saleInsuredInfo = JSON.parse(this.$CacheUtils.getLocItem('saleInsuredInfo'))
if (this.isWeixin) {
that.relationToAppnt = JSON.parse(this.$CacheUtils.getLocItem('saleInsuredPersonInfo')).relationToAppnt
}
if (this.detailJump != '1') {
// 投被保险人是否同人
that.relationToAppnt = JSON.parse(this.$CacheUtils.getLocItem('saleInsuredPersonInfo')).relationToAppnt
// 获取被保险人信息
that.saleInsuredPersonInfo = JSON.parse(this.$CacheUtils.getLocItem('saleInsuredPersonInfo'))
}
if (this.detailJump != '1') { if (this.detailJump != '1') {
this.getOrderDetail() this.getOrderDetail()
} }
@@ -627,22 +630,39 @@ export default {
let imgBase64Data = sessionStorage.getItem('threeimgBase64Data') let imgBase64Data = sessionStorage.getItem('threeimgBase64Data')
let wxSigned = sessionStorage.getItem('threewxSigned') let wxSigned = sessionStorage.getItem('threewxSigned')
let signInfo = localStorage.getItem('signInfo') let signInfo = localStorage.getItem('signInfo')
console.log('`````````````````````````````````')
console.log('imgBase64Data:threeimgBase64Data ' + imgBase64Data)
console.log('wxSigned: ' + wxSigned)
if (wxSigned) { if (wxSigned) {
console.log('第二次进入电子保单')
console.log('````````````````````````````````')
let rs = await this.getOrderDetail() let rs = await this.getOrderDetail()
console.log(rs)
if (rs === 'success') { if (rs === 'success') {
this.Time = true this.Time = true
this.radio = '1' this.radio = '1'
this.base64 = imgBase64Data this.base64 = imgBase64Data
this.isDisabledComplite = false this.isDisabledComplite = false
if (signInfo.status == '1') { if (signInfo.status == '1') {
// this.appntSign.signStatus = '1'
console.log('``````````````````')
console.log('appntSign:' + this.appntSign)
this.$set(this.appntSign, 'signStatus', '1') this.$set(this.appntSign, 'signStatus', '1')
this.isSubmit = false this.isSubmit = false
this.isSign = false this.isSign = false
} else { } else {
// this.insuredSign.signStatus = '1'
console.log('````````````````````')
console.log('insuredSign:' + this.insuredSign)
this.$set(this.insuredSign, 'signStatus', '1') this.$set(this.insuredSign, 'signStatus', '1')
// this.isDisabledComplite = false
} }
} }
console.log('第二次进入保单,完成状态查看')
console.log(this.isDisabledComplite)
} else { } else {
console.log('````````````````````````')
console.log('第一次进入电子保单')
this.timeOut() this.timeOut()
this.getOrderDetail() this.getOrderDetail()
} }
@@ -654,6 +674,12 @@ export default {
} }
document.body.style.backgroundColor = '#fff' document.body.style.backgroundColor = '#fff'
this.pdfUrl = encodeURIComponent(config.imgDomain + `/returnDirectStream?imgPath=${window.localStorage.getItem('insurance-policyUrl')}`) this.pdfUrl = encodeURIComponent(config.imgDomain + `/returnDirectStream?imgPath=${window.localStorage.getItem('insurance-policyUrl')}`)
//实例化
// this.pdfh5 = new Pdfh5('#pdf', {
// pdfurl: config.imgDomain + `/returnDirectStream?imgPath=${window.localStorage.getItem('insurance-policyUrl')}`
// // pdfurl: res.data.content.content
// })
// 获取签名信息
}, },
beforeRouteLeave(to, from, next) { beforeRouteLeave(to, from, next) {
document.body.style.backgroundColor = '' document.body.style.backgroundColor = ''

View File

@@ -60,10 +60,33 @@ export default {
[NoticeBar.name]: NoticeBar [NoticeBar.name]: NoticeBar
}, },
created() { created() {
this.init()
}, },
mounted() { mounted() {
this.init() // let readingType = localStorage.getItem('readingProtocolType')
// if (readingType && readingType === '1') {
// this.protocol = true
// }
// let that = this
// // {{switchFlag.Time?pageVariable.msg:pageVariable.number}}
// that.timeOut()
// that.activeType = window.localStorage.getItem('activeType')
// // Notify({
// // type: 'warning',
// // message: `提示:阅读时长需在${this.Time ? this.time : this.number}秒以上`,
// // duration: 10000,
// // background: '#999999',
// // className: 'notify'
// // })
// document.body.style.backgroundColor = '#fff'
// that.signVal = window.localStorage.getItem('sign-val')
// // if (JSON.parse(window.localStorage.getItem('sign-insured'))) {
// // that.insuredSign = JSON.parse(window.localStorage.getItem('sign-insured'))
// // }
// // if (JSON.parse(window.localStorage.getItem('sign-appnt'))) {
// // that.appntSign = JSON.parse(window.localStorage.getItem('sign-appnt'))
// // }
}, },
methods: { methods: {
async init(){ async init(){
@@ -117,18 +140,11 @@ export default {
// 获取PDF的路径 // 获取PDF的路径
getOrderDetail() { getOrderDetail() {
let that = this let that = this
this.$toast.loading({
duration: 0, // 持续展示 toast
forbidClick: true, // 禁用背景点击
loadingType: 'spinner',
message: '加载中……'
})
let data = { let data = {
orderNo: that.$route.query.orderNo orderNo: that.$route.query.orderNo
} }
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
getOrderDetail(data).then(res => { getOrderDetail(data).then(res => {
this.$toast.clear()
if (res.result == '0') { if (res.result == '0') {
res.orderDTO.insuredDTOs[0].riskDTOLst.forEach(item => { res.orderDTO.insuredDTOs[0].riskDTOLst.forEach(item => {
if(item.isMainRisk == '0'){ if(item.isMainRisk == '0'){

View File

@@ -62,7 +62,6 @@
mounted() { mounted() {
let that = this let that = this
document.body.style.backgroundColor = '#fff' document.body.style.backgroundColor = '#fff'
that.getOrderDetail();
setTimeout(function() { setTimeout(function() {
closeLoading() closeLoading()
that.timeOut() that.timeOut()
@@ -79,6 +78,7 @@
}, 100) }, 100)
window.appCallBack = this.appCallBack window.appCallBack = this.appCallBack
} }
this.getOrderDetail();
let that = this; let that = this;
that.signVal = window.localStorage.getItem('sign-val') that.signVal = window.localStorage.getItem('sign-val')
}, },
@@ -131,19 +131,13 @@
}, },
// 获取签名状态 // 获取签名状态
getOrderDetail() { getOrderDetail() {
openLoading()
let that = this let that = this
let data = { let data = {
orderNo: that.$route.query.orderNo orderNo: that.$route.query.orderNo
} }
that.$toast.loading({
duration: 0, // 持续展示 toast
forbidClick: true, // 禁用背景点击
loadingType: 'spinner',
message: '加载中……'
})
return new Promise((resolve) => { return new Promise((resolve) => {
getOrderDetail1(data).then(res => { getOrderDetail1(data).then(res => {
that.$toast.clear()
if (res.result == '0') { if (res.result == '0') {
for(let i = 0;i<res.orderDTO.ebizSignDTOS.length;i++){ for(let i = 0;i<res.orderDTO.ebizSignDTOS.length;i++){
if (res.orderDTO.ebizSignDTOS[i].signType == '0' || res.orderDTO.ebizSignDTOS[i].signType == '2') { if (res.orderDTO.ebizSignDTOS[i].signType == '0' || res.orderDTO.ebizSignDTOS[i].signType == '2') {

View File

@@ -82,11 +82,12 @@ export default {
[Dialog.name]: Dialog, [Dialog.name]: Dialog,
[NoticeBar.name]: NoticeBar [NoticeBar.name]: NoticeBar
}, },
created() { mounted() {
let that = this
}, that.timeOut()
async mounted() {
document.body.style.backgroundColor = '#fff' document.body.style.backgroundColor = '#fff'
},
async created() {
// 当前代理人渠道--个险渠道,中介渠道 // 当前代理人渠道--个险渠道,中介渠道
let dataReturn = await riskRules.getAgentInfoFunc(this) let dataReturn = await riskRules.getAgentInfoFunc(this)
this.branchTypeVal = dataReturn.branchTypeVal this.branchTypeVal = dataReturn.branchTypeVal
@@ -113,29 +114,48 @@ export default {
if (this.detailJump != '1') { if (this.detailJump != '1') {
// 投被保险人是否同人 // 投被保险人是否同人
that.relationToAppnt = JSON.parse(this.$CacheUtils.getLocItem('saleInsuredPersonInfo')).relationToAppnt that.relationToAppnt = JSON.parse(this.$CacheUtils.getLocItem('saleInsuredPersonInfo')).relationToAppnt
// 获取被保险人信息
// that.saleInsuredPersonInfo = JSON.parse(this.$CacheUtils.getLocItem('saleInsuredPersonInfo'))
} }
// if (this.detailJump != '1') {
// this.getOrderDetail()
// }
if (this.isWeixin) { if (this.isWeixin) {
let imgBase64Data = sessionStorage.getItem('twoimgBase64Data') let imgBase64Data = sessionStorage.getItem('twoimgBase64Data')
let wxSigned = JSON.parse(sessionStorage.getItem('twowxSigned')) let wxSigned = JSON.parse(sessionStorage.getItem('twowxSigned'))
// let wxSigned = false
let signInfo = JSON.parse(localStorage.getItem('signInfo')) let signInfo = JSON.parse(localStorage.getItem('signInfo'))
console.log('`````````````````````````````````')
console.log('imgBase64Data: twoimgBase64Data:' + imgBase64Data)
console.log('wxSigned: ' + wxSigned)
if (wxSigned) { if (wxSigned) {
console.log('第二次进入电子保单')
console.log('````````````````````````````````')
this.getOrderDetail().then(() => { this.getOrderDetail().then(() => {
this.Time = true this.Time = true
this.isOver = true this.isOver = true
this.radio = '1' this.radio = '1'
this.base64 = imgBase64Data this.base64 = imgBase64Data
this.isDisabledComplite = false this.isDisabledComplite = false
console.log('signInfo.status:' + signInfo.status)
if (signInfo.status == '0') { if (signInfo.status == '0') {
// this.appntSign.documentStatus = '3'
console.log('``````````````````')
this.$set(this.appntSign, 'documentStatus', '3') this.$set(this.appntSign, 'documentStatus', '3')
console.log('appntSign.documentStatus: ' + this.appntSign.documentStatus)
this.isSign = false this.isSign = false
this.isDisabledComplite = false this.isDisabledComplite = false
// this.isDisable = false
} else { } else {
this.$set(this.insuredSign, 'documentStatus', '3') this.$set(this.insuredSign, 'documentStatus', '3')
// this.insuredSign.documentStatus = '3'
this.isDisabledComplite = false this.isDisabledComplite = false
this.isSign = false this.isSign = false
} }
}) })
} else { } else {
console.log('第一次进入电子保单')
this.timeOut() this.timeOut()
this.getOrderDetail() this.getOrderDetail()
} }
@@ -145,7 +165,6 @@ export default {
this.getOrderDetail() this.getOrderDetail()
} }
} }
this.timeOut()
}, },
methods: { methods: {
appCallBack(data) { appCallBack(data) {
@@ -201,15 +220,8 @@ export default {
let data = { let data = {
orderNo: that.$route.query.orderNo orderNo: that.$route.query.orderNo
} }
that.$toast.loading({
duration: 0, // 持续展示 toast
forbidClick: true, // 禁用背景点击
loadingType: 'spinner',
message: '加载中……'
})
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
getOrderDetail(data).then(res => { getOrderDetail(data).then(res => {
that.$toast.clear()
if (res.result == '0') { if (res.result == '0') {
// 截取代理人机构号的前六位,用于去判断是否属于柳州代理人 // 截取代理人机构号的前六位,用于去判断是否属于柳州代理人
if(res.orderDTO.recmdDTO.managerOrg && res.orderDTO.recmdDTO.managerOrg.length >= 6){ if(res.orderDTO.recmdDTO.managerOrg && res.orderDTO.recmdDTO.managerOrg.length >= 6){