mirror of
http://112.124.100.131/GFRS/ebiz-h5.git
synced 2025-12-07 06:36:44 +08:00
feat:调整签字确认页面重定向实现
This commit is contained in:
@@ -1,18 +1,12 @@
|
||||
<template>
|
||||
<div class='insuranceInformation-container' style="padding: 15px;">
|
||||
<div style="display: flex;align-items: center;font-weight: bold;" class="fs20">
|
||||
<span style="width: 3px;background: red;height: 25px;"></span>
|
||||
<span v-if="signVal == '0' || signVal == '2'" 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 class="insuranceInformation-container" style="padding: 15px">
|
||||
<div style="display: flex; align-items: center; font-weight: bold" class="fs20">
|
||||
<span style="width: 3px; background: red; height: 25px"></span>
|
||||
<span v-if="signVal == '0' || signVal == '2'" 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 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'">
|
||||
1.接下来您作为代理人将进行投保文件的签字,请在签字前确保您已仔细阅读投保文件并了解投保文件的内容和含义,确定投保单各项信息准确无误。签字完成并成功提交说明您正式向我司提交投保申请。
|
||||
</span>
|
||||
@@ -26,208 +20,209 @@
|
||||
1.接下来您作为被保险人/监护人将进行投保文件的签字,请在签字前确保您已仔细阅读投保文件并了解投保文件的内容和含义,确定投保单各项信息准确无误。签字完成并成功提交说明您正式向我司提交投保申请。
|
||||
</span>
|
||||
</div>
|
||||
<div style="border-bottom: 1px dashed #eee;padding-bottom: 15px;margin-top: 15px;">
|
||||
<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;">
|
||||
<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%;">
|
||||
<img :src="src" style="margin-left: 15px;width: 16px;"/>
|
||||
<span style="font-size: 16px;color: #03ceaf;margin-left: 10px;">签署完成</span>
|
||||
<div style="border-bottom: 1px dashed #eee; padding-bottom: 15px; margin-top: 15px">
|
||||
<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">
|
||||
<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%">
|
||||
<img :src="src" style="margin-left: 15px; width: 16px" />
|
||||
<span style="font-size: 16px; color: #03ceaf; margin-left: 10px">签署完成</span>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<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 == '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>
|
||||
<van-button type="danger" size="small" round style="margin-left: 20px;height: 32px;font-size: 16px;" @click="gosign" class="fs20">
|
||||
{{signstatus ? '重新签名' : '签名'}}
|
||||
<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 == '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>
|
||||
<van-button type="danger" size="small" round style="margin-left: 20px; height: 32px; font-size: 16px" @click="gosign" class="fs20">
|
||||
{{ signstatus ? '重新签名' : '签名' }}
|
||||
</van-button>
|
||||
</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 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">
|
||||
<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>
|
||||
</div>
|
||||
|
||||
<van-dialog v-model="guardianshow" :showConfirmButton="false">
|
||||
<div slot="title">
|
||||
<p style="color: #E9332E;">监护人姓名</p>
|
||||
<p style="color: #e9332e">监护人姓名</p>
|
||||
</div>
|
||||
<div class="guardianContent" style="padding: 20px 30px 30px;font-size: 14px;">
|
||||
<van-field v-model="guardianName" label="" name="监护人姓名" placeholder="请输入"/>
|
||||
<div class="guardianContent" style="padding: 20px 30px 30px; font-size: 14px">
|
||||
<van-field v-model="guardianName" label="" name="监护人姓名" placeholder="请输入" />
|
||||
</div>
|
||||
<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>
|
||||
<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>
|
||||
</div>
|
||||
</van-dialog>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { saveInformation } from '@/api/ebiz/sale/sale'
|
||||
import isChoose from '@/assets/images/u20257.png'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
src: isChoose,
|
||||
fileList:[],
|
||||
signImgUrl:'data:image/gif;base64,',
|
||||
signstatus: false,
|
||||
signVal: '',
|
||||
signName: '',
|
||||
insuredAge: '',
|
||||
guardianshow: false,
|
||||
guardianName: '',
|
||||
nextDisabled:true,
|
||||
}
|
||||
},
|
||||
components: {},
|
||||
created(){
|
||||
setTimeout(() => {
|
||||
// eslint-disable-next-line no-undef
|
||||
EWebBridge.webCallAppInJs('webview_left_button', {
|
||||
img: this.$assetsUrl + 'images/del-close-btn@3x.png',
|
||||
intercept: '1' //是否拦截原生返回事件 1是 其他否
|
||||
import { saveInformation } from '@/api/ebiz/sale/sale'
|
||||
import isChoose from '@/assets/images/u20257.png'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
src: isChoose,
|
||||
fileList: [],
|
||||
signImgUrl: 'data:image/gif;base64,',
|
||||
signstatus: false,
|
||||
signVal: '',
|
||||
signName: '',
|
||||
insuredAge: '',
|
||||
guardianshow: false,
|
||||
guardianName: '',
|
||||
nextDisabled: true
|
||||
}
|
||||
},
|
||||
components: {},
|
||||
created() {
|
||||
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
|
||||
},
|
||||
mounted() {
|
||||
this.signVal = window.localStorage.getItem('sign-val')
|
||||
this.insuredAge = window.localStorage.getItem('insuredAge')
|
||||
document.body.style.backgroundColor = '#fff'
|
||||
let thisfilelist = ''
|
||||
if (this.signVal == '3') {
|
||||
thisfilelist = JSON.parse(window.localStorage.getItem('agentSignFile'))
|
||||
this.signName = window.localStorage.getItem('recmdName')
|
||||
} else if (this.signVal == '0' || this.signVal == '2') {
|
||||
thisfilelist = JSON.parse(window.localStorage.getItem('appntSignFile'))
|
||||
this.signName = window.localStorage.getItem('appntName')
|
||||
} else if (this.signVal == '1') {
|
||||
thisfilelist = JSON.parse(window.localStorage.getItem('insuredSignFile'))
|
||||
this.signName = window.localStorage.getItem('insuredName')
|
||||
}
|
||||
console.log(thisfilelist)
|
||||
thisfilelist.forEach((item) => {
|
||||
if (item.documentType == '1') {
|
||||
this.fileList.push({
|
||||
name: item.documentName,
|
||||
status: '1'
|
||||
})
|
||||
}, 100)
|
||||
window.appCallBack = this.appCallBack
|
||||
},
|
||||
mounted() {
|
||||
this.signVal = window.localStorage.getItem('sign-val')
|
||||
this.insuredAge = window.localStorage.getItem('insuredAge')
|
||||
document.body.style.backgroundColor = '#fff'
|
||||
let thisfilelist = ''
|
||||
if(this.signVal == '3') {
|
||||
thisfilelist = JSON.parse(window.localStorage.getItem('agentSignFile'))
|
||||
this.signName = window.localStorage.getItem('recmdName')
|
||||
} else if(this.signVal == '0' || this.signVal == '2') {
|
||||
thisfilelist = JSON.parse(window.localStorage.getItem('appntSignFile'))
|
||||
this.signName = window.localStorage.getItem('appntName')
|
||||
} else if(this.signVal == '1') {
|
||||
thisfilelist = JSON.parse(window.localStorage.getItem('insuredSignFile'))
|
||||
this.signName = window.localStorage.getItem('insuredName')
|
||||
}
|
||||
console.log(thisfilelist)
|
||||
thisfilelist.forEach(item => {
|
||||
if(item.documentType == '1') {
|
||||
this.fileList.push({
|
||||
name:item.documentName,
|
||||
status: '1'
|
||||
})
|
||||
this.signH5Img = 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)
|
||||
this.signstatus = true
|
||||
this.signImgUrl = this.signImgUrl + JSON.parse(window.sessionStorage.getItem('signH5Img')).val
|
||||
}
|
||||
if (window.sessionStorage.getItem('signH5Val')) {
|
||||
this.nextDisabled = false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
gosign() {
|
||||
window.localStorage.setItem('orderNo', this.$route.query.orderNo)
|
||||
let signInfo = {
|
||||
type: '签名',
|
||||
text: '',
|
||||
keyWord: ''
|
||||
}
|
||||
if (this.signVal == '0' || this.signVal == '2') {
|
||||
signInfo.text = window.localStorage.getItem('appntName')
|
||||
signInfo.keyWord = '投保锟斤拷:'
|
||||
}
|
||||
if (this.signVal == '1') {
|
||||
signInfo.text = window.localStorage.getItem('insuredName')
|
||||
signInfo.keyWord = '被保锟斤拷:'
|
||||
}
|
||||
if (this.signVal == '3') {
|
||||
signInfo.text = window.localStorage.getItem('recmdName')
|
||||
signInfo.keyWord = '代理锟斤拷:'
|
||||
}
|
||||
if (this.insuredAge < 18 && !this.guardianName && this.signVal == '1') {
|
||||
this.guardianshow = true
|
||||
} else {
|
||||
if (this.insuredAge < 18 && this.signVal == '1') {
|
||||
signInfo.text = this.guardianName
|
||||
}
|
||||
window.sessionStorage.setItem('signInfo', JSON.stringify(signInfo))
|
||||
setTimeout(() => {
|
||||
window.location.href = this.$mainUrl + '/signH5/1.html?time=' + new Date().getTime()
|
||||
}, 0)
|
||||
}
|
||||
},
|
||||
gonext() {
|
||||
let params = {
|
||||
orderType: 'SIGN_MERGED_ORDER',
|
||||
orderDTO: {
|
||||
orderInfoDTO: {
|
||||
orderNo: this.$route.query.orderNo
|
||||
},
|
||||
baseEncryp: window.sessionStorage.getItem('signH5Val'),
|
||||
signValue: JSON.parse(window.sessionStorage.getItem('signH5Img')).val,
|
||||
signType: window.localStorage.getItem('sign-val'),
|
||||
ebizSignDTOS: []
|
||||
}
|
||||
}
|
||||
let thisfilelist = ''
|
||||
if (this.signVal == '3') {
|
||||
thisfilelist = JSON.parse(window.localStorage.getItem('agentSignFile'))
|
||||
} else if (this.signVal == '0' || this.signVal == '2') {
|
||||
thisfilelist = JSON.parse(window.localStorage.getItem('appntSignFile'))
|
||||
} else if (this.signVal == '1') {
|
||||
thisfilelist = JSON.parse(window.localStorage.getItem('insuredSignFile'))
|
||||
}
|
||||
thisfilelist.forEach((item) => {
|
||||
if (item.documentType == '1') {
|
||||
params.orderDTO.ebizSignDTOS.push({
|
||||
signOrRead: 'sign',
|
||||
signId: item.signId,
|
||||
orderNo: this.$route.query.orderNo,
|
||||
documentCode: item.documentCode,
|
||||
documentStatus: '3',
|
||||
documentType: '1',
|
||||
signType: item.signType
|
||||
})
|
||||
}
|
||||
})
|
||||
this.signH5Img = 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)
|
||||
this.signstatus = true
|
||||
this.signImgUrl = this.signImgUrl + JSON.parse(window.sessionStorage.getItem('signH5Img')).val
|
||||
}
|
||||
if(window.sessionStorage.getItem('signH5Val')){
|
||||
this.nextDisabled = false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
gosign(){
|
||||
window.localStorage.setItem('orderNo',this.$route.query.orderNo)
|
||||
let signInfo = {
|
||||
type:'签名',
|
||||
text:'',
|
||||
keyWord: ''
|
||||
}
|
||||
if(this.signVal == '0' || this.signVal == '2') {
|
||||
signInfo.text = window.localStorage.getItem('appntName')
|
||||
signInfo.keyWord = '投保锟斤拷:'
|
||||
}
|
||||
if(this.signVal == '1'){
|
||||
signInfo.text = window.localStorage.getItem('insuredName')
|
||||
signInfo.keyWord = '被保锟斤拷:'
|
||||
}
|
||||
if(this.signVal == '3') {
|
||||
signInfo.text = window.localStorage.getItem('recmdName')
|
||||
signInfo.keyWord = '代理锟斤拷:'
|
||||
}
|
||||
if(this.insuredAge < 18 && !this.guardianName && this.signVal == '1') {
|
||||
this.guardianshow = true
|
||||
} else {
|
||||
if(this.insuredAge < 18 && this.signVal == '1') {
|
||||
signInfo.text = this.guardianName
|
||||
}
|
||||
window.sessionStorage.setItem('signInfo',JSON.stringify(signInfo))
|
||||
window.location.href = this.$mainUrl + '/signH5/1.html'
|
||||
// window.location.href = 'http://'+window.location.host + '/signH5/1.html'
|
||||
}
|
||||
|
||||
},
|
||||
gonext(){
|
||||
let params = {
|
||||
orderType: 'SIGN_MERGED_ORDER',
|
||||
orderDTO: {
|
||||
orderInfoDTO: {
|
||||
orderNo: this.$route.query.orderNo
|
||||
},
|
||||
baseEncryp: window.sessionStorage.getItem('signH5Val'),
|
||||
signValue: JSON.parse(window.sessionStorage.getItem('signH5Img')).val,
|
||||
signType: window.localStorage.getItem('sign-val'),
|
||||
ebizSignDTOS: []
|
||||
}
|
||||
}
|
||||
let thisfilelist = ''
|
||||
if(this.signVal == '3') {
|
||||
thisfilelist = JSON.parse(window.localStorage.getItem('agentSignFile'))
|
||||
} else if(this.signVal == '0' || this.signVal == '2') {
|
||||
thisfilelist = JSON.parse(window.localStorage.getItem('appntSignFile'))
|
||||
} else if(this.signVal == '1') {
|
||||
thisfilelist = JSON.parse(window.localStorage.getItem('insuredSignFile'))
|
||||
}
|
||||
thisfilelist.forEach(item => {
|
||||
if(item.documentType == '1') {
|
||||
params.orderDTO.ebizSignDTOS.push({
|
||||
signOrRead: 'sign',
|
||||
signId:item.signId,
|
||||
orderNo: this.$route.query.orderNo,
|
||||
documentCode: item.documentCode,
|
||||
documentStatus: '3',
|
||||
documentType: '1',
|
||||
signType: item.signType
|
||||
saveInformation(params).then((res) => {
|
||||
if (res.result == '0') {
|
||||
if (window.sessionStorage.getItem('shareUrl')) {
|
||||
this.$router.push({
|
||||
path: '/sale/SignatureConfirmation' + window.sessionStorage.getItem('shareUrl')
|
||||
})
|
||||
}
|
||||
})
|
||||
saveInformation(params).then(res=>{
|
||||
if(res.result == '0') {
|
||||
if(window.sessionStorage.getItem('shareUrl')){
|
||||
this.$router.push({
|
||||
path: '/sale/SignatureConfirmation'+window.sessionStorage.getItem('shareUrl')
|
||||
})
|
||||
} else {
|
||||
this.$router.push({
|
||||
path: '/sale/SignatureConfirmation',
|
||||
query: {
|
||||
orderNo: this.$route.query.orderNo
|
||||
}
|
||||
})
|
||||
}
|
||||
} else {
|
||||
this.$toast(res.resultMessage)
|
||||
}
|
||||
})
|
||||
},
|
||||
appCallBack(data) {
|
||||
if (data.trigger == 'left_button_click') {
|
||||
if (this.videoShow) {
|
||||
this.$jump({
|
||||
flag: 'navigation',
|
||||
extra: {
|
||||
title: '签名确认',
|
||||
hiddenRight: '1'
|
||||
this.$router.push({
|
||||
path: '/sale/SignatureConfirmation',
|
||||
query: {
|
||||
orderNo: this.$route.query.orderNo
|
||||
}
|
||||
})
|
||||
return (this.videoShow = false)
|
||||
}
|
||||
return this.$dialog.confirm({
|
||||
} else {
|
||||
this.$toast(res.resultMessage)
|
||||
}
|
||||
})
|
||||
},
|
||||
appCallBack(data) {
|
||||
if (data.trigger == 'left_button_click') {
|
||||
if (this.videoShow) {
|
||||
this.$jump({
|
||||
flag: 'navigation',
|
||||
extra: {
|
||||
title: '签名确认',
|
||||
hiddenRight: '1'
|
||||
}
|
||||
})
|
||||
return (this.videoShow = false)
|
||||
}
|
||||
return this.$dialog
|
||||
.confirm({
|
||||
className: 'dialog-delete',
|
||||
title: '提示',
|
||||
message: '是否确认退出?',
|
||||
@@ -251,34 +246,30 @@
|
||||
.catch(() => {
|
||||
return
|
||||
})
|
||||
}
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
|
||||
},
|
||||
beforeRouteLeave(to, from, next) {
|
||||
document.body.style.backgroundColor = ''
|
||||
window.sessionStorage.removeItem('signH5Img')
|
||||
window.sessionStorage.removeItem('signH5Val')
|
||||
window.sessionStorage.removeItem('signInfo')
|
||||
next()
|
||||
},
|
||||
watch: {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {},
|
||||
beforeRouteLeave(to, from, next) {
|
||||
document.body.style.backgroundColor = ''
|
||||
window.sessionStorage.removeItem('signH5Img')
|
||||
window.sessionStorage.removeItem('signH5Val')
|
||||
window.sessionStorage.removeItem('signInfo')
|
||||
next()
|
||||
},
|
||||
watch: {}
|
||||
}
|
||||
</script>
|
||||
<style lang='scss' scoped>
|
||||
.guardianContent{
|
||||
/deep/ .van-cell{
|
||||
border: 1px solid #eee;
|
||||
}
|
||||
<style lang="scss" scoped>
|
||||
.guardianContent {
|
||||
/deep/ .van-cell {
|
||||
border: 1px solid #eee;
|
||||
}
|
||||
.fs20{
|
||||
font-size: 16px;
|
||||
.van-button__text{
|
||||
padding: 8px 16px;
|
||||
}
|
||||
}
|
||||
.fs20 {
|
||||
font-size: 16px;
|
||||
.van-button__text {
|
||||
padding: 8px 16px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user