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:
@@ -0,0 +1,262 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<van-notice-bar :scrollable="false" v-if="!Time" class="notice">{{ `提示:阅读时长需在${time}秒以上` }}</van-notice-bar>
|
||||||
|
<iframe :src="src + pdfUrl" class="iframe"></iframe>
|
||||||
|
<div class="fixed bottom0 left0 bg-white" style="width:100%">
|
||||||
|
<van-radio-group v-model="radio" class="pb10 pt20 pl30">
|
||||||
|
<van-radio name="1" @click="click" class="fs12">
|
||||||
|
本人确认已阅读
|
||||||
|
<span class="blue">《销售从业人员拒绝非法集资、非法放贷、金融诈骗承诺书》</span>
|
||||||
|
</van-radio>
|
||||||
|
</van-radio-group>
|
||||||
|
<div class="pl30 pb15">
|
||||||
|
本人签字:
|
||||||
|
<van-button type="danger" size="small" @click="sign" :disabled="isDisable" v-no-more-click="1000">{{
|
||||||
|
appntSign.signState == '0' ? '签名' : '已签名'
|
||||||
|
}}</van-button>
|
||||||
|
</div>
|
||||||
|
<van-button type="danger" :disabled="isDisabledComplite" @click="goNext" v-no-more-click="1000" size="large">下一步</van-button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { Field, Icon, Button, Radio, NoticeBar, Dialog, RadioGroup } from 'vant'
|
||||||
|
import { agreementQuery, signAgreement } from '@/api/ebiz/agentEenter/agentEenter.js'
|
||||||
|
import config from '@/config'
|
||||||
|
import { filtSignList, getAgreementNextPagePath } from './js/methods'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
src: location.origin + '/pdfjs/web/viewer.html?file=',
|
||||||
|
pdfUrl: '',
|
||||||
|
radio: '',
|
||||||
|
// 定时器时间
|
||||||
|
time: '10',
|
||||||
|
// 定时器名称
|
||||||
|
timer: null,
|
||||||
|
isOver: false,
|
||||||
|
// 判断验证码是否开始倒计时
|
||||||
|
Time: false,
|
||||||
|
// 签名是否可以点击
|
||||||
|
isDisable: true,
|
||||||
|
// 是否可以点击下一步
|
||||||
|
isDisabledComplite: true,
|
||||||
|
// 是否签名 true 签名 false 未签名
|
||||||
|
isSign: false,
|
||||||
|
//协议list
|
||||||
|
signList: [],
|
||||||
|
//当前页面协议签署后下一页路由
|
||||||
|
nextPagePath: '',
|
||||||
|
//签署人 0-申请人 1-担保人
|
||||||
|
code: '',
|
||||||
|
//推荐人信息
|
||||||
|
agentInfo: {},
|
||||||
|
// 推荐人签名信息
|
||||||
|
appntSign: {
|
||||||
|
signState: '0'
|
||||||
|
},
|
||||||
|
//原生返回的加密包
|
||||||
|
base64: ''
|
||||||
|
}
|
||||||
|
},
|
||||||
|
components: {
|
||||||
|
[Field.name]: Field,
|
||||||
|
[Icon.name]: Icon,
|
||||||
|
[Button.name]: Button,
|
||||||
|
[Radio.name]: Radio,
|
||||||
|
[RadioGroup.name]: RadioGroup,
|
||||||
|
[NoticeBar.name]: NoticeBar,
|
||||||
|
[Dialog.name]: Dialog
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
if (!this.Time) {
|
||||||
|
this.timeOut()
|
||||||
|
}
|
||||||
|
this.agreementQuery()
|
||||||
|
this.code = this.$route.query.code
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
//获取签署协议人信息
|
||||||
|
agreementQuery() {
|
||||||
|
let that = this
|
||||||
|
let data = {}
|
||||||
|
this.$toast.loading({
|
||||||
|
duration: 0, // 持续展示 toast
|
||||||
|
forbidClick: true, // 禁用背景点击
|
||||||
|
loadingType: 'spinner',
|
||||||
|
message: '加载中……'
|
||||||
|
})
|
||||||
|
agreementQuery(data).then(res => {
|
||||||
|
console.log(res)
|
||||||
|
if (res.result == '0') {
|
||||||
|
this.$toast.clear()
|
||||||
|
that.signList = res.content.ebizAgreementDtoList
|
||||||
|
res.content.ebizAgreementDtoList.map(item => {
|
||||||
|
console.log(item)
|
||||||
|
if (item.type == '24') {
|
||||||
|
that.appntSign = item
|
||||||
|
}
|
||||||
|
})
|
||||||
|
filtSignList(that, that.signList)
|
||||||
|
that.nextPagePath = getAgreementNextPagePath(that.signList, that.code, that.appntSign)
|
||||||
|
that.pdfUrl = encodeURIComponent(config.imgDomain + `/returnDirectStream?imgPath=${that.appntSign.rgssUrl}`)
|
||||||
|
} else {
|
||||||
|
this.$toast(res.resultMessage)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
timeOut() {
|
||||||
|
let timer = setInterval(() => {
|
||||||
|
this.time--
|
||||||
|
if (this.time <= 0) {
|
||||||
|
this.time = 0
|
||||||
|
clearInterval(timer)
|
||||||
|
this.Time = true
|
||||||
|
this.isOver = true
|
||||||
|
}
|
||||||
|
}, 1000)
|
||||||
|
},
|
||||||
|
// 点击阅读时
|
||||||
|
click() {
|
||||||
|
let that = this
|
||||||
|
if (that.isOver == false) {
|
||||||
|
Dialog.confirm({
|
||||||
|
title: '提示',
|
||||||
|
message: '该内容涉及您的重大权益,请您仔细阅读',
|
||||||
|
showCancelButton: false
|
||||||
|
}).then(() => {
|
||||||
|
that.radio = ''
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
sign() {
|
||||||
|
this.$toast.loading({
|
||||||
|
duration: 0, // 持续展示 toast
|
||||||
|
forbidClick: true, // 禁用背景点击
|
||||||
|
loadingType: 'spinner',
|
||||||
|
message: '加载中……'
|
||||||
|
})
|
||||||
|
// eslint-disable-next-line no-undef
|
||||||
|
EWebBridge.webCallAppInJs('ca_sign', {
|
||||||
|
//身份证号码
|
||||||
|
number: localStorage.idNo,
|
||||||
|
//姓名
|
||||||
|
name: localStorage.idName,
|
||||||
|
//身份证号码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') {
|
||||||
|
this.base64 = decodeURI(JSON.parse(data).sign)
|
||||||
|
this.appntSign.signState = '1'
|
||||||
|
this.isDisabledComplite = false
|
||||||
|
this.isSign = false
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
goNext() {
|
||||||
|
if (this.$route.query.isChange && !this.base64) {
|
||||||
|
this.goBack()
|
||||||
|
} else {
|
||||||
|
let that = this
|
||||||
|
let data = {
|
||||||
|
baseEncryp: that.base64,
|
||||||
|
ebizAgreementDto: that.appntSign
|
||||||
|
}
|
||||||
|
this.$toast.loading({
|
||||||
|
duration: 0, // 持续展示 toast
|
||||||
|
forbidClick: true, // 禁用背景点击
|
||||||
|
loadingType: 'spinner',
|
||||||
|
message: '加载中……'
|
||||||
|
})
|
||||||
|
signAgreement(data).then(res => {
|
||||||
|
console.log(res)
|
||||||
|
if (res.result == '0') {
|
||||||
|
if (this.$route.query.isChange) {
|
||||||
|
this.goBack()
|
||||||
|
} else {
|
||||||
|
this.$toast.clear()
|
||||||
|
this.$jump({
|
||||||
|
flag: 'h5',
|
||||||
|
extra: {
|
||||||
|
url: location.origin + `/#/agentEenter/${that.nextPagePath}?code=${that.code}`,
|
||||||
|
pullRefresh: that.nextPagePath == 'signContract' ? '1' : '0'
|
||||||
|
},
|
||||||
|
routerInfo: {
|
||||||
|
path: `/agentEenter/${that.nextPagePath}?code=${that.code}`
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.$toast(res.resultMessage)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
goBack() {
|
||||||
|
this.$jump({
|
||||||
|
flag: 'goBack',
|
||||||
|
extra: {
|
||||||
|
refresh: '1',
|
||||||
|
index: '-1',
|
||||||
|
forbidSwipeBack: '1'
|
||||||
|
},
|
||||||
|
routerInfo: {
|
||||||
|
type: 2,
|
||||||
|
index: -1,
|
||||||
|
path: `/agentEenter/signContract`
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
listenChange() {
|
||||||
|
const { isOver, radio, appntSign } = this
|
||||||
|
return { isOver, radio, appntSign }
|
||||||
|
}
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
listenChange(val) {
|
||||||
|
let that = this
|
||||||
|
if (val.isOver == true && val.radio != '') {
|
||||||
|
that.isDisable = false
|
||||||
|
} else {
|
||||||
|
that.isDisable = true
|
||||||
|
}
|
||||||
|
|
||||||
|
if (that.radio == '1' && val.appntSign.signState == '1') {
|
||||||
|
//线上改为1
|
||||||
|
that.isDisabledComplite = false
|
||||||
|
} else {
|
||||||
|
that.isDisabledComplite = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
beforeRouteLeave(to, from, next) {
|
||||||
|
document.body.style.backgroundColor = ''
|
||||||
|
next()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.notice {
|
||||||
|
width: 100%;
|
||||||
|
position: fixed;
|
||||||
|
top: 0;
|
||||||
|
z-index: 20;
|
||||||
|
}
|
||||||
|
.iframe {
|
||||||
|
width: 100vw;
|
||||||
|
height: 75vh;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user