mirror of
http://112.124.100.131/GFRS/ebiz-h5.git
synced 2025-12-11 10:56:44 +08:00
【人管处20220302-关于贵州分公司(筹)电子入司签订材料的需求】担保书分为被担保人(保险代理人)签名,担保人签名,还有空签
This commit is contained in:
@@ -1,8 +1,9 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<van-notice-bar :scrollable="false" v-if="!Time" class="notice">{{ `提示:阅读时长需在${time}秒以上` }}</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>
|
||||||
<div class="fixed bottom0 left0 bg-white" style="width:100%">
|
<div class="fixed bottom0 left0 bg-white" style="width:100%">
|
||||||
|
<!-- <van-checkbox class="p15 pt20" v-model="radio" @click="click" shape="square">本人确认已阅读<span class="blue">《个险营销员健康告知书》</span></van-checkbox> -->
|
||||||
<van-radio-group v-model="radio" class="pb10 pt20 pl30">
|
<van-radio-group v-model="radio" class="pb10 pt20 pl30">
|
||||||
<van-radio name="1" @click="click" class="fs12">
|
<van-radio name="1" @click="click" class="fs12">
|
||||||
本人确认已阅读
|
本人确认已阅读
|
||||||
@@ -11,11 +12,24 @@
|
|||||||
</van-radio-group>
|
</van-radio-group>
|
||||||
<div class="pl30 pb15">
|
<div class="pl30 pb15">
|
||||||
本人签字:
|
本人签字:
|
||||||
<van-button type="danger" size="small" @click="sign" :disabled="isDisable" v-no-more-click="1000">{{
|
<van-button v-if="code == '1'" type="danger" size="small" @click="sign" disabled="disabled" v-no-more-click="1000">{{
|
||||||
appntSign.signState == '0' ? '签名' : '已签名'
|
agentSign.signState == '0' ? '未签名' : '已签名'
|
||||||
|
}}</van-button>
|
||||||
|
<van-button v-else type="danger" size="small" @click="sign" :disabled="isDisable" v-no-more-click="1000">{{
|
||||||
|
agentSign.signState == '0' ? '签名' : '已签名'
|
||||||
}}</van-button>
|
}}</van-button>
|
||||||
</div>
|
</div>
|
||||||
<van-button type="danger" :disabled="isDisabledComplite" @click="goNext" v-no-more-click="1000" size="large">下一步</van-button>
|
<div class="pl30 pb15">
|
||||||
|
担保人签字:
|
||||||
|
<van-button v-if="code == '0'" type="danger" size="small" @click="signD" disabled="disabled" v-no-more-click="1000">{{
|
||||||
|
guaranteeSign.signState == '0' ? '未签名' : '已签名'
|
||||||
|
}}</van-button>
|
||||||
|
<van-button v-else type="danger" size="small" @click="signD" :disabled="isDisableD" v-no-more-click="1000">{{
|
||||||
|
guaranteeSign.signState == '0' ? '签名' : '已签名'
|
||||||
|
}}</van-button>
|
||||||
|
</div>
|
||||||
|
<van-button v-if="!isWeixin" type="danger" :disabled="isDisabledComplite" @click="goNext" v-no-more-click="1000" size="large">下一步</van-button>
|
||||||
|
<van-button v-if="isWeixin" type="danger" :disabled="isDisabledCompliteD" @click="goNext" v-no-more-click="1000" size="large">提交</van-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -28,10 +42,15 @@ import { filtSignList, getAgreementNextPagePath } from './js/methods'
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
|
let isWeixin = this.$utils.device().isWeixin //判断环境
|
||||||
return {
|
return {
|
||||||
|
// 是否在微信
|
||||||
|
isWeixin,
|
||||||
src: location.origin + '/pdfjs/web/viewer.html?file=',
|
src: location.origin + '/pdfjs/web/viewer.html?file=',
|
||||||
pdfUrl: '',
|
pdfUrl: '',
|
||||||
radio: '',
|
radio: '',
|
||||||
|
// 倒计时时间
|
||||||
|
number: '',
|
||||||
// 定时器时间
|
// 定时器时间
|
||||||
time: '10',
|
time: '10',
|
||||||
// 定时器名称
|
// 定时器名称
|
||||||
@@ -41,10 +60,14 @@ export default {
|
|||||||
Time: false,
|
Time: false,
|
||||||
// 签名是否可以点击
|
// 签名是否可以点击
|
||||||
isDisable: true,
|
isDisable: true,
|
||||||
|
isDisableD: true,
|
||||||
// 是否可以点击下一步
|
// 是否可以点击下一步
|
||||||
isDisabledComplite: true,
|
isDisabledComplite: true,
|
||||||
|
//是否可以点击提交
|
||||||
|
isDisabledCompliteD: true,
|
||||||
// 是否签名 true 签名 false 未签名
|
// 是否签名 true 签名 false 未签名
|
||||||
isSign: false,
|
isSign: false,
|
||||||
|
isSignD: false,
|
||||||
//协议list
|
//协议list
|
||||||
signList: [],
|
signList: [],
|
||||||
//当前页面协议签署后下一页路由
|
//当前页面协议签署后下一页路由
|
||||||
@@ -53,12 +76,21 @@ export default {
|
|||||||
code: '',
|
code: '',
|
||||||
//推荐人信息
|
//推荐人信息
|
||||||
agentInfo: {},
|
agentInfo: {},
|
||||||
// 推荐人签名信息
|
//担保人签名信息
|
||||||
|
guaranteeSign: {},
|
||||||
|
//申请人签名信息
|
||||||
|
agentSign: {},
|
||||||
|
// 签名信息
|
||||||
appntSign: {
|
appntSign: {
|
||||||
signState: '0'
|
signState: '',
|
||||||
|
signStateD: ''
|
||||||
},
|
},
|
||||||
//原生返回的加密包
|
//原生返回的加密包
|
||||||
base64: ''
|
base64: '',
|
||||||
|
//担保人原生返回的加密包
|
||||||
|
base64D: ''
|
||||||
|
// 是否重复签名
|
||||||
|
// isReSign: '0'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
@@ -67,55 +99,115 @@ export default {
|
|||||||
[Button.name]: Button,
|
[Button.name]: Button,
|
||||||
[Radio.name]: Radio,
|
[Radio.name]: Radio,
|
||||||
[RadioGroup.name]: RadioGroup,
|
[RadioGroup.name]: RadioGroup,
|
||||||
|
// [CheckboxGroup.name]: CheckboxGroup,
|
||||||
[NoticeBar.name]: NoticeBar,
|
[NoticeBar.name]: NoticeBar,
|
||||||
[Dialog.name]: Dialog
|
[Dialog.name]: Dialog
|
||||||
},
|
},
|
||||||
created() {
|
async created() {
|
||||||
if (!this.Time) {
|
|
||||||
this.timeOut()
|
|
||||||
}
|
|
||||||
this.agreementQuery()
|
|
||||||
this.code = this.$route.query.code
|
this.code = this.$route.query.code
|
||||||
|
if (this.isWeixin) {
|
||||||
|
let imgBase64Data = sessionStorage.getItem('oneimgBase64Data')
|
||||||
|
let wxSigned = sessionStorage.getItem('onewxSigned')
|
||||||
|
let signInfo = JSON.parse(localStorage.getItem('signInfo'))
|
||||||
|
console.log('`````````````````````````````````')
|
||||||
|
console.log('imgBase64Data: twoimgBase64Data:' + imgBase64Data)
|
||||||
|
console.log('wxSigned: ' + wxSigned)
|
||||||
|
if (wxSigned) {
|
||||||
|
console.log('第二次进入电子保单')
|
||||||
|
console.log('````````````````````````````````')
|
||||||
|
await this.agreementQuery()
|
||||||
|
this.Time = true
|
||||||
|
this.isOver = true
|
||||||
|
this.radio = '1'
|
||||||
|
this.base64D = imgBase64Data
|
||||||
|
this.isDisabledComplite = false
|
||||||
|
console.log('signInfo.status:' + signInfo.status)
|
||||||
|
if (signInfo.status == '0') {
|
||||||
|
this.$set(this.appntSign, 'signStateD', '1')
|
||||||
|
this.$set(this.guaranteeSign, 'signState', '1')
|
||||||
|
this.isSignD = false
|
||||||
|
// this.isDisabledComplite = false
|
||||||
|
// this.isDisableD = false
|
||||||
|
} else {
|
||||||
|
this.$set(this.appntSign, 'signStateD', '0')
|
||||||
|
this.$set(this.guaranteeSign, 'signState', '0')
|
||||||
|
// this.isDisabledComplite = false
|
||||||
|
this.isSignD = false
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
console.log('第一次进入电子保单')
|
||||||
|
this.timeOut()
|
||||||
|
this.agreementQuery()
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.timeOut()
|
||||||
|
this.agreementQuery()
|
||||||
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
//获取签署协议人信息
|
//获取签署协议人信息
|
||||||
agreementQuery() {
|
agreementQuery() {
|
||||||
let that = this
|
let that = this
|
||||||
let data = {}
|
let data = {
|
||||||
this.$toast.loading({
|
// userModel: { //线上去掉
|
||||||
|
// mobile: '13000000000'
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
that.$toast.loading({
|
||||||
duration: 0, // 持续展示 toast
|
duration: 0, // 持续展示 toast
|
||||||
forbidClick: true, // 禁用背景点击
|
forbidClick: true, // 禁用背景点击
|
||||||
loadingType: 'spinner',
|
loadingType: 'spinner',
|
||||||
message: '加载中……'
|
message: '加载中……'
|
||||||
})
|
})
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
agreementQuery(data).then(res => {
|
agreementQuery(data).then(res => {
|
||||||
console.log(res)
|
that.$toast.clear()
|
||||||
if (res.result == '0') {
|
if (res.result == '0') {
|
||||||
this.$toast.clear()
|
|
||||||
that.signList = res.content.ebizAgreementDtoList
|
that.signList = res.content.ebizAgreementDtoList
|
||||||
res.content.ebizAgreementDtoList.map(item => {
|
res.content.ebizAgreementDtoList.map(item => {
|
||||||
console.log(item)
|
|
||||||
if (item.type == '21') {
|
if (item.type == '21') {
|
||||||
that.appntSign = item
|
if (item.documentType == '0') {
|
||||||
|
that.agentSign = item //申请人签名信息
|
||||||
|
} else {
|
||||||
|
that.guaranteeSign = item //担保人签名信息
|
||||||
}
|
}
|
||||||
|
if (item.documentType == that.code) {
|
||||||
|
that.appntSign = Object.assign({}, item)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
that.appntSign.signState = that.agentSign.signState == '0' ? '0' : '1'
|
||||||
|
that.isDisable = that.agentSign.signState == '0' ? false : true
|
||||||
|
that.appntSign.signStateD = that.guaranteeSign.signState == '0' ? '0' : '1'
|
||||||
|
that.isDisableD = that.guaranteeSign.signState == '0' ? false : true
|
||||||
})
|
})
|
||||||
|
console.log('that.appntSign=', that.appntSign)
|
||||||
filtSignList(that, that.signList)
|
filtSignList(that, that.signList)
|
||||||
that.nextPagePath = getAgreementNextPagePath(that.signList, that.code, that.appntSign)
|
that.nextPagePath = getAgreementNextPagePath(that.signList, that.code, that.appntSign)
|
||||||
that.pdfUrl = encodeURIComponent(config.imgDomain + `/returnDirectStream?imgPath=${that.appntSign.rgssUrl}`)
|
that.pdfUrl = encodeURIComponent(config.imgDomain + `/returnDirectStream?imgPath=${that.appntSign.rgssUrl}`)
|
||||||
|
resolve()
|
||||||
} else {
|
} else {
|
||||||
this.$toast(res.resultMessage)
|
this.$toast(res.resultMessage)
|
||||||
|
reject()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
})
|
||||||
},
|
},
|
||||||
timeOut() {
|
timeOut() {
|
||||||
|
let that = this
|
||||||
|
let time = that.time
|
||||||
|
that.Time = false
|
||||||
|
that.number = `${time}`
|
||||||
let timer = setInterval(() => {
|
let timer = setInterval(() => {
|
||||||
this.time--
|
time--
|
||||||
if (this.time <= 0) {
|
if (time <= 0) {
|
||||||
this.time = 0
|
time = 0
|
||||||
clearInterval(timer)
|
clearInterval(timer)
|
||||||
this.Time = true
|
|
||||||
this.isOver = true
|
that.Time = true
|
||||||
|
that.isOver = true
|
||||||
|
// window.localStorage.setItem('step', '1')
|
||||||
}
|
}
|
||||||
|
that.number = `${time}`
|
||||||
}, 1000)
|
}, 1000)
|
||||||
},
|
},
|
||||||
// 点击阅读时
|
// 点击阅读时
|
||||||
@@ -158,20 +250,88 @@ export default {
|
|||||||
if (JSON.parse(data).state == '1') {
|
if (JSON.parse(data).state == '1') {
|
||||||
this.base64 = decodeURI(JSON.parse(data).sign)
|
this.base64 = decodeURI(JSON.parse(data).sign)
|
||||||
this.appntSign.signState = '1'
|
this.appntSign.signState = '1'
|
||||||
|
this.agentSign.signState = '1'
|
||||||
|
if (this.appntSign.signState == '1') {
|
||||||
this.isDisabledComplite = false
|
this.isDisabledComplite = false
|
||||||
|
this.isSign = true
|
||||||
|
} else {
|
||||||
|
this.isDisabledComplite = true
|
||||||
this.isSign = false
|
this.isSign = false
|
||||||
}
|
}
|
||||||
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
//担保人签名
|
||||||
|
signD() {
|
||||||
|
let that = this
|
||||||
|
this.$toast.loading({
|
||||||
|
duration: 0, // 持续展示 toast
|
||||||
|
forbidClick: true, // 禁用背景点击
|
||||||
|
loadingType: 'spinner',
|
||||||
|
message: '加载中……'
|
||||||
|
})
|
||||||
|
if (this.isWeixin) {
|
||||||
|
this.toAirSign('0', '担保人签名', '5', '1')
|
||||||
|
} else {
|
||||||
|
// eslint-disable-next-line no-undef
|
||||||
|
EWebBridge.webCallAppInJs('ca_sign', {
|
||||||
|
//身份证号码
|
||||||
|
number: localStorage.idNoD,
|
||||||
|
//姓名
|
||||||
|
name: localStorage.idNameD,
|
||||||
|
//身份证号码id
|
||||||
|
type: '1',
|
||||||
|
keyword: '担保人签名',
|
||||||
|
pageNo: '1',
|
||||||
|
index: '1',
|
||||||
|
offset: '5',
|
||||||
|
pos: '3',
|
||||||
|
signatureWidth: this.$utils.signParams().signatureWidth,
|
||||||
|
signatureHeight: this.$utils.signParams().signatureHeight
|
||||||
|
}).then(data => {
|
||||||
|
this.$toast.clear()
|
||||||
|
if (JSON.parse(data).state == '1') {
|
||||||
|
that.base64D = decodeURI(JSON.parse(data).sign)
|
||||||
|
that.appntSign.signStateD = '1'
|
||||||
|
that.guaranteeSign.signState = '1'
|
||||||
|
if (that.appntSign.signStateD == '1') {
|
||||||
|
this.isDisabledComplite = false
|
||||||
|
this.isSignD = true
|
||||||
|
} else {
|
||||||
|
this.isDisabledComplite = true
|
||||||
|
this.isSignD = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
//微信空签
|
||||||
|
toAirSign(status, keyword, offset, originStatus) {
|
||||||
|
console.log('offset == ', offset)
|
||||||
|
localStorage.setItem(
|
||||||
|
'signInfo',
|
||||||
|
JSON.stringify({
|
||||||
|
originStatus: originStatus,
|
||||||
|
idNo: localStorage.idNoD,
|
||||||
|
name: localStorage.idNameD,
|
||||||
|
type: '1',
|
||||||
|
keyword: keyword,
|
||||||
|
status: status,
|
||||||
|
offset: offset,
|
||||||
|
originUrl: location.href
|
||||||
|
})
|
||||||
|
)
|
||||||
|
window.location.href = this.$mainUrl + '/sign/index.html'
|
||||||
|
},
|
||||||
goNext() {
|
goNext() {
|
||||||
if (this.$route.query.isChange && !this.base64) {
|
if ((this.$route.query.isChange && !this.base64 && this.code == '0') || (this.$route.query.isChange && !this.base64D && this.code == '1')) {
|
||||||
this.goBack()
|
this.goBack()
|
||||||
} else {
|
} else {
|
||||||
let that = this
|
|
||||||
let data = {
|
let data = {
|
||||||
baseEncryp: that.base64,
|
baseEncryp: this.code == '0' ? this.base64 : this.base64D,
|
||||||
ebizAgreementDto: that.appntSign
|
ebizAgreementDto: this.appntSign
|
||||||
}
|
}
|
||||||
|
console.log('baseEncryp', data.baseEncryp)
|
||||||
this.$toast.loading({
|
this.$toast.loading({
|
||||||
duration: 0, // 持续展示 toast
|
duration: 0, // 持续展示 toast
|
||||||
forbidClick: true, // 禁用背景点击
|
forbidClick: true, // 禁用背景点击
|
||||||
@@ -179,20 +339,22 @@ export default {
|
|||||||
message: '加载中……'
|
message: '加载中……'
|
||||||
})
|
})
|
||||||
signAgreement(data).then(res => {
|
signAgreement(data).then(res => {
|
||||||
console.log(res)
|
this.$toast.clear()
|
||||||
if (res.result == '0') {
|
if (res.result == '0') {
|
||||||
|
let path = !this.isWeixin
|
||||||
|
? `/agentEenter/${this.nextPagePath}?code=${this.code}`
|
||||||
|
: `/agentEenter/signContract?token=${localStorage.token}&dialogFlag=1`
|
||||||
if (this.$route.query.isChange) {
|
if (this.$route.query.isChange) {
|
||||||
this.goBack()
|
this.goBack()
|
||||||
} else {
|
} else {
|
||||||
this.$toast.clear()
|
|
||||||
this.$jump({
|
this.$jump({
|
||||||
flag: 'h5',
|
flag: 'h5',
|
||||||
extra: {
|
extra: {
|
||||||
url: location.origin + `/#/agentEenter/${that.nextPagePath}?code=${that.code}`,
|
url: location.origin + '/#' + path,
|
||||||
pullRefresh: that.nextPagePath == 'signContract' ? '1' : '0'
|
pullRefresh: this.nextPagePath == 'signContract' ? '1' : '0'
|
||||||
},
|
},
|
||||||
routerInfo: {
|
routerInfo: {
|
||||||
path: `/agentEenter/${that.nextPagePath}?code=${that.code}`
|
path: path
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -220,8 +382,8 @@ export default {
|
|||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
listenChange() {
|
listenChange() {
|
||||||
const { isOver, radio, appntSign } = this
|
const { isOver, radio, appntSign, code, isWeixin } = this
|
||||||
return { isOver, radio, appntSign }
|
return { isOver, radio, appntSign, code, isWeixin }
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
@@ -233,12 +395,45 @@ export default {
|
|||||||
that.isDisable = true
|
that.isDisable = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (val.isOver == true && val.radio != '') {
|
||||||
|
that.isDisableD = false
|
||||||
|
} else {
|
||||||
|
that.isDisableD = true
|
||||||
|
}
|
||||||
|
|
||||||
|
if (that.code == '0') {
|
||||||
if (that.radio == '1' && val.appntSign.signState == '1') {
|
if (that.radio == '1' && val.appntSign.signState == '1') {
|
||||||
//线上改为1
|
//线上改为1
|
||||||
that.isDisabledComplite = false
|
that.isDisabledComplite = false
|
||||||
} else {
|
} else {
|
||||||
that.isDisabledComplite = true
|
that.isDisabledComplite = true
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
if (that.radio == '1' && val.appntSign.signStateD == '1') {
|
||||||
|
//线上改为1
|
||||||
|
that.isDisabledComplite = false
|
||||||
|
if (that.isWeixin) {
|
||||||
|
that.isDisabledCompliteD = false
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
that.isDisabledComplite = true
|
||||||
|
if (that.isWeixin) {
|
||||||
|
that.isDisabledCompliteD = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// if (that.radio == '1' && val.appntSign.signState == '1' && val.appntSign.signStateD == '1') {
|
||||||
|
// //线上改为1
|
||||||
|
// that.isDisabledComplite = false
|
||||||
|
// } else {
|
||||||
|
// that.isDisabledComplite = true
|
||||||
|
// }
|
||||||
|
/*
|
||||||
|
if (val.appntSign.signState == '1' && val.appntSign.signStateD == '1') {
|
||||||
|
that.isDisable = true
|
||||||
|
that.isDisableD = true
|
||||||
|
}
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
beforeRouteLeave(to, from, next) {
|
beforeRouteLeave(to, from, next) {
|
||||||
|
|||||||
Reference in New Issue
Block a user