Merge branch 'feature/GFRS-451【0312】电投添加双录提示' into release/0312

This commit is contained in:
阳华祥
2020-03-12 15:14:37 +08:00
8 changed files with 1225 additions and 33 deletions

View File

@@ -22,6 +22,9 @@ const backShow = () => import('@/views/ebiz/sale/BackShow')
const Test = () => import('@/views/ebiz/sale/test')
const detail = () => import('@/views/ebiz/sale/Detail')
const productTip = () => import('@/views/ebiz/sale/productTip')
const avoidDutyTip = () => import('@/views/ebiz/sale/AvoidDutyTip')
const doubleRecordTip = () => import('@/views/ebiz/sale/DoubleRecordTip')
let riskName = localStorage.riskName
console.log('sale/riskName==', riskName)
export default [
@@ -150,6 +153,22 @@ export default [
title: '电子投保单签名'
}
},
{
path: '/sale/avoidDutyTip',
name: 'avoidDutyTip',
component: avoidDutyTip,
meta: {
title: '免除保险人责任条款说明书'
}
},
{
path: '/sale/doubleRecordTip',
name: 'doubleRecordTip',
component: doubleRecordTip,
meta: {
title: '保险销售行为双录说明'
}
},
{
path: '/sale/payMent',
name: 'payMent',

View File

@@ -53,6 +53,7 @@ import FieldPicker from '@/components/ebiz/FieldPicker'
import { orderDetail, deleteOrderInfo } from '@/api/ebiz/common/common'
import { formatAllRisk } from '@/assets/js/utils/formatRiskList'
import { getDetail, deleteProposal } from '@/api/ebiz/proposal/proposal.js'
import utilsAge from '@/assets/js/utils/age'
export default {
name: 'selectedProduct',
@@ -61,7 +62,8 @@ export default {
chooseProducts: [],
total: 0,
nextStepFlag: true,
isShow: true
isShow: true,
appntDTO: {}
}
},
components: {
@@ -129,16 +131,20 @@ export default {
let riskDTOLst
if (isProposal) {
localStorage.saleInsuredInfo = JSON.stringify(resultData.content[0].appntDTO) //存储投保人信息
this.appntDTO = resultData.content[0].appntDTO
resultData = resultData.content[0]
riskDTOLst = resultData.insuredDTOs && resultData.insuredDTOs[0] && resultData.insuredDTOs[0].riskDTOLst
this.total =
resultData.insuredDTOs && resultData.insuredDTOs.length > 0 ? Number(resultData.insuredDTOs[0] && resultData.insuredDTOs[0].totalPrem) * 100 : 0
} else {
this.appntDTO = resultData.orderDTO.appntDTO
//总保费
this.total = resultData.orderDTO.orderInfoDTO.orderAmount * 100
//险种数据格式化
riskDTOLst = resultData.orderDTO.insuredDTOs[0].riskDTOLst
}
localStorage.appntDTO = JSON.stringify(this.appntDTO)
if (!riskDTOLst) riskDTOLst = []
this.$utils.intLocalStorage(resultData, isProposal)
@@ -246,27 +252,26 @@ export default {
flag: 'goBack',
extra: {
refresh: '1',
index:page
index: page
},
routerInfo: {
path: routerUrl
}
})
} else {
routerUrl = '/sale/beneficiary'
localStorage.beneficiaryInfo = ''
localStorage.fromAddBeneficiaryInfo = ''
localStorage.removeItem('applicant')
this.$jump({
flag: 'h5',
extra: {
url: location.origin + '/#' + routerUrl,
needRefresh: '1'
},
routerInfo: {
path: routerUrl
}
})
let showFlag = this.showTipForDoubleRecord()
if (showFlag) {
this.$dialog
.alert({
message: '年龄≥60周岁投保人如果投保一年期以上产品请根据监管要求对销售过程进行录音录像',
confirmButtonColor: '#000000'
})
.then(() => {
this.nextPageShow()
})
} else {
this.nextPageShow()
}
}
},
//添加产品
@@ -280,6 +285,36 @@ export default {
path: '/common/mainRiskList'
}
})
},
showTipForDoubleRecord() {
//判断投保人年龄是否大于等于60岁
let showFlag = false
let age = utilsAge.getAge(this.appntDTO.birthday, new Date())
if (age >= 60) {
this.chooseProducts.map(item => {
if (item.insuYearFlag == 'A' || (item.insuYearFlag == 'Y' && item.insuYear != '1')) {
showFlag = true
return true
}
})
}
return showFlag
},
nextPageShow() {
let routerUrl = '/sale/beneficiary'
localStorage.beneficiaryInfo = ''
localStorage.fromAddBeneficiaryInfo = ''
localStorage.removeItem('applicant')
this.$jump({
flag: 'h5',
extra: {
url: location.origin + '/#' + routerUrl,
needRefresh: '1'
},
routerInfo: {
path: routerUrl
}
})
}
}
}

View File

@@ -0,0 +1,537 @@
<template>
<div class="insuranceInformation-container pb50">
<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>
<van-radio-group v-model="radio" class="pb10 pt20 pl30 fs14">
<van-radio name="1" @click="click">
本人确认已阅读
<span>免除保险人责任条款说明书</span>
</van-radio>
</van-radio-group>
<div class="pt30 pl30 flex align-items-c">
<span class="mr10">投保人签名 :</span>
<div v-if="signVal == '0' || signVal == '2'">
<van-button type="danger" size="small" :disabled="signVal == '1' ? true : isDisable" @click="sign('0')" v-no-more-click="1000">{{
appntSign.documentStatus == '2' ? '签名' : '已签名'
}}</van-button>
</div>
</div>
<div class="bg-white bottom-btn">
<van-button type="danger" size="large" :disabled="isDisabledComplite" @click="goNext" v-no-more-click="1000">下一步</van-button>
</div>
</div>
</template>
<script>
import { RadioGroup, Radio, Dialog, NoticeBar } from 'vant'
import { saveInformation, getOrderDetail } from '@/api/ebiz/sale/sale'
import config from '@/config'
// import axios from 'axios'
export default {
data() {
let isWeixin = this.$utils.device().isWeixin //判断环境
return {
// 投保人还是被保人信息
signVal: '',
// 被保人签名信息
insuredSign: {},
// 投保人签名信息
appntSign: {},
radio: '',
// 倒计时时间
number: '',
// 定时器时间
time: '10',
// 定时器名称
timer: null,
isOver: false,
// 判断验证码是否开始倒计时
Time: true,
// 按钮是否可以点击
isDisable: true,
// 是否在微信
isWeixin,
// 是否签名了 回执流程
isSign: true,
// sign加密码
base64: '',
// 是否可以点击
isDisabledComplite: true,
// local带来的被保人信息
saleInsuredPersonInfo: {},
// local带来的投保人信息
saleInsuredInfo: {},
// 是否从详情跳过来 如果为1 是
detailJump: '',
pdfUrl: '',
src: location.origin + '/pdfjs/web/viewer.html?file=',
tipsPolicyUrl: ''
}
},
components: {
[RadioGroup.name]: RadioGroup,
[Radio.name]: Radio,
[Dialog.name]: Dialog,
[NoticeBar.name]: NoticeBar
},
mounted() {
let that = this
that.timeOut()
document.body.style.backgroundColor = '#fff'
},
async created() {
let that = this
that.detailJump = window.localStorage.getItem('detailJump')
that.signVal = window.localStorage.getItem('sign-val')
// 获取投保人信息
that.saleInsuredInfo = JSON.parse(window.localStorage.getItem('saleInsuredInfo'))
if (this.isWeixin) {
that.relationToAppnt = JSON.parse(window.localStorage.getItem('saleInsuredPersonInfo')).relationToAppnt
}
if (this.detailJump != '1') {
// 投被保人是否同人
that.relationToAppnt = JSON.parse(window.localStorage.getItem('saleInsuredPersonInfo')).relationToAppnt
// 获取被保人信息
// that.saleInsuredPersonInfo = JSON.parse(window.localStorage.getItem('saleInsuredPersonInfo'))
}
// if (this.detailJump != '1') {
// this.getOrderDetail()
// }
if (this.isWeixin) {
let imgBase64Data = sessionStorage.getItem('twoimgBase64Data')
let wxSigned = sessionStorage.getItem('twowxSigned')
let signInfo = JSON.parse(localStorage.getItem('signInfo'))
console.log('`````````````````````````````````')
console.log('imgBase64Data: twoimgBase64Data:' + imgBase64Data)
console.log('wxSigned: ' + wxSigned)
if (wxSigned) {
console.log('第二次进入电子保单')
console.log('````````````````````````````````')
this.getOrderDetail().then(() => {
this.Time = true
this.isOver = true
this.radio = '1'
this.base64 = imgBase64Data
this.isDisabledComplite = false
console.log('signInfo.status:' + signInfo.status)
if (signInfo.status == '0') {
// this.appntSign.documentStatus = '3'
console.log('``````````````````')
this.$set(this.appntSign, 'documentStatus', '3')
console.log('appntSign.documentStatus: ' + this.appntSign.documentStatus)
this.isSign = false
this.isDisabledComplite = false
// this.isDisable = false
} else {
this.$set(this.insuredSign, 'documentStatus', '3')
// this.insuredSign.documentStatus = '3'
this.isDisabledComplite = false
this.isSign = false
}
})
} else {
console.log('第一次进入电子保单')
this.timeOut()
this.getOrderDetail()
}
} else {
this.timeOut()
if (this.detailJump != '1') {
this.getOrderDetail()
}
}
},
methods: {
timeOut() {
let that = this
let time = that.time
that.Time = false
that.number = `${time}`
let timer = setInterval(() => {
time--
if (time <= 0) {
time = 0
clearInterval(timer)
that.Time = true
that.isOver = true
// window.localStorage.setItem('step', '1')
}
that.number = `${time}`
}, 1000)
},
// 获取签名状态
getOrderDetail() {
let that = this
let data = {
orderNo: window.localStorage.getItem('orderNo')
}
return new Promise((resolve, reject) => {
getOrderDetail(data).then(res => {
if (res.result == '0') {
res.orderDTO.ebizSignDTOS.map(item => {
if (item.documentCode == '6') {
if (item.signType == '0' || item.signType == '2') {
console.log('000000000', item)
that.appntSign = item
that.tipsPolicyUrl = item.policyUrl
console.log('that.appntSign', item.policyUrl)
}
}
})
that.pdfUrl = encodeURIComponent(config.imgDomain + `/returnDirectStream?imgPath=${that.tipsPolicyUrl}`)
console.log(' that.pdfUrl', that.pdfUrl)
if (that.isWeixin) {
if (res.orderDTO.ebizSignDTOS.length > 1) {
if (that.appntSign.documentStatus == '3') {
that.isDisabledComplite = false
}
}
}
resolve('success')
}
})
})
},
// 点击阅读时
click() {
let that = this
if (that.isOver == false) {
Dialog.confirm({
title: '提示',
message: '该内容涉及您的重大权益,请您仔细阅读',
showCancelButton: false
}).then(() => {
that.radio = ''
})
}
},
// 点击签名
sign(val) {
console.log('签名参数',this.saleInsuredInfo.idNo,this.saleInsuredInfo.name,this.saleInsuredInfo.idType,'keyword'+':'+ '投保人签名','pageNo'+':'+ '1','index'+':'+ '1','offset'+':'+ '-150','pos'+':'+ '3')
let that = this
this.$toast.loading({
duration: 0, // 持续展示 toast
forbidClick: true, // 禁用背景点击
loadingType: 'spinner',
message: '加载中……'
})
if (val == '0') {
if (this.detailJump != '1') {
if (this.relationToAppnt == '1') {
if (this.isWeixin) {
this.toAirSign('0', '签字日期', '-150', '2')
} else {
EWebBridge.webCallAppInJs('ca_sign', {
//身份证号码
number: this.saleInsuredInfo.idNo,
//姓名
name: this.saleInsuredInfo.name,
type: this.saleInsuredInfo.idType,
keyword: '投保人签名',
pageNo: '1',
index: '1',
offset: '-150',
pos: '3'
}).then(data => {
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
}
})
}
} else {
if (this.isWeixin) {
this.toAirSign('0', '签字日期', '-150', '2')
} else {
EWebBridge.webCallAppInJs('ca_sign', {
//身份证号码
number: this.saleInsuredInfo.idNo,
//姓名
name: this.saleInsuredInfo.name,
type: this.saleInsuredInfo.idType,
keyword: '投保人签名',
pageNo: '1',
index: '1',
offset: '-150',
pos: '3'
}).then(data => {
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
}
})
}
}
} else {
switch (that.saleInsuredInfo.idType) {
case '居民身份证':
that.saleInsuredInfo.idType = '1'
break
case '户口本':
that.saleInsuredInfo.idType = '2'
break
case '出生证':
that.saleInsuredInfo.idType = '3'
break
case '外国人护照':
that.saleInsuredInfo.idType = '4'
break
case '港澳居民来往内地通行证':
that.saleInsuredInfo.idType = '5'
break
case '台湾居民来往大陆通行证':
that.saleInsuredInfo.idType = '6'
break
// case '其他':
// that.saleInsuredInfo.idType = '7'
// break
case '外国人永久居留身份证':
that.saleInsuredInfo.idType = '8'
break
case '港澳台居民居住证':
that.saleInsuredInfo.idType = '9'
break
}
if (this.isWeixin) {
this.toAirSign('0', '签字日期', '-150', '2')
} else {
EWebBridge.webCallAppInJs('ca_sign', {
//身份证号码
number: that.saleInsuredInfo.idNo,
//姓名
name: that.saleInsuredInfo.name,
type: that.saleInsuredInfo.idType,
keyword: '投保人签名',
pageNo: '1',
index: '1',
offset: '-150',
pos: '3'
}).then(data => {
this.$toast.clear()
if (JSON.parse(data).state == '1') {
that.base64 = decodeURI(JSON.parse(data).sign)
that.appntSign.documentStatus = '3'
that.isDisabledComplite = false
that.isSign = false
}
})
}
}
}
},
toAirSign(status, keyword, offset, originStatus) {
localStorage.setItem(
'signInfo',
JSON.stringify({
originStatus: originStatus,
idNo: this.saleInsuredInfo.idNo,
name: this.saleInsuredInfo.name,
type: this.saleInsuredInfo.idType,
keyword: keyword,
status: status,
offset: offset,
originUrl: location.href
})
)
window.location.href = this.$mainUrl + '/sign/index.html'
},
// 下一步
goNext() {
if (this.isWeixin) {
console.log('````````````````````')
console.log('进入微信')
this.$toast.loading({
duration: 0, // 持续展示 toast
forbidClick: true, // 禁用背景点击ase
loadingType: 'spinner',
message: '加载中……'
})
let that = this
console.log('that.appntSign', that.appntSign)
if (that.signVal == '0' || that.signVal == '2') {
let data = {
orderType: 'SIGN_ORDER',
orderDTO: {
orderInfoDTO: {
orderNo: window.localStorage.getItem('orderNo')
},
ebizSignDTOS: [
{
signOrRead: 'sign',
signId: that.appntSign.signId,
orderNo: window.localStorage.getItem('orderNo'),
documentCode: that.appntSign.documentCode,
documentStatus: '3',
documentType: that.appntSign.documentType,
signType: that.signVal,
baseEncryp: that.base64,
tipsPolicyUrl: that.tipsPolicyUrl
}
]
}
}
saveInformation(data).then(res => {
// console.log(res)
if (res.result == '0') {
this.$toast.clear()
// console.log(res)
window.localStorage.setItem('detailJump', '')
sessionStorage.twowxSigned = false
// let url = config.imgDomain + `/app/returnStream?imgPath=${res.signDTO.policyUrl}`
// axios.get(url).then(res => {
// console.log(res)
// })
this.$jump({
flag: 'h5',
extra: {
url: location.origin + '/#/sale/doubleRecordTip'
},
routerInfo: {
path: '/sale/doubleRecordTip'
}
})
} else {
that.$toast(res.resultMessage)
}
})
}
} else {
let that = this
this.$toast.loading({
duration: 0, // 持续展示 toast
forbidClick: true, // 禁用背景点击
loadingType: 'spinner',
message: '加载中……'
})
if (that.signVal == '0' || that.signVal == '2') {
let data = {
orderType: 'SIGN_ORDER',
orderDTO: {
orderInfoDTO: {
orderNo: window.localStorage.getItem('orderNo')
},
ebizSignDTOS: [
{
signOrRead: 'sign',
signId: that.appntSign.signId,
orderNo: window.localStorage.getItem('orderNo'),
documentCode: that.appntSign.documentCode,
documentStatus: '3',
documentType: that.appntSign.documentType,
signType: that.signVal,
baseEncryp: that.base64,
tipsPolicyUrl: that.tipsPolicyUrl
}
]
}
}
saveInformation(data).then(res => {
// console.log(res)
if (res.result == '0') {
this.$toast.clear()
// window.localStorage.setItem('insurance-url', res.signDTO.policyUrl)
window.localStorage.setItem('detailJump', '')
sessionStorage.twowxSigned = false
// let url = config.imgDomain + `/app/returnStream?imgPath=${res.signDTO.policyUrl}`
// axios.get(url).then(res => {
// console.log(res)
// })
this.$jump({
flag: 'h5',
extra: {
url: location.origin + '/#/sale/doubleRecordTip',
forbidSwipeBack: '1'
},
routerInfo: {
path: '/sale/doubleRecordTip'
}
})
} else {
that.$toast(res.resultMessage)
}
})
}
}
}
},
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.appntSign.documentStatus !== '3') {
that.isDisable = false
} else {
that.isDisable = true
}
if (that.radio == '1' && val.appntSign.documentStatus == '3') {
that.isDisabledComplite = false
} else {
that.isDisabledComplite = true
}
}
if (val.appntSign.documentStatus == '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.appntSign.documentStatus == '3') {
that.isDisabledComplite = false
} else {
that.isDisabledComplite = true
}
}
}
}
},
beforeRouteLeave(to, from, next) {
document.body.style.backgroundColor = ''
next()
}
}
</script>
<style lang="scss" scoped>
img {
width: 100%;
height: 100%;
}
.notice {
width: 100%;
position: fixed;
top: 0;
z-index: 20;
}
.iframe {
width: 100vw;
height: 70vh;
}
</style>

View File

@@ -0,0 +1,537 @@
<template>
<div class="insuranceInformation-container pb50">
<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>
<van-radio-group v-model="radio" class="pb10 pt20 pl30 fs14">
<van-radio name="1" @click="click">
本人确认已阅读
<span>保险销售行为双录说明</span>
</van-radio>
</van-radio-group>
<div class="pt30 pl30 flex align-items-c">
<span class="mr10">投保人签名 :</span>
<div v-if="signVal == '0' || signVal == '2'">
<van-button type="danger" size="small" :disabled="signVal == '1' ? true : isDisable" @click="sign('0')" v-no-more-click="1000">{{
appntSign.documentStatus == '2' ? '签名' : '已签名'
}}</van-button>
</div>
</div>
<div class="bg-white bottom-btn">
<van-button type="danger" size="large" :disabled="isDisabledComplite" @click="goNext" v-no-more-click="1000">下一步</van-button>
</div>
</div>
</template>
<script>
import { RadioGroup, Radio, Dialog, NoticeBar } from 'vant'
import { saveInformation, getOrderDetail } from '@/api/ebiz/sale/sale'
import config from '@/config'
// import axios from 'axios'
export default {
data() {
let isWeixin = this.$utils.device().isWeixin //判断环境
return {
// 投保人还是被保人信息
signVal: '',
// 被保人签名信息
insuredSign: {},
// 投保人签名信息
appntSign: {},
radio: '',
// 倒计时时间
number: '',
// 定时器时间
time: '10',
// 定时器名称
timer: null,
isOver: false,
// 判断验证码是否开始倒计时
Time: true,
// 按钮是否可以点击
isDisable: true,
// 是否在微信
isWeixin,
// 是否签名了 回执流程
isSign: true,
// sign加密码
base64: '',
// 是否可以点击
isDisabledComplite: true,
// local带来的被保人信息
saleInsuredPersonInfo: {},
// local带来的投保人信息
saleInsuredInfo: {},
// 是否从详情跳过来 如果为1 是
detailJump: '',
pdfUrl: '',
src: location.origin + '/pdfjs/web/viewer.html?file=',
tipsPolicyUrl: ''
}
},
components: {
[RadioGroup.name]: RadioGroup,
[Radio.name]: Radio,
[Dialog.name]: Dialog,
[NoticeBar.name]: NoticeBar
},
mounted() {
let that = this
that.timeOut()
document.body.style.backgroundColor = '#fff'
},
async created() {
let that = this
that.detailJump = window.localStorage.getItem('detailJump')
that.signVal = window.localStorage.getItem('sign-val')
// 获取投保人信息
that.saleInsuredInfo = JSON.parse(window.localStorage.getItem('saleInsuredInfo'))
if (this.isWeixin) {
that.relationToAppnt = JSON.parse(window.localStorage.getItem('saleInsuredPersonInfo')).relationToAppnt
}
if (this.detailJump != '1') {
// 投被保人是否同人
that.relationToAppnt = JSON.parse(window.localStorage.getItem('saleInsuredPersonInfo')).relationToAppnt
// 获取被保人信息
// that.saleInsuredPersonInfo = JSON.parse(window.localStorage.getItem('saleInsuredPersonInfo'))
}
// if (this.detailJump != '1') {
// this.getOrderDetail()
// }
if (this.isWeixin) {
let imgBase64Data = sessionStorage.getItem('twoimgBase64Data')
let wxSigned = sessionStorage.getItem('twowxSigned')
let signInfo = JSON.parse(localStorage.getItem('signInfo'))
console.log('`````````````````````````````````')
console.log('imgBase64Data: twoimgBase64Data:' + imgBase64Data)
console.log('wxSigned: ' + wxSigned)
if (wxSigned) {
console.log('第二次进入电子保单')
console.log('````````````````````````````````')
this.getOrderDetail().then(() => {
this.Time = true
this.isOver = true
this.radio = '1'
this.base64 = imgBase64Data
this.isDisabledComplite = false
console.log('signInfo.status:' + signInfo.status)
if (signInfo.status == '0') {
// this.appntSign.documentStatus = '3'
console.log('``````````````````')
this.$set(this.appntSign, 'documentStatus', '3')
console.log('appntSign.documentStatus: ' + this.appntSign.documentStatus)
this.isSign = false
this.isDisabledComplite = false
// this.isDisable = false
} else {
this.$set(this.insuredSign, 'documentStatus', '3')
// this.insuredSign.documentStatus = '3'
this.isDisabledComplite = false
this.isSign = false
}
})
} else {
console.log('第一次进入电子保单')
this.timeOut()
this.getOrderDetail()
}
} else {
this.timeOut()
if (this.detailJump != '1') {
this.getOrderDetail()
}
}
},
methods: {
timeOut() {
let that = this
let time = that.time
that.Time = false
that.number = `${time}`
let timer = setInterval(() => {
time--
if (time <= 0) {
time = 0
clearInterval(timer)
that.Time = true
that.isOver = true
// window.localStorage.setItem('step', '1')
}
that.number = `${time}`
}, 1000)
},
// 获取签名状态
getOrderDetail() {
let that = this
let data = {
orderNo: window.localStorage.getItem('orderNo')
}
return new Promise((resolve, reject) => {
getOrderDetail(data).then(res => {
if (res.result == '0') {
res.orderDTO.ebizSignDTOS.map(item => {
if (item.documentCode == '7') {
if (item.signType == '0' || item.signType == '2') {
console.log('000000000', item)
that.appntSign = item
that.tipsPolicyUrl = item.policyUrl
console.log('that.appntSign', item.policyUrl)
}
}
})
that.pdfUrl = encodeURIComponent(config.imgDomain + `/returnDirectStream?imgPath=${that.tipsPolicyUrl}`)
console.log(' that.pdfUrl', that.pdfUrl)
if (that.isWeixin) {
if (res.orderDTO.ebizSignDTOS.length > 1) {
if (that.appntSign.documentStatus == '3') {
that.isDisabledComplite = false
}
}
}
resolve('success')
}
})
})
},
// 点击阅读时
click() {
let that = this
if (that.isOver == false) {
Dialog.confirm({
title: '提示',
message: '该内容涉及您的重大权益,请您仔细阅读',
showCancelButton: false
}).then(() => {
that.radio = ''
})
}
},
// 点击签名
sign(val) {
console.log('签名参数',this.saleInsuredInfo.idNo,this.saleInsuredInfo.name,this.saleInsuredInfo.idType,'keyword'+':'+ '投保人签字','pageNo'+':'+ '1','index'+':'+ '1','offset'+':'+ '-150','pos'+':'+ '3')
let that = this
this.$toast.loading({
duration: 0, // 持续展示 toast
forbidClick: true, // 禁用背景点击
loadingType: 'spinner',
message: '加载中……'
})
if (val == '0') {
if (this.detailJump != '1') {
if (this.relationToAppnt == '1') {
if (this.isWeixin) {
this.toAirSign('0', '签字日期', '-150', '2')
} else {
EWebBridge.webCallAppInJs('ca_sign', {
//身份证号码
number: this.saleInsuredInfo.idNo,
//姓名
name: this.saleInsuredInfo.name,
type: this.saleInsuredInfo.idType,
keyword: '投保人签字',
pageNo: '1',
index: '1',
offset: '-150',
pos: '3'
}).then(data => {
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
}
})
}
} else {
if (this.isWeixin) {
this.toAirSign('0', '签字日期', '-150', '2')
} else {
EWebBridge.webCallAppInJs('ca_sign', {
//身份证号码
number: this.saleInsuredInfo.idNo,
//姓名
name: this.saleInsuredInfo.name,
type: this.saleInsuredInfo.idType,
keyword: '投保人签字',
pageNo: '1',
index: '1',
offset: '-150',
pos: '3'
}).then(data => {
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
}
})
}
}
} else {
switch (that.saleInsuredInfo.idType) {
case '居民身份证':
that.saleInsuredInfo.idType = '1'
break
case '户口本':
that.saleInsuredInfo.idType = '2'
break
case '出生证':
that.saleInsuredInfo.idType = '3'
break
case '外国人护照':
that.saleInsuredInfo.idType = '4'
break
case '港澳居民来往内地通行证':
that.saleInsuredInfo.idType = '5'
break
case '台湾居民来往大陆通行证':
that.saleInsuredInfo.idType = '6'
break
// case '其他':
// that.saleInsuredInfo.idType = '7'
// break
case '外国人永久居留身份证':
that.saleInsuredInfo.idType = '8'
break
case '港澳台居民居住证':
that.saleInsuredInfo.idType = '9'
break
}
if (this.isWeixin) {
this.toAirSign('0', '签字日期', '-150', '2')
} else {
EWebBridge.webCallAppInJs('ca_sign', {
//身份证号码
number: that.saleInsuredInfo.idNo,
//姓名
name: that.saleInsuredInfo.name,
type: that.saleInsuredInfo.idType,
keyword: '投保人签字',
pageNo: '1',
index: '1',
offset: '-150',
pos: '3'
}).then(data => {
this.$toast.clear()
if (JSON.parse(data).state == '1') {
that.base64 = decodeURI(JSON.parse(data).sign)
that.appntSign.documentStatus = '3'
that.isDisabledComplite = false
that.isSign = false
}
})
}
}
}
},
toAirSign(status, keyword, offset, originStatus) {
localStorage.setItem(
'signInfo',
JSON.stringify({
originStatus: originStatus,
idNo: this.saleInsuredInfo.idNo,
name: this.saleInsuredInfo.name,
type: this.saleInsuredInfo.idType,
keyword: keyword,
status: status,
offset: offset,
originUrl: location.href
})
)
window.location.href = this.$mainUrl + '/sign/index.html'
},
// 下一步
goNext() {
if (this.isWeixin) {
console.log('````````````````````')
console.log('进入微信')
this.$toast.loading({
duration: 0, // 持续展示 toast
forbidClick: true, // 禁用背景点击ase
loadingType: 'spinner',
message: '加载中……'
})
let that = this
console.log('that.appntSign', that.appntSign)
if (that.signVal == '0' || that.signVal == '2') {
let data = {
orderType: 'SIGN_ORDER',
orderDTO: {
orderInfoDTO: {
orderNo: window.localStorage.getItem('orderNo')
},
ebizSignDTOS: [
{
signOrRead: 'sign',
signId: that.appntSign.signId,
orderNo: window.localStorage.getItem('orderNo'),
documentCode: that.appntSign.documentCode,
documentStatus: '3',
documentType: that.appntSign.documentType,
signType: that.signVal,
baseEncryp: that.base64,
tipsPolicyUrl: that.tipsPolicyUrl
}
]
}
}
saveInformation(data).then(res => {
// console.log(res)
if (res.result == '0') {
this.$toast.clear()
// console.log(res)
window.localStorage.setItem('detailJump', '')
sessionStorage.twowxSigned = false
// let url = config.imgDomain + `/app/returnStream?imgPath=${res.signDTO.policyUrl}`
// axios.get(url).then(res => {
// console.log(res)
// })
this.$jump({
flag: 'h5',
extra: {
url: location.origin + '/#/sale/signatureOfElectronic'
},
routerInfo: {
path: '/sale/signatureOfElectronic'
}
})
} else {
that.$toast(res.resultMessage)
}
})
}
} else {
let that = this
this.$toast.loading({
duration: 0, // 持续展示 toast
forbidClick: true, // 禁用背景点击
loadingType: 'spinner',
message: '加载中……'
})
if (that.signVal == '0' || that.signVal == '2') {
let data = {
orderType: 'SIGN_ORDER',
orderDTO: {
orderInfoDTO: {
orderNo: window.localStorage.getItem('orderNo')
},
ebizSignDTOS: [
{
signOrRead: 'sign',
signId: that.appntSign.signId,
orderNo: window.localStorage.getItem('orderNo'),
documentCode: that.appntSign.documentCode,
documentStatus: '3',
documentType: that.appntSign.documentType,
signType: that.signVal,
baseEncryp: that.base64,
tipsPolicyUrl: that.tipsPolicyUrl
}
]
}
}
saveInformation(data).then(res => {
// console.log(res)
if (res.result == '0') {
this.$toast.clear()
// window.localStorage.setItem('insurance-url', res.signDTO.policyUrl)
window.localStorage.setItem('detailJump', '')
sessionStorage.twowxSigned = false
// let url = config.imgDomain + `/app/returnStream?imgPath=${res.signDTO.policyUrl}`
// axios.get(url).then(res => {
// console.log(res)
// })
this.$jump({
flag: 'h5',
extra: {
url: location.origin + '/#/sale/signatureOfElectronic',
forbidSwipeBack: '1'
},
routerInfo: {
path: '/sale/signatureOfElectronic'
}
})
} else {
that.$toast(res.resultMessage)
}
})
}
}
}
},
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.appntSign.documentStatus !== '3') {
that.isDisable = false
} else {
that.isDisable = true
}
if (that.radio == '1' && val.appntSign.documentStatus == '3') {
that.isDisabledComplite = false
} else {
that.isDisabledComplite = true
}
}
if (val.appntSign.documentStatus == '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.appntSign.documentStatus == '3') {
that.isDisabledComplite = false
} else {
that.isDisabledComplite = true
}
}
}
}
},
beforeRouteLeave(to, from, next) {
document.body.style.backgroundColor = ''
next()
}
}
</script>
<style lang="scss" scoped>
img {
width: 100%;
height: 100%;
}
.notice {
width: 100%;
position: fixed;
top: 0;
z-index: 20;
}
.iframe {
width: 100vw;
height: 70vh;
}
</style>

View File

@@ -393,13 +393,19 @@ export default {
// axios.get(url).then(res => {
// console.log(res)
// })
let doubleRecordFlag = localStorage.doubleRecordFlag
let routeUrl = '/sale/signatureOfElectronic'
if (doubleRecordFlag == '1') {
// 跳转双录签署文件
routeUrl = '/sale/avoidDutyTip'
}
this.$jump({
flag: 'h5',
extra: {
url: location.origin + '/#/sale/signatureOfElectronic'
url: location.origin + '/#' + routeUrl
},
routerInfo: {
path: '/sale/signatureOfElectronic'
path: routeUrl
}
})
} else {
@@ -452,14 +458,20 @@ export default {
// axios.get(url).then(res => {
// console.log(res)
// })
let doubleRecordFlag = localStorage.doubleRecordFlag
let routeUrl = '/sale/signatureOfElectronic'
if (doubleRecordFlag == '1') {
// 跳转双录签署文件
routeUrl = '/sale/avoidDutyTip'
}
this.$jump({
flag: 'h5',
extra: {
url: location.origin + '/#/sale/signatureOfElectronic',
url: location.origin + '/#' + routeUrl,
forbidSwipeBack: '1'
},
routerInfo: {
path: '/sale/signatureOfElectronic'
path: routeUrl
}
})
} else {

View File

@@ -968,15 +968,37 @@ export default {
this.timeId = null
this.countDown = 60
this.codeDisabled = false
this.$jump({
flag: 'h5',
extra: {
url: location.origin + `/#/sale/insuredPerson?${str}`
},
routerInfo: {
path: `/sale/insuredPerson?${str}`
}
})
// 添加提示
let age = utilsAge.getAge(this.userInfo.birthday, new Date())
if(age >= 60) {
this.$dialog
.alert({
message: '年龄≥60周岁投保人如果投保一年期以上产品请根据监管要求对销售过程进行录音录像',
confirmButtonColor: '#000000'
})
.then(() => {
this.$jump({
flag: 'h5',
extra: {
url: location.origin + `/#/sale/insuredPerson?${str}`
},
routerInfo: {
path: `/sale/insuredPerson?${str}`
}
})
})
}else {
this.$jump({
flag: 'h5',
extra: {
url: location.origin + `/#/sale/insuredPerson?${str}`
},
routerInfo: {
path: `/sale/insuredPerson?${str}`
}
})
}
} else {
this.$toast(resultData.resultMessage)
}

View File

@@ -72,6 +72,9 @@
<span class="fs14 c-gray-dark">{{ order.stateName }}</span>
</div>
</div>
<div v-if="!!order.orderInfoDTO.doubleFlag && order.orderInfoDTO.doubleFlag == '0'" class="fs12 mt15">
温馨提示本投保单满足双录条件需要双录质检通过后才能承保
</div>
<div class="text-right mt15 ">
<van-button v-if="active == 'uncommit'" round @click="goDetail(order)" size="small" class="mr5" type="danger" v-no-more-click="1000"
>编辑</van-button

View File

@@ -285,6 +285,7 @@ export default {
methods: {
// 初始化
async init() {
localStorage.doubleRecordFlag = '0' //0不是双录单 1是双录单
if (this.isWeixin) {
if (this.$route.query.airSign) {
sessionStorage.setItem('airSign', this.$route.query.airSign)
@@ -437,7 +438,19 @@ export default {
if (that.changeCard) {
path = 'insuranceInformation'
} else {
if (localStorage.productCode == 'GFRS_M0003' || localStorage.productCode == 'GFRS_M0015' || this.productCode == 'GFRS_M0017') {
for (let i = 0; i < that.appntSign.length; i++) {
if (that.appntSign[i].documentCode == '1' && that.appntSign[0].documentStatus == 0) {
//1投保须知 未读
path = that.appntSign[i].routePath
break
} else {
if (that.appntSign[i].documentStatus == 2) {
path = that.appntSign[i].routePath
break
}
}
}
/* if (localStorage.productCode == 'GFRS_M0003' || localStorage.productCode == 'GFRS_M0015' || this.productCode == 'GFRS_M0017') {
if (that.appntSign[0].documentStatus == 0) {
path = 'insuranceInformation'
} else if (that.appntSign[1].documentStatus == 2) {
@@ -455,7 +468,7 @@ export default {
} else if (that.appntSign[2].documentStatus == 2) {
path = 'SignatureOfElectronic'
}
}
}*/
}
that.$jump({
flag: 'h5',
@@ -765,6 +778,10 @@ export default {
})
//获取投保和被保人电子投保单签字状态
that.appntSign.map(item => {
// 判断是否双录
if (item.documentCode == '6') {
localStorage.doubleRecordFlag = '1'
}
if (item.documentCode == '2') {
that.appntSignStatus = item.documentStatus
}
@@ -782,15 +799,25 @@ export default {
},
//自定义key值排序用
addKey(item) {
//ducumentCode 1投保须知 2投保单 3产品说明书 4提示书
//ducumentCode 1投保须知 2投保单 3产品说明书 4提示书 6免除保险人责任条款说明书 7保险销售行为双录说明
if (item.documentCode == '1') {
item.key = 1
item.routePath = 'insuranceInformation'
} else if (item.documentCode == '2') {
item.key = 4
item.key = 6
item.routePath = 'SignatureOfElectronic'
} else if (item.documentCode == '3') {
item.key = 2
item.routePath = 'productTip'
} else if (item.documentCode == '4') {
item.key = 3
item.routePath = 'InsuranceTip'
} else if (item.documentCode == '6') {
item.key = 4
item.routePath = 'avoidDutyTip'
} else if (item.documentCode == '7') {
item.key = 5
item.routePath = 'doubleRecordTip'
}
},
getSignInvalid() {