mirror of
http://112.124.100.131/GFRS/ebiz-h5.git
synced 2025-12-11 09:46:43 +08:00
代码修改
This commit is contained in:
@@ -20,8 +20,8 @@
|
||||
<van-cell title="证件类型" :value="appntDTO.idTypeText" />
|
||||
<van-cell title="证件号码" :value="appntDTO.idNo" />
|
||||
<van-cell title="联系电话" :value="appntDTO.mobileStar" />
|
||||
<!-- <van-cell title="新市民身份" v-if="manageComCode == '45'" :value="appntDTO.isNewPeopleFlagText" />-->
|
||||
<!-- <van-cell v-if="appntDTO.isNewPeopleFlagText == '是' && manageComCode == '45'" title="新市民类型" :value="appntDTO.npTypeTypeText" />-->
|
||||
<!-- <van-cell title="新市民身份" v-if="manageComCode == '45'" :value="appntDTO.isNewPeopleFlagText" />-->
|
||||
<!-- <van-cell v-if="appntDTO.isNewPeopleFlagText == '是' && manageComCode == '45'" title="新市民类型" :value="appntDTO.npTypeTypeText" />-->
|
||||
</van-cell-group>
|
||||
</van-collapse-item>
|
||||
|
||||
@@ -35,8 +35,8 @@
|
||||
<van-cell title="证件类型" :value="item.idTypeText" />
|
||||
<van-cell title="证件号码" :value="item.idNo" />
|
||||
<van-cell title="联系电话" :value="item.mobile" />
|
||||
<!-- <van-cell title="新市民身份" v-if="manageComCode == '45'" :value="item.isNewPeopleFlagText" />-->
|
||||
<!-- <van-cell v-if="item.isNewPeopleFlagText == '是' && manageComCode == '45'" title="新市民类型" :value="item.npTypeText" />-->
|
||||
<!-- <van-cell title="新市民身份" v-if="manageComCode == '45'" :value="item.isNewPeopleFlagText" />-->
|
||||
<!-- <van-cell v-if="item.isNewPeopleFlagText == '是' && manageComCode == '45'" title="新市民类型" :value="item.npTypeText" />-->
|
||||
</van-cell-group>
|
||||
</van-collapse-item>
|
||||
<div v-for="(itm, i) in item.bnfDTOs" :key="i" class="pb10">
|
||||
@@ -89,7 +89,7 @@
|
||||
<van-field maxlength="6" placeholder="请输入短信验证码" v-model="authCode" clearable label-width="0" />
|
||||
<van-button type="danger" plain size="small" class="w160 p0" @click="getAuthCode" :disabled="codeDisabled" v-no-more-click="2000">{{
|
||||
codeDisabled ? `${countDown}s后重新获取` : '获取验证码'
|
||||
}}</van-button>
|
||||
}}</van-button>
|
||||
</van-cell-group>
|
||||
</van-dialog>
|
||||
<!-- 2019-09-27 版上线不含“回执签收” marked by panglizong on 2019-09-26 -->
|
||||
@@ -100,366 +100,366 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { Collapse, CollapseItem, Cell, CellGroup, Button, Field, Dialog } from 'vant'
|
||||
import { getPolicyDetail, getReceiptSign } from '@/api/ebiz/serve/serve'
|
||||
import { getAuthCode, autchCodeCheck } from '@/api/ebiz/sale/sale'
|
||||
import { checkPhone } from '@/api/ebiz/customer/customer'
|
||||
import dataDictionary from '@/assets/js/utils/data-dictionary' //根据数据字典进行页面展示
|
||||
import { formatAllRisk } from '@/assets/js/utils/formatRiskList'
|
||||
import riskRules from '@/views/ebiz/common/risk-rules'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
show: false, // 获取短信验证码
|
||||
codeDisabled: false, // 获取验证码按钮是否禁用
|
||||
timeId: null, // 计时器ID
|
||||
countDown: 60, // 倒计时
|
||||
authCode: '', // 验证码
|
||||
smsAuthNum: 3,
|
||||
operaFlag: null,
|
||||
encyCustomerMobile: null,
|
||||
customerMobile: null,
|
||||
sid: null,
|
||||
//人脸识别认证次数
|
||||
faceAuthCount: {
|
||||
appnt: 0,
|
||||
insured: 0,
|
||||
weixin: 0
|
||||
},
|
||||
// 折叠面板
|
||||
activeNames: ['1'],
|
||||
// 保单基本信息
|
||||
OrderInfoDTO: {},
|
||||
// 投保人信息
|
||||
appntDTO: {},
|
||||
// 被保险人信息
|
||||
insuredDTOs: [],
|
||||
// 保单号
|
||||
contNo: '',
|
||||
manageComCode:'',//代理人管理机构 52贵州 45广西
|
||||
list: []
|
||||
}
|
||||
},
|
||||
created() {
|
||||
setTimeout(() => {
|
||||
// 右上角的显示
|
||||
window.EWebBridge.webCallAppInJs('webview_right_button', {
|
||||
btns: [
|
||||
{
|
||||
img: this.$assetsUrl + 'images/share@3x.png'
|
||||
}
|
||||
]
|
||||
})
|
||||
}, 1000)
|
||||
window['appCallBack'] = this.appCallBack
|
||||
// 获取保单详情
|
||||
this.getPolicyDetail()
|
||||
},
|
||||
async mounted() {
|
||||
let dataReturn = await riskRules.getAgentInfoFunc(this)
|
||||
this.manageComCode = dataReturn.manageComCode
|
||||
},
|
||||
components: {
|
||||
[Collapse.name]: Collapse,
|
||||
[CollapseItem.name]: CollapseItem,
|
||||
[Cell.name]: Cell,
|
||||
[CellGroup.name]: CellGroup,
|
||||
[Button.name]: Button,
|
||||
[Field.name]: Field,
|
||||
[Dialog.name]: Dialog
|
||||
},
|
||||
methods: {
|
||||
// 获取短信验证码
|
||||
getAuthCode() {
|
||||
this.codeDisabled = true
|
||||
//倒计时
|
||||
this.timeId = setInterval(() => {
|
||||
this.countDown--
|
||||
if (this.countDown <= 0) {
|
||||
window.clearInterval(this.timeId)
|
||||
this.codeDisabled = false
|
||||
this.countDown = 60
|
||||
}
|
||||
import { Collapse, CollapseItem, Cell, CellGroup, Button, Field, Dialog } from 'vant'
|
||||
import { getPolicyDetail, getReceiptSign } from '@/api/ebiz/serve/serve'
|
||||
import { getAuthCode, autchCodeCheck } from '@/api/ebiz/sale/sale'
|
||||
import { checkPhone } from '@/api/ebiz/customer/customer'
|
||||
import dataDictionary from '@/assets/js/utils/data-dictionary' //根据数据字典进行页面展示
|
||||
import { formatAllRisk } from '@/assets/js/utils/formatRiskList'
|
||||
import riskRules from '@/views/ebiz/common/risk-rules'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
show: false, // 获取短信验证码
|
||||
codeDisabled: false, // 获取验证码按钮是否禁用
|
||||
timeId: null, // 计时器ID
|
||||
countDown: 60, // 倒计时
|
||||
authCode: '', // 验证码
|
||||
smsAuthNum: 3,
|
||||
operaFlag: null,
|
||||
encyCustomerMobile: null,
|
||||
customerMobile: null,
|
||||
sid: null,
|
||||
//人脸识别认证次数
|
||||
faceAuthCount: {
|
||||
appnt: 0,
|
||||
insured: 0,
|
||||
weixin: 0
|
||||
},
|
||||
// 折叠面板
|
||||
activeNames: ['1'],
|
||||
// 保单基本信息
|
||||
OrderInfoDTO: {},
|
||||
// 投保人信息
|
||||
appntDTO: {},
|
||||
// 被保险人信息
|
||||
insuredDTOs: [],
|
||||
// 保单号
|
||||
contNo: '',
|
||||
manageComCode:'',//代理人管理机构 52贵州 45广西
|
||||
list: []
|
||||
}
|
||||
},
|
||||
created() {
|
||||
setTimeout(() => {
|
||||
// 右上角的显示
|
||||
window.EWebBridge.webCallAppInJs('webview_right_button', {
|
||||
btns: [
|
||||
{
|
||||
img: this.$assetsUrl + 'images/share@3x.png'
|
||||
}
|
||||
]
|
||||
})
|
||||
}, 1000)
|
||||
getAuthCode({
|
||||
operateType: 'appntInfoEntry',
|
||||
type: 'H5',
|
||||
operateCode: this.customerMobile,
|
||||
system: 'agentApp',
|
||||
operateCodeType: '0'
|
||||
}).then(res => {
|
||||
console.log(res)
|
||||
window['appCallBack'] = this.appCallBack
|
||||
// 获取保单详情
|
||||
this.getPolicyDetail()
|
||||
},
|
||||
async mounted() {
|
||||
let dataReturn = await riskRules.getAgentInfoFunc(this)
|
||||
this.manageComCode = dataReturn.manageComCode
|
||||
},
|
||||
components: {
|
||||
[Collapse.name]: Collapse,
|
||||
[CollapseItem.name]: CollapseItem,
|
||||
[Cell.name]: Cell,
|
||||
[CellGroup.name]: CellGroup,
|
||||
[Button.name]: Button,
|
||||
[Field.name]: Field,
|
||||
[Dialog.name]: Dialog
|
||||
},
|
||||
methods: {
|
||||
// 获取短信验证码
|
||||
getAuthCode() {
|
||||
this.codeDisabled = true
|
||||
//倒计时
|
||||
this.timeId = setInterval(() => {
|
||||
this.countDown--
|
||||
if (this.countDown <= 0) {
|
||||
window.clearInterval(this.timeId)
|
||||
this.codeDisabled = false
|
||||
this.countDown = 60
|
||||
}
|
||||
}, 1000)
|
||||
getAuthCode({
|
||||
operateType: 'appntInfoEntry',
|
||||
type: 'H5',
|
||||
operateCode: this.customerMobile,
|
||||
system: 'agentApp',
|
||||
operateCodeType: '0'
|
||||
}).then(res => {
|
||||
console.log(res)
|
||||
if (res.result == 0) {
|
||||
this.sid = res.sessionId
|
||||
} else {
|
||||
this.$toast(res.resultMessage)
|
||||
}
|
||||
})
|
||||
},
|
||||
// 验证码确认事件
|
||||
async authConfirm() {
|
||||
//清理计时器
|
||||
this.clearTimer()
|
||||
this.changeSubmit()
|
||||
},
|
||||
// 清理计时器
|
||||
clearTimer() {
|
||||
window.clearInterval(this.timeId)
|
||||
this.timeId = null
|
||||
this.countDown = 60
|
||||
this.codeDisabled = false
|
||||
},
|
||||
//提交变更申请
|
||||
async changeSubmit() {
|
||||
if (null == this.sid) {
|
||||
this.$toast('请先进行发送短信验证码')
|
||||
return
|
||||
}
|
||||
let res = await autchCodeCheck({
|
||||
smsId: this.sid,
|
||||
code: this.authCode
|
||||
})
|
||||
if (res.result == 0) {
|
||||
this.sid = res.sessionId
|
||||
this.toNextPage()
|
||||
} else {
|
||||
this.$toast(res.resultMessage)
|
||||
}
|
||||
})
|
||||
},
|
||||
// 验证码确认事件
|
||||
async authConfirm() {
|
||||
//清理计时器
|
||||
this.clearTimer()
|
||||
this.changeSubmit()
|
||||
},
|
||||
// 清理计时器
|
||||
clearTimer() {
|
||||
window.clearInterval(this.timeId)
|
||||
this.timeId = null
|
||||
this.countDown = 60
|
||||
this.codeDisabled = false
|
||||
},
|
||||
//提交变更申请
|
||||
async changeSubmit() {
|
||||
if (null == this.sid) {
|
||||
this.$toast('请先进行发送短信验证码')
|
||||
return
|
||||
}
|
||||
let res = await autchCodeCheck({
|
||||
smsId: this.sid,
|
||||
code: this.authCode
|
||||
})
|
||||
if (res.result == 0) {
|
||||
this.toNextPage()
|
||||
} else {
|
||||
this.$toast(res.resultMessage)
|
||||
}
|
||||
},
|
||||
realPeopelCheck() {
|
||||
this.$toast.loading({
|
||||
// 持续展示 toast
|
||||
duration: 0,
|
||||
// 禁用背景点击s
|
||||
forbidClick: true,
|
||||
loadingType: 'spinner',
|
||||
message: '加载中……'
|
||||
})
|
||||
let data = {
|
||||
name: this.appntDTO.name,
|
||||
idType: this.appntDTO.idType,
|
||||
idNo: this.appntDTO.idNo,
|
||||
mobile: this.appntDTO.mobile
|
||||
}
|
||||
this.customerMobile = this.appntDTO.mobile
|
||||
this.encyCustomerMobile = this.customerMobile.replace(/^(\d{3})\d{4}(\d{4})$/, '$1****$2')
|
||||
this.authCode = null
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
return new Promise((resolve, reject) => {
|
||||
checkPhone(data).then(res => {
|
||||
if (res.result == '0') {
|
||||
console.log(res)
|
||||
this.show = true
|
||||
} else {
|
||||
Dialog.confirm({
|
||||
title: '提示',
|
||||
message: '抱歉,您预留的手机号非您本人的手机号!',
|
||||
showCancelButton: false
|
||||
})
|
||||
}
|
||||
},
|
||||
realPeopelCheck() {
|
||||
this.$toast.loading({
|
||||
// 持续展示 toast
|
||||
duration: 0,
|
||||
// 禁用背景点击s
|
||||
forbidClick: true,
|
||||
loadingType: 'spinner',
|
||||
message: '加载中……'
|
||||
})
|
||||
})
|
||||
},
|
||||
// 获取保单详情
|
||||
getPolicyDetail() {
|
||||
let that = this
|
||||
let data = {
|
||||
policyNo: window.localStorage.getItem('policyNo')
|
||||
}
|
||||
|
||||
getPolicyDetail(data).then(res => {
|
||||
if (res.result == '0') {
|
||||
let appntDTO = res.content.appntDTO
|
||||
let orderInfoDTO = res.content.orderInfoDTO
|
||||
// 保单信息
|
||||
if (orderInfoDTO.orderStatus == '0') {
|
||||
orderInfoDTO.orderStatusText = '未签收'
|
||||
} else if (orderInfoDTO.orderStatus == '1') {
|
||||
orderInfoDTO.orderStatusText = '已签收'
|
||||
} else {
|
||||
orderInfoDTO.orderStatusText = ''
|
||||
}
|
||||
//团险渠道 查看团单号
|
||||
if (orderInfoDTO.saleChnl === '2' || orderInfoDTO.saleChnl === '团险') {
|
||||
orderInfoDTO.contNo=orderInfoDTO.grpContNo;
|
||||
}
|
||||
// 测试用
|
||||
// orderInfoDTO.orderStatus = '0'
|
||||
that.OrderInfoDTO = orderInfoDTO
|
||||
// 投保人信息
|
||||
this.filterData(dataDictionary.sex, 'sex', appntDTO)
|
||||
this.filterData(dataDictionary.isNewPeopleFlag, 'isNewPeopleFlag', appntDTO)
|
||||
this.filterData(dataDictionary.npType, 'isNewPeopleFlag', appntDTO)
|
||||
this.filterData(dataDictionary.idType, 'idType', appntDTO)
|
||||
that.appntDTO = appntDTO
|
||||
this.$CacheUtils.setLocItem('saleInsuredInfo', JSON.stringify(appntDTO))
|
||||
// 被保险人信息
|
||||
res.content.insuredDTOs.map(insured => {
|
||||
insured.riskDTOLst.map(risk => {
|
||||
Number(risk.payIntv)
|
||||
switch (risk.payIntv) {
|
||||
case -1:
|
||||
risk.payIntv = '不定期交'
|
||||
break
|
||||
case 0:
|
||||
risk.payIntv = '一次交清'
|
||||
break
|
||||
case 1:
|
||||
risk.payIntv = '月交'
|
||||
break
|
||||
case 3:
|
||||
risk.payIntv = '季交'
|
||||
break
|
||||
case 6:
|
||||
risk.payIntv = '半年交'
|
||||
break
|
||||
case 12:
|
||||
risk.payIntv = '年交'
|
||||
break
|
||||
}
|
||||
if (risk.insuYear == '70') {
|
||||
risk.insuYear = '至70周岁'
|
||||
} else if (risk.insuYear == '75') {
|
||||
risk.insuYear = '至75周岁'
|
||||
} else if (risk.insuYear == '80') {
|
||||
risk.insuYear = '至80周岁'
|
||||
} else if (risk.insuYear == '106') {
|
||||
risk.insuYear = '终身'
|
||||
} else {
|
||||
risk.insuYear = risk.insuYearFlag == 'D' ? `${risk.insuYear}天` : `${risk.insuYear}年`
|
||||
}
|
||||
})
|
||||
this.filterData(dataDictionary.sex, 'sex', insured)
|
||||
this.filterData(dataDictionary.isNewPeopleFlag, 'isNewPeopleFlag', insured)
|
||||
this.filterData(dataDictionary.npType, 'npType', insured)
|
||||
this.filterData(dataDictionary.idType, 'idType', insured)
|
||||
this.filterData(dataDictionary.relationToAppnt, 'relation', insured)
|
||||
insured.bnfDTOs.map(bnf => {
|
||||
this.filterData(dataDictionary.bnfType, 'bnfType', bnf)
|
||||
this.filterData(dataDictionary.sex, 'sex', bnf)
|
||||
this.filterData(dataDictionary.isNewPeopleFlag, 'isNewPeopleFlag', bnf)
|
||||
this.filterData(dataDictionary.npType, 'npType', bnf)
|
||||
this.filterData(dataDictionary.idType, 'idType', bnf)
|
||||
this.filterData(dataDictionary.relationToAppnt, 'relation', bnf)
|
||||
})
|
||||
})
|
||||
|
||||
that.insuredDTOs = res.content.insuredDTOs
|
||||
this.list = formatAllRisk(this.insuredDTOs[0].riskDTOLst)
|
||||
} else {
|
||||
this.$toast(res.resultMessage)
|
||||
let data = {
|
||||
name: this.appntDTO.name,
|
||||
idType: this.appntDTO.idType,
|
||||
idNo: this.appntDTO.idNo,
|
||||
mobile: this.appntDTO.mobile
|
||||
}
|
||||
})
|
||||
},
|
||||
appCallBack(data) {
|
||||
if (data.trigger == 'right_button_click') {
|
||||
console.log(this.$CacheUtils.getLocItem('saleInsuredInfo'))
|
||||
EWebBridge.webCallAppInJs('bridge', {
|
||||
flag: 'share',
|
||||
extra: {
|
||||
title: '国富人寿保单回执签字',
|
||||
content: '国富人寿保单回执签收',
|
||||
url:
|
||||
location.origin +
|
||||
'/#/serve/airSign?policyNo=' +
|
||||
localStorage.policyNo +
|
||||
'&token=' +
|
||||
localStorage.token +
|
||||
'&saleInsuredInfo=' +
|
||||
encodeURI(this.$CacheUtils.getLocItem('saleInsuredInfo')),
|
||||
// url: 'http://47.96.143.111/#/proposal/exhibition?proposalNo=' + localStorage.orderNo + '&token=' + localStorage.token,
|
||||
img: this.$assetsUrl + 'images/logo.png'
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
//根据数据字典 将后端返回的数据渲染到页面中
|
||||
filterData(dictionary, key, pageData) {
|
||||
dictionary.forEach(item => {
|
||||
if (pageData[key] == item.id) {
|
||||
pageData[key + 'Text'] = item.text //渲染页面使用的字段
|
||||
}
|
||||
})
|
||||
},
|
||||
// 回执签收
|
||||
next() {
|
||||
this.toNextPage()
|
||||
// let that = this
|
||||
// if (this.faceAuthCount.appnt < this.smsAuthNum) {
|
||||
// if (this.appntDTO.idType == '1') {
|
||||
// //证件类型为身份证时,进行人脸识别
|
||||
// EWebBridge.webCallAppInJs('face_auth', {
|
||||
// number: this.appntDTO.idNo, //身份证号码
|
||||
// name: this.appntDTO.name //姓名
|
||||
// }).then(data => {
|
||||
// this.$toast.loading({
|
||||
// duration: 0, // 持续展示 toast
|
||||
// forbidClick: true, // 禁用背景点击
|
||||
// loadingType: 'spinner',
|
||||
// message: '加载中……'
|
||||
// })
|
||||
// this.$toast.clear()
|
||||
// if (JSON.parse(data).state == '1') {
|
||||
// this.toNextPage()
|
||||
// } else {
|
||||
// that.faceAuthCount.appnt++
|
||||
// if (that.faceAuthCount.appnt >= this.smsAuthNum) {
|
||||
// this.realPeopelCheck()
|
||||
// }
|
||||
// }
|
||||
// })
|
||||
// } else {
|
||||
// this.toNextPage()
|
||||
// }
|
||||
// } else {
|
||||
// this.realPeopelCheck()
|
||||
// }
|
||||
},
|
||||
toNextPage() {
|
||||
let params = {
|
||||
contNo: window.localStorage.getItem('policyNo')
|
||||
}
|
||||
getReceiptSign(params).then(res => {
|
||||
if (res.result == '0') {
|
||||
this.$toast.clear()
|
||||
window.localStorage.setItem('insurance-policyUrl', res.signUrl)
|
||||
window.localStorage.setItem('detailJump', '1')
|
||||
window.localStorage.setItem('contNo', this.OrderInfoDTO.contNo)
|
||||
window.localStorage.setItem('orderNo', this.OrderInfoDTO.orderNo)
|
||||
window.localStorage.setItem('orderStatus', this.OrderInfoDTO.orderStatus)
|
||||
this.$CacheUtils.setLocItem('saleInsuredInfo', JSON.stringify(this.appntDTO))
|
||||
this.$jump({
|
||||
flag: 'h5',
|
||||
extra: {
|
||||
url: location.origin + '/#/sale/signatureOfElectronic',
|
||||
forbidSwipeBack: '1',
|
||||
title: '保险合同签收回执电子确认书签名'
|
||||
},
|
||||
routerInfo: {
|
||||
path: '/sale/signatureOfElectronic'
|
||||
this.customerMobile = this.appntDTO.mobile
|
||||
this.encyCustomerMobile = this.customerMobile.replace(/^(\d{3})\d{4}(\d{4})$/, '$1****$2')
|
||||
this.authCode = null
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
return new Promise((resolve, reject) => {
|
||||
checkPhone(data).then(res => {
|
||||
if (res.result == '0') {
|
||||
console.log(res)
|
||||
this.show = true
|
||||
} else {
|
||||
Dialog.confirm({
|
||||
title: '提示',
|
||||
message: '抱歉,您预留的手机号非您本人的手机号!',
|
||||
showCancelButton: false
|
||||
})
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.$toast(res.resultMessage)
|
||||
})
|
||||
},
|
||||
// 获取保单详情
|
||||
getPolicyDetail() {
|
||||
let that = this
|
||||
let data = {
|
||||
policyNo: window.localStorage.getItem('policyNo')
|
||||
}
|
||||
})
|
||||
|
||||
getPolicyDetail(data).then(res => {
|
||||
if (res.result == '0') {
|
||||
let appntDTO = res.content.appntDTO
|
||||
let orderInfoDTO = res.content.orderInfoDTO
|
||||
// 保单信息
|
||||
if (orderInfoDTO.orderStatus == '0') {
|
||||
orderInfoDTO.orderStatusText = '未签收'
|
||||
} else if (orderInfoDTO.orderStatus == '1') {
|
||||
orderInfoDTO.orderStatusText = '已签收'
|
||||
} else {
|
||||
orderInfoDTO.orderStatusText = ''
|
||||
}
|
||||
//团险渠道 查看团单号
|
||||
if (orderInfoDTO.saleChnl === '2' || orderInfoDTO.saleChnl === '团险') {
|
||||
orderInfoDTO.contNo=orderInfoDTO.grpContNo;
|
||||
}
|
||||
// 测试用
|
||||
// orderInfoDTO.orderStatus = '0'
|
||||
that.OrderInfoDTO = orderInfoDTO
|
||||
// 投保人信息
|
||||
this.filterData(dataDictionary.sex, 'sex', appntDTO)
|
||||
this.filterData(dataDictionary.isNewPeopleFlag, 'isNewPeopleFlag', appntDTO)
|
||||
this.filterData(dataDictionary.npType, 'isNewPeopleFlag', appntDTO)
|
||||
this.filterData(dataDictionary.idType, 'idType', appntDTO)
|
||||
that.appntDTO = appntDTO
|
||||
this.$CacheUtils.setLocItem('saleInsuredInfo', JSON.stringify(appntDTO))
|
||||
// 被保险人信息
|
||||
res.content.insuredDTOs.map(insured => {
|
||||
insured.riskDTOLst.map(risk => {
|
||||
Number(risk.payIntv)
|
||||
switch (risk.payIntv) {
|
||||
case -1:
|
||||
risk.payIntv = '不定期交'
|
||||
break
|
||||
case 0:
|
||||
risk.payIntv = '一次交清'
|
||||
break
|
||||
case 1:
|
||||
risk.payIntv = '月交'
|
||||
break
|
||||
case 3:
|
||||
risk.payIntv = '季交'
|
||||
break
|
||||
case 6:
|
||||
risk.payIntv = '半年交'
|
||||
break
|
||||
case 12:
|
||||
risk.payIntv = '年交'
|
||||
break
|
||||
}
|
||||
if (risk.insuYear == '70') {
|
||||
risk.insuYear = '至70周岁'
|
||||
} else if (risk.insuYear == '75') {
|
||||
risk.insuYear = '至75周岁'
|
||||
} else if (risk.insuYear == '80') {
|
||||
risk.insuYear = '至80周岁'
|
||||
} else if (risk.insuYear == '106') {
|
||||
risk.insuYear = '终身'
|
||||
} else {
|
||||
risk.insuYear = risk.insuYearFlag == 'D' ? `${risk.insuYear}天` : `${risk.insuYear}年`
|
||||
}
|
||||
})
|
||||
this.filterData(dataDictionary.sex, 'sex', insured)
|
||||
this.filterData(dataDictionary.isNewPeopleFlag, 'isNewPeopleFlag', insured)
|
||||
this.filterData(dataDictionary.npType, 'npType', insured)
|
||||
this.filterData(dataDictionary.idType, 'idType', insured)
|
||||
this.filterData(dataDictionary.relationToAppnt, 'relation', insured)
|
||||
insured.bnfDTOs.map(bnf => {
|
||||
this.filterData(dataDictionary.bnfType, 'bnfType', bnf)
|
||||
this.filterData(dataDictionary.sex, 'sex', bnf)
|
||||
this.filterData(dataDictionary.isNewPeopleFlag, 'isNewPeopleFlag', bnf)
|
||||
this.filterData(dataDictionary.npType, 'npType', bnf)
|
||||
this.filterData(dataDictionary.idType, 'idType', bnf)
|
||||
this.filterData(dataDictionary.relationToAppnt, 'relation', bnf)
|
||||
})
|
||||
})
|
||||
|
||||
that.insuredDTOs = res.content.insuredDTOs
|
||||
this.list = formatAllRisk(this.insuredDTOs[0].riskDTOLst)
|
||||
} else {
|
||||
this.$toast(res.resultMessage)
|
||||
}
|
||||
})
|
||||
},
|
||||
appCallBack(data) {
|
||||
if (data.trigger == 'right_button_click') {
|
||||
console.log(this.$CacheUtils.getLocItem('saleInsuredInfo'))
|
||||
EWebBridge.webCallAppInJs('bridge', {
|
||||
flag: 'share',
|
||||
extra: {
|
||||
title: '国富人寿保单回执签字',
|
||||
content: '国富人寿保单回执签收',
|
||||
url:
|
||||
location.origin +
|
||||
'/#/serve/airSign?policyNo=' +
|
||||
localStorage.policyNo +
|
||||
'&token=' +
|
||||
localStorage.token +
|
||||
'&saleInsuredInfo=' +
|
||||
encodeURI(this.$CacheUtils.getLocItem('saleInsuredInfo')),
|
||||
// url: 'http://47.96.143.111/#/proposal/exhibition?proposalNo=' + localStorage.orderNo + '&token=' + localStorage.token,
|
||||
img: this.$assetsUrl + 'images/logo.png'
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
//根据数据字典 将后端返回的数据渲染到页面中
|
||||
filterData(dictionary, key, pageData) {
|
||||
dictionary.forEach(item => {
|
||||
if (pageData[key] == item.id) {
|
||||
pageData[key + 'Text'] = item.text //渲染页面使用的字段
|
||||
}
|
||||
})
|
||||
},
|
||||
// 回执签收
|
||||
next() {
|
||||
this.toNextPage()
|
||||
// let that = this
|
||||
// if (this.faceAuthCount.appnt < this.smsAuthNum) {
|
||||
// if (this.appntDTO.idType == '1') {
|
||||
// //证件类型为身份证时,进行人脸识别
|
||||
// EWebBridge.webCallAppInJs('face_auth', {
|
||||
// number: this.appntDTO.idNo, //身份证号码
|
||||
// name: this.appntDTO.name //姓名
|
||||
// }).then(data => {
|
||||
// this.$toast.loading({
|
||||
// duration: 0, // 持续展示 toast
|
||||
// forbidClick: true, // 禁用背景点击
|
||||
// loadingType: 'spinner',
|
||||
// message: '加载中……'
|
||||
// })
|
||||
// this.$toast.clear()
|
||||
// if (JSON.parse(data).state == '1') {
|
||||
// this.toNextPage()
|
||||
// } else {
|
||||
// that.faceAuthCount.appnt++
|
||||
// if (that.faceAuthCount.appnt >= this.smsAuthNum) {
|
||||
// this.realPeopelCheck()
|
||||
// }
|
||||
// }
|
||||
// })
|
||||
// } else {
|
||||
// this.toNextPage()
|
||||
// }
|
||||
// } else {
|
||||
// this.realPeopelCheck()
|
||||
// }
|
||||
},
|
||||
toNextPage() {
|
||||
let params = {
|
||||
contNo: window.localStorage.getItem('policyNo')
|
||||
}
|
||||
getReceiptSign(params).then(res => {
|
||||
if (res.result == '0') {
|
||||
this.$toast.clear()
|
||||
window.localStorage.setItem('insurance-policyUrl', res.signUrl)
|
||||
window.localStorage.setItem('detailJump', '1')
|
||||
window.localStorage.setItem('contNo', this.OrderInfoDTO.contNo)
|
||||
window.localStorage.setItem('orderNo', this.OrderInfoDTO.orderNo)
|
||||
window.localStorage.setItem('orderStatus', this.OrderInfoDTO.orderStatus)
|
||||
this.$CacheUtils.setLocItem('saleInsuredInfo', JSON.stringify(this.appntDTO))
|
||||
this.$jump({
|
||||
flag: 'h5',
|
||||
extra: {
|
||||
url: location.origin + '/#/sale/signatureOfElectronic',
|
||||
forbidSwipeBack: '1',
|
||||
title: '保险合同签收回执电子确认书签名'
|
||||
},
|
||||
routerInfo: {
|
||||
path: '/sale/signatureOfElectronic'
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.$toast(res.resultMessage)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.detail-container {
|
||||
.van-hairline--top-bottom::after {
|
||||
border: none;
|
||||
.detail-container {
|
||||
.van-hairline--top-bottom::after {
|
||||
border: none;
|
||||
}
|
||||
/deep/ .van-collapse-item__content {
|
||||
padding-top: 0;
|
||||
}
|
||||
/deep/.van-collapse-item__title {
|
||||
padding-left: 30px;
|
||||
}
|
||||
/deep/ .van-cell__value {
|
||||
text-align: left !important;
|
||||
}
|
||||
}
|
||||
/deep/ .van-collapse-item__content {
|
||||
padding-top: 0;
|
||||
}
|
||||
/deep/.van-collapse-item__title {
|
||||
padding-left: 30px;
|
||||
}
|
||||
/deep/ .van-cell__value {
|
||||
text-align: left !important;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user