mirror of
http://112.124.100.131/GFRS/ebiz-h5.git
synced 2025-12-13 18:56:43 +08:00
Merge branch 'feature/GFRS-2372【需求】关于金掌桂电子入司申请流程增加签署材料的需求' into release/20210513【无忧卡产说会】
This commit is contained in:
@@ -29,6 +29,7 @@ const recordList = () => import('@/views/ebiz/agentEenter/approve/RecordList')
|
||||
const recordDetail = () => import('@/views/ebiz/agentEenter/approve/RecordDetail')
|
||||
const ResultEnd = () => import('@/views/ebiz/agentEenter/ResultEnd')
|
||||
const InformationInspectionAuthorization = () => import('@/views/ebiz/agentEenter/InformationInspectionAuthorization')
|
||||
const SelfInsurance = () => import('@/views/ebiz/agentEenter/SelfInsurance')
|
||||
|
||||
export default [
|
||||
{
|
||||
@@ -67,6 +68,15 @@ export default [
|
||||
index: 1
|
||||
}
|
||||
},
|
||||
{
|
||||
path: '/agentEenter/SelfInsurance',
|
||||
name: 'SelfInsurance',
|
||||
component: SelfInsurance,
|
||||
meta: {
|
||||
title: '国富人寿保险股份有限公司自保件承诺书',
|
||||
index: 1
|
||||
}
|
||||
},
|
||||
{
|
||||
path: '/agentEenter/LetterOfCommitment',
|
||||
name: 'letterOfCommitment',
|
||||
|
||||
263
src/views/ebiz/agentEenter/SelfInsurance.vue
Normal file
263
src/views/ebiz/agentEenter/SelfInsurance.vue
Normal file
@@ -0,0 +1,263 @@
|
||||
<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 == '18') {
|
||||
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>
|
||||
@@ -38,15 +38,15 @@ export function selectComp(that, index, type = '') {
|
||||
} else if (index == 3) {
|
||||
if (type == '1') {
|
||||
//投保人
|
||||
CacheUtils.setLocItem('scanFromInsured','true')
|
||||
CacheUtils.setLocItem('scanFromInsured', 'true')
|
||||
} else if (type == '2') {
|
||||
//被保险人
|
||||
CacheUtils.setLocItem('scanFromInsured','false')
|
||||
CacheUtils.setLocItem('scanFromInsured', 'false')
|
||||
}
|
||||
;[that.isScan, title] = [true, '身份证扫描']
|
||||
} else if (index == 4) {
|
||||
CacheUtils.setLocItem('scanFromInsured','0')
|
||||
;[that.bankisScan, title] = [true, '银行卡扫描']
|
||||
CacheUtils.setLocItem('scanFromInsured', '0')
|
||||
;[that.bankisScan, title] = [true, '银行卡扫描']
|
||||
}
|
||||
|
||||
setTimeout(() => {
|
||||
@@ -86,7 +86,7 @@ function closeBtn(that) {
|
||||
* @param {String} type 1 投保人; 2 被保险人; 3 受益人
|
||||
*/
|
||||
export function appCallBack(that, type) {
|
||||
return function() {
|
||||
return function () {
|
||||
let title
|
||||
switch (type) {
|
||||
case '1':
|
||||
@@ -405,7 +405,7 @@ export function onConfirm(that, value, type) {
|
||||
}
|
||||
}
|
||||
that.areaName = ''
|
||||
;[that.userInfo.relationToInsured, that.relationToAppnt] = [value.id, value.text]
|
||||
;[that.userInfo.relationToInsured, that.relationToAppnt] = [value.id, value.text]
|
||||
}
|
||||
}
|
||||
break
|
||||
@@ -733,7 +733,7 @@ export function infoUpdate(that, type) {
|
||||
confirmButtonColor: '#FFFFFF'
|
||||
})
|
||||
.then(() => {
|
||||
CacheUtils.setLocItem('from','anotherChanged')
|
||||
CacheUtils.setLocItem('from', 'anotherChanged')
|
||||
type == '1' ? that.save('isShow=1') : that.save()
|
||||
})
|
||||
.catch(() => {
|
||||
@@ -831,7 +831,7 @@ export function sureArea(that, area, type, flag = false) {
|
||||
that.areaName = getAreaName(area)
|
||||
if (flag) {
|
||||
;[that.userInfo.province, that.userInfo.city, that.userInfo.area] = [area[0].code, area[1].code, area[2].code]
|
||||
;[that.userInfo.bankProvince, that.userInfo.bankCity] = [area[0].code, area[1].code]
|
||||
;[that.userInfo.bankProvince, that.userInfo.bankCity] = [area[0].code, area[1].code]
|
||||
} else {
|
||||
;[that.userInfo.companyProvince, that.userInfo.companyCity, that.userInfo.companyArea] = [area[0].code, area[1].code, area[2].code]
|
||||
}
|
||||
@@ -839,12 +839,12 @@ export function sureArea(that, area, type, flag = false) {
|
||||
break
|
||||
case '2': //家庭地址
|
||||
that.homeName = getAreaName(area)
|
||||
;[that.userInfo.homeProvince, that.userInfo.homeCity, that.userInfo.homeArea] = [area[0].code, area[1].code, area[2].code]
|
||||
;[that.userInfo.homeProvince, that.userInfo.homeCity, that.userInfo.homeArea] = [area[0].code, area[1].code, area[2].code]
|
||||
that.homeShow = false
|
||||
break
|
||||
case '3': //户籍
|
||||
that.census = getAreaName(area)
|
||||
;[that.userInfo.householdProvince, that.userInfo.householdCity] = [area[0].code, area[1].code]
|
||||
;[that.userInfo.householdProvince, that.userInfo.householdCity] = [area[0].code, area[1].code]
|
||||
that.censusShow = false
|
||||
break
|
||||
}
|
||||
@@ -977,7 +977,7 @@ export function filtSignList(that, signList) {
|
||||
let agentSignList = [], //申请人所需签署协议list
|
||||
guaranteeSignList = [] //担保人所需签署协议list
|
||||
//documentType:签名类型 0代理人 1 担保人 orderLis:显示顺序
|
||||
signList.sort(function(a, b) {
|
||||
signList.sort(function (a, b) {
|
||||
return a.orderLis - b.orderLis
|
||||
})
|
||||
signList.forEach(item => {
|
||||
@@ -1006,10 +1006,14 @@ export function filtSignList(that, signList) {
|
||||
// item.key = 3
|
||||
item.path = 'MessageLetterOfCommitment'
|
||||
break
|
||||
case '17':
|
||||
// item.key = 3
|
||||
item.path = 'InformationInspectionAuthorization'
|
||||
break
|
||||
case '17':
|
||||
// item.key = 3
|
||||
item.path = 'InformationInspectionAuthorization'
|
||||
break
|
||||
case '18':
|
||||
// item.key = 3
|
||||
item.path = 'SelfInsurance'
|
||||
break
|
||||
case '15':
|
||||
// item.key = 4
|
||||
item.path = 'IllegalLetterOfCommitment'
|
||||
|
||||
Reference in New Issue
Block a user