mirror of
http://112.124.100.131/GFRS/ebiz-h5.git
synced 2025-12-10 17:26:44 +08:00
完善银保代理人电子化合同签署页面的代码相关逻辑
This commit is contained in:
@@ -11,8 +11,8 @@
|
||||
</van-radio-group>
|
||||
<div class='pt30 pl30 flex align-items-c'>
|
||||
<span class='mr10'>投保人签名 :</span>
|
||||
<van-button type='danger' size='small' :disabled="signStatus == '1' ? true : isDisable" @click="sign" v-no-more-click='1000'>
|
||||
{{signStatus == '2' ? '签名' : '已签名' }}
|
||||
<van-button type='danger' size='small' :disabled="signVal == '1' ? true : isDisable" @click="sign" v-no-more-click='1000'>
|
||||
{{signStatus == '1' ? '签名' : '已签名' }}
|
||||
</van-button>
|
||||
</div>
|
||||
<div class='bg-white bottom-btn'>
|
||||
@@ -28,14 +28,17 @@
|
||||
data() {
|
||||
let isWeixin = this.$utils.device().isWeixin //判断环境
|
||||
return {
|
||||
time:'10',
|
||||
time:'2',
|
||||
radio: '',
|
||||
number: '',
|
||||
src: location.origin + '/pdfjs/web/viewer.html?file=',
|
||||
pdfUrl: '',
|
||||
signStatus: '',
|
||||
signVal: '2',
|
||||
base64: '',
|
||||
signStatus: '1',
|
||||
isDisable: true,
|
||||
isDisabledComplite:true,
|
||||
isOver: false,
|
||||
}
|
||||
},
|
||||
components: {
|
||||
@@ -48,7 +51,9 @@
|
||||
this.timeOut()
|
||||
},
|
||||
mounted() {
|
||||
let thispolicyUrl = "Ra4LpmZv2h6FrwZPS48QIETiI2AcWWLx6RavVjoAkoMO3QJwd%2BpYNd%2BhiCehCCFibahgDp%2FtP6UD%0A6vy8eKAAs4hhrh0dSyUouHrBpcu%2FGM6VGLphInLPv0HGtHpZ3OhD"
|
||||
document.body.style.backgroundColor = '#fff'
|
||||
this.pdfUrl = encodeURIComponent(config.imgDomain + `/returnDirectStream?imgPath=${thispolicyUrl}`)
|
||||
},
|
||||
methods: {
|
||||
// 点击阅读时
|
||||
@@ -83,18 +88,18 @@
|
||||
}, 1000)
|
||||
},
|
||||
sign() {
|
||||
this.$toast.loading({
|
||||
duration: 0, // 持续展示 toast
|
||||
forbidClick: true, // 禁用背景点击
|
||||
loadingType: 'spinner',
|
||||
message: '加载中……'
|
||||
})
|
||||
// this.$toast.loading({
|
||||
// duration: 0, // 持续展示 toast
|
||||
// forbidClick: true, // 禁用背景点击
|
||||
// loadingType: 'spinner',
|
||||
// message: '加载中……'
|
||||
// })
|
||||
EWebBridge.webCallAppInJs('ca_sign', {
|
||||
//身份证号码
|
||||
number: this.saleInsuredInfo.idNo,
|
||||
number: '150429199106185911',
|
||||
//姓名
|
||||
name: this.saleInsuredInfo.name,
|
||||
type: this.saleInsuredInfo.idType,
|
||||
name: '刘晓峰',
|
||||
type: '1',
|
||||
keyword: '签字日期',
|
||||
pageNo: '1',
|
||||
index: '1',
|
||||
@@ -103,12 +108,10 @@
|
||||
signatureWidth: this.$utils.signParams().signatureWidth,
|
||||
signatureHeight: this.$utils.signParams().signatureHeight
|
||||
}).then(data => {
|
||||
this.$toast.clear()
|
||||
// this.$toast.clear()
|
||||
if (JSON.parse(data).state == '1') {
|
||||
this.base64 = decodeURI(JSON.parse(data).sign)
|
||||
this.appntSign.documentStatus = '3'
|
||||
this.isDisabledComplite = false
|
||||
this.isSign = false
|
||||
}
|
||||
})
|
||||
},
|
||||
@@ -117,10 +120,46 @@
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
|
||||
listenChange() {
|
||||
const { isOver, radio, appntSign } = this
|
||||
return { isOver, radio, appntSign }
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
listenChange(val) {
|
||||
let that = this
|
||||
if (!that.isWeixin) {
|
||||
if (that.signVal == '0' || that.signVal == '2') {
|
||||
if (val.isOver == true && val.radio != '' && val.signStatus !== '3') {
|
||||
that.isDisable = false
|
||||
} else {
|
||||
that.isDisable = true
|
||||
}
|
||||
|
||||
if (that.radio == '1' && val.signStatus == '3') {
|
||||
that.isDisabledComplite = false
|
||||
} else {
|
||||
that.isDisabledComplite = true
|
||||
}
|
||||
}
|
||||
if (val.signStatus == '3') {
|
||||
that.isDisable = true
|
||||
}
|
||||
} else {
|
||||
if (that.signVal == '0' || that.signVal == '2') {
|
||||
if (val.isOver == true && val.radio != '') {
|
||||
that.isDisable = false
|
||||
} else {
|
||||
that.isDisable = true
|
||||
}
|
||||
if (that.radio == '1' && val.signStatus == '3') {
|
||||
that.isDisabledComplite = false
|
||||
} else {
|
||||
that.isDisabledComplite = true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
beforeRouteLeave(to, from, next) {
|
||||
|
||||
Reference in New Issue
Block a user