mirror of
http://112.124.100.131/GFRS/ebiz-h5.git
synced 2025-12-08 12:56:43 +08:00
Compare commits
93 Commits
hotfix/【20
...
release/【2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
26fd37d63d | ||
|
|
714ae57063 | ||
|
|
65cd6c1756 | ||
|
|
f10e909fb6 | ||
|
|
2a44969f12 | ||
|
|
3d294c6954 | ||
|
|
3941a088d8 | ||
|
|
e9d04aceab | ||
|
|
7082d19d6a | ||
|
|
9a49e58faa | ||
|
|
8992c12004 | ||
|
|
513dfa500d | ||
|
|
82e9185853 | ||
|
|
9a7ee1a8a2 | ||
|
|
24d66b823d | ||
|
|
dc3c3707ec | ||
|
|
82d4d7b6d8 | ||
|
|
3be901873c | ||
|
|
a807027c02 | ||
|
|
baddd63819 | ||
|
|
51c075355d | ||
|
|
22e821a565 | ||
|
|
3c2896dd30 | ||
|
|
1ba23bdcf5 | ||
|
|
76c2df8948 | ||
|
|
0189328205 | ||
|
|
1f7f86ad4e | ||
|
|
c64641be7f | ||
|
|
caf6ce2296 | ||
|
|
b2b6a31d2d | ||
|
|
9bb19c5d7d | ||
|
|
22b7708e63 | ||
|
|
e6be9aa6ef | ||
|
|
0bf3a2e6c8 | ||
|
|
602491e0ae | ||
|
|
1a668cebc7 | ||
|
|
10e94484a7 | ||
|
|
c83792a815 | ||
|
|
1cfc7cda8c | ||
|
|
f08e9d5dbe | ||
|
|
bea756a350 | ||
|
|
83e8248055 | ||
|
|
8e4d3ad3e2 | ||
|
|
c2fdffd4b7 | ||
|
|
4967324d87 | ||
|
|
bafc29a595 | ||
|
|
cc701a123c | ||
|
|
ce299774e4 | ||
|
|
3d7fc9a09c | ||
|
|
c9799f68be | ||
|
|
e11cb7a5ec | ||
|
|
37561f5440 | ||
|
|
e7b738e9cd | ||
|
|
99a9eb460d | ||
|
|
8c78080f02 | ||
|
|
5cadaf3229 | ||
|
|
e696551ce4 | ||
|
|
044e3ceb4b | ||
|
|
03d2de19dd | ||
|
|
d578b7523f | ||
|
|
a7ad8b1fc0 | ||
|
|
d2b59c9a7c | ||
|
|
4526bed080 | ||
|
|
669344886f | ||
|
|
303b4344dc | ||
|
|
5fe3e49c48 | ||
|
|
79bd09b4bc | ||
|
|
1baa0ae28c | ||
|
|
bd7fd7c3f8 | ||
|
|
1d0342f92d | ||
|
|
728010fe38 | ||
|
|
8de9f7e0c5 | ||
|
|
59c14509b3 | ||
|
|
77d2f505c5 | ||
|
|
0f071d8a91 | ||
|
|
44ae14bb8c | ||
|
|
aa0f75ff89 | ||
|
|
882670b873 | ||
|
|
10fed64fd6 | ||
|
|
5da3fc2634 | ||
|
|
b5b08aa3d9 | ||
|
|
a98139a54b | ||
|
|
162be894f8 | ||
|
|
f16d8bf8ac | ||
|
|
ce8255a1b2 | ||
|
|
70d64966e9 | ||
|
|
2fc5ef1e79 | ||
|
|
a17015c8a0 | ||
|
|
4c4901037a | ||
|
|
c03b1589c4 | ||
|
|
047e802d08 | ||
|
|
6d94409cc9 | ||
|
|
49981ef63d |
Binary file not shown.
|
Before Width: | Height: | Size: 259 KiB After Width: | Height: | Size: 59 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 126 KiB After Width: | Height: | Size: 281 KiB |
@@ -559,7 +559,10 @@ export default {
|
||||
)
|
||||
|
||||
if (insuredDTO) {
|
||||
let insuredPersonAge = insuredDTO.birthday?utilsAge.getAge(insuredDTO.birthday, new Date()):insuredDTO.insuredAge
|
||||
let insuredPersonAge = insuredDTO.insuredAge ? insuredDTO.insuredAge : insuredDTO.age
|
||||
if(insuredDTO.birthday){
|
||||
insuredPersonAge = utilsAge.getAge(insuredDTO.birthday, new Date())
|
||||
}
|
||||
CacheUtils.setLocItem('saleInsuredPersonInfo',
|
||||
JSON.stringify({
|
||||
birthday: insuredDTO.birthday,
|
||||
|
||||
@@ -3769,6 +3769,30 @@ export default {
|
||||
{
|
||||
code: "oldMajorDiseaseInsurance",
|
||||
label: "元"
|
||||
},
|
||||
{
|
||||
code: "GFRS_A0013__cashValue",
|
||||
label: "元"
|
||||
},
|
||||
{
|
||||
code: "GFRS_M0073__cashValue",
|
||||
label: "元"
|
||||
},
|
||||
{
|
||||
code: "currentBonus_L",
|
||||
label: "元"
|
||||
},
|
||||
{
|
||||
code: "currentBonus_M",
|
||||
label: "元"
|
||||
},
|
||||
{
|
||||
code: "riskAC_L",
|
||||
label: "元"
|
||||
},
|
||||
{
|
||||
code: "riskAC_M",
|
||||
label: "元"
|
||||
}
|
||||
],
|
||||
// 卡单与短期险重新投保选择职业类别时,两个模块职业类型数据的排序不同,创建这个数据字典,用于在选择职业类别时,作为一个参数传入组件,
|
||||
|
||||
@@ -653,12 +653,6 @@ export default {
|
||||
// return
|
||||
// }
|
||||
this.userInfo.effectiveDateType = false
|
||||
//如果录入日期早于当前日期
|
||||
if (Date.parse(val) < Date.parse(new Date())) {
|
||||
this.userInfo.certiexpiredate = ''
|
||||
this.$refs.certiexpiredate.date = ''
|
||||
return this.$toast('您的证件已过期')
|
||||
}
|
||||
}
|
||||
break
|
||||
case '2':
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div class="own_content">
|
||||
<ul class="index-bar">
|
||||
<li @click="changePage(Number(index) + 1)" v-for="(item, index) in pageTitle" :key="index" :class="item.tabClass" :id="item.tabClass" v-if="item.show">
|
||||
<li @click="changePage(item.pageNo)" v-for="(item, index) in pageTitle" :key="index" :class="item.tabClass" :id="item.tabClass" v-if="item.show">
|
||||
<!-- 选中 -->
|
||||
<div v-if="item.tabClass" class="flex justify-content-fs align-items-c">
|
||||
<div class="flex flex-direction-colunm align-items-c">
|
||||
@@ -23,6 +23,7 @@
|
||||
</template>
|
||||
<script>
|
||||
import { Icon, Image } from 'vant'
|
||||
import { getOrderDetail1 } from '@/api/ebiz/sale/sale'
|
||||
export default {
|
||||
name: 'IndexBar',
|
||||
props: {
|
||||
@@ -50,6 +51,7 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
thisShow: false,
|
||||
doneUrl: this.$assetsUrl + 'images/kmh/done.png',
|
||||
doneNurl: this.$assetsUrl + 'images/kmh/done_n.png',
|
||||
pageTitle: [
|
||||
@@ -103,7 +105,7 @@ export default {
|
||||
pageItem: '风险测评',
|
||||
urlStr: '/sale/answerPage',
|
||||
tabClass: '',
|
||||
show:this.$store.getters.getAnswerType,
|
||||
show:false,
|
||||
imgCheckedUrl: this.$assetsUrl + 'images/kmh/fx1.png',
|
||||
imgNoCheckedUrl: this.$assetsUrl + 'images/kmh/fx2.png'
|
||||
},
|
||||
@@ -112,10 +114,19 @@ export default {
|
||||
pageItem: '风险测评结果',
|
||||
urlStr: '/sale/answerSuccess',
|
||||
tabClass: '',
|
||||
show:this.$store.getters.getAnswerType,
|
||||
show:false,
|
||||
imgCheckedUrl: this.$assetsUrl + 'images/kmh/fxjg1.png',
|
||||
imgNoCheckedUrl: this.$assetsUrl + 'images/kmh/fxjg2.png'
|
||||
},
|
||||
{
|
||||
pageNo: 7.1,
|
||||
pageItem: '风险告知',
|
||||
urlStr: '/sale/universalRiskNotifyingMessage',
|
||||
tabClass: '',
|
||||
show:false,
|
||||
imgCheckedUrl: this.$assetsUrl + 'images/kmh/zhxx.png',
|
||||
imgNoCheckedUrl: this.$assetsUrl + 'images/kmh/zhxx_n.png'
|
||||
},
|
||||
{
|
||||
pageNo: 8,
|
||||
pageItem: '账户信息',
|
||||
@@ -149,6 +160,35 @@ export default {
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
let that = this
|
||||
let data = {
|
||||
orderNo: that.$route.query.orderNo
|
||||
}
|
||||
getOrderDetail1(data).then(res => {
|
||||
if (res.result == '0') {
|
||||
if(res.orderDTO.universalRiskNotifyDTO){
|
||||
if(res.orderDTO.universalRiskNotifyDTO.isUniversalRiskNotifyShowPoint == 1){
|
||||
this.pageTitle.forEach(item=>{
|
||||
if(item.pageNo == 7.1){
|
||||
item.show = true
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
if(res.orderDTO.riskEvaluationDTO){
|
||||
if(res.orderDTO.riskEvaluationDTO.isShowEvaluationPoint == 1){
|
||||
this.pageTitle.forEach(item=>{
|
||||
if(item.pageNo == 6){
|
||||
item.show = true
|
||||
}
|
||||
if(item.pageNo == 7){
|
||||
item.show = true
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
this.selectTab()
|
||||
},
|
||||
methods: {
|
||||
@@ -181,6 +221,9 @@ export default {
|
||||
case 7: //跳到风险评估结果页
|
||||
url = `/sale/answerSuccess?edit=1&salePageFlag=${pageIndex}&orderNo=` + this.$route.query.orderNo
|
||||
break
|
||||
case 7.1: //跳到万能险风险告知页面
|
||||
url = `/sale/universalRiskNotifyingMessage?edit=1&salePageFlag=${pageIndex}&orderNo=` + this.$route.query.orderNo
|
||||
break
|
||||
case 8: //跳到账户信息页面
|
||||
url = `/sale/AccountInformation?edit=1&salePageFlag=${pageIndex}&orderNo=` + this.$route.query.orderNo
|
||||
break
|
||||
|
||||
@@ -10,12 +10,14 @@ const addBeneficiaryInfo = () => import('@/views/ebiz/sale/AddBeneficiaryInfo')
|
||||
|
||||
const signatureConfirmation = () => import('@/views/ebiz/sale/SignatureConfirmation')
|
||||
const notifyingMessage = () => import('@/views/ebiz/sale/NotifyingMessage')
|
||||
const universalRiskNotifyingMessage = () => import('@/views/ebiz/sale/universalRiskNotifyingMessage')
|
||||
const answerPage = () => import('@/views/ebiz/sale/answerPage')
|
||||
const answerSuccess = () => import('@/views/ebiz/sale/answerSuccess')
|
||||
const accountInformation = () => import('@/views/ebiz/sale/AccountInformation')
|
||||
const insuranceInformation = () => import('@/views/ebiz/sale/InsuranceInformation')
|
||||
const insuranceClauses = () => import('@/views/ebiz/sale/insuranceClauses')
|
||||
const insuranceTip = () => import('@/views/ebiz/sale/InsuranceTip')
|
||||
const universalRiskNotifyingMessageTip = () => import('@/views/ebiz/sale/universalRiskNotifyingMessageTip')
|
||||
const InsuranceRiskReminder = () => import('@/views/ebiz/sale/InsuranceRiskReminder')
|
||||
const signatureOfElectronic = () => import('@/views/ebiz/sale/SignatureOfElectronic')
|
||||
const PersonalInformation = () => import('@/views/ebiz/sale/PersonalInformation')
|
||||
@@ -122,6 +124,14 @@ export default [
|
||||
title: '告知信息'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: '/sale/universalRiskNotifyingMessage',
|
||||
name: 'universalRiskNotifyingMessage',
|
||||
component: universalRiskNotifyingMessage,
|
||||
meta: {
|
||||
title: '风险告知'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: '/sale/answerPage',
|
||||
name: 'answerPage',
|
||||
@@ -170,6 +180,14 @@ export default [
|
||||
title: '阅读人身保险投保提示书'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: '/sale/universalRiskNotifyingMessageTip',
|
||||
name: 'universalRiskNotifyingMessageTip',
|
||||
component: universalRiskNotifyingMessageTip,
|
||||
meta: {
|
||||
title: '万能型人身保险产品风险告知问卷'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: '/sale/InsuranceRiskReminder',
|
||||
name: 'InsuranceRiskReminder',
|
||||
|
||||
@@ -27,7 +27,7 @@ export default new Vuex.Store({
|
||||
agentGrade: '', //用户的agentGrade,判断用户权限
|
||||
secondManageCode: '', //内勤所需参数
|
||||
orderDetail: {},//无优卡分享微信端订单信息
|
||||
answerType: true,//风险测评tab是否显示
|
||||
answerType: false,//风险测评tab是否显示
|
||||
},
|
||||
mutations: {
|
||||
setOrderDetail (state, data) {
|
||||
|
||||
@@ -14,8 +14,16 @@
|
||||
<img class="menu1_p_img" src="@/assets/YB_APP/images/15.png">
|
||||
<span class="menu1_p_span">投保相关</span>
|
||||
</p>
|
||||
<div class="menu1_div">
|
||||
<div v-for="(item, ind) in menu1" :key="ind" @click="pageJump(item)" class="menu1_div_div">
|
||||
<div class="menu1_div" style="margin-bottom: 10px;">
|
||||
<div v-for="(item, ind) in menu1" :key="ind" @click="pageJump(item)" v-if="ind <= 3" class="menu1_div_div">
|
||||
<div>
|
||||
<img class="menu1_div_div_img" :src="item.img">
|
||||
</div>
|
||||
<p class="menu1_div_p">{{ item.title }}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="menu1_div" v-if="menu1.length > 4">
|
||||
<div v-for="(item, ind) in menu1" :key="ind" @click="pageJump(item)" v-if="ind > 3" class="menu1_div_div">
|
||||
<div>
|
||||
<img class="menu1_div_div_img" :src="item.img">
|
||||
</div>
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { Field, GoodsAction, GoodsActionIcon, GoodsActionButton, Icon ,Collapse, CollapseItem} from 'vant'
|
||||
import {Field, GoodsAction, GoodsActionIcon, GoodsActionButton, Icon, Collapse, CollapseItem, Dialog} from 'vant'
|
||||
import {cardOrderDetail } from '@/api/ebiz/cardList/cardList.js'
|
||||
import getAreaName from '@/assets/js/utils/getAreaNameForSale'
|
||||
import afterDate from '@/assets/js/utils/getAfterDate.js'
|
||||
@@ -79,7 +79,8 @@ export default {
|
||||
riskDTO: {},
|
||||
productDate: '',
|
||||
orderInfoDTO:{},
|
||||
isGroupCard:''
|
||||
isGroupCard:'',
|
||||
mainRiskCode: ''
|
||||
// isLessEighteen: true // 被保人手机号和邮箱默认展示
|
||||
}
|
||||
},
|
||||
@@ -101,6 +102,11 @@ export default {
|
||||
this.orderInfoDTO = res.orderDTO.orderInfoDTO
|
||||
this.insuredInfo = res.orderDTO.insuredDTOs
|
||||
this.insuredInfo.forEach(item => {
|
||||
item.riskDTOLst.forEach(ii=>{
|
||||
if(ii.isMainRisk == '0'){
|
||||
this.mainRiskCode = ii.mainRiskCode
|
||||
}
|
||||
})
|
||||
item.homeName = getAreaName([{ code: item.homeProvince }, { code: item.homeCity }, { code: item.homeArea }])
|
||||
})
|
||||
// this.riskDTO = res.orderDTO.insuredDTOs[0].riskDTOLst[0]
|
||||
@@ -132,15 +138,37 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
nextStep() {
|
||||
this.$jump({
|
||||
flag: 'h5',
|
||||
extra: {
|
||||
url: location.origin + `/#/cardList/SignatureConfirmation?isGroupCard=`+this.isGroupCard
|
||||
},
|
||||
routerInfo: {
|
||||
path: `/cardList/SignatureConfirmation?isGroupCard=`+this.isGroupCard
|
||||
}
|
||||
})
|
||||
if(this.mainRiskCode == 'GFRS_M0058'){
|
||||
Dialog.alert({
|
||||
title: '特别提醒',
|
||||
messageAlign: 'left',
|
||||
confirmButtonText: '确认',
|
||||
message: `2023年9月1日起生效的惠桂保保单,不能参保的5类既往症中增加了“神经性耳聋”,敬请注意!`,
|
||||
})
|
||||
.then(() => {
|
||||
this.$jump({
|
||||
flag: 'h5',
|
||||
extra: {
|
||||
url: location.origin + `/#/cardList/SignatureConfirmation?isGroupCard=`+this.isGroupCard
|
||||
},
|
||||
routerInfo: {
|
||||
path: `/cardList/SignatureConfirmation?isGroupCard=`+this.isGroupCard
|
||||
}
|
||||
})
|
||||
})
|
||||
.catch(() => {
|
||||
})
|
||||
}else{
|
||||
this.$jump({
|
||||
flag: 'h5',
|
||||
extra: {
|
||||
url: location.origin + `/#/cardList/SignatureConfirmation?isGroupCard=`+this.isGroupCard
|
||||
},
|
||||
routerInfo: {
|
||||
path: `/cardList/SignatureConfirmation?isGroupCard=`+this.isGroupCard
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -290,6 +290,7 @@ export default {
|
||||
accBankProvince: '',
|
||||
accBankCity: '',
|
||||
areaStr: '',
|
||||
mainRiskCode: '',
|
||||
isGroupCard:'' //1 团险标识
|
||||
}
|
||||
},
|
||||
@@ -310,17 +311,13 @@ export default {
|
||||
this.bankListName = orderDetail.orderAccountDTO.bankName
|
||||
this.orderStatus = orderDetail.orderInfoDTO.orderStatus
|
||||
localStorage.orderNo = orderDetail.orderInfoDTO.orderNo
|
||||
// this.radio = '3'
|
||||
// this.isLoading = true
|
||||
// this.$toast.loading({
|
||||
// duration: 0, // 持续展示 toast
|
||||
// forbidClick: true, // 禁用背景点击
|
||||
// loadingType: 'spinner',
|
||||
// message: '加载中……'
|
||||
// })
|
||||
// setTimeout(() => {
|
||||
// this.pay()
|
||||
// }, 500)
|
||||
orderDetail.insuredDTOs.forEach(item=>{
|
||||
item.riskDTOLst.forEach(ii=>{
|
||||
if(ii.isMainRisk == '0'){
|
||||
this.mainRiskCode = ii.mainRiskCode
|
||||
}
|
||||
})
|
||||
})
|
||||
} else {
|
||||
document.title = '支付分享'
|
||||
// 再次支付 调详情 获取信息
|
||||
@@ -513,6 +510,13 @@ export default {
|
||||
getOrderDetail({ orderNo: window.localStorage.getItem('orderNo') }).then(res => {
|
||||
if (res.result == '0') {
|
||||
this.insuredDTOs = res.orderDTO.insuredDTOs
|
||||
res.orderDTO.insuredDTOs.forEach(item=>{
|
||||
item.riskDTOLst.forEach(ii=>{
|
||||
if(ii.isMainRisk == '0'){
|
||||
this.mainRiskCode = ii.mainRiskCode
|
||||
}
|
||||
})
|
||||
})
|
||||
this.orderStatus = res.orderDTO.orderInfoDTO.orderStatus
|
||||
try {
|
||||
if (this.noEdit) {
|
||||
@@ -742,58 +746,69 @@ export default {
|
||||
支付之前要先保存银行账户信息
|
||||
*/
|
||||
let res = await saveOrUpdateAccount(data)
|
||||
// .then(res => {
|
||||
console.log('res', res)
|
||||
this.$toast.clear()
|
||||
if (res.result == '0') {
|
||||
if(this.mainRiskCode == 'GFRS_M0058'){
|
||||
Dialog.alert({
|
||||
title: '特别提醒',
|
||||
messageAlign: 'left',
|
||||
confirmButtonText: '确认',
|
||||
message: `2023年9月1日起生效的惠桂保保单,不能参保的5类既往症中增加了“神经性耳聋”,敬请注意!`,
|
||||
})
|
||||
.then(() => {
|
||||
this.$toast.loading({
|
||||
duration: 0, // 持续展示 toast
|
||||
forbidClick: true, // 禁用背景点击
|
||||
loadingType: 'spinner',
|
||||
message: '加载中……'
|
||||
})
|
||||
this.acceptInsurance()
|
||||
})
|
||||
.catch(() => {
|
||||
})
|
||||
}else{
|
||||
this.$toast.loading({
|
||||
duration: 0, // 持续展示 toast
|
||||
forbidClick: true, // 禁用背景点击
|
||||
loadingType: 'spinner',
|
||||
message: '加载中……'
|
||||
})
|
||||
this.acceptInsurance()
|
||||
}
|
||||
|
||||
} else {
|
||||
this.$toast(res.resultMessage)
|
||||
this.isLoading = false
|
||||
}
|
||||
} else {
|
||||
if(this.mainRiskCode == 'GFRS_M0058'){
|
||||
Dialog.alert({
|
||||
title: '特别提醒',
|
||||
messageAlign: 'left',
|
||||
confirmButtonText: '确认',
|
||||
message: `2023年9月1日起生效的惠桂保保单,不能参保的5类既往症中增加了“神经性耳聋”,敬请注意!`,
|
||||
})
|
||||
.then(() => {
|
||||
this.$toast.loading({
|
||||
duration: 0, // 持续展示 toast
|
||||
forbidClick: true, // 禁用背景点击
|
||||
loadingType: 'spinner',
|
||||
message: '加载中……'
|
||||
})
|
||||
this.acceptInsurance()
|
||||
})
|
||||
.catch(() => {
|
||||
})
|
||||
}else{
|
||||
this.$toast.loading({
|
||||
duration: 0, // 持续展示 toast
|
||||
forbidClick: true, // 禁用背景点击
|
||||
loadingType: 'spinner',
|
||||
message: '加载中……'
|
||||
})
|
||||
|
||||
// if (!flag) {
|
||||
// let rs = await this.underWrite()
|
||||
|
||||
// if (rs.result != '0') {
|
||||
// this.$toast.clear()
|
||||
// return this.$toast(rs.resultMessage)
|
||||
// }
|
||||
|
||||
// if (rs.uwResult != '02') {
|
||||
// return this.$toast(rs.message)
|
||||
// }
|
||||
// }
|
||||
|
||||
this.acceptInsurance()
|
||||
} else {
|
||||
this.$toast(res.resultMessage)
|
||||
this.isLoading = false
|
||||
}
|
||||
// })
|
||||
} else {
|
||||
this.$toast.loading({
|
||||
duration: 0, // 持续展示 toast
|
||||
forbidClick: true, // 禁用背景点击
|
||||
loadingType: 'spinner',
|
||||
message: '加载中……'
|
||||
})
|
||||
|
||||
// if (!flag) {
|
||||
// let rs = await this.underWrite()
|
||||
|
||||
// if (rs.result != '0') {
|
||||
// this.$toast.clear()
|
||||
// return this.$toast(rs.resultMessage)
|
||||
// }
|
||||
|
||||
// if (rs.uwResult != '02') {
|
||||
// return this.$toast(rs.message)
|
||||
// }
|
||||
// }
|
||||
|
||||
this.acceptInsurance()
|
||||
}
|
||||
},
|
||||
// 选择微信支付校验身份证类型
|
||||
|
||||
@@ -978,7 +978,9 @@ export default {
|
||||
if (res.result == 0) {
|
||||
//选择保障方案
|
||||
this.trialList = res.trialList
|
||||
this.allPrice = res.trialList[0].prem
|
||||
if (!this.allPrice) {
|
||||
this.allPrice = res.trialList[0].prem
|
||||
}
|
||||
} else {
|
||||
this.$toast(res.resultMessage)
|
||||
}
|
||||
@@ -1594,10 +1596,32 @@ export default {
|
||||
this.userInfo.homeAddress = data.homeAddress //家庭详细地址
|
||||
this.userInfo.occupationCode = data.occupationCode
|
||||
this.userInfo.occupationName = data.occupationName
|
||||
let thisoccupationType = ''
|
||||
let thislifeGrade = ''
|
||||
let thishealthGrade = ''
|
||||
let collect = (data,code) => {
|
||||
data.forEach(item => {
|
||||
if (item.code == code) {
|
||||
if (this.trialDTOS.productInsuredDTO.healthGrade && this.trialDTOS.productInsuredDTO.healthGrade != '0') {
|
||||
thisoccupationType = item.healthGrade
|
||||
}
|
||||
if (this.trialDTOS.productInsuredDTO.lifeGrade && this.trialDTOS.productInsuredDTO.lifeGrade != '0') {
|
||||
thisoccupationType = item.lifeGrade
|
||||
}
|
||||
thislifeGrade = item.lifeGrade
|
||||
thishealthGrade = item.healthGrade
|
||||
} else {
|
||||
if (item.subs && item.subs.length != 0) {
|
||||
collect(item.subs,code)
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
collect(occupationList,data.occupationCode)
|
||||
|
||||
this.userInfo.occupationType = data.lifeGrade
|
||||
this.userInfo.lifeGrade = data.lifeGrade
|
||||
this.userInfo.healthGrade = data.healthGrade
|
||||
this.userInfo.occupationType =thisoccupationType
|
||||
this.userInfo.lifeGrade = thislifeGrade
|
||||
this.userInfo.healthGrade = thishealthGrade
|
||||
this.userInfo.averageAnnualIncome = this.itemProductDTOS.productCode == 'GFRS_M0032' ? data.averageYearlyIncome : '0' //平均年收入
|
||||
//2516--三个学平险--被保险人国籍默认中国,允许修改
|
||||
if (this.itemProductDTOS.productCode == 'GFRS_M0048' || this.itemProductDTOS.productCode == 'GFRS_M0049' || this.itemProductDTOS.productCode == 'GFRS_M0050'
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -23,7 +23,7 @@
|
||||
</div>
|
||||
|
||||
<div class="text-right pv5">
|
||||
<!-- <van-button v-if="isFrom == 'proposal'" size="small" round @click="editInsure(index,item)" class="mr5" type="danger">编辑</van-button>-->
|
||||
<van-button v-if="isFrom == 'proposal'" size="small" round @click="editInsure(index,item)" class="mr5" type="danger">编辑</van-button>
|
||||
<van-button size="small" round @click="deteleInsure(index)" plain type="danger">删除</van-button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -119,7 +119,7 @@
|
||||
<script>
|
||||
import { Tag, SubmitBar, Icon, Dialog, RadioGroup, Radio, Image } from 'vant'
|
||||
import FieldPicker from '@/components/ebiz/FieldPicker'
|
||||
import { orderDetail, deleteOrderInfo } from '@/api/ebiz/common/common'
|
||||
import { orderDetail, deleteOrderInfo, mainRiskList, mainRiskListProposal, calculatePremium } from '@/api/ebiz/common/common'
|
||||
import { formatAllRisk } from '@/assets/js/utils/formatRiskList'
|
||||
import { getDetail, deleteProposal } from '@/api/ebiz/proposal/proposal.js'
|
||||
import { saveOrderActiveType,getActivityList } from '@/api/ebiz/sale/sale.js'
|
||||
@@ -148,6 +148,7 @@ export default {
|
||||
noCheckedUrl: require('@/assets/images/kmh/no_checked.png'),
|
||||
proposalOrderNo:'',
|
||||
renovate:'',//刷新子组件
|
||||
isCrossChannel: 0, // 是否选择交叉渠道列表 0-否 1-是
|
||||
}
|
||||
},
|
||||
components: {
|
||||
@@ -180,18 +181,30 @@ export default {
|
||||
}
|
||||
//建议书--右上角为退出流程键(到建议书列表)×,并清除浏览记录
|
||||
if (localStorage.isFrom == 'proposal') {
|
||||
// eslint-disable-next-line no-undef
|
||||
setTimeout(() => {
|
||||
EWebBridge.webCallAppInJs('webview_right_button', {
|
||||
btns: [
|
||||
{
|
||||
img: this.$assetsUrl + 'images/del-close.png',
|
||||
route: { flag: '', extra: {} }
|
||||
}
|
||||
]
|
||||
})
|
||||
}, 500)
|
||||
// eslint-disable-next-line no-undef
|
||||
setTimeout(() => {
|
||||
EWebBridge.webCallAppInJs('webview_right_button', {
|
||||
btns: [
|
||||
{
|
||||
img: this.$assetsUrl + 'images/del-close.png',
|
||||
route: { flag: '', extra: {} }
|
||||
}
|
||||
]
|
||||
})
|
||||
}, 500)
|
||||
getDetail({
|
||||
orderNo: this.$route.query.proposalOrderNo
|
||||
}).then(res => {
|
||||
if (res.result == '0') {
|
||||
this.recommendType = res.content[0].recmdDTO?res.content[0].recmdDTO.recommendType:'';
|
||||
if (this.recommendType == '02' || this.recommendType == '11') {
|
||||
// 电投 团险渠道产品 均为交叉渠道销售
|
||||
this.isCrossChannel = '1';
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
window.appCallBack = this.appCallBack
|
||||
document.body.style.backgroundColor = '#fff'
|
||||
this.getProductList()
|
||||
@@ -322,11 +335,7 @@ export default {
|
||||
if (resultData.result == 0) {
|
||||
if( resultData.orderDTO ) {
|
||||
//判断是否显示风险测评tab
|
||||
let updateAnswerType = resultData.orderDTO.riskEvaluationDTO.isShowEvaluationPoint =='1'?true:false
|
||||
this.$store.commit('updateAnswerType', updateAnswerType )
|
||||
// console.log(updateAnswerType,'updateAnswerType');
|
||||
this.renovate = new Date().getTime()
|
||||
|
||||
this.renovate = new Date().getTime()
|
||||
}
|
||||
let riskDTOLst
|
||||
if (isProposal) {
|
||||
@@ -426,8 +435,236 @@ export default {
|
||||
this.$toast(resultData.resultMessage)
|
||||
}
|
||||
},
|
||||
//编辑
|
||||
editInsure(index,data){
|
||||
//获取主险列表--普通产品
|
||||
async getMainRiskList(riskProductCode) {
|
||||
let mainRiskCodes = localStorage.mainRiskCodes && JSON.parse(localStorage.mainRiskCodes)
|
||||
let mainListDate = { platform: 'app' }
|
||||
switch (this.isFrom) {
|
||||
case 'proposal':
|
||||
mainListDate.platform = 'proposal'
|
||||
break
|
||||
case 'sale':
|
||||
mainListDate.platform = 'app'
|
||||
break
|
||||
}
|
||||
if (this.isCrossChannel == '1') {
|
||||
mainListDate.platform = 'cross'
|
||||
}
|
||||
let resultData
|
||||
if(this.isFrom == 'proposal'){
|
||||
resultData = await mainRiskListProposal(mainListDate)
|
||||
}else{
|
||||
resultData = await mainRiskList(mainListDate)
|
||||
}
|
||||
if (resultData.result == 0) {
|
||||
if (resultData.mainRiskDTOS && resultData.mainRiskDTOS.length > 0){
|
||||
resultData.mainRiskDTOS.forEach(item=>{
|
||||
if (item.riskProductCode == riskProductCode) {
|
||||
this.result = item
|
||||
}
|
||||
})
|
||||
this.addMainRisk()
|
||||
}
|
||||
}
|
||||
},
|
||||
//储存主险
|
||||
async addMainRisk() {
|
||||
localStorage.setItem('isTrial', '1')
|
||||
let riskProductCode = this.result.riskProductCode
|
||||
let resultData = await calculatePremium({ productCodes: [riskProductCode], platform: 'app', type: '1' })
|
||||
if (resultData.result == 0) {
|
||||
resultData = resultData.trialDTOS[0]
|
||||
localStorage.isTrial = resultData.productTrialInfoDTO.productTrialYearDTOS != null ? '0' : '1'
|
||||
localStorage.hint = resultData.hint
|
||||
if (resultData.productTrialInfoDTO.dutyGroup != null) {
|
||||
resultData.productTrialInfoDTO.dutyGroup.map(item => {
|
||||
if (item.dutyName == '意外身故/伤残保险金') {
|
||||
item.defaultDutyAmt = item.minDutyAmt
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
if (resultData.productTrialInfoDTO.ruleExpression) {
|
||||
let ruleExpression = localStorage.ruleExpression ? JSON.parse(localStorage.ruleExpression) : {}
|
||||
ruleExpression[resultData.productCode] = resultData.productTrialInfoDTO.ruleExpression
|
||||
localStorage.ruleExpression = JSON.stringify(ruleExpression)
|
||||
}
|
||||
|
||||
/********start 主险选择限制 start******/
|
||||
|
||||
// 检验投被人关系 惠企保特殊校验
|
||||
if (riskProductCode == 'GFRS_M0040') {
|
||||
if (riskRules.relationLimit(resultData, JSON.parse(this.$CacheUtils.getLocItem('saleInsuredPersonInfo')).relationToAppnt, this)) {
|
||||
return
|
||||
}
|
||||
}
|
||||
// 检验投被人关系 国富人寿特定疾病药品费用医疗保险特殊校验
|
||||
if (riskProductCode == 'GFRS_M0045') {
|
||||
if (riskRules.relationCommonLimit(resultData, JSON.parse(this.$CacheUtils.getLocItem('saleInsuredPersonInfo')).relationToAppnt, this)) {
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
if (riskRules.ageLimit(resultData, this, null,riskProductCode)) {
|
||||
return
|
||||
}
|
||||
|
||||
if (riskRules.medicalLimit(resultData, this)) {
|
||||
return
|
||||
}
|
||||
|
||||
if (riskRules.healthGradeLimit(resultData, this)) {
|
||||
return
|
||||
}
|
||||
// if (riskRules.lifeGradeLimit(resultData, this)) {
|
||||
// return
|
||||
// }
|
||||
//validateAppntFlag 0-职业寿险等级需校验主合同的投保人;1-职业寿险等级无需校验主合同的投保人
|
||||
if (resultData.productInsuredDTO.validateAppntFlag == '0') {
|
||||
//校验主合同投保人寿险职业等级
|
||||
if (riskRules.lifeGradeLimitForBaby(resultData, this)) {
|
||||
return
|
||||
}
|
||||
} else {
|
||||
//校验主合同被保险人寿险职业等级
|
||||
if (riskRules.lifeGradeLimit(resultData, this)) {
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
let flagPermission = await riskRules.getProductSellPermissionList(resultData.productCode, this,this.isCrossChannel)
|
||||
if (flagPermission.flag && localStorage.isFrom != 'proposal') {
|
||||
//校验该代理人是否有该产品的售卖权限
|
||||
return this.$toast(flagPermission.resultMessage)
|
||||
}
|
||||
let flagCompany = await riskRules.checkCompany(resultData.productCode, JSON.parse(this.$CacheUtils.getLocItem('saleInsuredInfo')).workcompany, JSON.parse(this.$CacheUtils.getLocItem('saleInsuredInfo')).isAsync,this)
|
||||
if (flagCompany && localStorage.isFrom != 'proposal') {
|
||||
//校验该投保人的工作单位是否能够投保该产品
|
||||
return this.$toast('该投保人工作单位不能投保该产品')
|
||||
}
|
||||
/********end 主险选择限制 end******/
|
||||
|
||||
//保存附加险
|
||||
localStorage.addtionRiskLst = JSON.stringify(resultData.productTrialInfoDTO.addtionRiskLst)
|
||||
localStorage.isAutoPay = resultData.isAutoPay
|
||||
localStorage.isRenew = resultData.isRenew
|
||||
localStorage.isForceRenew = resultData.isForceRenew
|
||||
localStorage.isRelated = resultData.isRelated
|
||||
|
||||
let calFactorLst = this.getFactorList(resultData)
|
||||
let productTrialYearDTOS = resultData.productTrialInfoDTO.productTrialYearDTOS != null ? resultData.productTrialInfoDTO.productTrialYearDTOS : null
|
||||
let hasAddtionRisk = (resultData.productTrialInfoDTO.addtionRiskLst != null && resultData.productTrialInfoDTO.addtionRiskLst.length) ? true : false
|
||||
let currentProductInfo = localStorage.isTrial == '1' ? {
|
||||
isCrossChannel:this.isCrossChannel,
|
||||
calFactorLst,
|
||||
hasAddtionRisk,
|
||||
isMainRisk: 0,
|
||||
hint: resultData.hint,
|
||||
riskType: resultData.riskType,
|
||||
riskName: this.result.riskName,
|
||||
productCode: this.result.riskProductCode,
|
||||
mainRiskCode: this.result.riskProductCode,
|
||||
documentDTOS: resultData.productTrialInfoDTO.documentDTOS,
|
||||
influences: resultData.productTrialInfoDTO.influences,
|
||||
isRemit: resultData.productTrialInfoDTO.isRemit,
|
||||
hasPredictTransferPrem: resultData.productTrialInfoDTO.hasPredictTransferPrem, //建议书使用 是否展示预计转入保费
|
||||
predictTransferPrem: null //建议书使用 预计转入保费字段
|
||||
} : {
|
||||
isCrossChannel:this.isCrossChannel,
|
||||
productTrialYearDTOS,
|
||||
calFactorLst,
|
||||
hasAddtionRisk,
|
||||
isMainRisk: 0,
|
||||
hint: resultData.hint,
|
||||
riskType: resultData.riskType,
|
||||
riskName: this.result.riskName,
|
||||
productCode: this.result.riskProductCode,
|
||||
mainRiskCode: this.result.riskProductCode,
|
||||
documentDTOS: resultData.productTrialInfoDTO.documentDTOS,
|
||||
influences: resultData.productTrialInfoDTO.influences,
|
||||
isRemit: resultData.productTrialInfoDTO.isRemit,
|
||||
hasPredictTransferPrem: resultData.productTrialInfoDTO.hasPredictTransferPrem, //建议书使用 是否展示预计转入保费
|
||||
predictTransferPrem: null //建议书使用 预计转入保费字段
|
||||
}
|
||||
|
||||
//构建险种数组
|
||||
let productsData
|
||||
if (localStorage.chooseProducts) {
|
||||
productsData = JSON.parse(localStorage.chooseProducts)
|
||||
productsData.push(currentProductInfo)
|
||||
} else {
|
||||
productsData = [currentProductInfo]
|
||||
}
|
||||
//保存选择险种
|
||||
productsData = this.$utils.unrepeatObj(productsData, 'productCode') //产品数组去重,跳转试算页面未成功重复添加同一产品的情况
|
||||
localStorage.chooseProducts = JSON.stringify(productsData)
|
||||
this.jumpTo(this.thisEditIndex,this.thisEditData)
|
||||
}
|
||||
},
|
||||
//构建险种因子列表
|
||||
getFactorList(resultData) {
|
||||
let productTrialInfoDTO = resultData.productTrialInfoDTO
|
||||
console.log(productTrialInfoDTO, 'wode')
|
||||
let calFactorLst = resultData.productTrialInfoDTO.calFactorLst
|
||||
console.log('calFactorLst', calFactorLst)
|
||||
|
||||
calFactorLst.forEach(item => {
|
||||
item['isMainRisk'] = 0
|
||||
item.columns = []
|
||||
if (item.type == 0) {
|
||||
//1、type=0 select 2、type=1 input+stepper
|
||||
productTrialInfoDTO[item.code].forEach(factor => {
|
||||
if (factor.defaultValue == 0) {
|
||||
item.showContent = factor.showContent
|
||||
if (factor[item.code + 'Flag'] != undefined) {
|
||||
item[item.code] = factor[item.code]
|
||||
item[item.code + 'Flag'] = factor[item.code + 'Flag']
|
||||
item.hasFlag = '1'
|
||||
}else if(item.code == 'pensionAge'){
|
||||
//养老保险金领取年龄
|
||||
item[item.code] = factor[item.code]
|
||||
item['sex'] = factor.sex
|
||||
}else {
|
||||
item[item.code] = factor[item.code]
|
||||
}
|
||||
}
|
||||
let itemColumns = { text: factor.showContent, value: factor[item.code], flag: factor[item.code + 'Flag'],sex:factor.sex}
|
||||
if (factor.medical !== undefined) {
|
||||
itemColumns.medical = factor.medical
|
||||
}
|
||||
item.columns.push(itemColumns)
|
||||
})
|
||||
} else if (item.type == 1) {
|
||||
//按年龄选择
|
||||
if (productTrialInfoDTO[item.code] != null) {
|
||||
productTrialInfoDTO[item.code].forEach(factor => {
|
||||
// item = Object.assign(item, factor)
|
||||
if(JSON.parse(this.$CacheUtils.getLocItem('saleInsuredPersonInfo')).insuredAge >= Number(factor.minAge) && JSON.parse(this.$CacheUtils.getLocItem('saleInsuredPersonInfo')).insuredAge <= Number(factor.maxAge)){
|
||||
// if(JSON.parse(this.$CacheUtils.getLocItem('saleInsuredPersonInfo')).age >= Number(factor.minAge) && JSON.parse(this.$CacheUtils.getLocItem('saleInsuredPersonInfo')).age <= Number(factor.maxAge)){
|
||||
item = Object.assign(item, factor)
|
||||
}
|
||||
})
|
||||
if (item.code == 'inputPrem') {
|
||||
item['inputPrem'] = Number(item.minPrem) * Number(item.moneyUnit)
|
||||
} else {
|
||||
item['amt'] = Number(item.minAmt) * Number(item.moneyUnit)
|
||||
}
|
||||
}
|
||||
}
|
||||
//规则储存
|
||||
item['rules'] = productTrialInfoDTO[item.code]
|
||||
})
|
||||
// // 用于意外险初始化保额
|
||||
// calFactorLst.map(item => {
|
||||
// if (item.code == '"dutyGroup"') {
|
||||
// item.rules.map(factor => {
|
||||
// factor[0].defaultDutyAmt = 50
|
||||
// })
|
||||
// }
|
||||
// })
|
||||
return calFactorLst
|
||||
},
|
||||
jumpTo(index,data){
|
||||
let insuanceIdInfo = [{insuanceId: data.insuanceId, riskCode: data.riskCode, isMainRisk: 0 }]
|
||||
if(data.addtion && data.addtion.length != 0){
|
||||
data.addtion.forEach(item=>{
|
||||
@@ -441,11 +678,12 @@ export default {
|
||||
let isProposal = localStorage.isFrom == 'proposal' ? true : false
|
||||
let thismyurl = ''
|
||||
if (this.$route.query.orderNo) {
|
||||
thismyurl = '/common/calculatePremium/?orderNo=' + this.$route.query.orderNo + '&insuanceId='+insuanceId
|
||||
thismyurl = '/common/calculatePremium/?orderNo=' + this.$route.query.orderNo + '&insuanceIdInfo='+JSON.stringify(insuanceIdInfo)
|
||||
} else if (this.$route.query.proposalOrderNo) {
|
||||
thismyurl = '/common/calculatePremium?proposalOrderNo=' + this.$route.query.proposalOrderNo + '&insuanceId='+insuanceId
|
||||
thismyurl = '/common/calculatePremium?proposalOrderNo=' + this.$route.query.proposalOrderNo + '&insuanceIdInfo='+JSON.stringify(insuanceIdInfo)
|
||||
}
|
||||
if (isProposal) {
|
||||
window.localStorage.removeItem("editproposaladdrisk")
|
||||
this.$jump({
|
||||
flag: 'h5',
|
||||
extra: {
|
||||
@@ -457,6 +695,12 @@ export default {
|
||||
})
|
||||
}
|
||||
},
|
||||
//编辑
|
||||
editInsure(index,data){
|
||||
this.thisEditIndex = index
|
||||
this.thisEditData = data
|
||||
this.getMainRiskList(data.riskCode)
|
||||
},
|
||||
//下一步
|
||||
async nextStep() {
|
||||
if (!this.$route.query.salePageFlag) {
|
||||
|
||||
@@ -44,10 +44,10 @@
|
||||
<div class="pcenter-list mr20 mb10 ml15">
|
||||
<template v-if="branchType != '6'">
|
||||
<div class="pcenter-item text-center">
|
||||
<img src="../../../assets/images/home_cp_1.png" style="width: 100%;" @click="goDetail('GFRSPRO_M0002')" />
|
||||
<img src="../../../assets/images/home_cp_1.png" style="width: 100%;" @click="goDetail('GFRSPRO_M0056')" />
|
||||
</div>
|
||||
<div class="pcenter-item text-center">
|
||||
<img src="../../../assets/images/home_cp_2.png" style="width: 100%;" @click="goDetail('GFRSPRO_M0035')" />
|
||||
<img src="../../../assets/images/home_cp_2.png" style="width: 100%;" @click="goDetail('GFRSPRO_M0072')" />
|
||||
</div>
|
||||
</template>
|
||||
<template v-else-if="branchType == '6'">
|
||||
@@ -122,10 +122,10 @@
|
||||
<div class="home-product-pcenter">
|
||||
<div class="pcenter-list mr20 mb10 ml15">
|
||||
<div class="pcenter-item text-center">
|
||||
<img src="../../../assets/images/home_cp_1.png" style="width: 100%;" @click="goDetail('GFRSPRO_M0002')" />
|
||||
<img src="../../../assets/images/home_cp_1.png" style="width: 100%;" @click="goDetail('GFRSPRO_M0056')" />
|
||||
</div>
|
||||
<div class="pcenter-item text-center">
|
||||
<img src="../../../assets/images/home_cp_2.png" style="width: 100%;" @click="goDetail('GFRSPRO_M0046')" />
|
||||
<img src="../../../assets/images/home_cp_2.png" style="width: 100%;" @click="goDetail('GFRSPRO_M0072')" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -453,21 +453,10 @@ export default {
|
||||
//编辑被保险人
|
||||
edit(item) {
|
||||
item.birthday = item.birthdayLabel
|
||||
// item.age = item.insuredAge
|
||||
this.$CacheUtils.setLocItem('saleInsuredPersonInfo', JSON.stringify(item)) //存储被保险人信息
|
||||
localStorage.isFrom = 'proposal'
|
||||
// let url = `/common/selectedProduct?proposalEdit=1&proposalOrderNo=${item.orderNo}`
|
||||
let url = `/proposal/insuredPerson?proposalOrderNo=${this.proposalOrderNo}&insuredId=`+item.insuredId
|
||||
this.$router.push({ path: url })
|
||||
// this.$jump({
|
||||
// flag: 'h5',
|
||||
// extra: {
|
||||
// url: location.origin + `/#${url}`
|
||||
// },
|
||||
// routerInfo: {
|
||||
// path: url
|
||||
// }
|
||||
// })
|
||||
},
|
||||
//添加被保险人 添加一个没有险种的被保险人
|
||||
addPerson(item) {
|
||||
|
||||
@@ -326,11 +326,11 @@ export default {
|
||||
//点击下一步
|
||||
nextStep() {
|
||||
// 建议书投保人/被保人姓名不必填, 填写姓名时展示姓名(落库),不填写姓名时展示性别+年龄,如:男30岁(不落库)
|
||||
let sex = this.insured.sex == '0'?'男':'女'
|
||||
let name = sex + this.insured.insuredAge+'岁'
|
||||
if(this.insured.name == name){
|
||||
this.insured.name = ''
|
||||
}
|
||||
// let sex = this.insured.sex == '0'?'男':'女'
|
||||
// let name = sex + this.insured.insuredAge+'岁'
|
||||
// if(this.insured.name == name){
|
||||
// this.insured.name = ''
|
||||
// }
|
||||
//保存有没有社保,在保费计算用到
|
||||
//localStorage.setItem('proposalMedical', this.insured.medical == '0' ? '1' : '0')
|
||||
localStorage.proposalMedical = this.insured.medical == '0' ? '1' : '0'
|
||||
|
||||
@@ -4,11 +4,12 @@
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { makePdf, share } from '@/api/ebiz/proposal/proposal.js'
|
||||
import { makePdf, share, getDemo } from '@/api/ebiz/proposal/proposal.js'
|
||||
import { Toast } from 'vant'
|
||||
import config from '@/config'
|
||||
import dataDictionary from '@/assets/js/utils/data-dictionary' //使用数据字典中的险种类型
|
||||
import { weixinShare } from '@/assets/js/utils/wxShare.js'
|
||||
import { getAgentInfo } from '@/api/ebiz/my/my.js'
|
||||
import { queryPersonal } from '@/api/ebiz/laurelClub/laurelClub'
|
||||
export default {
|
||||
data() {
|
||||
@@ -16,7 +17,8 @@ export default {
|
||||
return {
|
||||
pdfUrl: '',
|
||||
isWeixin,
|
||||
title: ''
|
||||
title: '',
|
||||
agent:{}
|
||||
}
|
||||
},
|
||||
components: {
|
||||
@@ -31,7 +33,7 @@ export default {
|
||||
this.init()
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
async mounted() {
|
||||
let riskCode = localStorage.pdfShareCode
|
||||
dataDictionary.riskType.some(item => {
|
||||
if (item.code == riskCode) {
|
||||
@@ -39,10 +41,78 @@ export default {
|
||||
return true
|
||||
}
|
||||
})
|
||||
if(this.$route.query.proposalOrderNo){
|
||||
let params = {
|
||||
proposalInfoDTO: {
|
||||
proposalNo: this.$route.query.proposalOrderNo
|
||||
}
|
||||
}
|
||||
let res = await getDemo(params)
|
||||
if(res.result == 0){
|
||||
let mainRiskNameList = []
|
||||
res.content.orderDTO.insuredDTOs.forEach(item => {
|
||||
item.riskDTOLst.forEach(item01 => {
|
||||
if (item01.isMainRisk == '0') {
|
||||
mainRiskNameList.push(item01.riskName)
|
||||
}
|
||||
})
|
||||
})
|
||||
// 一、单个被保险人
|
||||
// 1、1个主险(含附加险)的情况,直接显示“主险产品名称”
|
||||
// 2、有2个及以上主险组合,建议书名称显示“保险产品组合计划”
|
||||
// 二、有多个被保险人
|
||||
// 都显示“家庭保障计划”
|
||||
if(mainRiskNameList.length == 1){
|
||||
if (res.content.orderDTO.insuredDTOs.length > 1) {
|
||||
this.title = '家庭保障计划'
|
||||
} else {
|
||||
this.title = mainRiskNameList[0]
|
||||
}
|
||||
}else{
|
||||
if (res.content.orderDTO.insuredDTOs.length > 1) {
|
||||
this.title = '家庭保障计划'
|
||||
} else {
|
||||
this.title = '保险产品组合计划'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
let agentResult = await getAgentInfo({}) //调取代理人查询接口
|
||||
if (agentResult.result == '0'){
|
||||
let { agent } = this
|
||||
let { name } = agentResult
|
||||
agent.name = name
|
||||
}
|
||||
let date = new Date()
|
||||
let month = date.getMonth() + 1
|
||||
if (month <= 9) {
|
||||
month = '0' + month
|
||||
}
|
||||
let reqData = {
|
||||
mdType: 'm',
|
||||
monthStr:date.getFullYear() + month
|
||||
}
|
||||
let shareContent;
|
||||
let resData = await queryPersonal(reqData)
|
||||
if (resData.content.length&&resData.content[0].glevel>0&&resData.content[0].ggrade) {
|
||||
if(resData.content[0].glevel<3){
|
||||
resData.content[0].ggrade='00'
|
||||
}
|
||||
}
|
||||
if (resData.content.length&&resData.content[0].slevel>0&&resData.content[0].sgrade&&resData.content[0].sgrade!='00') {
|
||||
let sgrade =this.memberConversion(resData.content[0].sgrade);
|
||||
shareContent='国富双冠精英'+resData.content[0].slevel+'级'+sgrade+resData.content[0].name+'为您量身定制的保险产品,请查收';
|
||||
}else if (resData.content.length&&resData.content[0].glevel>0&&resData.content[0].ggrade&&resData.content[0].ggrade!='00') {
|
||||
let ggrade =this.memberConversion(resData.content[0].ggrade);
|
||||
shareContent='国富桂冠精英'+resData.content[0].glevel+'级'+ggrade+resData.content[0].name+'为您量身定制的保险产品,请查收';
|
||||
} else {
|
||||
shareContent = this.agent.name+'为您设计的专属保险计划书,请查阅!因为国富,所以民安!';
|
||||
}
|
||||
|
||||
weixinShare({
|
||||
title: this.title,
|
||||
imgUrl: this.$assetsUrl + 'images/logo.png',
|
||||
desc: '国富为您量身定制的保险产品,请查收'
|
||||
desc: shareContent
|
||||
})
|
||||
//重置左上角按钮,变成返回
|
||||
window.EWebBridge.webCallAppInJs("webview_left_button",{
|
||||
@@ -109,10 +179,15 @@ export default {
|
||||
if(resData.content[0].glevel<3){
|
||||
resData.content[0].ggrade='00'
|
||||
}
|
||||
}
|
||||
if (resData.content.length&&resData.content[0].slevel>0&&resData.content[0].sgrade&&resData.content[0].sgrade!='00') {
|
||||
let sgrade =this.memberConversion(resData.content[0].sgrade);
|
||||
shareContent='国富双冠精英'+resData.content[0].slevel+'级'+sgrade+resData.content[0].name+'为您量身定制的保险产品,请查收';
|
||||
}else if (resData.content.length&&resData.content[0].glevel>0&&resData.content[0].ggrade&&resData.content[0].ggrade!='00') {
|
||||
let ggrade =this.memberConversion(resData.content[0].ggrade);
|
||||
shareContent='国富桂冠人力'+resData.content[0].glevel+'级'+ggrade+resData.content[0].name+'为您量身定制的保险产品,请查收';
|
||||
shareContent='国富桂冠精英'+resData.content[0].glevel+'级'+ggrade+resData.content[0].name+'为您量身定制的保险产品,请查收';
|
||||
} else {
|
||||
shareContent='国富为您量身定制的保险产品,请查收';
|
||||
shareContent = this.agent.name+'为您设计的专属保险计划书,请查阅!因为国富,所以民安!';
|
||||
}
|
||||
if (data.trigger == 'right_button_click') {
|
||||
// eslint-disable-next-line no-undef
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<div>
|
||||
<div class="mb50">
|
||||
<img class="w178 h41 div_1" src="@/assets/images/proposal/proposal_logo.png" />
|
||||
<div class="white fw500 fs18 div_2">家庭保障计划</div>
|
||||
<div class="white fw500 fs18 div_2">{{mainRiskName}}</div>
|
||||
<van-sticky @scroll="testSticky">
|
||||
<div class="pl15 pt15 flex justify-content-fs align-items-c sticky_div" :class="pageShowType.isFixed ? 'divbg_1' : 'divbg_2'">
|
||||
<div class="mr9 title_item" v-for="(item, index) in pageShowInfo.insuredDTOs" :key="index" @click="checkInsure(item.insuredId)">
|
||||
@@ -199,7 +199,11 @@
|
||||
<div class="text-left" style="width: 75%;">
|
||||
<span>{{ moneyItem.contentLabel }}</span>
|
||||
</div>
|
||||
<div class="text-right">
|
||||
<div class="text-right" v-if="moneyItem.content == 'currentBonus_M'">
|
||||
<span class="color_3A81F6">{{ moneyItem.value | numFormat2 }}</span
|
||||
>{{ moneyItem.content | productRateUnit }}
|
||||
</div>
|
||||
<div class="text-right" v-else>
|
||||
<span class="color_3A81F6">{{ moneyItem.value | numFormatNo }}</span
|
||||
>{{ moneyItem.content | productRateUnit }}
|
||||
</div>
|
||||
@@ -279,7 +283,7 @@
|
||||
</div>
|
||||
<div class="div_02">
|
||||
<div class="text-center div_021">
|
||||
<div class="text-center div_022">家庭保障计划</div>
|
||||
<div class="text-center div_022">{{mainRiskName}}</div>
|
||||
<!-- 如果没有姓名的话,根据性别展示男士或女士 -->
|
||||
<div class="text-center div_023">尊敬的<span v-if="pageShowInfo.appntDTO.name">{{ pageShowInfo.appntDTO.name.substr(0, 1) }}</span>{{ pageShowInfo.appntDTO.sex == '0' ? '先生' : '女士' }}</div>
|
||||
</div>
|
||||
@@ -382,6 +386,7 @@ export default {
|
||||
mainRiskCodes: [],
|
||||
time: 5,
|
||||
proposalNo:'',
|
||||
mainRiskName: ''
|
||||
}
|
||||
},
|
||||
filters: {
|
||||
@@ -395,6 +400,13 @@ export default {
|
||||
numFormat(str) {
|
||||
return str.replace(/\.00/, '')
|
||||
},
|
||||
numFormat2(str) {
|
||||
if (str) {
|
||||
return Number(str.replace(/,/g, '')).toFixed(2)
|
||||
} else {
|
||||
return '-'
|
||||
}
|
||||
},
|
||||
numFormatNo(str) {
|
||||
if (str) {
|
||||
return Number(str.replace(/,/g, '')).toFixed(0)
|
||||
@@ -437,6 +449,7 @@ export default {
|
||||
})
|
||||
}, 1000)
|
||||
window['appCallBack'] = this.appCallBack*/
|
||||
// init方法在微信端存储token,接口请求用此token,所以init方法前不要请求接口,会影响分享微信功能,接口会报token为空
|
||||
this.init()
|
||||
//校验当前用户权限
|
||||
funcPermCheck({}).then(res => {
|
||||
@@ -596,7 +609,7 @@ export default {
|
||||
}
|
||||
},
|
||||
async sharePeople() {
|
||||
console.log(this.agent,'this.agent.name')
|
||||
console.log(this.pageShowInfo.insuredDTOs,'this.pageShowInfo.insuredDTOs')
|
||||
let date = new Date()
|
||||
let month = date.getMonth() + 1
|
||||
if (month <= 9) {
|
||||
@@ -608,25 +621,34 @@ export default {
|
||||
}
|
||||
let shareContent;
|
||||
let resData = await queryPersonal(reqData)
|
||||
// debugger
|
||||
//准会员话术改为普通人话术
|
||||
if(resData.content.length&&resData.content[0].slevel<3){
|
||||
resData.content[0].sgrade='00'
|
||||
}
|
||||
if(resData.content.length&&resData.content[0].glevel<3){
|
||||
resData.content[0].ggrade='00'
|
||||
}
|
||||
if (resData.content.length&&resData.content[0].slevel>0&&resData.content[0].sgrade&&resData.content[0].sgrade!='00') {
|
||||
if(resData.content[0].slevel<3){
|
||||
resData.content[0].sgrade='00'
|
||||
}
|
||||
// if(resData.content[0].slevel<3){
|
||||
// resData.content[0].sgrade='00'
|
||||
// }
|
||||
let sgrade =this.memberConversion(resData.content[0].sgrade);
|
||||
shareContent='国富双冠精英'+resData.content[0].slevel+'级'+sgrade+resData.content[0].name+'为您量身定制的保险产品,请查收';
|
||||
}else if (resData.content.length&&resData.content[0].glevel>0&&resData.content[0].ggrade&&!resData.content[0].sgrade&&resData.content[0].sgrade!='00') {
|
||||
if(resData.content[0].glevel<3){
|
||||
resData.content[0].ggrade='00'
|
||||
}
|
||||
}else if (resData.content.length&&resData.content[0].glevel>0&&resData.content[0].ggrade&&resData.content[0].ggrade!='00') {
|
||||
// if(resData.content[0].glevel<3){
|
||||
// resData.content[0].ggrade='00'
|
||||
// }
|
||||
let ggrade =this.memberConversion(resData.content[0].ggrade);
|
||||
shareContent='国富桂冠精英'+resData.content[0].glevel+'级'+ggrade+resData.content[0].name+'为您量身定制的保险产品,请查收';
|
||||
} else {
|
||||
shareContent = this.agent.name+'为您设计的专属保险计划书,请查阅!因为国富,所以民安!';
|
||||
shareContent = this.agent.name+'为您设计的专属保险计划书,请查阅!因为国富,所以民安!';
|
||||
}
|
||||
console.log(shareContent,'shareContent')
|
||||
let title
|
||||
let riskList = [] //所有险种
|
||||
let riskCodeList = [] //所有险种code
|
||||
this.pageShowInfo.insuredDTOs.map(item => {
|
||||
this.pageShowInfo.insuredDTOs.map(item => {
|
||||
item.mainRisk.map(item01 => {
|
||||
if (item01.isMainRisk == '0') { //主险
|
||||
riskList.push(item01)
|
||||
@@ -637,11 +659,23 @@ export default {
|
||||
riskCodeList.push(item.riskCode)
|
||||
})
|
||||
let sameRisk = isAllEqual(riskCodeList)
|
||||
// 以主险为单位,一个主险,显示主险名称。 多个主险,显示“家庭综合保障计划”,跟被保人人数无关
|
||||
// 一、单个被保险人
|
||||
// 1、1个主险(含附加险)的情况,直接显示“主险产品名称”
|
||||
// 2、有2个及以上主险组合,建议书名称显示“保险产品组合计划”
|
||||
// 二、有多个被保险人
|
||||
// 都显示“家庭保障计划”
|
||||
if(sameRisk){
|
||||
title= riskList[0].riskName
|
||||
if(this.pageShowInfo.insuredDTOs.length > 1){
|
||||
title='家庭保障计划'
|
||||
}else{
|
||||
title= riskList[0].riskName
|
||||
}
|
||||
}else{
|
||||
title='家庭综合保障计划'
|
||||
if(this.pageShowInfo.insuredDTOs.length > 1){
|
||||
title='家庭保障计划'
|
||||
}else{
|
||||
title= '保险产品组合计划'
|
||||
}
|
||||
}
|
||||
let res = await getSharingToken({ shareType: 'proposal_demonstrate' })
|
||||
if (res.result == '0') {
|
||||
@@ -691,6 +725,32 @@ export default {
|
||||
this.pageShowInfo.appntDTO = res.content.orderDTO.appntDTO
|
||||
this.pageShowInfo.insuredDTOs = res.content.orderDTO.insuredDTOs
|
||||
this.pageShowInfo.showInsuredDTO = this.pageShowInfo.insuredDTOs[0]
|
||||
let mainRiskNameList = []
|
||||
that.pageShowInfo.insuredDTOs.forEach(item => {
|
||||
item.riskDTOLst.forEach(item01 => {
|
||||
if (item01.isMainRisk == '0') {
|
||||
mainRiskNameList.push(item01.riskName)
|
||||
}
|
||||
})
|
||||
})
|
||||
// 一、单个被保险人
|
||||
// 1、1个主险(含附加险)的情况,直接显示“主险产品名称”
|
||||
// 2、有2个及以上主险组合,建议书名称显示“保险产品组合计划”
|
||||
// 二、有多个被保险人
|
||||
// 都显示“家庭保障计划”
|
||||
if(mainRiskNameList.length == 1){
|
||||
if (this.pageShowInfo.insuredDTOs.length > 1) {
|
||||
that.mainRiskName = '家庭保障计划'
|
||||
} else {
|
||||
that.mainRiskName = mainRiskNameList[0]
|
||||
}
|
||||
}else{
|
||||
if (this.pageShowInfo.insuredDTOs.length > 1) {
|
||||
that.mainRiskName = '家庭保障计划'
|
||||
} else {
|
||||
that.mainRiskName = '保险产品组合计划'
|
||||
}
|
||||
}
|
||||
//投保人年龄
|
||||
// this.pageShowInfo.appntDTO.age = getAge.getAge(this.pageShowInfo.appntDTO.birthdayLabel, new Date())
|
||||
let { insuredLabelResult, insuredResult, insuredInfoResult } = res.content.calculusResDTO
|
||||
@@ -880,7 +940,17 @@ export default {
|
||||
},
|
||||
//跳转到pdf 进入建议书后 根据建议书编码来查找相应的pdf
|
||||
async goPDF() {
|
||||
this.$router.push({ path: '/proposal/pdf' })
|
||||
if(this.$route.query.proposalOrderNo){
|
||||
this.$router.push({
|
||||
path: '/proposal/pdf',
|
||||
query: {
|
||||
proposalOrderNo:this.$route.query.proposalOrderNo
|
||||
}
|
||||
})
|
||||
}else{
|
||||
this.$router.push({ path: '/proposal/pdf' })
|
||||
}
|
||||
|
||||
// this.$jump({
|
||||
// flag: 'h5',
|
||||
// extra: {
|
||||
|
||||
@@ -643,7 +643,6 @@ export default {
|
||||
|
||||
},
|
||||
async mounted() {
|
||||
this.$store.commit('updateAnswerType', false )
|
||||
let res = await getOrderDetail({ orderNo: this.$route.query.orderNo })
|
||||
this.$toast.loading({
|
||||
duration: 0, // 持续展示 toast
|
||||
@@ -652,10 +651,7 @@ export default {
|
||||
message: '加载中……'
|
||||
})
|
||||
if (res.result == 0) {
|
||||
let updateAnswerType = res.orderDTO.riskEvaluationDTO.isShowEvaluationPoint =='1'?true:false
|
||||
this.$store.commit('updateAnswerType', updateAnswerType )
|
||||
this.renovate = new Date().getTime()
|
||||
console.log(updateAnswerType,'updateAnswerType');
|
||||
if(res.orderDTO.riskEvaluationDTO.isShowEvaluationPoint == '1'&&res.orderDTO.riskEvaluationDTO.totalScore == null){
|
||||
Dialog.alert({
|
||||
title: '提示',
|
||||
@@ -748,10 +744,6 @@ export default {
|
||||
}, 100)
|
||||
// 筛选按钮的点击事件
|
||||
window.appCallBack = this.appCallBack
|
||||
// this.updateAnswerType = res.orderDTO.riskEvaluationDTO.isShowEvaluationPoint =='1'?true:false
|
||||
// let updateAnswerType = res.orderDTO.riskEvaluationDTO.isShowEvaluationPoint =='1'?true:false
|
||||
this.$store.commit('updateAnswerType', this.updateAnswerType )
|
||||
console.log(this.updateAnswerType,'updateAnswerType');
|
||||
},
|
||||
computed: {
|
||||
listenChange() {
|
||||
|
||||
@@ -136,6 +136,9 @@
|
||||
data-vv-name="联系地址"
|
||||
/>
|
||||
<van-field v-model="userInfo.village" label="" name="详细地址" placeholder="请输入详细地址" v-validate="'required'" clearable maxlength="30" />
|
||||
<div class="pl10 pt10 pb10 pr10 address fs14">
|
||||
<van-checkbox v-model="withRootUser.value">同投保人地址</van-checkbox>
|
||||
</div>
|
||||
<van-field
|
||||
v-model="userInfo.yearSalary"
|
||||
label="平均年收入(万元)"
|
||||
@@ -271,6 +274,10 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
withRootUser: {
|
||||
load: false, //防止重复请求
|
||||
value: false,
|
||||
},
|
||||
nameLimit: false,
|
||||
idNoLimit: false,
|
||||
birthdayLimit: false,
|
||||
@@ -951,6 +958,11 @@ export default {
|
||||
}
|
||||
//证件止期
|
||||
let val = this.userInfo.certiexpiredate
|
||||
if (Date.parse(val) < Date.parse(new Date())) {
|
||||
this.userInfo.certiexpiredate = ''
|
||||
this.$refs.certiexpiredate.date = ''
|
||||
return this.$toast('您的证件已过期')
|
||||
}
|
||||
//年龄在16周岁以下
|
||||
if (age < 16) {
|
||||
if (new Date(val).getFullYear() - new Date(this.userInfo.certificateValidate).getFullYear() != 5) {
|
||||
@@ -1196,31 +1208,64 @@ export default {
|
||||
}
|
||||
|
||||
this.isInsured = true
|
||||
let insuredDetail = JSON.parse(this.$CacheUtils.getLocItem('saleInsuredInfo'))
|
||||
console.log(insuredDetail,'insuredDetailqqqqqqqqq')
|
||||
this.userInfo.name = insuredDetail.name //姓名
|
||||
this.nameLimit = Boolean(insuredDetail.name)
|
||||
this.userInfo.sex = insuredDetail.sex //性别
|
||||
this.sexLimit = Boolean(insuredDetail.sex)
|
||||
this.userInfo.nativeplace = insuredDetail.nativeplace //国家地区
|
||||
this.userInfo.birthday = insuredDetail.birthday //出生日期
|
||||
this.birthdayLimit = Boolean(insuredDetail.birthday)
|
||||
this.userInfo.idType = insuredDetail.idType //证件类型
|
||||
this.userInfo.idNo = insuredDetail.idNo //证件号码
|
||||
this.idNoLimit = Boolean(insuredDetail.idNo)
|
||||
this.userInfo.certificateValidate = insuredDetail.certificateValidate //证件起始日期
|
||||
this.userInfo.certiexpiredate = insuredDetail.certiexpiredate == '9999-12-31' ? '' : insuredDetail.certiexpiredate //证件截止日期
|
||||
this.userInfo.effectiveDateType = insuredDetail.certiexpiredate == '9999-12-31' //是否长期
|
||||
this.userInfo.mobile = insuredDetail.mobile
|
||||
this.mobileLimit = Boolean(insuredDetail.mobile)
|
||||
let age = utilsAge.getAge(insuredDetail.birthday, new Date())
|
||||
this.effectiveDateTypeAble = age <= 45
|
||||
if (age > 45) {
|
||||
this.userInfo.effectiveDateType = true
|
||||
let params = {
|
||||
orderNo: this.$route.query.orderNo
|
||||
}
|
||||
this.idLimit = true
|
||||
this.userInfo.occupationCode = insuredDetail.occupationCode //职业类别编码
|
||||
this.userInfo.occupationName = insuredDetail.occupationName //职业类别名称
|
||||
getOrderDetail(params).then(res=>{
|
||||
if(res.result == 0){
|
||||
let insuredDetail = res.orderDTO.appntDTO
|
||||
this.userInfo.name = insuredDetail.name //姓名
|
||||
this.nameLimit = Boolean(insuredDetail.name)
|
||||
this.userInfo.sex = insuredDetail.sex //性别
|
||||
this.sexLimit = Boolean(insuredDetail.sex)
|
||||
this.userInfo.nativeplace = insuredDetail.nativeplace //国家地区
|
||||
this.userInfo.birthday = insuredDetail.birthday //出生日期
|
||||
this.birthdayLimit = Boolean(insuredDetail.birthday)
|
||||
this.userInfo.idType = insuredDetail.idType //证件类型
|
||||
this.userInfo.idNo = insuredDetail.idNo //证件号码
|
||||
this.idNoLimit = Boolean(insuredDetail.idNo)
|
||||
this.userInfo.certificateValidate = insuredDetail.certificateValidate //证件起始日期
|
||||
this.userInfo.certiexpiredate = insuredDetail.certiexpiredate == '9999-12-31' ? '' : insuredDetail.certiexpiredate //证件截止日期
|
||||
this.userInfo.effectiveDateType = insuredDetail.certiexpiredate == '9999-12-31' //是否长期
|
||||
this.userInfo.mobile = insuredDetail.mobile
|
||||
this.mobileLimit = Boolean(insuredDetail.mobile)
|
||||
this.userInfo.marriage =insuredDetail.marriage
|
||||
if(this.userInfo.marriage == 1){
|
||||
this.userInfo.marriageStatus = '已婚'
|
||||
}
|
||||
else if(this.userInfo.marriage == 2){
|
||||
this.userInfo.marriageStatus = '未婚'
|
||||
}
|
||||
else if(this.userInfo.marriage == 3){
|
||||
this.userInfo.marriageStatus = '离异'
|
||||
}
|
||||
else if(this.userInfo.marriage == 4){
|
||||
this.userInfo.marriageStatus = '丧偶'
|
||||
}
|
||||
let age = utilsAge.getAge(insuredDetail.birthday, new Date())
|
||||
this.effectiveDateTypeAble = age <= 45
|
||||
if (age > 45) {
|
||||
this.userInfo.effectiveDateType = true
|
||||
}
|
||||
this.idLimit = true
|
||||
this.userInfo.occupationCode = insuredDetail.occupationCode //职业类别编码
|
||||
this.userInfo.occupationName = insuredDetail.occupationName //职业类别名称
|
||||
|
||||
this.areaStr = getAreaName([
|
||||
{ code: insuredDetail.homeProvince },
|
||||
{ code: insuredDetail.homeCity },
|
||||
{ code: insuredDetail.homeArea },
|
||||
])
|
||||
this.userInfo.province = insuredDetail.homeProvince
|
||||
this.userInfo.city = insuredDetail.homeCity
|
||||
this.userInfo.area = insuredDetail.homeArea
|
||||
this.userInfo.village = insuredDetail.homeAddress
|
||||
|
||||
this.userInfo.yearSalary = insuredDetail.averageAnnualIncome
|
||||
this.userInfo.averageAnnualIncome = insuredDetail.averageAnnualIncome
|
||||
}
|
||||
})
|
||||
|
||||
} else {
|
||||
this.isInsured = false
|
||||
this.userInfo.relationToInsured = ''
|
||||
@@ -1307,6 +1352,25 @@ export default {
|
||||
filters: {
|
||||
idToText: filter.idToText
|
||||
},
|
||||
watch: {
|
||||
async 'withRootUser.value'(n) {
|
||||
const orderNo = this.$route.query.orderNo
|
||||
if (n && orderNo) {
|
||||
const rs = await getOrderDetail({ orderNo: orderNo});
|
||||
this.areaStr = getAreaName([
|
||||
{ code: rs.orderDTO.appntDTO.homeProvince },
|
||||
{ code: rs.orderDTO.appntDTO.homeCity },
|
||||
{ code: rs.orderDTO.appntDTO.homeArea },
|
||||
])
|
||||
this.userInfo.province = rs.orderDTO.appntDTO.homeProvince
|
||||
this.userInfo.city = rs.orderDTO.appntDTO.homeCity
|
||||
this.userInfo.area = rs.orderDTO.appntDTO.homeArea
|
||||
this.userInfo.village = rs.orderDTO.appntDTO.homeAddress
|
||||
} else {
|
||||
this.homeName = this.userInfo.homeAddress = ''
|
||||
}
|
||||
}
|
||||
},
|
||||
beforeRouteLeave(to, from, next) {
|
||||
document.body.style.backgroundColor = ''
|
||||
next()
|
||||
@@ -1322,5 +1386,9 @@ export default {
|
||||
/deep/.van-checkbox {
|
||||
margin-left: auto;
|
||||
}
|
||||
.address {
|
||||
display: flex;
|
||||
flex-direction: row-reverse;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -505,117 +505,112 @@ export default {
|
||||
imageType: ''
|
||||
}
|
||||
},
|
||||
created() {
|
||||
async created() {
|
||||
//如果是从编辑进来的
|
||||
// if (this.$route.query.edit || localStorage.changeCard) {
|
||||
getOrderDetail({ orderNo: this.$route.query.orderNo }).then((res) => {
|
||||
// console.log(res)
|
||||
if (res.result == 0) {
|
||||
let res= await getOrderDetail({ orderNo: this.$route.query.orderNo })
|
||||
if (res.result == 0) {
|
||||
if(res.orderDTO.riskEvaluationDTO.isShowEvaluationPoint == '1'&&res.orderDTO.riskEvaluationDTO.totalScore == null){
|
||||
Dialog.alert({
|
||||
title: '提示',
|
||||
message: '您当前未完成测评,请完成后再进行后续操作',
|
||||
theme: 'round-button',
|
||||
}).then(() => {
|
||||
this.$jump({
|
||||
flag: 'h5',
|
||||
extra: {
|
||||
url: location.origin + '/#/sale/answerPage',
|
||||
},
|
||||
routerInfo: {
|
||||
path: '/sale/answerPage'
|
||||
}
|
||||
})
|
||||
// on close
|
||||
})
|
||||
Dialog.alert({
|
||||
title: '提示',
|
||||
message: '您当前未完成测评,请完成后再进行后续操作',
|
||||
theme: 'round-button',
|
||||
}).then(() => {
|
||||
this.$jump({
|
||||
flag: 'h5',
|
||||
extra: {
|
||||
url: location.origin + '/#/sale/answerPage',
|
||||
},
|
||||
routerInfo: {
|
||||
path: '/sale/answerPage'
|
||||
}
|
||||
})
|
||||
// on close
|
||||
})
|
||||
}
|
||||
//是投保人还是被保险人
|
||||
localStorage.accountInformationRadio = res.orderDTO.orderAccountDTO.accountType
|
||||
//投被保险人关系
|
||||
this.relationToAppnt = res.orderDTO.insuredDTOs[0].relationToAppnt
|
||||
this.$utils.intLocalStorage(res)
|
||||
//投保人信息
|
||||
this.saleInsuredInfo = res.orderDTO.appntDTO
|
||||
//被保险人信息
|
||||
this.saleInsuredPersonInfo = res.orderDTO.insuredDTOs[0]
|
||||
//收益人信息
|
||||
this.saleBtnfPersonInfo = this.saleInsuredPersonInfo.bnfDTOs
|
||||
//bnfInfo 受益人影像数据反显,护照属于其他类型,护照以外的证件区分正反面
|
||||
console.log(this.saleBtnfPersonInfo,'this.saleBtnfPersonInfo')
|
||||
if(this.saleBtnfPersonInfo){
|
||||
this.saleBtnfPersonInfo.forEach((item, index, arr) => {
|
||||
if(item.idType == '4'){
|
||||
this.bnfInfo.push(
|
||||
{
|
||||
// 受益人其他类型页面
|
||||
fileLIstImgBeneficiary: []
|
||||
}
|
||||
)
|
||||
}else{
|
||||
this.bnfInfo.push(
|
||||
{
|
||||
// 受益人身份证正面
|
||||
fileListIdFrontBeneficiary: [],
|
||||
// 受益人身份证反面
|
||||
fileListIdBackBeneficiary: []
|
||||
}
|
||||
)
|
||||
}
|
||||
})
|
||||
}else{
|
||||
this.isDisabledBnf = false
|
||||
}
|
||||
|
||||
//是投保人还是被保险人
|
||||
localStorage.accountInformationRadio = res.orderDTO.orderAccountDTO.accountType
|
||||
//投被保险人关系
|
||||
this.relationToAppnt = res.orderDTO.insuredDTOs[0].relationToAppnt
|
||||
this.$utils.intLocalStorage(res)
|
||||
//投保人信息
|
||||
this.saleInsuredInfo = res.orderDTO.appntDTO
|
||||
//被保险人信息
|
||||
this.saleInsuredPersonInfo = res.orderDTO.insuredDTOs[0]
|
||||
//收益人信息
|
||||
this.saleBtnfPersonInfo = this.saleInsuredPersonInfo.bnfDTOs
|
||||
//bnfInfo 受益人影像数据反显,护照属于其他类型,护照以外的证件区分正反面
|
||||
console.log(this.saleBtnfPersonInfo,'this.saleBtnfPersonInfo')
|
||||
if(this.saleBtnfPersonInfo){
|
||||
this.saleBtnfPersonInfo.forEach((item, index, arr) => {
|
||||
if(item.idType == '4'){
|
||||
this.bnfInfo.push(
|
||||
{
|
||||
// 受益人其他类型页面
|
||||
fileLIstImgBeneficiary: []
|
||||
}
|
||||
)
|
||||
}else{
|
||||
this.bnfInfo.push(
|
||||
{
|
||||
// 受益人身份证正面
|
||||
fileListIdFrontBeneficiary: [],
|
||||
// 受益人身份证反面
|
||||
fileListIdBackBeneficiary: []
|
||||
}
|
||||
)
|
||||
}
|
||||
// localStorage.saleInsuredPersonInfo = JSON.stringify(res.orderDTO.insuredDTOs[0])
|
||||
// 核保老师确认,只有财务告知第8项社保问题选【是】,不用展示上传资料按钮,其他健康告知或财务告知选【是】,都可以展示上传资料按钮
|
||||
if (this.saleInsuredInfo.impartDTO.impartItemDTOS && this.saleInsuredInfo.impartDTO.impartItemDTOS.length > 0) {
|
||||
this.isNotify = this.saleInsuredInfo.impartDTO.impartItemDTOS.some((item) => {
|
||||
return item.impartAnswer != 1
|
||||
})
|
||||
}
|
||||
if (!this.isNotify) {
|
||||
if (this.saleInsuredInfo.financeImpartDTO.impartItemDTOS && this.saleInsuredInfo.financeImpartDTO.impartItemDTOS.length > 0) {
|
||||
this.isNotify = this.saleInsuredInfo.financeImpartDTO.impartItemDTOS.some((item) => {
|
||||
return item.impartAnswer != 1 && item.impartCode != 8
|
||||
})
|
||||
}else{
|
||||
this.isDisabledBnf = false
|
||||
}
|
||||
|
||||
// localStorage.saleInsuredPersonInfo = JSON.stringify(res.orderDTO.insuredDTOs[0])
|
||||
// 核保老师确认,只有财务告知第8项社保问题选【是】,不用展示上传资料按钮,其他健康告知或财务告知选【是】,都可以展示上传资料按钮
|
||||
if (this.saleInsuredInfo.impartDTO.impartItemDTOS && this.saleInsuredInfo.impartDTO.impartItemDTOS.length > 0) {
|
||||
this.isNotify = this.saleInsuredInfo.impartDTO.impartItemDTOS.some((item) => {
|
||||
}
|
||||
|
||||
if (this.saleInsuredPersonInfo.impartDTO.impartItemDTOS && this.saleInsuredPersonInfo.impartDTO.impartItemDTOS.length > 0) {
|
||||
if (this.saleInsuredPersonInfo.relationToAppnt == 1) {
|
||||
this.isNotify = this.saleInsuredPersonInfo.impartDTO.impartItemDTOS.some((item) => {
|
||||
return item.impartAnswer != 1
|
||||
})
|
||||
} else {
|
||||
this.isNotifyInsured = this.saleInsuredPersonInfo.impartDTO.impartItemDTOS.some((item) => {
|
||||
return item.impartAnswer != 1
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
if (this.saleInsuredPersonInfo.relationToAppnt == 1) {
|
||||
if (!this.isNotify) {
|
||||
if (this.saleInsuredInfo.financeImpartDTO.impartItemDTOS && this.saleInsuredInfo.financeImpartDTO.impartItemDTOS.length > 0) {
|
||||
this.isNotify = this.saleInsuredInfo.financeImpartDTO.impartItemDTOS.some((item) => {
|
||||
if (this.saleInsuredPersonInfo.financeImpartDTO.impartItemDTOS && this.saleInsuredPersonInfo.financeImpartDTO.impartItemDTOS.length > 0) {
|
||||
this.isNotify = this.saleInsuredPersonInfo.financeImpartDTO.impartItemDTOS.some((item) => {
|
||||
return item.impartAnswer != 1 && item.impartCode != 8
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
if (this.saleInsuredPersonInfo.impartDTO.impartItemDTOS && this.saleInsuredPersonInfo.impartDTO.impartItemDTOS.length > 0) {
|
||||
if (this.saleInsuredPersonInfo.relationToAppnt == 1) {
|
||||
this.isNotify = this.saleInsuredPersonInfo.impartDTO.impartItemDTOS.some((item) => {
|
||||
return item.impartAnswer != 1
|
||||
})
|
||||
} else {
|
||||
this.isNotifyInsured = this.saleInsuredPersonInfo.impartDTO.impartItemDTOS.some((item) => {
|
||||
return item.impartAnswer != 1
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
if (this.saleInsuredPersonInfo.relationToAppnt == 1) {
|
||||
if (!this.isNotify) {
|
||||
if (this.saleInsuredPersonInfo.financeImpartDTO.impartItemDTOS && this.saleInsuredPersonInfo.financeImpartDTO.impartItemDTOS.length > 0) {
|
||||
this.isNotify = this.saleInsuredPersonInfo.financeImpartDTO.impartItemDTOS.some((item) => {
|
||||
return item.impartAnswer != 1 && item.impartCode != 8
|
||||
})
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (!this.isNotifyInsured) {
|
||||
if (this.saleInsuredPersonInfo.financeImpartDTO.impartItemDTOS && this.saleInsuredPersonInfo.financeImpartDTO.impartItemDTOS.length > 0) {
|
||||
this.isNotifyInsured = this.saleInsuredPersonInfo.financeImpartDTO.impartItemDTOS.some((item) => {
|
||||
return item.impartAnswer != 1 && item.impartCode != 8
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
this.$toast(res.resultMessage)
|
||||
if (!this.isNotifyInsured) {
|
||||
if (this.saleInsuredPersonInfo.financeImpartDTO.impartItemDTOS && this.saleInsuredPersonInfo.financeImpartDTO.impartItemDTOS.length > 0) {
|
||||
this.isNotifyInsured = this.saleInsuredPersonInfo.financeImpartDTO.impartItemDTOS.some((item) => {
|
||||
return item.impartAnswer != 1 && item.impartCode != 8
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
// }
|
||||
} else {
|
||||
this.$toast(res.resultMessage)
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
setTimeout(() => {
|
||||
@@ -1550,6 +1545,27 @@ export default {
|
||||
}
|
||||
})
|
||||
}
|
||||
if(that.type == 'fileListIdFrontBeneficiary'){
|
||||
that.saleBtnfPersonInfo.forEach((item,index)=>{
|
||||
if(item.bnfId == that.bnfId){
|
||||
that.bnfInfo[index].fileListIdFrontBeneficiary = []
|
||||
}
|
||||
})
|
||||
}
|
||||
if(that.type == 'fileListIdBackBeneficiary'){
|
||||
that.saleBtnfPersonInfo.forEach((item,index)=>{
|
||||
if(item.bnfId == that.bnfId){
|
||||
that.bnfInfo[index].fileListIdBackBeneficiary = []
|
||||
}
|
||||
})
|
||||
}
|
||||
if(that.type == 'fileLIstImgBeneficiary'){
|
||||
that.saleBtnfPersonInfo.forEach((item,index)=>{
|
||||
if(item.bnfId == that.bnfId){
|
||||
that.bnfInfo[index].fileLIstImgBeneficiary = []
|
||||
}
|
||||
})
|
||||
}
|
||||
this.$toast('网络环境不佳,图片上传失败,请切换移动网络或稍后重试')
|
||||
}
|
||||
)
|
||||
|
||||
@@ -86,10 +86,7 @@ export default {
|
||||
getOrderDetail({ orderNo: this.$route.query.orderNo }).then(res => {
|
||||
if (res.result == 0) {
|
||||
this.isShowEvaluationPoint = res.orderDTO.riskEvaluationDTO.isShowEvaluationPoint
|
||||
let updateAnswerType = res.orderDTO.riskEvaluationDTO.isShowEvaluationPoint =='1'?true:false
|
||||
this.$store.commit('updateAnswerType', updateAnswerType )
|
||||
this.renovate = new Date().getTime()
|
||||
console.log(updateAnswerType,'updateAnswerType');
|
||||
this.$utils.intLocalStorage(res)
|
||||
this.type = res.orderDTO.orderInfoDTO.bnfFlag == '1' ? '2' : '1' //bnfFlag 0-法定受益人 1-指定受益人
|
||||
if (res.orderDTO.orderInfoDTO.bnfFlag == null) {
|
||||
|
||||
@@ -73,7 +73,8 @@ export default {
|
||||
src: location.origin + '/pdfjs/web/viewer.html?file=',
|
||||
tipsPolicyUrl: '',
|
||||
flagLiuZhou: '', // 当前代理人是否属于柳州代理人的标志,此变量的值为'true'或'false'
|
||||
branchTypeVal:'' // 当前代理人渠道
|
||||
branchTypeVal:'', // 当前代理人渠道
|
||||
isUniversalRiskNotifyShowPoint: 0
|
||||
}
|
||||
},
|
||||
components: {
|
||||
@@ -223,6 +224,9 @@ export default {
|
||||
return new Promise((resolve, reject) => {
|
||||
getOrderDetail(data).then(res => {
|
||||
if (res.result == '0') {
|
||||
if(res.orderDTO.universalRiskNotifyDTO && res.orderDTO.universalRiskNotifyDTO.isUniversalRiskNotifyShowPoint){
|
||||
this.isUniversalRiskNotifyShowPoint = res.orderDTO.universalRiskNotifyDTO.isUniversalRiskNotifyShowPoint
|
||||
}
|
||||
// 截取代理人机构号的前六位,用于去判断是否属于柳州代理人
|
||||
if(res.orderDTO.recmdDTO.managerOrg && res.orderDTO.recmdDTO.managerOrg.length >= 6){
|
||||
let str = res.orderDTO.recmdDTO.managerOrg.substr(0, 6)
|
||||
@@ -478,12 +482,11 @@ export default {
|
||||
if (this.flagLiuZhou) {
|
||||
routeUrl = '/sale/InsuranceRiskReminder'
|
||||
} else {
|
||||
// let doubleRecordFlag = localStorage.doubleRecordFlag
|
||||
// routeUrl = '/sale/signatureOfElectronic'
|
||||
// if (doubleRecordFlag == '1') {
|
||||
// 跳转双录签署文件
|
||||
if(that.isUniversalRiskNotifyShowPoint == 1){
|
||||
routeUrl = '/sale/universalRiskNotifyingMessageTip'
|
||||
}else{
|
||||
routeUrl = '/sale/avoidDutyTip'
|
||||
// }
|
||||
}
|
||||
}
|
||||
this.$jump({
|
||||
flag: 'h5',
|
||||
@@ -548,12 +551,11 @@ export default {
|
||||
if (this.flagLiuZhou) {
|
||||
routeUrl = '/sale/InsuranceRiskReminder'
|
||||
} else {
|
||||
// let doubleRecordFlag = localStorage.doubleRecordFlag
|
||||
// routeUrl = '/sale/signatureOfElectronic'
|
||||
// if (doubleRecordFlag == '1') {
|
||||
// 跳转双录签署文件
|
||||
if(that.isUniversalRiskNotifyShowPoint == 1){
|
||||
routeUrl = '/sale/universalRiskNotifyingMessageTip'
|
||||
}else{
|
||||
routeUrl = '/sale/avoidDutyTip'
|
||||
// }
|
||||
}
|
||||
}
|
||||
this.$jump({
|
||||
flag: 'h5',
|
||||
|
||||
@@ -557,9 +557,6 @@ export default {
|
||||
const orderNo = this.$route.query.orderNo
|
||||
getOrderDetail({ orderNo: orderNo }).then((res) => {
|
||||
if (res.result == 0) {
|
||||
let updateAnswerType = res.orderDTO.riskEvaluationDTO.isShowEvaluationPoint =='1'?true:false
|
||||
console.log(updateAnswerType,'updateAnswerType');
|
||||
this.$store.commit( 'updateAnswerType',updateAnswerType )
|
||||
this.renovate = new Date().getTime()
|
||||
//投保人信息返显
|
||||
this.userInfo = res.orderDTO.appntDTO
|
||||
@@ -1113,7 +1110,12 @@ export default {
|
||||
|
||||
//身份证证件类型的判断
|
||||
//证件止期
|
||||
let val = this.userInfo.certiexpiredate
|
||||
let val = this.userInfo.certiexpiredate
|
||||
if (Date.parse(val) < Date.parse(new Date())) {
|
||||
this.userInfo.certiexpiredate = ''
|
||||
this.$refs.certiexpiredate.date = ''
|
||||
return this.$toast('您的证件已过期')
|
||||
}
|
||||
//年龄在16周岁以下
|
||||
if (age < 16) {
|
||||
if (new Date(val).getFullYear() - new Date(this.userInfo.certificateValidate).getFullYear() != 5) {
|
||||
|
||||
@@ -617,10 +617,7 @@ export default {
|
||||
if (orderNo) {
|
||||
getOrderDetail({ orderNo: orderNo }).then((res) => {
|
||||
if (res.result == 0) {
|
||||
let updateAnswerType = res.orderDTO.riskEvaluationDTO.isShowEvaluationPoint =='1'?true:false
|
||||
this.$store.commit('updateAnswerType', updateAnswerType )
|
||||
this.renovate = new Date().getTime()
|
||||
console.log(updateAnswerType,'updateAnswerType');
|
||||
//投被同人
|
||||
if (res.orderDTO.insuredDTOs.length && res.orderDTO.insuredDTOs[0].relationToAppnt == '1') {
|
||||
this.$nextTick(() => {
|
||||
@@ -1472,6 +1469,11 @@ export default {
|
||||
|
||||
//证件止期
|
||||
let val = this.userInfo.certiexpiredate
|
||||
if (Date.parse(val) < Date.parse(new Date())) {
|
||||
this.userInfo.certiexpiredate = ''
|
||||
this.$refs.certiexpiredate.date = ''
|
||||
return this.$toast('您的证件已过期')
|
||||
}
|
||||
//年龄在16周岁以下
|
||||
if (age < 16) {
|
||||
if (new Date(val).getFullYear() - new Date(this.userInfo.certificateValidate).getFullYear() != 5) {
|
||||
|
||||
@@ -516,9 +516,13 @@ export default {
|
||||
}else if(orderStatus == '39'){ //险种信息保存成功, 跳到已选产品列表
|
||||
url = '/common/selectedProduct?edit=1&orderNo='+orderNo
|
||||
}else if(orderStatus == '40'){//告知信息保存成功, 跳到风险测评--
|
||||
if( order.riskEvaluationDTO.isShowEvaluationPoint == '0'){
|
||||
url = '/sale/AccountInformation?edit=1&orderNo='+orderNo
|
||||
}else {
|
||||
if( order.riskEvaluationDTO.isShowEvaluationPoint != '1'){
|
||||
if(order.universalRiskNotifyDTO && order.universalRiskNotifyDTO.isUniversalRiskNotifyShowPoint == '1'){
|
||||
url = '/sale/universalRiskNotifyingMessage?edit=1&orderNo='+orderNo
|
||||
}else{
|
||||
url = '/sale/AccountInformation?edit=1&orderNo='+orderNo
|
||||
}
|
||||
}else {
|
||||
url = '/sale/answerPage?edit=1&orderNo='+orderNo
|
||||
}
|
||||
}else if(orderStatus == ''){//跳到投保人
|
||||
@@ -526,8 +530,13 @@ export default {
|
||||
}else if(orderStatus == '44'){//建议书转投保, 跳到投保人
|
||||
url = '/sale/insuredInfo?edit=1&orderNo='+orderNo
|
||||
}else if(orderStatus == '62'){//风险测评保存成功, 跳到账户信息--
|
||||
// url = '/sale/AccountInformation?edit=1'
|
||||
url = '/sale/answerSuccess?edit=1&orderNo='+orderNo
|
||||
if(order.universalRiskNotifyDTO && order.universalRiskNotifyDTO.isUniversalRiskNotifyShowPoint != '1'){
|
||||
url = '/sale/AccountInformation?edit=1&orderNo='+orderNo
|
||||
}else{
|
||||
url = '/sale/universalRiskNotifyingMessage?edit=1&orderNo='+orderNo
|
||||
}
|
||||
}else if(orderStatus == '63'){//风险测评保存成功, 跳到账户信息--
|
||||
url = '/sale/AccountInformation?edit=1&orderNo='+orderNo
|
||||
}
|
||||
// switch (orderStatus) {
|
||||
// case '01': //已签名待客户确认, 跳到签名确认页面
|
||||
|
||||
@@ -188,20 +188,16 @@ export default {
|
||||
salePageFlag: '5',
|
||||
// 是否特定医疗险
|
||||
isSpecificMedicalInsurance:false,
|
||||
isShowEvaluationPoint:'0'//默认不跳转到风险测评
|
||||
isShowEvaluationPoint:'0',//默认不跳转到风险测评
|
||||
isUniversalRiskNotifyShowPoint: '0' //默认不跳转到万能险风险告知
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
// this.$store.commit('updateAnswerType', false )
|
||||
let res= await getOrderDetail({ orderNo: this.$route.query.orderNo })
|
||||
// getOrderDetail({ orderNo: `8186270000000036` }).then(res => {
|
||||
if (res.result == 0) {
|
||||
//投被保险人关系
|
||||
this.isShowEvaluationPoint = res.orderDTO.riskEvaluationDTO.isShowEvaluationPoint
|
||||
// this.isShowEvaluationPoint = res.orderDTO.riskEvaluationDTO.isShowEvaluationPoint
|
||||
let updateAnswerType = res.orderDTO.riskEvaluationDTO.isShowEvaluationPoint =='1'?true:false
|
||||
this.$store.commit( 'updateAnswerType',updateAnswerType )
|
||||
console.log(updateAnswerType,'updateAnswerType');
|
||||
this.isUniversalRiskNotifyShowPoint = res.orderDTO.universalRiskNotifyDTO.isUniversalRiskNotifyShowPoint
|
||||
this.renovate = new Date().getTime()
|
||||
this.isExistAdditionalRisk = res.orderDTO.insuredDTOs[0].riskDTOLst.length > 1 ? true : false
|
||||
|
||||
@@ -679,15 +675,27 @@ export default {
|
||||
localStorage.salePageFlag = '6'
|
||||
}
|
||||
if(this.isShowEvaluationPoint == '0'){
|
||||
that.$jump({
|
||||
flag: 'h5',
|
||||
extra: {
|
||||
url: location.origin + '/#/sale/accountInformation',
|
||||
},
|
||||
routerInfo: {
|
||||
path: '/sale/accountInformation'
|
||||
}
|
||||
})
|
||||
if(this.isUniversalRiskNotifyShowPoint == '1'){
|
||||
that.$jump({
|
||||
flag: 'h5',
|
||||
extra: {
|
||||
url: location.origin + '/#/sale/universalRiskNotifyingMessage?orderNo=' + this.$route.query.orderNo,
|
||||
},
|
||||
routerInfo: {
|
||||
path: '/sale/universalRiskNotifyingMessage?orderNo=' + this.$route.query.orderNo
|
||||
}
|
||||
})
|
||||
}else{
|
||||
that.$jump({
|
||||
flag: 'h5',
|
||||
extra: {
|
||||
url: location.origin + '/#/sale/accountInformation?orderNo=' + this.$route.query.orderNo,
|
||||
},
|
||||
routerInfo: {
|
||||
path: '/sale/accountInformation?orderNo=' + this.$route.query.orderNo
|
||||
}
|
||||
})
|
||||
}
|
||||
} else {
|
||||
that.$jump({
|
||||
flag: 'h5',
|
||||
@@ -713,7 +721,8 @@ export default {
|
||||
this.$toast(res.resultMessage)
|
||||
}
|
||||
})
|
||||
} else if (financeImpart == {}) {
|
||||
}
|
||||
else if (financeImpart == {}) {
|
||||
let data = {
|
||||
orderType: 'IMPART_ORDER',
|
||||
orderDTO: {
|
||||
@@ -734,20 +743,33 @@ export default {
|
||||
saveInformation(data).then(res => {
|
||||
if (res.result == '0') {
|
||||
localStorage.removeItem('changeCard')
|
||||
that.$jump({
|
||||
flag: 'h5',
|
||||
extra: {
|
||||
url: location.origin + '/#/sale/AccountInformation',
|
||||
},
|
||||
routerInfo: {
|
||||
path: '/sale/AccountInformation'
|
||||
}
|
||||
})
|
||||
if(this.isUniversalRiskNotifyShowPoint == '1'){
|
||||
that.$jump({
|
||||
flag: 'h5',
|
||||
extra: {
|
||||
url: location.origin + '/#/sale/universalRiskNotifyingMessage?orderNo=' + this.$route.query.orderNo,
|
||||
},
|
||||
routerInfo: {
|
||||
path: '/sale/universalRiskNotifyingMessage?orderNo=' + this.$route.query.orderNo
|
||||
}
|
||||
})
|
||||
}else{
|
||||
that.$jump({
|
||||
flag: 'h5',
|
||||
extra: {
|
||||
url: location.origin + '/#/sale/AccountInformation',
|
||||
},
|
||||
routerInfo: {
|
||||
path: '/sale/AccountInformation'
|
||||
}
|
||||
})
|
||||
}
|
||||
} else {
|
||||
this.$toast(res.resultMessage)
|
||||
}
|
||||
})
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
let data = {
|
||||
orderType: 'IMPART_ORDER',
|
||||
orderDTO: {
|
||||
@@ -769,15 +791,27 @@ export default {
|
||||
if (res.result == '0') {
|
||||
localStorage.removeItem('changeCard')
|
||||
if(this.isShowEvaluationPoint == '0'){
|
||||
that.$jump({
|
||||
flag: 'h5',
|
||||
extra: {
|
||||
url: location.origin + '/#/sale/accountInformation',
|
||||
},
|
||||
routerInfo: {
|
||||
path: '/sale/accountInformation'
|
||||
}
|
||||
})
|
||||
if(this.isUniversalRiskNotifyShowPoint == '1'){
|
||||
that.$jump({
|
||||
flag: 'h5',
|
||||
extra: {
|
||||
url: location.origin + '/#/sale/universalRiskNotifyingMessage?orderNo=' + this.$route.query.orderNo,
|
||||
},
|
||||
routerInfo: {
|
||||
path: '/sale/universalRiskNotifyingMessage?orderNo=' + this.$route.query.orderNo
|
||||
}
|
||||
})
|
||||
}else{
|
||||
that.$jump({
|
||||
flag: 'h5',
|
||||
extra: {
|
||||
url: location.origin + '/#/sale/accountInformation',
|
||||
},
|
||||
routerInfo: {
|
||||
path: '/sale/accountInformation'
|
||||
}
|
||||
})
|
||||
}
|
||||
} else {
|
||||
that.$jump({
|
||||
flag: 'h5',
|
||||
|
||||
@@ -210,7 +210,12 @@ export default {
|
||||
} else {
|
||||
this.$toast(res.resultMessage)
|
||||
setTimeout(() => {
|
||||
this.$router.push({ path: '/sale/payResultFail' })
|
||||
this.$router.push({
|
||||
path: '/sale/payResultFail',
|
||||
query: {
|
||||
orderNo: this.$route.query.orderNo
|
||||
}
|
||||
})
|
||||
}, 2000)
|
||||
}
|
||||
},
|
||||
@@ -289,16 +294,6 @@ export default {
|
||||
} else {
|
||||
this.$toast(res.resultMessage)
|
||||
}
|
||||
// if (res.content.payFlag == 'Y') {
|
||||
// this.getAcceptInsurance()
|
||||
// } else {
|
||||
// debugger
|
||||
// this.$toast(res.resultMessage)
|
||||
//
|
||||
// setTimeout(() => {
|
||||
// this.$router.push({ path: '/sale/payResultFail' })
|
||||
// }, 2000)
|
||||
// }
|
||||
}
|
||||
},
|
||||
// 取消支付
|
||||
@@ -568,7 +563,12 @@ export default {
|
||||
// on confirm
|
||||
// 订单状态已同步修改为 签约失败,页面提示去修改银行卡信息
|
||||
localStorage.setItem('changeCard', true)
|
||||
this.$router.push('/sale/AccountInformation')
|
||||
this.$router.push({
|
||||
path: '/sale/AccountInformation',
|
||||
query: {
|
||||
orderNo: this.$route.query.orderNo
|
||||
}
|
||||
})
|
||||
resolve(false);
|
||||
}).catch(() => {
|
||||
// on cancel
|
||||
@@ -594,7 +594,12 @@ export default {
|
||||
// on confirm
|
||||
// 订单状态已同步修改为 签约失败,页面提示去修改银行卡信息
|
||||
localStorage.setItem('changeCard', true)
|
||||
this.$router.push('/sale/AccountInformation')
|
||||
this.$router.push({
|
||||
path: '/sale/AccountInformation',
|
||||
query: {
|
||||
orderNo: this.$route.query.orderNo
|
||||
}
|
||||
})
|
||||
resolve(false);
|
||||
}).catch(() => {
|
||||
// on cancel
|
||||
@@ -661,7 +666,12 @@ export default {
|
||||
}).then(() => {
|
||||
// 订单状态已同步修改为 签约失败,页面提示去修改银行卡信息
|
||||
localStorage.setItem('changeCard', true)
|
||||
this.$router.push('/sale/AccountInformation')
|
||||
this.$router.push({
|
||||
path: '/sale/AccountInformation',
|
||||
query: {
|
||||
orderNo: this.$route.query.orderNo
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -606,10 +606,12 @@ export default {
|
||||
this.$toast.clear()
|
||||
if (JSON.parse(data).state == '1') {
|
||||
this.base64 = decodeURI(JSON.parse(data).sign)
|
||||
this.appntSign.documentStatus = '3'
|
||||
this.isDisabledComplite = false
|
||||
this.isSubmit = false
|
||||
this.isSign = false
|
||||
if(this.base64){
|
||||
this.appntSign.documentStatus = '3'
|
||||
this.isDisabledComplite = false
|
||||
this.isSubmit = false
|
||||
this.isSign = false
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -71,16 +71,12 @@ export default {
|
||||
created(){
|
||||
getOrderDetail({ orderNo: this.$route.query.orderNo }).then(res => {
|
||||
if (res.result == 0) {
|
||||
// let updateAnswerType = res.orderDTO.riskEvaluationDTO.isShowEvaluationPoint =='1'?true:false
|
||||
// this.$store.commit('updateAnswerType', updateAnswerType )
|
||||
this.question =JSON.parse( res.orderDTO.riskEvaluationDTO.quentionAnswer)
|
||||
console.log( this.question,' this.question');
|
||||
this.isDisabledType()
|
||||
this.question =JSON.parse( res.orderDTO.riskEvaluationDTO.quentionAnswer)
|
||||
this.isDisabledType()
|
||||
} else {
|
||||
this.$toast(res.resultMessage)
|
||||
}
|
||||
})
|
||||
|
||||
},
|
||||
mounted(){
|
||||
setTimeout(() => {
|
||||
|
||||
@@ -49,6 +49,7 @@ export default {
|
||||
salePageFlag: '7',
|
||||
riskEvaluationDTO:{
|
||||
},
|
||||
isUniversalRiskNotifyShowPoint: '0' //默认不跳转到万能险风险告知
|
||||
}
|
||||
},
|
||||
components: {
|
||||
@@ -66,10 +67,8 @@ export default {
|
||||
created(){
|
||||
getOrderDetail({ orderNo: this.$route.query.orderNo }).then(res => {
|
||||
if (res.result == 0) {
|
||||
// let updateAnswerType = res.orderDTO.riskEvaluationDTO.isShowEvaluationPoint =='1'?true:false
|
||||
// this.$store.commit('updateAnswerType', updateAnswerType )
|
||||
// localStorage.setItem('updateAnswerType',updateAnswerType)
|
||||
this.riskEvaluationDTO = res.orderDTO.riskEvaluationDTO
|
||||
this.isUniversalRiskNotifyShowPoint = res.orderDTO.universalRiskNotifyDTO.isUniversalRiskNotifyShowPoint
|
||||
this.getStatement()
|
||||
} else {
|
||||
this.$toast(res.resultMessage)
|
||||
@@ -172,15 +171,28 @@ export default {
|
||||
},
|
||||
next(){
|
||||
let that = this
|
||||
that.$jump({
|
||||
flag: 'h5',
|
||||
extra: {
|
||||
url: location.origin + '/#/sale/AccountInformation?orderNo=' + this.$route.query.orderNo
|
||||
},
|
||||
routerInfo: {
|
||||
path: '/sale/AccountInformation?orderNo=' + this.$route.query.orderNo
|
||||
if(that.isUniversalRiskNotifyShowPoint == '1'){
|
||||
that.$jump({
|
||||
flag: 'h5',
|
||||
extra: {
|
||||
url: location.origin + '/#/sale/universalRiskNotifyingMessage?orderNo=' + that.$route.query.orderNo,
|
||||
},
|
||||
routerInfo: {
|
||||
path: '/sale/universalRiskNotifyingMessage?orderNo=' + that.$route.query.orderNo
|
||||
}
|
||||
})
|
||||
}else{
|
||||
that.$jump({
|
||||
flag: 'h5',
|
||||
extra: {
|
||||
url: location.origin + '/#/sale/AccountInformation?orderNo=' + this.$route.query.orderNo
|
||||
},
|
||||
routerInfo: {
|
||||
path: '/sale/AccountInformation?orderNo=' + this.$route.query.orderNo
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
},
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<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 + pdfUrl" class="iframe"></iframe>
|
||||
<iframe :src="src + pdfUrl" class="iframe" id="iframepage"></iframe>
|
||||
|
||||
<div class="bg-white bottom-btn">
|
||||
<van-radio-group v-model="radio" class="pb10 pb20 pl30 pr50">
|
||||
@@ -49,7 +49,8 @@ export default {
|
||||
changeCard: localStorage.changeCard, //是否从修改银行卡号进来
|
||||
title:'', //阅读文件标题
|
||||
src: location.origin + '/pdfjs/web/viewer.html?file=',
|
||||
tipsPolicyUrl:''
|
||||
tipsPolicyUrl:'',
|
||||
hasProductTip: false
|
||||
}
|
||||
},
|
||||
components: {
|
||||
@@ -145,6 +146,17 @@ export default {
|
||||
return new Promise((resolve, reject) => {
|
||||
getOrderDetail(data).then(res => {
|
||||
if (res.result == '0') {
|
||||
res.orderDTO.insuredDTOs[0].riskDTOLst.forEach(item => {
|
||||
if(item.isMainRisk == '0'){
|
||||
if(item.insuYearFlag == 'Y' && item.insuYear > 1){
|
||||
this.hasProductTip = true
|
||||
}
|
||||
if(item.insuYearFlag == 'A' && item.insuYear > 1){
|
||||
this.hasProductTip = true
|
||||
}
|
||||
}
|
||||
})
|
||||
let insuYear = res.orderDTO.insuredDTOs[0].riskDTOLst
|
||||
let list = res.orderDTO.ebizSignDTOS
|
||||
let appntSignList = []
|
||||
let insuredSignList = []
|
||||
@@ -167,7 +179,7 @@ export default {
|
||||
originalUrl = item.originalUrl
|
||||
document.title = ''
|
||||
this.title = item.documentName
|
||||
document.title = item.documentName
|
||||
document.title = item.documentName
|
||||
console.log('that.appntSign', item.policyUrl)
|
||||
break
|
||||
}
|
||||
@@ -192,6 +204,12 @@ export default {
|
||||
}).then(() => {
|
||||
that.radio = ''
|
||||
})
|
||||
} else {
|
||||
var ifm1 = document.getElementById("iframepage").contentWindow.document.documentElement.scrollTop;
|
||||
var ifm2 = document.getElementById("iframepage").contentWindow.document.body.scrollTop;
|
||||
console.log(ifm1,'ifm1')
|
||||
console.log(ifm2,'ifm2')
|
||||
// document.getElementById("iframepage").contentWindow.scrollTo(0, 200)
|
||||
}
|
||||
},
|
||||
// 下一步
|
||||
@@ -303,12 +321,33 @@ export default {
|
||||
// }
|
||||
// })
|
||||
}else{
|
||||
url = this.productCode == 'GFRS_M0003' || this.productCode == 'GFRS_M0015' || this.productCode == 'GFRS_M0017' ? 'productTip' : 'insuranceTip'
|
||||
/*that.appntSign.map(item => {
|
||||
if (item.documentCode == '8') {
|
||||
url = 'apointValidDoc'
|
||||
}
|
||||
})*/
|
||||
url = this.hasProductTip ? 'productTip' : 'insuranceTip'
|
||||
// url = this.productCode == 'GFRS_M0003' ||
|
||||
// this.productCode == 'GFRS_M0015' ||
|
||||
// this.productCode == 'GFRS_M0017' ||
|
||||
// this.productCode == 'GFRS_M0072' ||
|
||||
// this.productCode == 'GFRS_M0073' ||
|
||||
// this.productCode == 'GFRS_M0072' ||
|
||||
// this.productCode == 'GFRS_M0056' ||
|
||||
// this.productCode == 'GFRS_M0038' ||
|
||||
// this.productCode == 'GFRS_M0035' ||
|
||||
// this.productCode == 'GFRS_M0044' ||
|
||||
// this.productCode == 'GFRS_M0057' ||
|
||||
// this.productCode == 'GFRS_M0026' ||
|
||||
// this.productCode == 'GFRS_M0066' ||
|
||||
// this.productCode == 'GFRS_M0069' ||
|
||||
// this.productCode == 'GFRS_M0065' ||
|
||||
// this.productCode == 'GFRS_M0053' ||
|
||||
// this.productCode == 'GFRS_M0054' ||
|
||||
// this.productCode == 'GFRS_M0059' ||
|
||||
// this.productCode == 'GFRS_M0013' ||
|
||||
// this.productCode == 'GFRS_M0014' ||
|
||||
// this.productCode == 'GFRS_M0012' ? 'productTip' : 'insuranceTip'
|
||||
/*that.appntSign.map(item => {
|
||||
if (item.documentCode == '8') {
|
||||
url = 'apointValidDoc'
|
||||
}
|
||||
})*/
|
||||
// 若需展示 短期健康险投保须知,则优先展示
|
||||
that.appntSign.map(item => {
|
||||
if (item.documentCode == '9') {
|
||||
@@ -451,7 +490,6 @@ export default {
|
||||
window.localStorage.setItem('detailJump', '')
|
||||
// 查看保险条款是否都签署
|
||||
console.log(this.appntSign,'dfasd')
|
||||
// debugger
|
||||
let isHasClauses = this.appntSign.some(item => {
|
||||
return item.documentCode == '13' && (item.documentStatus == '0' || item.documentStatus == '2')
|
||||
})
|
||||
@@ -474,7 +512,28 @@ export default {
|
||||
if (that.changeCard) {
|
||||
url = 'SignatureConfirmation'
|
||||
} else {
|
||||
url = this.productCode == 'GFRS_M0003' || this.productCode == 'GFRS_M0015' || this.productCode == 'GFRS_M0017' ? 'productTip' : 'insuranceTip'
|
||||
url = this.hasProductTip ? 'productTip' : 'insuranceTip'
|
||||
// url = this.productCode == 'GFRS_M0003' ||
|
||||
// this.productCode == 'GFRS_M0015' ||
|
||||
// this.productCode == 'GFRS_M0017' ||
|
||||
// this.productCode == 'GFRS_M0072' ||
|
||||
// this.productCode == 'GFRS_M0073' ||
|
||||
// this.productCode == 'GFRS_M0072' ||
|
||||
// this.productCode == 'GFRS_M0056' ||
|
||||
// this.productCode == 'GFRS_M0038' ||
|
||||
// this.productCode == 'GFRS_M0035' ||
|
||||
// this.productCode == 'GFRS_M0044' ||
|
||||
// this.productCode == 'GFRS_M0057' ||
|
||||
// this.productCode == 'GFRS_M0026' ||
|
||||
// this.productCode == 'GFRS_M0066' ||
|
||||
// this.productCode == 'GFRS_M0069' ||
|
||||
// this.productCode == 'GFRS_M0065' ||
|
||||
// this.productCode == 'GFRS_M0053' ||
|
||||
// this.productCode == 'GFRS_M0054' ||
|
||||
// this.productCode == 'GFRS_M0059' ||
|
||||
// this.productCode == 'GFRS_M0013' ||
|
||||
// this.productCode == 'GFRS_M0014' ||
|
||||
// this.productCode == 'GFRS_M0012' ? 'productTip' : 'insuranceTip'
|
||||
// 本人或投保人-需阅读短期健康险投保须知时 跳转shortPeriodProduct
|
||||
that.appntSign.map(item => {
|
||||
if (item.documentCode == '9') {
|
||||
|
||||
@@ -2,599 +2,362 @@
|
||||
<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 pr50">
|
||||
<van-radio-group v-model="radio" class="pb10 pt20 pl30 fs14">
|
||||
<van-radio name="1" @click="click">
|
||||
本人确认已阅读
|
||||
<span>《{{ riskName }}产品说明书》</span>
|
||||
<span>{{ appntSign.documentName }}</span>
|
||||
</van-radio>
|
||||
</van-radio-group>
|
||||
<div class="pt10 pb10 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, 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,
|
||||
// 按钮是否可以点击
|
||||
isDisable: true,
|
||||
// 是否在微信
|
||||
isWeixin,
|
||||
// 是否签名了 回执流程
|
||||
isSign: true,
|
||||
// sign加密码
|
||||
base64: '',
|
||||
// 是否可以点击
|
||||
isDisabledComplite: true,
|
||||
// local带来的被保险人信息
|
||||
saleInsuredPersonInfo: {},
|
||||
// local带来的投保人信息
|
||||
saleInsuredInfo: {},
|
||||
// 是否从详情跳过来 如果为1 是
|
||||
detailJump: '',
|
||||
src: location.origin + '/pdfjs/web/viewer.html?file=',
|
||||
//保险产品名称
|
||||
riskName: localStorage.riskName,
|
||||
}
|
||||
},
|
||||
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
|
||||
}
|
||||
|
||||
let that = this
|
||||
|
||||
that.detailJump = window.localStorage.getItem('detailJump')
|
||||
that.signVal = window.localStorage.getItem('sign-val')
|
||||
|
||||
// 获取投保人信息
|
||||
that.saleInsuredInfo = JSON.parse(this.$CacheUtils.getLocItem('saleInsuredInfo'))
|
||||
if (this.isWeixin) {
|
||||
that.relationToAppnt = JSON.parse(this.$CacheUtils.getLocItem('saleInsuredPersonInfo')).relationToAppnt
|
||||
}
|
||||
|
||||
if (this.detailJump != '1') {
|
||||
// 投被保险人是否同人
|
||||
that.relationToAppnt = JSON.parse(this.$CacheUtils.getLocItem('saleInsuredPersonInfo')).relationToAppnt
|
||||
// 获取被保险人信息
|
||||
that.saleInsuredPersonInfo = JSON.parse(this.$CacheUtils.getLocItem('saleInsuredPersonInfo'))
|
||||
}
|
||||
// if (this.detailJump != '1') {
|
||||
// this.getOrderDetail()
|
||||
// }
|
||||
|
||||
if (this.isWeixin) {
|
||||
let imgBase64Data = sessionStorage.getItem('oneimgBase64Data')
|
||||
let wxSigned = sessionStorage.getItem('onewxSigned')
|
||||
let signInfo = JSON.parse(localStorage.getItem('signInfo'))
|
||||
console.log('`````````````````````````````````')
|
||||
|
||||
console.log('imgBase64Data: oneimgBase64Data:' + 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('````````````````````````')
|
||||
console.log('第一次进入电子保单')
|
||||
setTimeout(function() {
|
||||
closeLoading()
|
||||
this.timeOut()
|
||||
}, 5000)
|
||||
|
||||
this.getOrderDetail()
|
||||
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: {},
|
||||
//获取产品编号
|
||||
productCode: localStorage.productCode,
|
||||
src: location.origin + '/pdfjs/web/viewer.html?file=',
|
||||
riskName: localStorage.riskName
|
||||
}
|
||||
} else {
|
||||
},
|
||||
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()
|
||||
this.timeOut()
|
||||
that.timeOut()
|
||||
}, 5000)
|
||||
if (this.detailJump != '1') {
|
||||
this.getOrderDetail()
|
||||
}
|
||||
}
|
||||
},
|
||||
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
|
||||
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}`
|
||||
}, 1000)
|
||||
},
|
||||
// 获取签名状态
|
||||
getOrderDetail() {
|
||||
openLoading()
|
||||
let that = this
|
||||
let data = {
|
||||
orderNo: that.$route.query.orderNo
|
||||
}
|
||||
return new Promise((resolve, reject) => {
|
||||
getOrderDetail1(data).then(res => {
|
||||
if (res.result == '0') {
|
||||
|
||||
res.orderDTO.ebizSignDTOS.map(item => {
|
||||
if (item.signType == '0' || item.signType == '2') {
|
||||
if (item.documentCode == '3') {
|
||||
that.appntSign = item
|
||||
console.log('that.appntSign', that.appntSign)
|
||||
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: that.$route.query.orderNo
|
||||
}
|
||||
return new Promise((resolve) => {
|
||||
getOrderDetail1(data).then(res => {
|
||||
if (res.result == '0') {
|
||||
for(let i = 0;i<res.orderDTO.ebizSignDTOS.length;i++){
|
||||
if (res.orderDTO.ebizSignDTOS[i].signType == '0' || res.orderDTO.ebizSignDTOS[i].signType == '2') {
|
||||
if (res.orderDTO.ebizSignDTOS[i].documentCode == '3' && res.orderDTO.ebizSignDTOS[i].documentStatus == '0') {
|
||||
that.appntSign = res.orderDTO.ebizSignDTOS[i]
|
||||
document.title = ''
|
||||
document.title = res.orderDTO.ebizSignDTOS[i].documentName
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
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: that.$route.query.orderNo
|
||||
},
|
||||
ebizSignDTOS: [
|
||||
{
|
||||
signOrRead: 'read',
|
||||
signId: that.appntSign.signId,
|
||||
orderNo: that.$route.query.orderNo,
|
||||
documentCode: that.appntSign.documentCode,
|
||||
documentStatus: '0',
|
||||
signType: that.appntSign.signType,
|
||||
documentType: that.appntSign.documentType,
|
||||
baseEncryp: that.base64,
|
||||
policyUrl: that.appntSign.policyUrl
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
saveInformation(data).then(res => {
|
||||
if (res.result == '0') {
|
||||
this.$toast.clear()
|
||||
window.localStorage.setItem('detailJump', '')
|
||||
window.sessionStorage.onewxSigned = false
|
||||
let thisdata = {
|
||||
orderNo: this.$route.query.orderNo
|
||||
}
|
||||
getOrderDetail1(thisdata).then(response=>{
|
||||
if(response.result == 0){
|
||||
let hasotherproductTip = false
|
||||
for(let i = 0;i<response.orderDTO.ebizSignDTOS.length;i++){
|
||||
if (response.orderDTO.ebizSignDTOS[i].signType == '0' || response.orderDTO.ebizSignDTOS[i].signType == '2') {
|
||||
if (response.orderDTO.ebizSignDTOS[i].documentCode == '3' && response.orderDTO.ebizSignDTOS[i].documentStatus == '0') {
|
||||
hasotherproductTip = true
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
if(hasotherproductTip){
|
||||
this.$router.go(0)
|
||||
}else{
|
||||
this.$jump({
|
||||
flag: 'h5',
|
||||
extra: {
|
||||
url: location.origin + '/#/sale/InsuranceTip?orderNo=' + that.$route.query.orderNo
|
||||
},
|
||||
routerInfo: {
|
||||
path: '/sale/InsuranceTip?orderNo=' + that.$route.query.orderNo
|
||||
}
|
||||
})
|
||||
}
|
||||
}else{
|
||||
this.$toast(response.resultMessage)
|
||||
}
|
||||
})
|
||||
} else {
|
||||
that.$toast(res.resultMessage)
|
||||
}
|
||||
})
|
||||
that.appntSign.policyUrl = encodeURIComponent(config.imgDomain + `/returnDirectStream?imgPath=${that.appntSign.policyUrl}`)
|
||||
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) {
|
||||
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', '投保人签名', '5', '1')
|
||||
} else {
|
||||
EWebBridge.webCallAppInJs('ca_sign', {
|
||||
//身份证号码
|
||||
number: this.saleInsuredInfo.idNo,
|
||||
//姓名
|
||||
name: this.saleInsuredInfo.name,
|
||||
type: this.saleInsuredInfo.idType,
|
||||
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.documentStatus = '3'
|
||||
this.isDisabledComplite = false
|
||||
this.isSign = false
|
||||
}
|
||||
})
|
||||
}
|
||||
} else {
|
||||
if (this.isWeixin) {
|
||||
this.toAirSign('0', '投保人签名', '5', '1')
|
||||
} else {
|
||||
EWebBridge.webCallAppInJs('ca_sign', {
|
||||
//身份证号码
|
||||
number: this.saleInsuredInfo.idNo,
|
||||
//姓名
|
||||
name: this.saleInsuredInfo.name,
|
||||
type: this.saleInsuredInfo.idType,
|
||||
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.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', '投保人签名', '5', '1')
|
||||
} else {
|
||||
EWebBridge.webCallAppInJs('ca_sign', {
|
||||
//身份证号码
|
||||
number: that.saleInsuredInfo.idNo,
|
||||
//姓名
|
||||
name: that.saleInsuredInfo.name,
|
||||
type: that.saleInsuredInfo.idType,
|
||||
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') {
|
||||
that.base64 = decodeURI(JSON.parse(data).sign)
|
||||
that.appntSign.documentStatus = '3'
|
||||
that.isDisabledComplite = false
|
||||
that.isSign = false
|
||||
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: that.$route.query.orderNo
|
||||
},
|
||||
ebizSignDTOS: [
|
||||
{
|
||||
signOrRead: 'read',
|
||||
signId: that.appntSign.signId,
|
||||
orderNo: that.$route.query.orderNo,
|
||||
documentCode: that.appntSign.documentCode,
|
||||
documentStatus: '0',
|
||||
signType: that.appntSign.signType,
|
||||
documentType: that.appntSign.documentType,
|
||||
baseEncryp: that.base64,
|
||||
policyUrl: that.appntSign.policyUrl
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
saveInformation(data).then(res => {
|
||||
if (res.result == '0') {
|
||||
this.$toast.clear()
|
||||
window.localStorage.setItem('detailJump', '')
|
||||
window.sessionStorage.onewxSigned = false
|
||||
let thisdata = {
|
||||
orderNo: this.$route.query.orderNo
|
||||
}
|
||||
getOrderDetail1(thisdata).then(response=>{
|
||||
if(response.result == 0){
|
||||
let hasotherproductTip = false
|
||||
for(let i = 0;i<response.orderDTO.ebizSignDTOS.length;i++){
|
||||
if (response.orderDTO.ebizSignDTOS[i].signType == '0' || response.orderDTO.ebizSignDTOS[i].signType == '2') {
|
||||
if (response.orderDTO.ebizSignDTOS[i].documentCode == '3' && response.orderDTO.ebizSignDTOS[i].documentStatus == '0') {
|
||||
hasotherproductTip = true
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
if(hasotherproductTip){
|
||||
this.$router.go(0)
|
||||
}else{
|
||||
this.$jump({
|
||||
flag: 'h5',
|
||||
extra: {
|
||||
url: location.origin + '/#/sale/InsuranceTip?orderNo=' + that.$route.query.orderNo
|
||||
},
|
||||
routerInfo: {
|
||||
path: '/sale/InsuranceTip?orderNo=' + that.$route.query.orderNo
|
||||
}
|
||||
})
|
||||
}
|
||||
}else{
|
||||
this.$toast(response.resultMessage)
|
||||
}
|
||||
})
|
||||
} else {
|
||||
that.$toast(res.resultMessage)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
// toAirSign(status, keyword, offset) {
|
||||
// localStorage.setItem(
|
||||
// 'signInfo',
|
||||
// JSON.stringify({
|
||||
// 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'
|
||||
// },
|
||||
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'
|
||||
computed: {
|
||||
listenChange() {
|
||||
const { isOver, radio, appntSign } = this
|
||||
return { isOver, radio, appntSign }
|
||||
}
|
||||
},
|
||||
// 下一步
|
||||
goNext() {
|
||||
if (this.isWeixin) {
|
||||
console.log('````````````````````')
|
||||
console.log('进入微信')
|
||||
this.$toast.loading({
|
||||
duration: 0, // 持续展示 toast
|
||||
|
||||
forbidClick: true, // 禁用背景点击
|
||||
|
||||
loadingType: 'spinner',
|
||||
|
||||
message: '加载中……'
|
||||
})
|
||||
watch: {
|
||||
listenChange(val) {
|
||||
let that = this
|
||||
if (that.signVal == '0' || that.signVal == '2') {
|
||||
let data = {
|
||||
orderType: 'SIGN_ORDER',
|
||||
orderDTO: {
|
||||
orderInfoDTO: {
|
||||
orderNo: that.$route.query.orderNo
|
||||
},
|
||||
ebizSignDTOS: [
|
||||
{
|
||||
signOrRead: 'sms',
|
||||
signId: that.appntSign.signId,
|
||||
orderNo: that.$route.query.orderNo,
|
||||
documentCode: that.appntSign.documentCode,
|
||||
documentStatus: '3',
|
||||
signType: that.appntSign.signType,
|
||||
documentType: that.appntSign.documentType,
|
||||
baseEncryp: that.base64,
|
||||
policyUrl: that.appntSign.policyUrl
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
saveInformation(data).then(res => {
|
||||
if (res.result == '0') {
|
||||
this.$toast.clear()
|
||||
window.localStorage.setItem('detailJump', '')
|
||||
window.sessionStorage.onewxSigned = false
|
||||
|
||||
this.$jump({
|
||||
flag: 'h5',
|
||||
extra: {
|
||||
url: location.origin + '/#/sale/InsuranceTip?orderNo=' + that.$route.query.orderNo
|
||||
},
|
||||
routerInfo: {
|
||||
path: '/sale/InsuranceTip?orderNo=' + that.$route.query.orderNo
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
} 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: that.$route.query.orderNo
|
||||
},
|
||||
ebizSignDTOS: [
|
||||
{
|
||||
signOrRead: 'sms',
|
||||
signId: that.appntSign.signId,
|
||||
orderNo: that.$route.query.orderNo,
|
||||
documentCode: that.appntSign.documentCode,
|
||||
documentStatus: '3',
|
||||
signType: that.appntSign.signType,
|
||||
documentType: that.appntSign.documentType,
|
||||
baseEncryp: that.base64,
|
||||
policyUrl: that.appntSign.policyUrl
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
saveInformation(data).then(res => {
|
||||
if (res.result == '0') {
|
||||
this.$toast.clear()
|
||||
window.localStorage.setItem('detailJump', '')
|
||||
window.sessionStorage.onewxSigned = false
|
||||
// window.sessionStorage.oneimgBase64Data = ''
|
||||
|
||||
this.$jump({
|
||||
flag: 'h5',
|
||||
extra: {
|
||||
url: location.origin + '/#/sale/InsuranceTip?orderNo=' + that.$route.query.orderNo
|
||||
},
|
||||
routerInfo: {
|
||||
path: '/sale/InsuranceTip?orderNo=' + that.$route.query.orderNo
|
||||
}
|
||||
})
|
||||
|
||||
} else {
|
||||
that.$toast(res.resultMessage)
|
||||
}
|
||||
})
|
||||
if (val.isOver == true && val.radio !== '') {
|
||||
that.isDisabledComplite = false
|
||||
} else {
|
||||
that.isDisabledComplite = true
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
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()
|
||||
}
|
||||
},
|
||||
|
||||
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;
|
||||
}
|
||||
img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
.notice {
|
||||
width: 100%;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
z-index: 20;
|
||||
}
|
||||
.iframe {
|
||||
width: 100vw;
|
||||
height: 70vh;
|
||||
border: none;
|
||||
}
|
||||
</style>
|
||||
|
||||
244
src/views/ebiz/sale/universalRiskNotifyingMessage.vue
Normal file
244
src/views/ebiz/sale/universalRiskNotifyingMessage.vue
Normal file
@@ -0,0 +1,244 @@
|
||||
<template>
|
||||
<div class="notifyingMessage-container redRadioCheckbox">
|
||||
<div class="pb50">
|
||||
<div class="allFalse">
|
||||
<div style="background-color: rgb(245, 245, 245);padding-bottom:5px">
|
||||
<index-bar :key="renovate"></index-bar>
|
||||
</div>
|
||||
<div class="flex justify-content-s align-items-c bg-white pt20 pb20 pr10">
|
||||
<span class="pl10">风险告知</span>
|
||||
<div @click="allFalse" class="pr10">
|
||||
<van-button type="danger" size="small">一键全是</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="content-all-info">
|
||||
<h3 style="text-align:center;margin-top: 20px;">万能型人身保险产品风险告知问卷</h3>
|
||||
<div class="mb20 ml20 mr10 mt20">
|
||||
<p style="text-indent:2em">
|
||||
尊敬的客户,您好!感谢您对国富人寿保险股份有限公司(以下简称“本公司”)的信任。在您购买万能型保险产品前,请您对以下事项进行确认:
|
||||
</p>
|
||||
</div>
|
||||
<div v-for="(item, index) in question" :key="index">
|
||||
<div class="mt10 pb2" v-if="item.impartCode != '2b'">
|
||||
<div class="mb20 ml20 mr10">
|
||||
<span v-html="item.title"></span>
|
||||
</div>
|
||||
<van-radio-group
|
||||
v-model="item.answer.score"
|
||||
class="flex mb10 pb10"
|
||||
v-validate="'required'"
|
||||
data-vv-name="单选"
|
||||
>
|
||||
<van-radio name="0" class="mr150 ml70">是</van-radio>
|
||||
<van-radio name="1">否</van-radio>
|
||||
</van-radio-group>
|
||||
</div>
|
||||
</div>
|
||||
<p style="text-indent:2em" class="mb20 ml20 mr10">
|
||||
本公司已对您完成万能型产品的风险告知。<span style="font-weight: bold">若您对风险告知内容有疑问,请您再次阅读保险条款及产品说明书;您也可以要求销售人员、销售机构或本公司进行解释。若您仍有疑问的,请您在理解无误后进行投保。</span>
|
||||
</p>
|
||||
<p style="text-indent:2em" class="mb10 ml20 mr10">
|
||||
<span style="font-weight: bold">客户声明:</span>
|
||||
</p>
|
||||
<p style="text-indent:2em" class="mb20 ml20 mr10">
|
||||
上述风险告知问卷过程,均为本人操作,提供的全部信息是真实、准确的,并自愿承担由于信息不真实、不准确而引发的相关风险。
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="bottom-btn bg-white">
|
||||
<van-button type="danger" size="large" @click="nextStep" v-no-more-click="1000">下一步</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { Collapse, CollapseItem, RadioGroup, Radio, Field, CellGroup, Icon } from 'vant'
|
||||
import { information, saveInformation, getOrderDetail } from '@/api/ebiz/sale/sale'
|
||||
import utilsAge from '@/assets/js/utils/age'
|
||||
import IndexBar from '@/components/ebiz/sale/IndexBar'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
renovate:'',
|
||||
salePageFlag: '7.1',
|
||||
question: []
|
||||
}
|
||||
},
|
||||
created() {
|
||||
|
||||
},
|
||||
mounted() {
|
||||
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
|
||||
if (!this.$route.query.edit) {
|
||||
//如果不是编辑/导航条跳转进来的
|
||||
localStorage.setItem('salePageFlag', this.salePageFlag)
|
||||
} else if (this.$route.query.edit && !this.$route.query.salePageFlag) {
|
||||
//如果从保单列表点击编辑按钮进入
|
||||
this.salePageFlag = '7.1'
|
||||
localStorage.setItem('salePageFlag', this.salePageFlag)
|
||||
} else if (this.$route.query.salePageFlag) {
|
||||
//如果是从导航栏点击进入
|
||||
this.salePageFlag = localStorage.salePageFlag
|
||||
}
|
||||
this.getOrderDetail()
|
||||
},
|
||||
methods: {
|
||||
getOrderDetail(){
|
||||
let params = {
|
||||
orderNo: this.$route.query.orderNo
|
||||
}
|
||||
getOrderDetail(params).then(res => {
|
||||
if (res.result == 0) {
|
||||
this.question =JSON.parse( res.orderDTO.universalRiskNotifyDTO.quentionAnswer)
|
||||
// debugger
|
||||
this.isDisabledType()
|
||||
} else {
|
||||
this.$toast(res.resultMessage)
|
||||
}
|
||||
})
|
||||
},
|
||||
isDisabledType(){
|
||||
|
||||
},
|
||||
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
|
||||
})
|
||||
}
|
||||
},
|
||||
allFalse(){
|
||||
if(this.question && this.question.length != 0){
|
||||
this.question.forEach(item=>{
|
||||
item.answer.score = '0'
|
||||
})
|
||||
}
|
||||
},
|
||||
nextStep(){
|
||||
let flag = true
|
||||
if(this.question && this.question.length != 0){
|
||||
this.question.forEach(item=>{
|
||||
if(item.answer.score !== '0'){
|
||||
flag = false
|
||||
}
|
||||
})
|
||||
}
|
||||
if(flag){
|
||||
let data = {
|
||||
orderType: 'NOTIFY_ORDER',
|
||||
orderDTO: {
|
||||
orderInfoDTO: {
|
||||
orderNo: this.$route.query.orderNo,
|
||||
},
|
||||
universalRiskNotifyDTO:{
|
||||
quentionAnswer:JSON.stringify(this.question)
|
||||
}
|
||||
},
|
||||
}
|
||||
saveInformation(data).then(res => {
|
||||
if(res.result == 0){
|
||||
if (!this.$route.query.salePageFlag) {
|
||||
//不是从导航栏进入
|
||||
localStorage.salePageFlag = '7.1'
|
||||
}
|
||||
this.$jump({
|
||||
flag: 'h5',
|
||||
extra: {
|
||||
url: location.origin + '/#/sale/AccountInformation?orderNo=' + this.$route.query.orderNo,
|
||||
},
|
||||
routerInfo: {
|
||||
path: '/sale/AccountInformation?orderNo=' + this.$route.query.orderNo
|
||||
}
|
||||
})
|
||||
}else{
|
||||
this.$toast(res.resuleMessage)
|
||||
}
|
||||
})
|
||||
}else{
|
||||
this.$toast('万能险风险告知需要全部回答“是”方可进入下一步流程')
|
||||
}
|
||||
},
|
||||
},
|
||||
beforeRouteLeave(to, from, next) {
|
||||
document.body.style.backgroundColor = ''
|
||||
next()
|
||||
},
|
||||
components: {
|
||||
[Collapse.name]: Collapse,
|
||||
[CollapseItem.name]: CollapseItem,
|
||||
[RadioGroup.name]: RadioGroup,
|
||||
[Radio.name]: Radio,
|
||||
[Field.name]: Field,
|
||||
[CellGroup.name]: CellGroup,
|
||||
[Icon.name]: Icon,
|
||||
[IndexBar.name]: IndexBar
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import '@/assets/sass/variables.scss';
|
||||
|
||||
.notifyingMessage-text {
|
||||
background: rgba(236, 249, 255, 1);
|
||||
span {
|
||||
color: #4a90e2;
|
||||
}
|
||||
}
|
||||
/deep/ .van-field__label {
|
||||
width: 38%;
|
||||
}
|
||||
/deep/ .van-cell__value {
|
||||
margin-left: 20px;
|
||||
}
|
||||
/deep/.van-collapse-item__content {
|
||||
padding: 0;
|
||||
}
|
||||
/deep/ .special .van-hairline--top-bottom:first-child::after {
|
||||
border: none;
|
||||
}
|
||||
.allFalse {
|
||||
position: fixed;
|
||||
overflow: hidden;
|
||||
z-index: 10;
|
||||
width: 100%;
|
||||
}
|
||||
.content-all-info {
|
||||
padding-top: 153px;
|
||||
}
|
||||
.content-all-info2 {
|
||||
padding-top: 90px;
|
||||
}
|
||||
.pb5{
|
||||
padding-bottom: 5px;
|
||||
}
|
||||
</style>
|
||||
642
src/views/ebiz/sale/universalRiskNotifyingMessageTip.vue
Normal file
642
src/views/ebiz/sale/universalRiskNotifyingMessageTip.vue
Normal file
@@ -0,0 +1,642 @@
|
||||
<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 + 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 riskRules from '@/views/ebiz/common/risk-rules'
|
||||
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: '',
|
||||
flagLiuZhou: '', // 当前代理人是否属于柳州代理人的标志,此变量的值为'true'或'false'
|
||||
branchTypeVal:'' // 当前代理人渠道
|
||||
}
|
||||
},
|
||||
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 dataReturn = await riskRules.getAgentInfoFunc(this)
|
||||
this.branchTypeVal = dataReturn.branchTypeVal
|
||||
|
||||
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
|
||||
}
|
||||
let that = this
|
||||
that.detailJump = window.localStorage.getItem('detailJump')
|
||||
that.signVal = window.localStorage.getItem('sign-val')
|
||||
// 获取投保人信息
|
||||
that.saleInsuredInfo = JSON.parse(this.$CacheUtils.getLocItem('saleInsuredInfo'))
|
||||
if (this.isWeixin) {
|
||||
that.relationToAppnt = JSON.parse(this.$CacheUtils.getLocItem('saleInsuredPersonInfo')).relationToAppnt
|
||||
}
|
||||
|
||||
if (this.detailJump != '1') {
|
||||
// 投被保险人是否同人
|
||||
that.relationToAppnt = JSON.parse(this.$CacheUtils.getLocItem('saleInsuredPersonInfo')).relationToAppnt
|
||||
// 获取被保险人信息
|
||||
// that.saleInsuredPersonInfo = JSON.parse(this.$CacheUtils.getLocItem('saleInsuredPersonInfo'))
|
||||
}
|
||||
// if (this.detailJump != '1') {
|
||||
// this.getOrderDetail()
|
||||
// }
|
||||
if (this.isWeixin) {
|
||||
let imgBase64Data = sessionStorage.getItem('twoimgBase64Data')
|
||||
let wxSigned = JSON.parse(sessionStorage.getItem('twowxSigned'))
|
||||
// let wxSigned = false
|
||||
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: {
|
||||
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
|
||||
// window.localStorage.setItem('step', '1')
|
||||
}
|
||||
that.number = `${time}`
|
||||
}, 1000)
|
||||
},
|
||||
// 获取签名状态
|
||||
getOrderDetail() {
|
||||
let that = this
|
||||
let data = {
|
||||
orderNo: that.$route.query.orderNo
|
||||
}
|
||||
return new Promise((resolve, reject) => {
|
||||
getOrderDetail(data).then(res => {
|
||||
if (res.result == '0') {
|
||||
// 截取代理人机构号的前六位,用于去判断是否属于柳州代理人
|
||||
if(res.orderDTO.recmdDTO.managerOrg && res.orderDTO.recmdDTO.managerOrg.length >= 6){
|
||||
let str = res.orderDTO.recmdDTO.managerOrg.substr(0, 6)
|
||||
// 如果属于
|
||||
if (str === '864502' && this.branchTypeVal == 'G') {
|
||||
that.flagLiuZhou = true
|
||||
} else {
|
||||
that.flagLiuZhou = false
|
||||
}
|
||||
console.log(that.branchTypeVal,'that.branchTypeVal')
|
||||
console.log(that.flagLiuZhou,'that.flagLiuZhou')
|
||||
}
|
||||
res.orderDTO.ebizSignDTOS.map(item => {
|
||||
if (item.documentCode == '15') {
|
||||
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',
|
||||
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.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',
|
||||
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.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',
|
||||
signatureWidth: this.$utils.signParams().signatureWidth,
|
||||
signatureHeight: this.$utils.signParams().signatureHeight
|
||||
}).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)
|
||||
console.log('that.signVal', that.signVal)
|
||||
if (that.signVal == '0' || that.signVal == '2') {
|
||||
let data = {
|
||||
orderType: 'SIGN_ORDER',
|
||||
orderDTO: {
|
||||
orderInfoDTO: {
|
||||
orderNo: that.$route.query.orderNo
|
||||
},
|
||||
ebizSignDTOS: [
|
||||
{
|
||||
signOrRead: 'tip',
|
||||
signId: that.appntSign.signId,
|
||||
orderNo: that.$route.query.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)
|
||||
// })
|
||||
let routeUrl = ''
|
||||
if (this.flagLiuZhou) {
|
||||
routeUrl = '/sale/InsuranceRiskReminder'
|
||||
} else {
|
||||
// let doubleRecordFlag = localStorage.doubleRecordFlag
|
||||
// routeUrl = '/sale/signatureOfElectronic'
|
||||
// if (doubleRecordFlag == '1') {
|
||||
// 跳转双录签署文件
|
||||
routeUrl = '/sale/avoidDutyTip'
|
||||
// }
|
||||
}
|
||||
this.$jump({
|
||||
flag: 'h5',
|
||||
extra: {
|
||||
url: location.origin + '/#' + routeUrl + '?orderNo=' + that.$route.query.orderNo
|
||||
},
|
||||
routerInfo: {
|
||||
path: routeUrl + '?orderNo=' + that.$route.query.orderNo
|
||||
}
|
||||
})
|
||||
} 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: that.$route.query.orderNo
|
||||
},
|
||||
ebizSignDTOS: [
|
||||
{
|
||||
signOrRead: 'tip',
|
||||
signId: that.appntSign.signId,
|
||||
orderNo: that.$route.query.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)
|
||||
// })
|
||||
let routeUrl = ''
|
||||
if (this.flagLiuZhou) {
|
||||
routeUrl = '/sale/InsuranceRiskReminder'
|
||||
} else {
|
||||
// let doubleRecordFlag = localStorage.doubleRecordFlag
|
||||
// routeUrl = '/sale/signatureOfElectronic'
|
||||
// if (doubleRecordFlag == '1') {
|
||||
// 跳转双录签署文件
|
||||
routeUrl = '/sale/avoidDutyTip'
|
||||
// }
|
||||
}
|
||||
this.$jump({
|
||||
flag: 'h5',
|
||||
extra: {
|
||||
url: location.origin + '/#' + routeUrl + '?orderNo=' + that.$route.query.orderNo,
|
||||
forbidSwipeBack: '1'
|
||||
},
|
||||
routerInfo: {
|
||||
path: routeUrl + '?orderNo=' + that.$route.query.orderNo
|
||||
}
|
||||
})
|
||||
} 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>
|
||||
Reference in New Issue
Block a user