mirror of
http://112.124.100.131/GFRS/ebiz-h5.git
synced 2025-12-10 05:46:44 +08:00
feature/GFRS-2441 配置短期健康险投保须知-初版代码提交-提交人:白金岩
This commit is contained in:
@@ -26,6 +26,7 @@ const avoidDutyTip = () => import('@/views/ebiz/sale/AvoidDutyTip')
|
||||
const doubleRecordTip = () => import('@/views/ebiz/sale/DoubleRecordTip')
|
||||
const PayResultFail = () => import('@/views/ebiz/sale/PayResultFail')
|
||||
const apointValidDoc = () => import('@/views/ebiz/sale/apointValidDoc')
|
||||
const shortPeriodProduct = () => import('@/views/ebiz/sale/shortPeriodProduct')
|
||||
let riskName = localStorage.riskName
|
||||
console.log('sale/riskName==', riskName)
|
||||
export default [
|
||||
@@ -229,5 +230,13 @@ export default [
|
||||
meta: {
|
||||
title: '支付结果'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: '/sale/shortPeriodProduct',
|
||||
name: 'shortPeriodProduct',
|
||||
component: shortPeriodProduct,
|
||||
meta: {
|
||||
title: '国富人寿短期健康险投保须知'
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
@@ -38,11 +38,11 @@
|
||||
</div>
|
||||
<div v-else>
|
||||
<div v-for="(item, index) in appntSign" :key="index">
|
||||
<p>{{ item.documentCode == '1' || item.documentCode == '8' ? '需阅读' : '需签署' }}</p>
|
||||
<p>{{ item.documentCode == '1' || item.documentCode == '8' || item.documentCode == '9' ? '需阅读' : '需签署' }}</p>
|
||||
<p class="mb20">
|
||||
<span class="text">{{ item.documentName }}</span>
|
||||
<img :src="src" v-if="(item.documentCode == '1' || item.documentCode == '8') && item.documentStatus == '1'" />
|
||||
<img :src="src" v-if="!(item.documentCode == '1' || item.documentCode == '8') && item.documentStatus == '3'" />
|
||||
<img :src="src" v-if="(item.documentCode == '1' || item.documentCode == '8' || item.documentCode == '9') && item.documentStatus == '1'" />
|
||||
<img :src="src" v-if="!(item.documentCode == '1' || item.documentCode == '8' || item.documentCode == '9') && item.documentStatus == '3'" />
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
@@ -131,11 +131,11 @@
|
||||
</div>
|
||||
<div v-else>
|
||||
<div v-for="(item, index) in appntSign" :key="index">
|
||||
<p>{{ item.documentCode == '1' || item.documentCode == '8' ? '需阅读' : '需签署' }}</p>
|
||||
<p>{{ item.documentCode == '1' || item.documentCode == '8' || item.documentCode == '9'? '需阅读' : '需签署' }}</p>
|
||||
<p class="mb20">
|
||||
<span class="text">{{ item.documentName }}</span>
|
||||
<img :src="src" v-if="(item.documentCode == '1' || item.documentCode == '8') && item.documentStatus == '1'" />
|
||||
<img :src="src" v-if="(item.documentCode == '1' || item.documentCode == '8') && item.documentStatus == '3'" />
|
||||
<img :src="src" v-if="(item.documentCode == '1' || item.documentCode == '8' || item.documentCode == '9') && item.documentStatus == '1'" />
|
||||
<img :src="src" v-if="!(item.documentCode == '1' || item.documentCode == '8' || item.documentCode == '9') && item.documentStatus == '3'" />
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
@@ -169,7 +169,7 @@
|
||||
<p class="mb20">
|
||||
<span class="text">{{ item.documentName }}</span>
|
||||
<img :src="src" v-if="(item.documentCode == '1' || item.documentCode == '8') && item.documentStatus == '1'" />
|
||||
<img :src="src" v-if="(item.documentCode == '1' || item.documentCode == '8') && item.documentStatus == '3'" />
|
||||
<img :src="src" v-if="!(item.documentCode == '1' || item.documentCode == '8') && item.documentStatus == '3'" />
|
||||
</p>
|
||||
</div>
|
||||
<p class="start" v-if="airSign != '1'">点击【开始】或【分享】,进行相关操作</p>
|
||||
@@ -1001,7 +1001,7 @@ export default {
|
||||
} else {
|
||||
console.log('that.appntSign.length ==', that.appntSign.length, typeof that.appntSign.length)
|
||||
for (let i = 0; i < that.appntSign.length; i++) {
|
||||
if ((that.appntSign[i].documentCode == '1' || that.appntSign[i].documentCode == '8') && that.appntSign[i].documentStatus == 0) {
|
||||
if ((that.appntSign[i].documentCode == '1' || that.appntSign[i].documentCode == '8' || that.appntSign[i].documentCode == '9') && that.appntSign[i].documentStatus == 0) {
|
||||
//1投保须知 未读
|
||||
path = that.appntSign[i].routePath
|
||||
break
|
||||
@@ -1053,7 +1053,7 @@ export default {
|
||||
} else {
|
||||
console.log('that.appntSign.length ==', that.appntSign.length, typeof that.appntSign.length)
|
||||
for (let i = 0; i < that.appntSign.length; i++) {
|
||||
if ((that.appntSign[i].documentCode == '1' || that.appntSign[i].documentCode == '8') && that.appntSign[i].documentStatus == 0) {
|
||||
if ((that.appntSign[i].documentCode == '1' || that.appntSign[i].documentCode == '8' || that.appntSign[i].documentCode == '9') && that.appntSign[i].documentStatus == 0) {
|
||||
//1投保须知 未读
|
||||
path = that.appntSign[i].routePath
|
||||
break
|
||||
@@ -1543,7 +1543,7 @@ export default {
|
||||
},
|
||||
//自定义key值排序用
|
||||
addKey(item) {
|
||||
//ducumentCode 1投保须知 2投保单 3产品说明书 4提示书 6免除保险人责任条款说明书 7保险销售行为双录说明
|
||||
//ducumentCode 1投保须知 2投保单 3产品说明书 4提示书 6免除保险人责任条款说明书 7保险销售行为双录说明 8指定保单生效日 9短期险投保须知
|
||||
if (item.documentCode == '1') {
|
||||
item.key = 2
|
||||
item.routePath = 'insuranceInformation'
|
||||
@@ -1565,6 +1565,9 @@ export default {
|
||||
} else if (item.documentCode == '8') {
|
||||
item.key = 1
|
||||
item.routePath = 'apointValidDoc'
|
||||
} else if (item.documentCode == '9') {
|
||||
item.key = 0
|
||||
item.routePath = 'shortPeriodProduct'
|
||||
}
|
||||
},
|
||||
getSignInvalid() {
|
||||
|
||||
313
src/views/ebiz/sale/shortPeriodProduct.vue
Normal file
313
src/views/ebiz/sale/shortPeriodProduct.vue
Normal file
@@ -0,0 +1,313 @@
|
||||
<template>
|
||||
<div class="insuranceInformation-container pb50 redRadioCheckbox">
|
||||
<van-notice-bar :scrollable="false" v-if="!Time" class="notice">{{ `提示:阅读时长需在${this.Time ? this.time : this.number}秒以上` }}</van-notice-bar>
|
||||
<iframe :src="src + appntSign.policyUrl" 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="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, getOrderDetail1 } from '@/api/ebiz/sale/sale'
|
||||
import { openLoading, closeLoading } from '@/assets/js/utils/toastLoading.js'
|
||||
import config from '@/config'
|
||||
// import axios from 'axios'
|
||||
export default {
|
||||
data() {
|
||||
let isWeixin = this.$utils.device().isWeixin //判断环境
|
||||
return {
|
||||
// 投保人还是被保险人信息
|
||||
signVal: '',
|
||||
// 投保人签名信息
|
||||
appntSign: {},
|
||||
radio: '',
|
||||
// 倒计时时间
|
||||
number: '',
|
||||
// 定时器时间
|
||||
time: '10',
|
||||
// 定时器名称
|
||||
timer: null,
|
||||
isOver: false,
|
||||
// 判断验证码是否开始倒计时
|
||||
Time: true,
|
||||
// 是否在微信
|
||||
isWeixin,
|
||||
// sign加密码
|
||||
base64: '',
|
||||
// 是否可以点击
|
||||
isDisabledComplite: true,
|
||||
// local带来的被保险人信息
|
||||
saleInsuredPersonInfo: {},
|
||||
// local带来的投保人信息
|
||||
saleInsuredInfo: {},
|
||||
src: location.origin + '/pdfjs/web/viewer.html?file=',
|
||||
}
|
||||
},
|
||||
components: {
|
||||
[RadioGroup.name]: RadioGroup,
|
||||
[Radio.name]: Radio,
|
||||
[Dialog.name]: Dialog,
|
||||
[NoticeBar.name]: NoticeBar
|
||||
},
|
||||
mounted() {
|
||||
let that = this
|
||||
document.body.style.backgroundColor = '#fff'
|
||||
setTimeout(function() {
|
||||
closeLoading()
|
||||
that.timeOut()
|
||||
}, 5000)
|
||||
},
|
||||
async created() {
|
||||
if (!this.isWeixin) {
|
||||
setTimeout(() => {
|
||||
// eslint-disable-next-line no-undef
|
||||
EWebBridge.webCallAppInJs('webview_left_button', {
|
||||
img: this.$assetsUrl + 'images/del-close-btn@3x.png',
|
||||
intercept: '1' //是否拦截原生返回事件 1是 其他否
|
||||
})
|
||||
}, 100)
|
||||
window.appCallBack = this.appCallBack
|
||||
}
|
||||
this.getOrderDetail();
|
||||
let that = this;
|
||||
that.signVal = window.localStorage.getItem('sign-val')
|
||||
},
|
||||
methods: {
|
||||
appCallBack(data) {
|
||||
if (data.trigger == 'left_button_click') {
|
||||
return this.$dialog
|
||||
.confirm({
|
||||
className: 'dialog-delete',
|
||||
title: '提示',
|
||||
message: '退出流程可能会丢失部分数据,是否确认退出?',
|
||||
cancelButtonColor: '#E9332E',
|
||||
confirmButtonColor: '#FFFFFF'
|
||||
})
|
||||
.then(() => {
|
||||
this.$jump({
|
||||
flag: 'h5',
|
||||
extra: {
|
||||
title: '电子投保单列表',
|
||||
forbidSwipeBack: 1, //当前页面禁止右滑返回
|
||||
url: location.origin + `/#/sale/list`
|
||||
},
|
||||
routerInfo: {
|
||||
path: `/sale/list`,
|
||||
type: '1'
|
||||
}
|
||||
})
|
||||
})
|
||||
.catch(() => {
|
||||
return
|
||||
})
|
||||
}
|
||||
},
|
||||
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
|
||||
}
|
||||
that.number = `${time}`
|
||||
}, 1000)
|
||||
},
|
||||
// 获取签名状态
|
||||
getOrderDetail() {
|
||||
openLoading()
|
||||
let that = this
|
||||
let data = {
|
||||
orderNo: window.localStorage.getItem('orderNo')
|
||||
}
|
||||
return new Promise((resolve) => {
|
||||
getOrderDetail1(data).then(res => {
|
||||
if (res.result == '0') {
|
||||
res.orderDTO.ebizSignDTOS.map(item => {
|
||||
if (item.signType == '0' || item.signType == '2') {
|
||||
if (item.documentCode == '9') {
|
||||
that.appntSign = item
|
||||
console.log('that.appntSign', that.appntSign)
|
||||
}
|
||||
}
|
||||
})
|
||||
that.appntSign.policyUrl = encodeURIComponent(config.imgDomain + `/returnDirectStream?imgPath=${that.appntSign.policyUrl}`)
|
||||
resolve('success')
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
// 点击阅读时
|
||||
click() {
|
||||
let that = this
|
||||
if (that.isOver == false) {
|
||||
Dialog.confirm({
|
||||
title: '提示',
|
||||
message: '该内容涉及您的重大权益,请您仔细阅读',
|
||||
showCancelButton: false
|
||||
}).then(() => {
|
||||
that.radio = ''
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
// 下一步
|
||||
goNext() {
|
||||
if (this.isWeixin) {
|
||||
console.log('````````````````````')
|
||||
console.log('进入微信')
|
||||
this.$toast.loading({
|
||||
duration: 0, // 持续展示 toast
|
||||
|
||||
forbidClick: true, // 禁用背景点击
|
||||
|
||||
loadingType: 'spinner',
|
||||
|
||||
message: '加载中……'
|
||||
})
|
||||
let that = this
|
||||
if (that.signVal == '0' || that.signVal == '2') {
|
||||
let data = {
|
||||
orderType: 'SIGN_ORDER',
|
||||
orderDTO: {
|
||||
orderInfoDTO: {
|
||||
orderNo: window.localStorage.getItem('orderNo')
|
||||
},
|
||||
ebizSignDTOS: [
|
||||
{
|
||||
signOrRead: 'read',
|
||||
signId: that.appntSign.signId,
|
||||
orderNo: window.localStorage.getItem('orderNo'),
|
||||
documentCode: that.appntSign.documentCode,
|
||||
documentStatus: '1',
|
||||
signType: that.appntSign.signType,
|
||||
documentType: that.appntSign.documentType,
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
saveInformation(data).then(res => {
|
||||
if (res.result == '0') {
|
||||
this.$toast.clear()
|
||||
window.sessionStorage.onewxSigned = false
|
||||
// window.sessionStorage.oneimgBase64Data = ''
|
||||
this.$jump({
|
||||
flag: 'h5',
|
||||
extra: {
|
||||
url: location.origin + '/#/sale/insuranceInformation'
|
||||
},
|
||||
routerInfo: {
|
||||
path: '/sale/insuranceInformation'
|
||||
}
|
||||
})
|
||||
} 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') {
|
||||
console.log('that.appntSign.documentCode=',that.appntSign.documentCode);
|
||||
let data = {
|
||||
orderType: 'SIGN_ORDER',
|
||||
orderDTO: {
|
||||
orderInfoDTO: {
|
||||
orderNo: window.localStorage.getItem('orderNo')
|
||||
},
|
||||
ebizSignDTOS: [
|
||||
{
|
||||
signOrRead: 'read',
|
||||
signId: that.appntSign.signId,
|
||||
orderNo: window.localStorage.getItem('orderNo'),
|
||||
documentCode: that.appntSign.documentCode,
|
||||
documentStatus: '1',
|
||||
signType: that.appntSign.signType,
|
||||
documentType: that.appntSign.documentType,
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
saveInformation(data).then(res => {
|
||||
if (res.result == '0') {
|
||||
this.$toast.clear()
|
||||
this.$jump({
|
||||
flag: 'h5',
|
||||
extra: {
|
||||
url: location.origin + '/#/sale/insuranceInformation',
|
||||
forbidSwipeBack: '1'
|
||||
},
|
||||
routerInfo: {
|
||||
path: '/sale/insuranceInformation'
|
||||
}
|
||||
})
|
||||
} else {
|
||||
that.$toast(res.resultMessage)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
listenChange() {
|
||||
const { isOver, radio, appntSign } = this
|
||||
return { isOver, radio, appntSign }
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
listenChange(val) {
|
||||
let that = this
|
||||
if (val.isOver == true && val.radio !== '') {
|
||||
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;
|
||||
border: none;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user