feat:调整签字确认页面重定向实现

This commit is contained in:
zhang.weiwei
2025-08-27 22:32:20 +08:00
parent c6acb57ff8
commit c6f4bf5d62

View File

@@ -1,18 +1,12 @@
<template> <template>
<div class='insuranceInformation-container' style="padding: 15px;"> <div class="insuranceInformation-container" style="padding: 15px">
<div style="display: flex;align-items: center;font-weight: bold;" class="fs20"> <div style="display: flex; align-items: center; font-weight: bold" class="fs20">
<span style="width: 3px;background: red;height: 25px;"></span> <span style="width: 3px; background: red; height: 25px"></span>
<span v-if="signVal == '0' || signVal == '2'" style="margin-left: 5px;"> <span v-if="signVal == '0' || signVal == '2'" style="margin-left: 5px"> 投保人{{ signName }} </span>
投保{{signName}} <span v-if="signVal == '1'" style="margin-left: 5px"> 被保险{{ signName }} </span>
</span> <span v-if="signVal == '3'" style="margin-left: 5px"> 代理人{{ signName }} </span>
<span v-if="signVal == '1'" style="margin-left: 5px;">
被保险人{{signName}}
</span>
<span v-if="signVal == '3'" style="margin-left: 5px;">
代理人{{signName}}
</span>
</div> </div>
<div style="margin-top: 15px;font-weight: bold;line-height: 32px;font-size: 16px;" class="fs20"> <div style="margin-top: 15px; font-weight: bold; line-height: 32px; font-size: 16px" class="fs20">
<span v-if="signVal == '3'"> <span v-if="signVal == '3'">
1.接下来您作为代理人将进行投保文件的签字请在签字前确保您已仔细阅读投保文件并了解投保文件的内容和含义确定投保单各项信息准确无误签字完成并成功提交说明您正式向我司提交投保申请 1.接下来您作为代理人将进行投保文件的签字请在签字前确保您已仔细阅读投保文件并了解投保文件的内容和含义确定投保单各项信息准确无误签字完成并成功提交说明您正式向我司提交投保申请
</span> </span>
@@ -26,67 +20,67 @@
1.接下来您作为被保险人/监护人将进行投保文件的签字请在签字前确保您已仔细阅读投保文件并了解投保文件的内容和含义确定投保单各项信息准确无误签字完成并成功提交说明您正式向我司提交投保申请 1.接下来您作为被保险人/监护人将进行投保文件的签字请在签字前确保您已仔细阅读投保文件并了解投保文件的内容和含义确定投保单各项信息准确无误签字完成并成功提交说明您正式向我司提交投保申请
</span> </span>
</div> </div>
<div style="border-bottom: 1px dashed #eee;padding-bottom: 15px;margin-top: 15px;"> <div style="border-bottom: 1px dashed #eee; padding-bottom: 15px; margin-top: 15px">
<p style="font-size: 16px;font-weight: bold;">2.您将为以下文件进行统一签名</p> <p style="font-size: 16px; font-weight: bold">2.您将为以下文件进行统一签名</p>
<div v-for="item in fileList" style="margin-top: 15px;display: flex;justify-content: space-between;"> <div v-for="item in fileList" style="margin-top: 15px; display: flex; justify-content: space-between">
<span style="font-size: 16px;color: red;opacity: 0.7;width: 60%;display: inline-block;">{{item.name}}</span> <span style="font-size: 16px; color: red; opacity: 0.7; width: 60%; display: inline-block">{{ item.name }}</span>
<span v-if="signstatus == '1'" style="display: flex;align-items: center;display: inline-block;width: 40%;"> <span v-if="signstatus == '1'" style="display: flex; align-items: center; display: inline-block; width: 40%">
<img :src="src" style="margin-left: 15px;width: 16px;"/> <img :src="src" style="margin-left: 15px; width: 16px" />
<span style="font-size: 16px;color: #03ceaf;margin-left: 10px;">签署完成</span> <span style="font-size: 16px; color: #03ceaf; margin-left: 10px">签署完成</span>
</span> </span>
</div> </div>
</div> </div>
<div style="margin-top: 15px;display: flex;align-items: center;" class="fs20"> <div style="margin-top: 15px; display: flex; align-items: center" class="fs20">
<span v-if="signVal == '3'" style="font-size: 16px;font-weight: bold;">代理人签名</span> <span v-if="signVal == '3'" style="font-size: 16px; font-weight: bold">代理人签名</span>
<span v-if="signVal == '0' || signVal == '2'" style="font-size: 16px;font-weight: bold;">投保人签名</span> <span v-if="signVal == '0' || signVal == '2'" style="font-size: 16px; font-weight: bold">投保人签名</span>
<span v-if="signVal == '1' && insuredAge >= 18" style="font-size: 16px;font-weight: bold;">被保险人签名</span> <span v-if="signVal == '1' && insuredAge >= 18" style="font-size: 16px; font-weight: bold">被保险人签名</span>
<span v-if="signVal == '1' && insuredAge < 18" style="font-size: 16px;font-weight: bold;">被保险人/监护人签名</span> <span v-if="signVal == '1' && insuredAge < 18" style="font-size: 16px; font-weight: bold">被保险人/监护人签名</span>
<van-button type="danger" size="small" round style="margin-left: 20px;height: 32px;font-size: 16px;" @click="gosign" class="fs20"> <van-button type="danger" size="small" round style="margin-left: 20px; height: 32px; font-size: 16px" @click="gosign" class="fs20">
{{signstatus ? '重新签名' : '签名'}} {{ signstatus ? '重新签名' : '签名' }}
</van-button> </van-button>
</div> </div>
<div> <div>
<img v-if="signstatus" :src="signImgUrl" style="height: 34px;margin-left: 20px;width: auto;"/> <img v-if="signstatus" :src="signImgUrl" style="height: 34px; margin-left: 20px; width: auto" />
</div> </div>
<div class='bg-white bottom-btn'> <div class="bg-white bottom-btn">
<van-button :disabled="nextDisabled" type='danger' size='normal' style="font-size: 16px;" block v-no-more-click='1000' @click="gonext"> <van-button :disabled="nextDisabled" type="danger" size="normal" style="font-size: 16px" block v-no-more-click="1000" @click="gonext">
完成阅读并签署 完成阅读并签署
</van-button> </van-button>
</div> </div>
<van-dialog v-model="guardianshow" :showConfirmButton="false"> <van-dialog v-model="guardianshow" :showConfirmButton="false">
<div slot="title"> <div slot="title">
<p style="color: #E9332E;">监护人姓名</p> <p style="color: #e9332e">监护人姓名</p>
</div> </div>
<div class="guardianContent" style="padding: 20px 30px 30px;font-size: 14px;"> <div class="guardianContent" style="padding: 20px 30px 30px; font-size: 14px">
<van-field v-model="guardianName" label="" name="监护人姓名" placeholder="请输入"/> <van-field v-model="guardianName" label="" name="监护人姓名" placeholder="请输入" />
</div> </div>
<div style="text-align: center;margin-bottom: 30px;"> <div style="text-align: center; margin-bottom: 30px">
<van-button round type="danger" size="small" style="padding:0px 35px;font-size: 14px;" @click="gosign">确定</van-button> <van-button round type="danger" size="small" style="padding: 0px 35px; font-size: 14px" @click="gosign">确定</van-button>
</div> </div>
</van-dialog> </van-dialog>
</div> </div>
</template> </template>
<script> <script>
import { saveInformation } from '@/api/ebiz/sale/sale' import { saveInformation } from '@/api/ebiz/sale/sale'
import isChoose from '@/assets/images/u20257.png' import isChoose from '@/assets/images/u20257.png'
export default { export default {
data() { data() {
return { return {
src: isChoose, src: isChoose,
fileList:[], fileList: [],
signImgUrl:'data:image/gif;base64,', signImgUrl: 'data:image/gif;base64,',
signstatus: false, signstatus: false,
signVal: '', signVal: '',
signName: '', signName: '',
insuredAge: '', insuredAge: '',
guardianshow: false, guardianshow: false,
guardianName: '', guardianName: '',
nextDisabled:true, nextDisabled: true
} }
}, },
components: {}, components: {},
created(){ created() {
setTimeout(() => { setTimeout(() => {
// eslint-disable-next-line no-undef // eslint-disable-next-line no-undef
EWebBridge.webCallAppInJs('webview_left_button', { EWebBridge.webCallAppInJs('webview_left_button', {
@@ -101,68 +95,68 @@
this.insuredAge = window.localStorage.getItem('insuredAge') this.insuredAge = window.localStorage.getItem('insuredAge')
document.body.style.backgroundColor = '#fff' document.body.style.backgroundColor = '#fff'
let thisfilelist = '' let thisfilelist = ''
if(this.signVal == '3') { if (this.signVal == '3') {
thisfilelist = JSON.parse(window.localStorage.getItem('agentSignFile')) thisfilelist = JSON.parse(window.localStorage.getItem('agentSignFile'))
this.signName = window.localStorage.getItem('recmdName') this.signName = window.localStorage.getItem('recmdName')
} else if(this.signVal == '0' || this.signVal == '2') { } else if (this.signVal == '0' || this.signVal == '2') {
thisfilelist = JSON.parse(window.localStorage.getItem('appntSignFile')) thisfilelist = JSON.parse(window.localStorage.getItem('appntSignFile'))
this.signName = window.localStorage.getItem('appntName') this.signName = window.localStorage.getItem('appntName')
} else if(this.signVal == '1') { } else if (this.signVal == '1') {
thisfilelist = JSON.parse(window.localStorage.getItem('insuredSignFile')) thisfilelist = JSON.parse(window.localStorage.getItem('insuredSignFile'))
this.signName = window.localStorage.getItem('insuredName') this.signName = window.localStorage.getItem('insuredName')
} }
console.log(thisfilelist) console.log(thisfilelist)
thisfilelist.forEach(item => { thisfilelist.forEach((item) => {
if(item.documentType == '1') { if (item.documentType == '1') {
this.fileList.push({ this.fileList.push({
name:item.documentName, name: item.documentName,
status: '1' status: '1'
}) })
} }
}) })
this.signH5Img = sessionStorage.getItem('signH5Img') this.signH5Img = sessionStorage.getItem('signH5Img')
if(JSON.parse(window.sessionStorage.getItem('signH5Img'))) { if (JSON.parse(window.sessionStorage.getItem('signH5Img'))) {
if(JSON.parse(window.sessionStorage.getItem('signH5Img')).type == '签名' && JSON.parse(window.sessionStorage.getItem('signH5Img')).val) if (JSON.parse(window.sessionStorage.getItem('signH5Img')).type == '签名' && JSON.parse(window.sessionStorage.getItem('signH5Img')).val)
this.signstatus = true this.signstatus = true
this.signImgUrl = this.signImgUrl + JSON.parse(window.sessionStorage.getItem('signH5Img')).val this.signImgUrl = this.signImgUrl + JSON.parse(window.sessionStorage.getItem('signH5Img')).val
} }
if(window.sessionStorage.getItem('signH5Val')){ if (window.sessionStorage.getItem('signH5Val')) {
this.nextDisabled = false this.nextDisabled = false
} }
}, },
methods: { methods: {
gosign(){ gosign() {
window.localStorage.setItem('orderNo',this.$route.query.orderNo) window.localStorage.setItem('orderNo', this.$route.query.orderNo)
let signInfo = { let signInfo = {
type:'签名', type: '签名',
text:'', text: '',
keyWord: '' keyWord: ''
} }
if(this.signVal == '0' || this.signVal == '2') { if (this.signVal == '0' || this.signVal == '2') {
signInfo.text = window.localStorage.getItem('appntName') signInfo.text = window.localStorage.getItem('appntName')
signInfo.keyWord = '投保锟斤拷:' signInfo.keyWord = '投保锟斤拷:'
} }
if(this.signVal == '1'){ if (this.signVal == '1') {
signInfo.text = window.localStorage.getItem('insuredName') signInfo.text = window.localStorage.getItem('insuredName')
signInfo.keyWord = '被保锟斤拷:' signInfo.keyWord = '被保锟斤拷:'
} }
if(this.signVal == '3') { if (this.signVal == '3') {
signInfo.text = window.localStorage.getItem('recmdName') signInfo.text = window.localStorage.getItem('recmdName')
signInfo.keyWord = '代理锟斤拷:' signInfo.keyWord = '代理锟斤拷:'
} }
if(this.insuredAge < 18 && !this.guardianName && this.signVal == '1') { if (this.insuredAge < 18 && !this.guardianName && this.signVal == '1') {
this.guardianshow = true this.guardianshow = true
} else { } else {
if(this.insuredAge < 18 && this.signVal == '1') { if (this.insuredAge < 18 && this.signVal == '1') {
signInfo.text = this.guardianName signInfo.text = this.guardianName
} }
window.sessionStorage.setItem('signInfo',JSON.stringify(signInfo)) window.sessionStorage.setItem('signInfo', JSON.stringify(signInfo))
window.location.href = this.$mainUrl + '/signH5/1.html' setTimeout(() => {
// window.location.href = 'http://'+window.location.host + '/signH5/1.html' window.location.href = this.$mainUrl + '/signH5/1.html?time=' + new Date().getTime()
}, 0)
} }
}, },
gonext(){ gonext() {
let params = { let params = {
orderType: 'SIGN_MERGED_ORDER', orderType: 'SIGN_MERGED_ORDER',
orderDTO: { orderDTO: {
@@ -176,18 +170,18 @@
} }
} }
let thisfilelist = '' let thisfilelist = ''
if(this.signVal == '3') { if (this.signVal == '3') {
thisfilelist = JSON.parse(window.localStorage.getItem('agentSignFile')) thisfilelist = JSON.parse(window.localStorage.getItem('agentSignFile'))
} else if(this.signVal == '0' || this.signVal == '2') { } else if (this.signVal == '0' || this.signVal == '2') {
thisfilelist = JSON.parse(window.localStorage.getItem('appntSignFile')) thisfilelist = JSON.parse(window.localStorage.getItem('appntSignFile'))
} else if(this.signVal == '1') { } else if (this.signVal == '1') {
thisfilelist = JSON.parse(window.localStorage.getItem('insuredSignFile')) thisfilelist = JSON.parse(window.localStorage.getItem('insuredSignFile'))
} }
thisfilelist.forEach(item => { thisfilelist.forEach((item) => {
if(item.documentType == '1') { if (item.documentType == '1') {
params.orderDTO.ebizSignDTOS.push({ params.orderDTO.ebizSignDTOS.push({
signOrRead: 'sign', signOrRead: 'sign',
signId:item.signId, signId: item.signId,
orderNo: this.$route.query.orderNo, orderNo: this.$route.query.orderNo,
documentCode: item.documentCode, documentCode: item.documentCode,
documentStatus: '3', documentStatus: '3',
@@ -196,11 +190,11 @@
}) })
} }
}) })
saveInformation(params).then(res=>{ saveInformation(params).then((res) => {
if(res.result == '0') { if (res.result == '0') {
if(window.sessionStorage.getItem('shareUrl')){ if (window.sessionStorage.getItem('shareUrl')) {
this.$router.push({ this.$router.push({
path: '/sale/SignatureConfirmation'+window.sessionStorage.getItem('shareUrl') path: '/sale/SignatureConfirmation' + window.sessionStorage.getItem('shareUrl')
}) })
} else { } else {
this.$router.push({ this.$router.push({
@@ -227,7 +221,8 @@
}) })
return (this.videoShow = false) return (this.videoShow = false)
} }
return this.$dialog.confirm({ return this.$dialog
.confirm({
className: 'dialog-delete', className: 'dialog-delete',
title: '提示', title: '提示',
message: '是否确认退出?', message: '是否确认退出?',
@@ -252,11 +247,9 @@
return return
}) })
} }
}
}, },
}, computed: {},
computed: {
},
beforeRouteLeave(to, from, next) { beforeRouteLeave(to, from, next) {
document.body.style.backgroundColor = '' document.body.style.backgroundColor = ''
window.sessionStorage.removeItem('signH5Img') window.sessionStorage.removeItem('signH5Img')
@@ -264,21 +257,19 @@
window.sessionStorage.removeItem('signInfo') window.sessionStorage.removeItem('signInfo')
next() next()
}, },
watch: { watch: {}
}
}
}
</script> </script>
<style lang='scss' scoped> <style lang="scss" scoped>
.guardianContent{ .guardianContent {
/deep/ .van-cell{ /deep/ .van-cell {
border: 1px solid #eee; border: 1px solid #eee;
} }
} }
.fs20{ .fs20 {
font-size: 16px; font-size: 16px;
.van-button__text{ .van-button__text {
padding: 8px 16px; padding: 8px 16px;
} }
} }
</style> </style>