mirror of
http://112.124.100.131/GFRS/ebiz-h5.git
synced 2025-12-16 05:16:44 +08:00
'无忧卡新原型页面'
This commit is contained in:
@@ -133,6 +133,10 @@ service.interceptors.request.use(
|
||||
message: '加载中……'
|
||||
})
|
||||
}
|
||||
let obj = Object.assign({},config.data)
|
||||
console.log('请求入参')
|
||||
console.log(obj)
|
||||
console.log(config)
|
||||
/**
|
||||
* 请求拦截处理(待添加 判断走统一网关处理)
|
||||
*/
|
||||
@@ -188,6 +192,9 @@ service.interceptors.response.use(
|
||||
res = JSON.parse(AESTools.AESDecrypt(res.response, configApp.REQ_PWD))
|
||||
}
|
||||
}
|
||||
console.log('请求结果')
|
||||
console.log(response)
|
||||
console.log(res)
|
||||
Toast.clear()
|
||||
if (res.code != 0) {
|
||||
if (res.code == 10001 || res.code == 10002) {
|
||||
|
||||
@@ -7,6 +7,9 @@ const payResult = () => import('@/views/ebiz/cardList/PayResult')
|
||||
const paySuccess = () => import('@/views/ebiz/cardList/PaySuccess')
|
||||
const payLoser = () => import('@/views/ebiz/cardList/PayLoser')
|
||||
const ShowPDF = () => import('@/views/ebiz/cardList/ShowPDF')
|
||||
const phoneCode = () => import('@/views/ebiz/cardList/phoneCode')
|
||||
const cardDetail = () => import('@/views/ebiz/cardList/cardDetail')
|
||||
const SignatureConfirmation = () => import('@/views/ebiz/cardList/SignatureConfirmation')
|
||||
|
||||
export default [
|
||||
{
|
||||
@@ -80,6 +83,33 @@ export default [
|
||||
title: '',
|
||||
index: 7
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
path: '/cardList/phoneCode',
|
||||
name: 'phoneCode',
|
||||
component: phoneCode,
|
||||
meta: {
|
||||
title: '短信验证',
|
||||
index: 8
|
||||
}
|
||||
},
|
||||
{
|
||||
path: '/cardList/cardDetail',
|
||||
name: 'cardDetail',
|
||||
component: cardDetail,
|
||||
meta: {
|
||||
title: '核对投被保人信息',
|
||||
index: 9
|
||||
}
|
||||
},
|
||||
{
|
||||
path: '/cardList/SignatureConfirmation',
|
||||
name: 'SignatureConfirmation',
|
||||
component: SignatureConfirmation,
|
||||
meta: {
|
||||
title: '阅读确认',
|
||||
index: 10
|
||||
}
|
||||
},
|
||||
]
|
||||
|
||||
|
||||
@@ -19,9 +19,14 @@ export default new Vuex.Store({
|
||||
eodrApplyNo: '', //保全-保全受理号
|
||||
agentGrade: '', //用户的agentGrade,判断用户权限
|
||||
secondManageCode: '', //内勤所需参数
|
||||
thirdManageCode: '' //内勤所需参数
|
||||
thirdManageCode: '' ,//内勤所需参数
|
||||
orderDetail:{},//无优卡分享微信端订单信息
|
||||
},
|
||||
mutations: {
|
||||
setOrderDetail(state,data){
|
||||
console.log('更新订单信息')
|
||||
state.orderDetail = data;
|
||||
},
|
||||
setThirdManageCode(state, code) {
|
||||
state.thirdManageCode = code
|
||||
},
|
||||
|
||||
@@ -2,7 +2,10 @@
|
||||
<div class="pay">
|
||||
<div v-if="!isScan">
|
||||
<van-cell-group>
|
||||
<van-field v-model="underWriteData.appntName" type="textarea" autosize readonly label="产品名称" class="projuct" />
|
||||
<van-field v-model="underWriteData.riskName" type="textarea" autosize readonly label="产品名称" class="projuct" />
|
||||
<van-field v-model="underWriteData.appntName" readonly label="保障方案" class="projuct" />
|
||||
<van-field v-if="!isWeixin" v-model="underWriteData.appntName" readonly label="投保人姓名" class="projuct" />
|
||||
<van-field v-if="!isWeixin" v-model="underWriteData.insuredName" readonly label="被保人姓名" class="projuct" />
|
||||
<van-field :value="underWriteData.orderAmount == undefined ? '' : `${underWriteData.orderAmount} 元`" readonly label="支付金额" />
|
||||
</van-cell-group>
|
||||
<!-- 银行卡支付开始 -->
|
||||
@@ -15,27 +18,29 @@
|
||||
<van-radio-group v-model="radio" class="flex justify-content-fe"><van-radio name="1"></van-radio></van-radio-group>
|
||||
</div>
|
||||
</div> -->
|
||||
<van-cell-group class="flex align-items-c">
|
||||
<img :src="src" class="pl10" />
|
||||
<van-cell title="银行卡支付" clickable>
|
||||
<!-- <van-checkbox v-model="checked" class="flex justify-content-fe"></van-checkbox> -->
|
||||
<van-radio-group v-model="radio" :disabled="noEdit" class="flex justify-content-fe">
|
||||
<van-radio name=""></van-radio>
|
||||
</van-radio-group>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
<van-cell-group class="flex align-items-c">
|
||||
<img :src="vxSrc" class="vximg" />
|
||||
<van-cell title="微信支付" clickable>
|
||||
<van-radio-group v-model="radio" :disabled="noEdit" class="flex justify-content-fe">
|
||||
<van-radio name="3" @click="vxVerify"></van-radio>
|
||||
</van-radio-group>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
<div v-if="isWeixin">
|
||||
<van-cell-group class="flex align-items-c">
|
||||
<img :src="src" class="pl10" />
|
||||
<van-cell title="银行卡支付" clickable>
|
||||
<!-- <van-checkbox v-model="checked" class="flex justify-content-fe"></van-checkbox> -->
|
||||
<van-radio-group v-model="radio" class="flex justify-content-fe">
|
||||
<van-radio name=""></van-radio>
|
||||
</van-radio-group>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
<van-cell-group class="flex align-items-c">
|
||||
<img :src="vxSrc" class="vximg" />
|
||||
<van-cell title="微信支付" clickable>
|
||||
<van-radio-group v-model="radio" class="flex justify-content-fe">
|
||||
<van-radio name="3" @click="vxVerify"></van-radio>
|
||||
</van-radio-group>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
</div>
|
||||
<!-- 银行卡支付结束 -->
|
||||
<van-cell-group v-if="radio != '3'">
|
||||
<van-field
|
||||
v-model="underWriteData.name"
|
||||
v-model="underWriteData.appntName"
|
||||
label="姓名"
|
||||
name="姓名"
|
||||
readonly
|
||||
@@ -46,7 +51,7 @@
|
||||
required
|
||||
/>
|
||||
|
||||
<template v-if="noEdit">
|
||||
<!-- <template v-if="noEdit">
|
||||
<van-field
|
||||
v-model="underWriteData.bankCode"
|
||||
maxlength="19"
|
||||
@@ -71,8 +76,8 @@
|
||||
data-vv-name="开户银行"
|
||||
required
|
||||
/>
|
||||
</template>
|
||||
<template v-else>
|
||||
</template> -->
|
||||
<template>
|
||||
<van-field
|
||||
v-model="underWriteData.bankCode"
|
||||
maxlength="19"
|
||||
@@ -139,24 +144,24 @@
|
||||
<input name="ReqReserved5" type="hidden" v-model="payParam.ReqReserved5" />
|
||||
<input name="S3Sign" type="hidden" v-model="payParam.S3Sign" />
|
||||
</form>
|
||||
<div class="bg-white bottom-btn"><van-button type="danger" size="large" @click="pay" v-no-more-click="1000">支付</van-button></div>
|
||||
<div class="bg-white bottom-btn" v-if="radio == '3' && !isWeixin">
|
||||
<van-button type="danger" style="width: 50vw;height: 13vw" @click="pay" v-no-more-click="1000">支付</van-button>
|
||||
<van-button type="danger" style="width: 50vw;height: 13vw" @click="share" v-no-more-click="1000">分享</van-button>
|
||||
<div class="bg-white bottom-btn" v-if="!isWeixin">
|
||||
<!-- <van-button type="danger" style="width: 100vw;height: 13vw" @click="pay" v-no-more-click="1000">支付</van-button> -->
|
||||
<van-button type="danger" style="width: 100vw; height: 13vw" @click="share" v-no-more-click="1000">支付分享</van-button>
|
||||
</div>
|
||||
<div class="bg-white bottom-btn" v-else><van-button type="danger" size="large" @click="pay" v-no-more-click="1000">支付</van-button></div>
|
||||
</div>
|
||||
<!-- 银行卡扫描按钮 -->
|
||||
<van-popup v-model="isScan" style="height:100vh" position="bottom">
|
||||
<van-popup v-model="isScan" style="height: 100vh" position="bottom">
|
||||
<BankCardScan :scanShow="isScan" :clear="isClear" @getScanInfo="getBankCardInfo"></BankCardScan>
|
||||
</van-popup>
|
||||
<!-- 开户银行选择 -->
|
||||
<van-popup v-model="show" position="bottom" style="height:354px">
|
||||
<van-popup v-model="show" position="bottom" style="height: 354px">
|
||||
<van-list>
|
||||
<van-cell v-for="item in bankList" :key="item.code" :title="item.bankName" class="text-center" @click="clickList(item.bankName, item.code)" />
|
||||
</van-list>
|
||||
</van-popup>
|
||||
<!-- 分享到微信的页面loading -->
|
||||
<Loading :isLoading="isLoading"></Loading>
|
||||
<!-- <Loading :isLoading="isLoading"></Loading> -->
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -182,7 +187,7 @@ export default {
|
||||
[Cell.name]: Cell,
|
||||
[RadioGroup.name]: RadioGroup,
|
||||
[Radio.name]: Radio,
|
||||
Loading
|
||||
Loading,
|
||||
},
|
||||
data() {
|
||||
let isWeixin = this.$utils.device().isWeixin //判断环境
|
||||
@@ -199,7 +204,7 @@ export default {
|
||||
orderAmount: '', //支付金额
|
||||
name: '',
|
||||
bankCode: '', //银行卡号
|
||||
bankName: '' //开户银行
|
||||
bankName: '', //开户银行
|
||||
},
|
||||
radio: '3',
|
||||
result: [],
|
||||
@@ -244,42 +249,46 @@ export default {
|
||||
ReqReserved4: '', // 备用字段4
|
||||
ReqReserved5: '', // 备用字段5
|
||||
S3Sign: '', // 验签信息
|
||||
tradeState: '' // 状态
|
||||
tradeState: '', // 状态
|
||||
},
|
||||
gotPayParam: false, // 是否已正确获取支付参数,
|
||||
payStatus: '', // 接口返回的支付状态
|
||||
noEdit: true, //是否为编辑
|
||||
isWeixin, // 是否为微信环境
|
||||
isLoading: false // 分享到微信后的页面loading
|
||||
isLoading: false, // 分享到微信后的页面loading
|
||||
}
|
||||
},
|
||||
created() {
|
||||
if (this.isWeixin) {
|
||||
this.radio = '3'
|
||||
let token = this.$route.query.token
|
||||
let orderNo = this.$route.query.orderNo
|
||||
localStorage.token = token
|
||||
localStorage.orderNo = orderNo
|
||||
this.isLoading = true
|
||||
this.$toast.loading({
|
||||
duration: 0, // 持续展示 toast
|
||||
forbidClick: true, // 禁用背景点击
|
||||
loadingType: 'spinner',
|
||||
message: '加载中……'
|
||||
})
|
||||
setTimeout(() => {
|
||||
this.pay()
|
||||
}, 500)
|
||||
let orderDetail = JSON.parse(sessionStorage.orderDetail)
|
||||
this.underWriteData.riskName = orderDetail.insuredDTOs[0].riskDTOLst[0].riskName
|
||||
this.underWriteData.appntName = orderDetail.appntDTO.name
|
||||
this.underWriteData.insuredName = orderDetail.insuredDTOs[0].name
|
||||
this.underWriteData.orderAmount = orderDetail.insuredDTOs[0].riskDTOLst[0].prem
|
||||
this.orderStatus = orderDetail.orderInfoDTO.orderStatus
|
||||
this.underWriteData.idType = orderDetail.appntDTO.idType
|
||||
// this.radio = '3'
|
||||
// this.isLoading = true
|
||||
// this.$toast.loading({
|
||||
// duration: 0, // 持续展示 toast
|
||||
// forbidClick: true, // 禁用背景点击
|
||||
// loadingType: 'spinner',
|
||||
// message: '加载中……'
|
||||
// })
|
||||
// setTimeout(() => {
|
||||
// this.pay()
|
||||
// }, 500)
|
||||
} else {
|
||||
// 再次支付 调详情 获取信息
|
||||
this.getOrderDetail()
|
||||
}
|
||||
// 再次支付 调详情 获取信息
|
||||
this.getOrderDetail()
|
||||
},
|
||||
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是 其他否
|
||||
intercept: '1', //是否拦截原生返回事件 1是 其他否
|
||||
})
|
||||
}, 100)
|
||||
// window.appCallBack = this.appCallBack
|
||||
@@ -287,27 +296,24 @@ export default {
|
||||
// this.underWrite.orderAmount = this.trialList[0].prem
|
||||
document.body.style.backgroundColor = '#fff'
|
||||
window.appCallBack = this.appCallBack
|
||||
|
||||
// 不在微信环境下
|
||||
// if (!this.isWeixin) {
|
||||
// 获取银行卡
|
||||
this.getBankList()
|
||||
// this.getOrderDetail()
|
||||
// console.log('----保融form.action', config.payUrl)
|
||||
// if (localStorage.salelist == '1') {
|
||||
// 第一次支付 调核保获取
|
||||
// this.underWrite()
|
||||
// this.underWriteData = JSON.parse(window.localStorage.getItem('underWriteData'))
|
||||
// } else {
|
||||
// 再次支付 调详情 获取信息
|
||||
this.getOrderDetail()
|
||||
// this.underWriteData = JSON.parse(window.localStorage.getItem('underWriteData'))
|
||||
// }
|
||||
// console.log('--自核结果--支付信息:', JSON.stringify(this.underWriteData))
|
||||
this.getPayTemp()
|
||||
|
||||
|
||||
// }
|
||||
// 不在微信环境下
|
||||
if (!this.isWeixin) {
|
||||
// this.getOrderDetail()
|
||||
// console.log('----保融form.action', config.payUrl)
|
||||
// if (localStorage.salelist == '1') {
|
||||
// 第一次支付 调核保获取
|
||||
// this.underWrite()
|
||||
// this.underWriteData = JSON.parse(window.localStorage.getItem('underWriteData'))
|
||||
// } else {
|
||||
// 再次支付 调详情 获取信息
|
||||
this.getOrderDetail()
|
||||
// this.underWriteData = JSON.parse(window.localStorage.getItem('underWriteData'))
|
||||
// }
|
||||
// console.log('--自核结果--支付信息:', JSON.stringify(this.underWriteData))
|
||||
this.getPayTemp()
|
||||
}
|
||||
},
|
||||
beforeRouteLeave(to, from, next) {
|
||||
document.body.style.backgroundColor = ''
|
||||
@@ -317,7 +323,7 @@ export default {
|
||||
setTimeout(() => {
|
||||
// eslint-disable-next-line no-undef
|
||||
EWebBridge.webCallAppInJs('webview_left_button', {
|
||||
intercept: '0' //是否拦截原生返回事件 1是 其他否
|
||||
intercept: '0', //是否拦截原生返回事件 1是 其他否
|
||||
})
|
||||
// window.appCallBack = this.appCallBack
|
||||
}, 100)
|
||||
@@ -331,7 +337,7 @@ export default {
|
||||
title: '提示',
|
||||
message: '是否确认退出?',
|
||||
cancelButtonColor: '#E9332E',
|
||||
confirmButtonColor: '#FFFFFF'
|
||||
confirmButtonColor: '#FFFFFF',
|
||||
})
|
||||
.then(() => {
|
||||
this.$jump({
|
||||
@@ -339,12 +345,12 @@ export default {
|
||||
extra: {
|
||||
title: '产品列表',
|
||||
forbidSwipeBack: 1, //当前页面禁止右滑返回
|
||||
url: location.origin + `/#/cardList/CardTotreasure`
|
||||
url: location.origin + `/#/cardList/CardTotreasure`,
|
||||
},
|
||||
routerInfo: {
|
||||
path: `/cardList/CardTotreasure`,
|
||||
type: '1'
|
||||
}
|
||||
type: '1',
|
||||
},
|
||||
})
|
||||
})
|
||||
.catch(() => {
|
||||
@@ -356,8 +362,8 @@ export default {
|
||||
flag: 'navigation',
|
||||
extra: {
|
||||
title: '支付',
|
||||
hiddenRight: '1'
|
||||
}
|
||||
hiddenRight: '1',
|
||||
},
|
||||
})
|
||||
this.isScan = false
|
||||
}
|
||||
@@ -369,8 +375,8 @@ export default {
|
||||
flag: 'navigation',
|
||||
extra: {
|
||||
title: '账户信息',
|
||||
hiddenRight: '1'
|
||||
}
|
||||
hiddenRight: '1',
|
||||
},
|
||||
})
|
||||
this.isScan = false
|
||||
},
|
||||
@@ -386,8 +392,8 @@ export default {
|
||||
flag: 'navigation',
|
||||
extra: {
|
||||
title,
|
||||
hiddenLeft: '1'
|
||||
}
|
||||
hiddenLeft: '1',
|
||||
},
|
||||
})
|
||||
this.closeBtn()
|
||||
}, 400)
|
||||
@@ -400,10 +406,10 @@ export default {
|
||||
btns: [
|
||||
{
|
||||
img: this.$assetsUrl + 'images/del-close.png',
|
||||
route: { flag: '', extra: {} }
|
||||
}
|
||||
]
|
||||
}
|
||||
route: { flag: '', extra: {} },
|
||||
},
|
||||
],
|
||||
},
|
||||
})
|
||||
},
|
||||
// 获取银行列表的focus
|
||||
@@ -416,9 +422,9 @@ export default {
|
||||
getBankList() {
|
||||
let self = this
|
||||
let data = {
|
||||
operateType: 'bank_type'
|
||||
operateType: 'bank_type',
|
||||
}
|
||||
getBankList(data).then(res => {
|
||||
getBankList(data).then((res) => {
|
||||
if (res.result == '0') {
|
||||
console.log('银行卡列表', res.content)
|
||||
self.bankList = res.content
|
||||
@@ -436,18 +442,18 @@ export default {
|
||||
},
|
||||
getPayTemp() {
|
||||
getPayTemp({ orderNo: window.localStorage.getItem('orderNo') })
|
||||
.then(res => {
|
||||
.then((res) => {
|
||||
if (res.result == '0') {
|
||||
this.noEdit = res.content.flag != 'false'
|
||||
}
|
||||
})
|
||||
.catch(e => {
|
||||
.catch((e) => {
|
||||
console.error(e)
|
||||
})
|
||||
},
|
||||
// 再次支付
|
||||
// 获取支付详情
|
||||
getOrderDetail() {
|
||||
getOrderDetail({ orderNo: window.localStorage.getItem('orderNo') }).then(res => {
|
||||
getOrderDetail({ orderNo: window.localStorage.getItem('orderNo') }).then((res) => {
|
||||
console.log('getOrderDetail', res)
|
||||
if (res.result == '0') {
|
||||
this.orderStatus = res.orderDTO.orderInfoDTO.orderStatus
|
||||
@@ -465,8 +471,9 @@ export default {
|
||||
this.$toast.clear()
|
||||
console.log(res.orderDTO.orderAccountDTO.bankCode)
|
||||
this.underWriteData = {
|
||||
appntName: res.orderDTO.insuredDTOs[0].riskDTOLst[0].riskName,
|
||||
name: res.orderDTO.appntDTO.name,
|
||||
riskName: res.orderDTO.insuredDTOs[0].riskDTOLst[0].riskName,
|
||||
appntName: res.orderDTO.appntDTO.name,
|
||||
insuredName: res.orderDTO.insuredDTOs[0].name,
|
||||
// bankName: res.orderDTO.orderAccountDTO.bankCode,
|
||||
// bankCode: res.orderDTO.orderAccountDTO.cardBookCode,
|
||||
// cardBookCode: res.orderDTO.orderAccountDTO.cardBookCode,
|
||||
@@ -475,7 +482,7 @@ export default {
|
||||
orderNo: res.orderDTO.orderAccountDTO.orderNo,
|
||||
result: '',
|
||||
resultMessage: '交易处理成功',
|
||||
uwResult: '02'
|
||||
uwResult: '02',
|
||||
}
|
||||
// this.bankListName = res.orderDTO.orderAccountDTO.bankName
|
||||
this.underWriteData.bankCode =
|
||||
@@ -491,7 +498,9 @@ export default {
|
||||
} else {
|
||||
this.underWriteData = {
|
||||
accountName: '',
|
||||
riskName: '',
|
||||
appntName: '',
|
||||
insuredName: '',
|
||||
idType: '',
|
||||
bankCode: '',
|
||||
bankName: '',
|
||||
@@ -500,7 +509,7 @@ export default {
|
||||
orderNo: '',
|
||||
result: '',
|
||||
resultMessage: '交易处理失败',
|
||||
uwResult: '00'
|
||||
uwResult: '00',
|
||||
}
|
||||
// window.localStorage.setItem('underWriteData', JSON.stringify(underWriteData))
|
||||
this.$toast(res.resultMessage)
|
||||
@@ -565,9 +574,33 @@ export default {
|
||||
let data = {
|
||||
orderNo: window.localStorage.getItem('orderNo'),
|
||||
cardOrder: 'cardOrder',
|
||||
payType: this.radio
|
||||
payType: this.radio,
|
||||
}
|
||||
acceptInsurance(data).then(res => {
|
||||
acceptInsurance(data).then((res) => {
|
||||
// this.$jump({
|
||||
// flag: 'h5',
|
||||
// extra: {
|
||||
// forbidSwipeBack: 1, //当前页面禁止右滑返回
|
||||
// url: location.origin + `/#/cardList/payLoser`,
|
||||
// },
|
||||
// routerInfo: {
|
||||
// path: `/cardList/payLoser`,
|
||||
// type: '1',
|
||||
// },
|
||||
// })
|
||||
// return;
|
||||
this.$jump({
|
||||
flag: 'h5',
|
||||
extra: {
|
||||
forbidSwipeBack: 1, //当前页面禁止右滑返回
|
||||
url: location.origin + `/#/cardList/paySuccess`,
|
||||
},
|
||||
routerInfo: {
|
||||
path: `/cardList/paySuccess`,
|
||||
type: '1',
|
||||
},
|
||||
})
|
||||
return
|
||||
console.log('----取支付参数结果:', JSON.stringify(res))
|
||||
// res = {'result':'0','resultMessage':'','content':null,'prtNo':'8186270000000008','payStatus':'4','amnt':'63700.00','appntName':'投保人','message':null,'brPayReturnData':{'result':'','resultMessage':'','content':null,'businessId':'1569125393518','businessNo':'8186270000000008','tradeSubType':'COMM','businessType':'SALE','systemType':'GF','money':63700,'businessSubType':'XDCB','thirdType':'0002','thirdName':null,'bankCode':'ABC','epayOrderNo':'1909221209536259999900','companyAccount':null,'tradeState':'TRADING','standardCode':'DEALING','standardMsg':null,'thirdOrderNo':null,'respRemark':null,'tradeTime':'2019-09-22T04:09:53.518+0000','description':'','version':'1','sourceNotecode':'8186270000000008','payType':'MIT01','expireDate':'20191010101010','transSeq':'20190922120953782','transSource':'MIT','applyEntity':'11860000','paymentCode':'8186270000000008','transDate':'20190922','rdSeq':'1909221209536259999900','settleMode':null,'cur':'CNY','transTime':'120953','ourAmount':63700,'fixUser':'1','insurer':'投保人','certType':'0','certNum':'110101199009210011','oppBank':'ABC','oppAct':'6228481200290317812','oppActName':'投保人','cellPhone':null,'purpose':null,'memo':null,'returnURL':'http://139.199.50.151/#/sale/payResult','notifyURL':'http://139.199.50.151:7000/api/v1/epay/epay/payResult','s3Sign':'e3f0581ec6b751337e8eca360a0746bc'}}
|
||||
if (res.result == '0') {
|
||||
@@ -596,7 +629,7 @@ export default {
|
||||
window.localStorage.setItem('payStatus', res.payStatus)
|
||||
window.localStorage.setItem('payInfo', JSON.stringify(res))
|
||||
this.underWriteData.bankListName = this.bankListName
|
||||
if(this.radio == '3'){
|
||||
if (this.radio == '3') {
|
||||
this.underWriteData.bankCode = ''
|
||||
}
|
||||
localStorage['cardList-detail'] = JSON.stringify(this.underWriteData)
|
||||
@@ -606,7 +639,7 @@ export default {
|
||||
setTimeout(() => {
|
||||
// eslint-disable-next-line no-undef
|
||||
EWebBridge.webCallAppInJs('webview_left_button', {
|
||||
intercept: '0' //是否拦截原生返回事件 1是 其他否
|
||||
intercept: '0', //是否拦截原生返回事件 1是 其他否
|
||||
})
|
||||
}, 100)
|
||||
})
|
||||
@@ -626,7 +659,7 @@ export default {
|
||||
let data = {
|
||||
orderDTO: {
|
||||
orderInfoDTO: {
|
||||
orderNo: window.localStorage.getItem('orderNo')
|
||||
orderNo: window.localStorage.getItem('orderNo'),
|
||||
},
|
||||
orderAccountDTO: {
|
||||
accountType: '0',
|
||||
@@ -636,15 +669,15 @@ export default {
|
||||
cardBookType: '1',
|
||||
cardBookCode: this.underWriteData.bankCode,
|
||||
isAutoPay: '0',
|
||||
isAutoRenewal: '1'
|
||||
}
|
||||
}
|
||||
isAutoRenewal: '1',
|
||||
},
|
||||
},
|
||||
}
|
||||
this.$toast.loading({
|
||||
duration: 0, // 持续展示 toast
|
||||
forbidClick: true, // 禁用背景点击
|
||||
loadingType: 'spinner',
|
||||
message: '加载中……'
|
||||
message: '加载中……',
|
||||
})
|
||||
/*
|
||||
支付之前要先保存银行账户信息
|
||||
@@ -658,7 +691,7 @@ export default {
|
||||
duration: 0, // 持续展示 toast
|
||||
forbidClick: true, // 禁用背景点击
|
||||
loadingType: 'spinner',
|
||||
message: '加载中……'
|
||||
message: '加载中……',
|
||||
})
|
||||
|
||||
// if (!flag) {
|
||||
@@ -685,7 +718,7 @@ export default {
|
||||
duration: 0, // 持续展示 toast
|
||||
forbidClick: true, // 禁用背景点击
|
||||
loadingType: 'spinner',
|
||||
message: '加载中……'
|
||||
message: '加载中……',
|
||||
})
|
||||
|
||||
// if (!flag) {
|
||||
@@ -710,7 +743,7 @@ export default {
|
||||
this.$dialog
|
||||
.confirm({
|
||||
message: '证件类型不是身份证,无法使用微信支付',
|
||||
showCancelButton: false
|
||||
showCancelButton: false,
|
||||
})
|
||||
.then(() => {
|
||||
this.radio = ''
|
||||
@@ -724,13 +757,13 @@ export default {
|
||||
console.log(this.$validator)
|
||||
return this.$toast(this.$validator.errors.all()[0])
|
||||
}
|
||||
let shareName = this.underWriteData.name
|
||||
localStorage.name = this.underWriteData.name
|
||||
let shareName = this.underWriteData.appntName
|
||||
localStorage.appntName = this.underWriteData.appntName
|
||||
localStorage.bankName = this.underWriteData.bankName
|
||||
localStorage.bankCode = this.underWriteData.bankCode
|
||||
localStorage.bankListName = this.bankListName
|
||||
console.log(this.underWriteData.bankName, this.underWriteData.bankCode, this.bankListName, this.underWriteData.name)
|
||||
let url = location.origin + '/#/cardList/pay?orderNo=' + localStorage.orderNo + '&token=' + localStorage.token
|
||||
let url = location.origin + '/#/cardList/phoneCode?orderNo=' + localStorage.orderNo + '&token=' + localStorage.token
|
||||
console.log(url)
|
||||
EWebBridge.webCallAppInJs('bridge', {
|
||||
flag: 'share',
|
||||
@@ -738,11 +771,11 @@ export default {
|
||||
title: `国富人寿卡单投保(${shareName})付款`,
|
||||
content: '付款进行',
|
||||
url: url,
|
||||
img: this.$assetsUrl + 'images/logo.png'
|
||||
}
|
||||
img: this.$assetsUrl + 'images/logo.png',
|
||||
},
|
||||
})
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -759,4 +792,8 @@ export default {
|
||||
padding-right: 3px;
|
||||
box-sizing: content-box;
|
||||
}
|
||||
.bottom-btn {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
<template>
|
||||
<div class="PayLoser">
|
||||
<div>
|
||||
<img src="../../../assets/images/u10608.svg" alt="" />
|
||||
<!-- <img src="../../../assets/images/u10608.svg" alt="" /> -->
|
||||
<img :src="$assetsUrl + 'images/fail.png'" alt="">
|
||||
<p>支付失败</p>
|
||||
</div>
|
||||
<van-button type="info" size="large" class="payBtn">返回首页</van-button>
|
||||
<van-button type="danger" size="large" class="payBtn">返回首页</van-button>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
@@ -1,22 +1,22 @@
|
||||
<template>
|
||||
<div class="paySuccess">
|
||||
<template v-if="payStatus == '1'">
|
||||
<template>
|
||||
<div class="paySucc">
|
||||
<van-icon name="passed" size="100px" color="#1296DB" />
|
||||
<van-icon name="passed" size="100px" color="#E9332E" />
|
||||
<span>支付成功</span>
|
||||
</div>
|
||||
<van-cell-group name="payInfo">
|
||||
<van-field v-model="payInfo.productName" readonly clearable label="产品名称" name="产品名称" placeholder="国富安全出行2.0" />
|
||||
<van-field v-model="payInfo.paymentAmount" readonly clearable label="支付金额" name="支付金额" placeholder="100.00元" />
|
||||
<van-field v-model="payInfo.bankCardNumber" readonly clearable label="卡号" name="卡号" placeholder="1297793740298" />
|
||||
<van-field v-model="productName" readonly clearable label="产品名称" name="产品名称" placeholder="国富安全出行2.0" />
|
||||
<van-field v-model="paymentAmount" readonly clearable label="支付金额" name="支付金额" placeholder="100.00元" />
|
||||
<van-field v-model="bankCardNumber" readonly clearable label="卡号" name="卡号" placeholder="1297793740298" />
|
||||
</van-cell-group>
|
||||
</template>
|
||||
<template v-else-if="payStatus == '2'">
|
||||
<!-- <template v-else-if="payStatus == '2'">
|
||||
<div class="flex flex-direction-colunm align-items-c pt100">
|
||||
<img :src="this.$assetsUrl + 'images/fail.png'" class="w100 h100" alt="" />
|
||||
<p class="mt30">支付失败</p>
|
||||
</div>
|
||||
</template>
|
||||
</template> -->
|
||||
<div class="bg-white bottom-btn">
|
||||
<van-button type="danger" size="large" class="payBtn" @click="goHome">返回首页</van-button>
|
||||
</div>
|
||||
|
||||
@@ -1,29 +1,65 @@
|
||||
<template>
|
||||
<div>
|
||||
<iframe :src="src + pdfUrl" style="width:100vw;height:100vh"></iframe>
|
||||
<van-notice-bar wrapable v-if="time > 0" :scrollable="false" :text="'提示:阅读时长需在' + time + '秒以上'" />
|
||||
<iframe :src="src + pdfUrl" style="width: 100vw; height: calc(100vh - 100px)"></iframe>
|
||||
<div class="bg-white bottom-btn"><van-button type="danger" size="large" @click="nextStep" v-no-more-click="1000">下一步</van-button></div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { Button, NoticeBar } from 'vant'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
pdfUrl: '',
|
||||
src: location.origin + '/pdfjs/web/viewer.html?file='
|
||||
src: 'http://139.199.50.151' + '/pdfjs/web/viewer.html?file=',
|
||||
index: this.$route.query.index || 0, //阅读文件指针
|
||||
timer: null,
|
||||
time: 5,
|
||||
cardListPDF: [],
|
||||
}
|
||||
},
|
||||
components: {
|
||||
[NoticeBar.name]: NoticeBar,
|
||||
[Button.name]: Button,
|
||||
},
|
||||
created() {
|
||||
this.init()
|
||||
},
|
||||
mounted() {},
|
||||
methods: {
|
||||
init() {
|
||||
let cardListPDF = JSON.parse(localStorage.cardListPDF)
|
||||
console.log(cardListPDF)
|
||||
this.pdfUrl = cardListPDF.documentUrl
|
||||
this.shareContent = cardListPDF.title
|
||||
document.title = cardListPDF.title
|
||||
}
|
||||
}
|
||||
console.log('init')
|
||||
this.cardListPDF = JSON.parse(localStorage.cardListPDF)
|
||||
console.log(this.cardListPDF)
|
||||
this.pdfUrl = this.cardListPDF[this.index].documentUrl
|
||||
document.title = this.cardListPDF[this.index].documentName
|
||||
this.interval()
|
||||
},
|
||||
interval() {
|
||||
this.time = 5
|
||||
this.timer = setInterval(() => {
|
||||
this.time--
|
||||
if (this.time == 0) return clearInterval(this.timer)
|
||||
}, 1000)
|
||||
},
|
||||
nextStep() {
|
||||
// 调用阅读接口
|
||||
if (this.index >= this.cardListPDF.length - 1) {
|
||||
this.$jump({
|
||||
flag: 'h5',
|
||||
extra: {
|
||||
url: location.origin + '/#/cardList/SignatureConfirmation',
|
||||
},
|
||||
routerInfo: {
|
||||
path: '/cardList/SignatureConfirmation',
|
||||
},
|
||||
})
|
||||
} else {
|
||||
this.index++
|
||||
this.init()
|
||||
}
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
217
src/views/ebiz/cardList/SignatureConfirmation.vue
Normal file
217
src/views/ebiz/cardList/SignatureConfirmation.vue
Normal file
@@ -0,0 +1,217 @@
|
||||
<template>
|
||||
<div class="signature-container">
|
||||
<div class="signature-content pb40">
|
||||
<van-cell-group class="mt10">
|
||||
<van-cell title="销售人员工号" :value="recmd.agentCode" />
|
||||
<van-cell title="销售人员姓名" :value="recmd.name" />
|
||||
<van-cell title="投保单号" :value="orderInfo.orderNo"></van-cell>
|
||||
<van-cell title="投保日期" :value="orderInfo.appntDateLabel" />
|
||||
<van-cell title="保费合计(元)" :value="orderInfo.orderAmount == undefined ? '' : orderInfo.orderAmount | moneyFormat" />
|
||||
</van-cell-group>
|
||||
<!-- 在微信 -->
|
||||
<div class="mt10">
|
||||
<van-collapse v-model="activeNames">
|
||||
<van-collapse-item name="1">
|
||||
<div slot="title">
|
||||
投保人
|
||||
<span class="ml20">{{ appntInfo.name }}</span>
|
||||
</div>
|
||||
<p class="mb20">以下内容需要您按照顺序阅读确认:</p>
|
||||
<div>
|
||||
<p>需阅读</p>
|
||||
<p class="mb20" v-for="item in appntSign" :key="item.name">
|
||||
<span class="text">{{ item.documentName }}</span>
|
||||
<img :src="src" v-if="item.documentStatus == '1'" />
|
||||
</p>
|
||||
</div>
|
||||
<p class="start">点击【下一步】按钮,进行相关操作</p>
|
||||
<!-- <div class="text">操作时间已失效,请联系销售人员!</div> -->
|
||||
</van-collapse-item>
|
||||
</van-collapse>
|
||||
</div>
|
||||
</div>
|
||||
<div class="bottom-btn bg-white">
|
||||
<van-button type="danger" size="large" @click="next" v-no-more-click="1000">下一步</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// import UploadImageFile from '@/components/ebiz/sale/UploadImageFile'
|
||||
import { Field, Cell, CellGroup, Collapse, CollapseItem, Dialog } from 'vant'
|
||||
import { underWrite } from '@/api/ebiz/sale/sale'
|
||||
import { checkPhone } from '@/api/ebiz/customer/customer'
|
||||
import IndexBar from '@/components/ebiz/sale/IndexBar'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
let isWeixin = this.$utils.device().isWeixin //判断环境
|
||||
return {
|
||||
operaFlag: null,
|
||||
encyCustomerMobile: null,
|
||||
//人脸识别认证次数
|
||||
faceAuthCount: {
|
||||
appnt: 0,
|
||||
insured: 0,
|
||||
weixin: 0,
|
||||
},
|
||||
customerMobile: '',
|
||||
//保险产品名称
|
||||
riskName: '',
|
||||
// 员工信息
|
||||
recmd: {},
|
||||
// 订单信息
|
||||
orderInfo: {},
|
||||
// 投保人信息
|
||||
appntInfo: {},
|
||||
// 投保人签名阅读信息
|
||||
appntSign: [
|
||||
{
|
||||
documentName: '短期交通卡投保须知',
|
||||
documentUrl: this.$assetsUrl + 'product/GFRS_M0022/M0022Notice.pdf',
|
||||
documentStatus: '1',
|
||||
},
|
||||
{
|
||||
documentName: '短期交通卡投保声明',
|
||||
documentUrl: this.$assetsUrl + 'product/GFRS_M0022/M0022Explain.pdf',
|
||||
documentStatus: '1',
|
||||
},
|
||||
{
|
||||
documentName: '国富人寿综合交通意外保险2020',
|
||||
documentUrl: this.$assetsUrl + 'product/GFRS_M0022/M0022.pdf',
|
||||
documentStatus: '2',
|
||||
},
|
||||
],
|
||||
// 折叠面板
|
||||
activeNames: ['1'],
|
||||
// 图片路径
|
||||
src: this.$assetsUrl + 'images/u6490.png',
|
||||
// 是否在微信
|
||||
isWeixin,
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
orderDTO: {
|
||||
get() {
|
||||
return JSON.parse(sessionStorage.orderDetail)
|
||||
},
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
// 初始化
|
||||
async init() {
|
||||
this.recmd = this.orderDTO.recmdDTO
|
||||
this.orderInfo = this.orderDTO.orderInfoDTO
|
||||
this.appntInfo = this.orderDTO.appntDTO
|
||||
// if (this.isWeixin) {
|
||||
// await this.getOrderDetail()
|
||||
// // weixinShare({
|
||||
// // title: '国富人寿计划书',
|
||||
// // imgUrl: 'http://47.96.143.111:8000/app/images/logo.png',
|
||||
// // desc: '国富为您量身定制的保险产品,请查收'
|
||||
// // })
|
||||
// } else {
|
||||
// // 获取详情消息
|
||||
// this.getOrderDetail()
|
||||
// }
|
||||
},
|
||||
// 提交
|
||||
next() {
|
||||
let index = 0
|
||||
let is_sign = this.appntSign.some((item, key) => {
|
||||
index = key
|
||||
return item.documentStatus != 1
|
||||
})
|
||||
if (is_sign) {
|
||||
// 有未阅读的文件
|
||||
localStorage.setItem('cardListPDF', JSON.stringify(this.appntSign))
|
||||
this.$jump({
|
||||
flag: 'h5',
|
||||
extra: {
|
||||
title: this.appntSign[index].documentName,
|
||||
// url: 'http://47.96.143.111/pdfjs/web/viewer.html?file=' + url //测试代码
|
||||
url: location.origin + '/#/cardList/ShowPDF?index='+index,
|
||||
},
|
||||
routerInfo: {
|
||||
path: '/cardList/ShowPDF?index='+index,
|
||||
},
|
||||
})
|
||||
} else {
|
||||
return this.$jump({
|
||||
flag: 'h5',
|
||||
extra: {
|
||||
title: this.appntSign[index].documentName,
|
||||
// url: 'http://47.96.143.111/pdfjs/web/viewer.html?file=' + url //测试代码
|
||||
url: location.origin + '/#/cardList/pay',
|
||||
},
|
||||
routerInfo: {
|
||||
path: '/cardList/pay',
|
||||
},
|
||||
})
|
||||
//需要全部提交
|
||||
this.$toast.loading({
|
||||
duration: 0, // 持续展示 toast
|
||||
|
||||
forbidClick: true, // 禁用背景点击
|
||||
|
||||
loadingType: 'spinner',
|
||||
|
||||
message: '加载中……',
|
||||
})
|
||||
let data = {
|
||||
platform: 'app',
|
||||
type: '1',
|
||||
orderDTO: {
|
||||
orderInfoDTO: {
|
||||
orderNo: window.localStorage.getItem('orderNo'),
|
||||
},
|
||||
},
|
||||
}
|
||||
// /insure/selfToHuman
|
||||
underWrite(data).then((res) => {
|
||||
this.$toast.clear()
|
||||
if (res.result == '0') {
|
||||
|
||||
} else {
|
||||
this.$toast(res.resultMessage)
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
},
|
||||
created() {},
|
||||
mounted() {
|
||||
// 初始化
|
||||
this.init()
|
||||
},
|
||||
components: {
|
||||
[Cell.name]: Cell,
|
||||
[CellGroup.name]: CellGroup,
|
||||
[Collapse.name]: Collapse,
|
||||
[CollapseItem.name]: CollapseItem,
|
||||
[Dialog.name]: Dialog,
|
||||
[Field.name]: Field,
|
||||
[IndexBar.name]: IndexBar,
|
||||
},
|
||||
beforeRouteLeave(to, from, next) {
|
||||
document.body.style.backgroundColor = ''
|
||||
next()
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import '@/assets/sass/variables.scss';
|
||||
.text {
|
||||
color: #4a90e2;
|
||||
}
|
||||
.start {
|
||||
color: #4fc6b3;
|
||||
}
|
||||
.tips {
|
||||
line-height: 30px;
|
||||
}
|
||||
.tips {
|
||||
line-height: 30px;
|
||||
}
|
||||
</style>
|
||||
107
src/views/ebiz/cardList/cardDetail.vue
Normal file
107
src/views/ebiz/cardList/cardDetail.vue
Normal file
@@ -0,0 +1,107 @@
|
||||
<template>
|
||||
<div class="product-detail-container pb50" style="overflow: hidden">
|
||||
<van-cell-group class="mt10">
|
||||
<p style="border-bottom: 1px solid #ebedf0" class="fs15 fwb pl10 pv12">投保人信息</p>
|
||||
<van-field :value="appntInfo.name" label="姓名" name="姓名" readonly />
|
||||
<van-field :value="appntInfo.idType | idToText('insuredIdType')" label="证件类型" name="证件类型" readonly />
|
||||
<van-field :value="appntInfo.idNo" label="证件号码" name="证件号码" readonly />
|
||||
<van-field :value="appntInfo.mobile" label="手机号码" name="手机号码" readonly />
|
||||
<van-field :value="appntInfo.email" label="电子邮箱" name="电子邮箱" readonly />
|
||||
<van-field :value="appntInfo.homeName" label="联系地址" name="联系地址" readonly />
|
||||
<van-field :value="appntInfo.homeAddress" label name="详细地址" readonly />
|
||||
</van-cell-group>
|
||||
<van-cell-group class="mt10">
|
||||
<p style="border-bottom: 1px solid #ebedf0" class="fs15 fwb pl10 pv12">被保人信息</p>
|
||||
<van-field :value="insuredInfo.name" label="姓名" name="姓名" readonly />
|
||||
<van-field :value="insuredInfo.idType | idToText('insuredIdType')" label="证件类型" name="证件类型" readonly />
|
||||
<van-field :value="insuredInfo.idNo" label="证件号码" name="证件号码" readonly />
|
||||
<van-field :value="insuredInfo.mobile" label="手机号码" name="手机号码" readonly />
|
||||
<van-field :value="insuredInfo.email" label="电子邮箱" name="电子邮箱" readonly />
|
||||
<van-field :value="insuredInfo.homeName" label="联系地址" name="联系地址" readonly />
|
||||
<van-field :value="insuredInfo.homeAddress" label name="详细地址" readonly />
|
||||
</van-cell-group>
|
||||
<van-cell-group class="mt10">
|
||||
<p style="border-bottom: 1px solid #ebedf0" class="fs15 fwb pl10 pv12">受益人信息</p>
|
||||
<van-field readonly v-model="bnfTypeVal" clearable label="受益人类型" v-validate="'required'" style="border-bottom: 1px solid #ebedf0" />
|
||||
</van-cell-group>
|
||||
<van-cell-group class="mt10">
|
||||
<p style="border-bottom: 1px solid #ebedf0" class="fs15 fwb pl10 pv12">产品信息</p>
|
||||
<van-field :value="riskDTO.riskName" label="保障方案" name="保障方案" readonly />
|
||||
<van-field value="保额" label="保险责任" name="保险责任" readonly />
|
||||
<van-field :value="riskDTO.prem" label="保费" name="保费" readonly />
|
||||
<van-field :value="'1年'" label="保险期间" name="保险期间" readonly />
|
||||
</van-cell-group>
|
||||
<div class="tips">注:2020年04月03日0时至2021年04月02日24时止。</div>
|
||||
<van-goods-action style="z-index: 99">
|
||||
<van-button type="default" style="width: 50%; font-size: 14px; height: 40px; background: white"
|
||||
>总保费:<span style="color: red; font-weight: bold; font-size: 18px; font-weight: 400">{{ riskDTO.prem }}</span
|
||||
>元</van-button
|
||||
>
|
||||
<van-goods-action-button type="danger" text="确认" @click="nextStep" v-no-more-click="1000" style="border-radius: 0em; width: 50%; height: 40px" />
|
||||
</van-goods-action>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { Field, GoodsAction, GoodsActionIcon, GoodsActionButton, Icon } from 'vant'
|
||||
import { getOrderDetail, information, underWrite } from '@/api/ebiz/sale/sale'
|
||||
import getAreaName from '@/assets/js/utils/getAreaNameForSale'
|
||||
export default {
|
||||
name: 'cardDetail',
|
||||
components: {
|
||||
[Field.name]: Field,
|
||||
[GoodsAction.name]: GoodsAction,
|
||||
[GoodsActionIcon.name]: GoodsActionIcon,
|
||||
[GoodsActionButton.name]: GoodsActionButton,
|
||||
[Icon.name]: Icon,
|
||||
},
|
||||
computed: {
|
||||
orderDTO: {
|
||||
get() {
|
||||
return JSON.parse(sessionStorage.orderDetail)
|
||||
},
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
activeName: ['1'],
|
||||
appntInfo: {},
|
||||
insuredInfo: {},
|
||||
bnfTypeVal: '法定受益人', //受益人类型文字展示
|
||||
riskDTO: {},
|
||||
}
|
||||
},
|
||||
created() {
|
||||
console.log(this.orderDTO)
|
||||
this.appntInfo = this.orderDTO.appntDTO
|
||||
this.appntInfo.homeName = getAreaName([{ code: this.appntInfo.homeProvince }, { code: this.appntInfo.homeCity }, { code: this.appntInfo.homeArea }])
|
||||
this.insuredInfo = this.orderDTO.insuredDTOs[0]
|
||||
this.insuredInfo.homeName = getAreaName([{ code: this.insuredInfo.homeProvince }, { code: this.insuredInfo.homeCity }, { code: this.insuredInfo.homeArea }])
|
||||
this.riskDTO = this.orderDTO.insuredDTOs[0].riskDTOLst[0]
|
||||
},
|
||||
methods: {
|
||||
nextStep() {
|
||||
this.$jump({
|
||||
flag: 'h5',
|
||||
extra: {
|
||||
url: location.origin + `/#/cardList/SignatureConfirmation`,
|
||||
},
|
||||
routerInfo: {
|
||||
path: `/cardList/SignatureConfirmation`,
|
||||
},
|
||||
})
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.product-detail-container .van-collapse-item__content {
|
||||
padding: 0 15px;
|
||||
}
|
||||
.tips {
|
||||
font-size: 14px;
|
||||
color: #333;
|
||||
padding: 15px;
|
||||
}
|
||||
</style>
|
||||
@@ -65,12 +65,49 @@
|
||||
/>
|
||||
<van-field v-model="userInfo.email" required label="邮箱" name="邮箱" placeholder="请输入" v-validate="'required|email'" clearable />
|
||||
<!-- <van-field v-model="userInfo.workcompany" required label="工作单位" name="工作单位" placeholder="请输入" v-validate="'required'" maxlength="50" clearable /> -->
|
||||
<!-- <template v-if="false">
|
||||
<!-- <template v-if="false"> -->
|
||||
<occupation-picker
|
||||
:value.sync="userInfo.occupationCode"
|
||||
:chooseName.sync="userInfo.occupationName"
|
||||
:lifeGrade.sync="userInfo.lifeGrade"
|
||||
:healthGrade.sync="userInfo.healthGrade"
|
||||
clearable
|
||||
label="职业类别"
|
||||
name="职业类别"
|
||||
required
|
||||
v-validate="'required'"
|
||||
placeholder="请选择"
|
||||
:parentShowPicker.sync="occupationShowPicker"
|
||||
@on-click="selectClick('2')"
|
||||
@on-choose="chooseOccupation"
|
||||
/>
|
||||
<van-field
|
||||
v-model="homeName"
|
||||
:value="userInfo.nativeplace | idToText('nativeplace')"
|
||||
readonly
|
||||
label="地址"
|
||||
name="地址"
|
||||
required
|
||||
label="国籍"
|
||||
name="国籍"
|
||||
v-validate="'required'"
|
||||
right-icon="arrow"
|
||||
placeholder="请选择"
|
||||
@click="toSelect('1')"
|
||||
/>
|
||||
<van-field
|
||||
:value="userInfo.marriage | idToText('marriage')"
|
||||
readonly
|
||||
required
|
||||
label="婚姻状况"
|
||||
name="婚姻状况"
|
||||
v-validate="'required'"
|
||||
right-icon="arrow"
|
||||
placeholder="请选择"
|
||||
@click="toSelect('6')"
|
||||
/>
|
||||
<van-field
|
||||
v-model="userInfo.homeName"
|
||||
readonly
|
||||
label="联系地址"
|
||||
name="联系地址"
|
||||
required
|
||||
right-icon="arrow"
|
||||
placeholder="请选择"
|
||||
@@ -78,7 +115,7 @@
|
||||
@click="homeShow = true"
|
||||
/>
|
||||
<van-field v-model="userInfo.homeAddress" label name="详细地址" placeholder="请输入详细地址" v-validate="'required'" clearable maxlength="30" />
|
||||
</template> -->
|
||||
<!-- </template> -->
|
||||
<van-field
|
||||
:value="userInfo.relationToInsured | idToText('relationToAppnt')"
|
||||
readonly
|
||||
@@ -93,7 +130,7 @@
|
||||
</van-cell-group>
|
||||
<!-- 被保险人信息 -->
|
||||
<van-cell-group class="mt10" v-if="userInfo.relationToInsured != 1">
|
||||
<p style="border-bottom: 1px solid #ebedf0" class="fs15 fwb pl10 pv12">被保险人信息</p>
|
||||
<p style="border-bottom: 1px solid #ebedf0" class="fs15 fwb pl10 pv12">被保人信息</p>
|
||||
<customer-picker
|
||||
@on-choose="chooseCustomer(arguments)"
|
||||
v-validate="'required|name'"
|
||||
@@ -143,6 +180,66 @@
|
||||
ref="insuredBirthday"
|
||||
:maxDate="insuredMaxDate"
|
||||
></FieldDatePicter>
|
||||
<van-field
|
||||
required
|
||||
v-model="insuredInfo.mobile"
|
||||
clearable
|
||||
label="手机号码"
|
||||
name="手机号码"
|
||||
placeholder="请输入"
|
||||
v-validate="'required|mobile'"
|
||||
maxlength="11"
|
||||
/>
|
||||
<van-field v-model="insuredInfo.email" required label="邮箱" name="邮箱" placeholder="请输入" v-validate="'required|email'" clearable />
|
||||
<occupation-picker
|
||||
:value.sync="insuredInfo.occupationCode"
|
||||
:chooseName.sync="insuredInfo.occupationName"
|
||||
:lifeGrade.sync="insuredInfo.lifeGrade"
|
||||
:healthGrade.sync="insuredInfo.healthGrade"
|
||||
clearable
|
||||
label="职业类别"
|
||||
name="职业类别"
|
||||
required
|
||||
v-validate="'required'"
|
||||
placeholder="请选择"
|
||||
:parentShowPicker.sync="occupationShowPicker"
|
||||
@on-click="selectClick('2')"
|
||||
@on-choose="chooseOccupation"
|
||||
/>
|
||||
<van-field
|
||||
:value="insuredInfo.nativeplace | idToText('nativeplace')"
|
||||
readonly
|
||||
required
|
||||
label="国籍"
|
||||
name="国籍"
|
||||
v-validate="'required'"
|
||||
right-icon="arrow"
|
||||
placeholder="请选择"
|
||||
@click="toSelect('1')"
|
||||
/>
|
||||
<van-field
|
||||
:value="insuredInfo.marriage | idToText('marriage')"
|
||||
readonly
|
||||
required
|
||||
label="婚姻状况"
|
||||
name="婚姻状况"
|
||||
v-validate="'required'"
|
||||
right-icon="arrow"
|
||||
placeholder="请选择"
|
||||
@click="toSelect('10')"
|
||||
/>
|
||||
<van-field
|
||||
v-model="insuredInfo.homeName"
|
||||
readonly
|
||||
label="联系地址"
|
||||
name="联系地址"
|
||||
required
|
||||
right-icon="arrow"
|
||||
placeholder="请选择"
|
||||
v-validate="'required'"
|
||||
@click="homeShow = true"
|
||||
/>
|
||||
<van-field v-model="insuredInfo.homeAddress" label name="详细地址" placeholder="请输入详细地址" v-validate="'required'" clearable maxlength="30" />
|
||||
</van-cell-group>
|
||||
<van-cell-group class="mt10" v-else>
|
||||
<p style="border-bottom: 1px solid #ebedf0" class="fs15 fwb pl10 pv12">被保人信息</p>
|
||||
@@ -187,14 +284,85 @@
|
||||
:flag="true"
|
||||
ref="insuredBirthday"
|
||||
:maxDate="maxDate"
|
||||
></FieldDatePicter>
|
||||
></FieldDatePicter
|
||||
><van-field
|
||||
required
|
||||
v-model="userInfo.mobile"
|
||||
clearable
|
||||
label="手机号码"
|
||||
name="手机号码"
|
||||
placeholder="请输入"
|
||||
v-validate="'required|mobile'"
|
||||
maxlength="11"
|
||||
/>
|
||||
<van-field v-model="userInfo.email" required label="邮箱" name="邮箱" placeholder="请输入" v-validate="'required|email'" clearable />
|
||||
<occupation-picker
|
||||
:value.sync="userInfo.occupationCode"
|
||||
:chooseName.sync="userInfo.occupationName"
|
||||
:lifeGrade.sync="userInfo.lifeGrade"
|
||||
:healthGrade.sync="userInfo.healthGrade"
|
||||
clearable
|
||||
label="职业类别"
|
||||
name="职业类别"
|
||||
required
|
||||
v-validate="'required'"
|
||||
placeholder="请选择"
|
||||
:parentShowPicker.sync="occupationShowPicker"
|
||||
@on-click="selectClick('2')"
|
||||
@on-choose="chooseOccupation"
|
||||
/>
|
||||
<van-field
|
||||
:value="userInfo.nativeplace | idToText('nativeplace')"
|
||||
readonly
|
||||
required
|
||||
label="国籍"
|
||||
name="国籍"
|
||||
v-validate="'required'"
|
||||
right-icon="arrow"
|
||||
placeholder="请选择"
|
||||
@click="toSelect('1')"
|
||||
/>
|
||||
<van-field
|
||||
:value="userInfo.marriage | idToText('marriage')"
|
||||
readonly
|
||||
required
|
||||
label="婚姻状况"
|
||||
name="婚姻状况"
|
||||
v-validate="'required'"
|
||||
right-icon="arrow"
|
||||
placeholder="请选择"
|
||||
@click="toSelect('6')"
|
||||
/>
|
||||
<van-field
|
||||
v-model="userInfo.homeName"
|
||||
readonly
|
||||
label="联系地址"
|
||||
name="联系地址"
|
||||
required
|
||||
right-icon="arrow"
|
||||
placeholder="请选择"
|
||||
v-validate="'required'"
|
||||
@click="homeShow = true"
|
||||
/>
|
||||
<van-field v-model="userInfo.homeAddress" label name="详细地址" placeholder="请输入详细地址" v-validate="'required'" clearable maxlength="30" />
|
||||
</van-cell-group>
|
||||
<!-- 受益人信息 -->
|
||||
<van-cell-group class="mt10">
|
||||
<p style="border-bottom: 1px solid #ebedf0" class="fs15 fwb pl10 pv12">受益人信息</p>
|
||||
<van-field required readonly v-model="bnfTypeVal" clearable label="受益人类型" v-validate="'required'" style="border-bottom: 1px solid #ebedf0;" />
|
||||
<van-field required readonly v-model="bnfTypeVal" clearable label="受益人类型" v-validate="'required'" style="border-bottom: 1px solid #ebedf0" />
|
||||
</van-cell-group>
|
||||
<p style="background:white;border-bottom: 1px solid #ebedf0" class="fs15 fwb pl10 pv12">产品信息</p>
|
||||
<p style="background: white; border-bottom: 1px solid #ebedf0" class="fs15 fwb pl10 pv12">产品信息</p>
|
||||
<van-field
|
||||
:value="schemeName"
|
||||
readonly
|
||||
required
|
||||
label="保障方案"
|
||||
name="保障方案"
|
||||
v-validate="'required'"
|
||||
right-icon="arrow"
|
||||
placeholder="请选择"
|
||||
@click="toSelect('12')"
|
||||
/>
|
||||
<FieldDatePicter
|
||||
v-validate="'required'"
|
||||
label="指定生效日期"
|
||||
@@ -209,8 +377,8 @@
|
||||
input-align:right
|
||||
>
|
||||
</FieldDatePicter>
|
||||
<van-field value="7天" clearable label="保险期间" style="border-bottom: 1px solid #ebedf0;" />
|
||||
<van-checkbox-group v-model="result" ref="checkboxGroup" style="box-sizing:border-box;" class="pl8 pr20 pt10 pb10 bg-white">
|
||||
<van-field :value="productDate" v-if="cvaliDate.length > 0" clearable label="保险期间" style="border-bottom: 1px solid #ebedf0" />
|
||||
<!-- <van-checkbox-group v-model="result" ref="checkboxGroup" style="box-sizing:border-box;" class="pl8 pr20 pt10 pb10 bg-white">
|
||||
<van-checkbox name="a" shape="square" icon-size="13px"
|
||||
>本人已仔细阅读并了解
|
||||
<span class="blue" @click.stop="goDocu($assetsUrl + 'product/GFRS_M0022/M0022Notice.pdf', '短期交通卡投保须知')">《投保须知》</span>
|
||||
@@ -222,21 +390,15 @@
|
||||
等内容,自愿为被保险人投保本保险。<br />
|
||||
为未成年子女投保的人身保险,在被保险人成年之前,因被保险人身故给付的保险金总和不得超过国务院保险监督管理机构规定的限额,身故给付的保险金额总和的约定也不得超过前述限额。但航空意外死亡保险金额及重大自然灾害意外死亡保险金额不计算在上述规定限额之中。</van-checkbox
|
||||
>
|
||||
</van-checkbox-group>
|
||||
</van-checkbox-group> -->
|
||||
<!-- <div class="tips" v-if="cvaliDate.length > 0">注:2020年04月03日0时至2021年04月02日24时止。</div> -->
|
||||
|
||||
<van-goods-action style="z-index: 99;">
|
||||
<van-button type="default" style="width:50%;font-size:14px;height:40px;background:white"
|
||||
>总保费:<span style="color:red;font-weight:bold;font-size:18px;font-weight:400;">{{ allPrice }}</span
|
||||
<van-goods-action style="z-index: 99">
|
||||
<van-button type="default" style="width: 50%; font-size: 14px; height: 40px; background: white"
|
||||
>总保费:<span style="color: red; font-weight: bold; font-size: 18px; font-weight: 400">{{ allPrice }}</span
|
||||
>元</van-button
|
||||
>
|
||||
<van-goods-action-button
|
||||
:disabled="!result.length"
|
||||
type="danger"
|
||||
text="立即投保"
|
||||
@click="nextStep"
|
||||
v-no-more-click="1000"
|
||||
style="border-radius:0em;width:50%;height:40px;"
|
||||
/>
|
||||
<van-goods-action-button type="danger" text="立即投保" @click="nextStep" v-no-more-click="1000" style="border-radius: 0em; width: 50%; height: 40px" />
|
||||
</van-goods-action>
|
||||
|
||||
<!-- 字段选择 -->
|
||||
@@ -283,9 +445,7 @@ import Vue from 'vue'
|
||||
import { GoodsAction, GoodsActionIcon, GoodsActionButton } from 'vant'
|
||||
DataDictionary.relationToAppnt = DataDictionary.relationToAppnt.slice(0, 4)
|
||||
Vue.use(Checkbox).use(CheckboxGroup)
|
||||
Vue.use(GoodsAction)
|
||||
.use(GoodsActionIcon)
|
||||
.use(GoodsActionButton)
|
||||
Vue.use(GoodsAction).use(GoodsActionIcon).use(GoodsActionButton)
|
||||
export default {
|
||||
name: 'insuredInfo',
|
||||
components: {
|
||||
@@ -301,35 +461,39 @@ export default {
|
||||
[Area.name]: Area,
|
||||
[RadioGroup.name]: RadioGroup,
|
||||
[Radio.name]: Radio,
|
||||
[IdentityCardScan.name]: IdentityCardScan
|
||||
[IdentityCardScan.name]: IdentityCardScan,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
schemeName:'',//保障方案
|
||||
schemeCode:'',
|
||||
productDate:'',//保险期间
|
||||
now: afterDate.getAfterDays(1), //指定生效日期最小值
|
||||
insuredSex: '男',
|
||||
isScan: false, //是否显示证件扫描组件
|
||||
allPrice: 0,
|
||||
result: [],
|
||||
checked: true,
|
||||
current:'userInfo',
|
||||
sexRadio: [
|
||||
{
|
||||
label: '男',
|
||||
value: '0'
|
||||
value: '0',
|
||||
},
|
||||
{
|
||||
label: '女',
|
||||
value: '1'
|
||||
}
|
||||
value: '1',
|
||||
},
|
||||
],
|
||||
medicalRadio: [
|
||||
{
|
||||
label: '有',
|
||||
value: '0'
|
||||
value: '0',
|
||||
},
|
||||
{
|
||||
label: '无',
|
||||
value: '1'
|
||||
}
|
||||
value: '1',
|
||||
},
|
||||
],
|
||||
maxDate: beforeDate.getBeforeYear(18), //投保人出生日期可选最大值
|
||||
insuredMaxDate: beforeDate.getBeforeDays(28), //被保人出生日期可选最大值
|
||||
@@ -354,12 +518,19 @@ export default {
|
||||
relationToInsured: '1',
|
||||
idType: '1', //证件类型
|
||||
idNo: '', //证件号码
|
||||
// homeProvince: '1', //家庭省
|
||||
// homeCity: '1', //家庭市
|
||||
// homeArea: '1', //家庭区
|
||||
// homeAddress: '1', //详细地址
|
||||
occupationCode:'',//职业代码
|
||||
occupationName:'',//职业名称
|
||||
lifeGrade:'',//寿险等级
|
||||
healthGrade:'',//健康等级
|
||||
nativeplace: '1', //国家地区
|
||||
marriageStatus:'',//婚姻状况
|
||||
homeProvince: '1', //家庭省
|
||||
homeCity: '1', //家庭市
|
||||
homeArea: '1', //家庭区
|
||||
homeName: '', //联系地址
|
||||
homeAddress: '', //详细地址
|
||||
mobile: '', //移动电话
|
||||
email: '' //电子邮箱
|
||||
email: '', //电子邮箱
|
||||
// effectiveDate: '' //指定生效日期
|
||||
},
|
||||
//被保人信息
|
||||
@@ -368,7 +539,20 @@ export default {
|
||||
idType: '1', //被保人证件类型
|
||||
idNo: '', //被保人证件号码
|
||||
sex: '0', //被保人性别
|
||||
birthday: '' //被保人出生日期
|
||||
birthday: '', //被保人出生日期
|
||||
occupationCode:'',//职业代码
|
||||
occupationName:'',//职业名称
|
||||
lifeGrade:'',//寿险等级
|
||||
healthGrade:'',//健康等级
|
||||
nativeplace: '1', //国家地区
|
||||
marriageStatus:'',//婚姻状况
|
||||
homeProvince: '1', //家庭省
|
||||
homeCity: '1', //家庭市
|
||||
homeArea: '1', //家庭区
|
||||
homeName: '', //联系地址
|
||||
homeAddress: '1', //详细地址
|
||||
mobile: '', //移动电话
|
||||
email: '', //电子邮箱
|
||||
},
|
||||
selectUser: '',
|
||||
areaList: areaList,
|
||||
@@ -379,7 +563,7 @@ export default {
|
||||
timeId: null,
|
||||
chooseProducts: JSON.parse(localStorage.chooseProducts),
|
||||
trialList: JSON.parse(localStorage.trialList),
|
||||
pdf: ['', '', '']
|
||||
pdf: ['', '', ''],
|
||||
}
|
||||
},
|
||||
created() {
|
||||
@@ -417,13 +601,12 @@ export default {
|
||||
type: '1',
|
||||
orderDTO: {
|
||||
orderInfoDTO: {
|
||||
orderNo: orderNo
|
||||
}
|
||||
}
|
||||
orderNo: orderNo,
|
||||
},
|
||||
},
|
||||
}
|
||||
underWrite(data)
|
||||
.then(res => {
|
||||
console.log(res);
|
||||
underWrite(data).then((res) => {
|
||||
console.log(res)
|
||||
if (res.result == '0') {
|
||||
this.$toast.clear()
|
||||
if (res.uwResult == '33') {
|
||||
@@ -437,11 +620,11 @@ export default {
|
||||
flag: 'h5',
|
||||
extra: {
|
||||
url: location.origin + `/#/cardList/pay`,
|
||||
forbidSwipeBack: 1
|
||||
forbidSwipeBack: 1,
|
||||
},
|
||||
routerInfo: {
|
||||
path: `/cardList/pay`
|
||||
}
|
||||
path: `/cardList/pay`,
|
||||
},
|
||||
})
|
||||
return true
|
||||
} else {
|
||||
@@ -459,11 +642,11 @@ export default {
|
||||
extra: {
|
||||
title: name,
|
||||
// url: 'http://47.96.143.111/pdfjs/web/viewer.html?file=' + url //测试代码
|
||||
url: location.origin + '/#/cardList/ShowPDF'
|
||||
url: location.origin + '/#/cardList/ShowPDF',
|
||||
},
|
||||
routerInfo: {
|
||||
path: '/cardList/ShowPDF'
|
||||
}
|
||||
path: '/cardList/ShowPDF',
|
||||
},
|
||||
})
|
||||
},
|
||||
//监听名字变化
|
||||
@@ -504,8 +687,8 @@ export default {
|
||||
flag: 'navigation',
|
||||
extra: {
|
||||
title: '投被保人信息',
|
||||
hiddenRight: '1'
|
||||
}
|
||||
hiddenRight: '1',
|
||||
},
|
||||
})
|
||||
if (this.currentPopupIndex == 1) {
|
||||
if (this.selectUser == '1') {
|
||||
@@ -524,8 +707,8 @@ export default {
|
||||
flag: 'navigation',
|
||||
extra: {
|
||||
title: '投被保人信息',
|
||||
hiddenRight: '1'
|
||||
}
|
||||
hiddenRight: '1',
|
||||
},
|
||||
})
|
||||
this.occupationShowPicker = false
|
||||
},
|
||||
@@ -544,7 +727,7 @@ export default {
|
||||
} else if (pickerType == '4') {
|
||||
this.columns = [
|
||||
{ id: 0, text: '有' },
|
||||
{ id: 1, text: '无' }
|
||||
{ id: 1, text: '无' },
|
||||
]
|
||||
} else if (pickerType == '5') {
|
||||
this.columns = DataDictionary.taxIdentity
|
||||
@@ -556,8 +739,17 @@ export default {
|
||||
this.columns = DataDictionary.salarySource
|
||||
} else if (pickerType == '9') {
|
||||
this.columns = DataDictionary.relationToAppnt
|
||||
} else if (pickerType == '10') {
|
||||
this.columns = DataDictionary.marriage
|
||||
} else if (pickerType == '11') {
|
||||
this.columns = DataDictionary.insuredIdType
|
||||
} else if (pickerType == '12') {
|
||||
this.trialList.forEach((item)=>{
|
||||
this.columns.push({
|
||||
id:schemeCode,
|
||||
text:item.schemeName
|
||||
})
|
||||
})
|
||||
}
|
||||
},
|
||||
//确认选择字段
|
||||
@@ -582,14 +774,21 @@ export default {
|
||||
this.userInfo.taxResidentId = value.id
|
||||
} else if (this.pickerType == '6') {
|
||||
this.userInfo.marriage = value.id
|
||||
this.userInfo.marriageStatus = value.text
|
||||
} else if (this.pickerType == '7') {
|
||||
this.userInfo.jobStatus = value.id
|
||||
} else if (this.pickerType == '8') {
|
||||
this.userInfo.salarySource = value.id
|
||||
} else if (this.pickerType == '9') {
|
||||
this.userInfo.relationToInsured = value.id
|
||||
} else if (this.pickerType == '10') {
|
||||
this.insuredInfo.marriage = value.text
|
||||
this.insuredInfo.marriageStatus = value.text
|
||||
} else if (this.pickerType == '11') {
|
||||
this.insuredInfo.idType = value.id
|
||||
} else if (this.pickerType == '12') {
|
||||
this.schemeName = value.text
|
||||
this.schemeCode = value.id
|
||||
}
|
||||
},
|
||||
//证件起始截止日期
|
||||
@@ -695,6 +894,15 @@ export default {
|
||||
// this.$refs.birthday.date = ''
|
||||
// return this.$toast('当前日期早于当日')
|
||||
// }
|
||||
// console.log(val)
|
||||
// console.log(Date.parse(val))
|
||||
// console.log(new Date())
|
||||
// let str = '',flag='',date='',valArr=val.split('-');
|
||||
// switch (flag){
|
||||
// case 'd':
|
||||
// str = valArr[2]+date
|
||||
// break;
|
||||
// }
|
||||
}
|
||||
break
|
||||
}
|
||||
@@ -715,8 +923,8 @@ export default {
|
||||
flag: 'navigation',
|
||||
extra: {
|
||||
title: '投被保人信息',
|
||||
hiddenRight: '1'
|
||||
}
|
||||
hiddenRight: '1',
|
||||
},
|
||||
})
|
||||
if (this.selectUser == '0') {
|
||||
let { customerName, customerSex } = data
|
||||
@@ -724,19 +932,26 @@ export default {
|
||||
this.userInfo.sex = customerSex ? customerSex.toString() : '0' //性别
|
||||
this.userInfo.birthday = data.birthday //出生日期
|
||||
if (data.customerIdType == 1) {
|
||||
console.log(data)
|
||||
this.userInfo.idType = data.customerIdType //证件类型
|
||||
this.userInfo.idNo = data.customerIdNumber //证件类别
|
||||
}
|
||||
this.userInfo.email = data.email //邮箱
|
||||
|
||||
this.userInfo.mobile = data.customerPhone //移动电话
|
||||
// this.userInfo.homeProvince = data.homeProvince //家庭省
|
||||
// this.userInfo.homeCity = data.homeCity //家庭市
|
||||
// this.userInfo.homeArea = data.homeArea //家庭区
|
||||
// if (data.homeProvince && data.homeCity && data.homeArea) {
|
||||
// this.homeName = getAreaName([{ code: data.homeProvince }, { code: data.homeCity }, { code: data.homeArea }]) //家庭地址
|
||||
// }
|
||||
// this.userInfo.homeAddress = data.homeAddress //家庭详细地址
|
||||
this.userInfo.homeProvince = data.homeProvince //家庭省
|
||||
this.userInfo.homeCity = data.homeCity //家庭市
|
||||
this.userInfo.homeArea = data.homeArea //家庭区
|
||||
if (data.homeProvince && data.homeCity && data.homeArea) {
|
||||
this.userInfo.homeName = getAreaName([{ code: data.homeProvince }, { code: data.homeCity }, { code: data.homeArea }]) //家庭地址
|
||||
}
|
||||
this.userInfo.homeAddress = data.homeAddress //家庭详细地址
|
||||
this.userInfo.occupationCode = data.occupationCode
|
||||
this.userInfo.occupationName = data.occupationName
|
||||
this.userInfo.lifeGrade = data.lifeGrade
|
||||
this.userInfo.healthGrade = data.healthGrade
|
||||
this.userInfo.nativeplace = data.country
|
||||
this.userInfo.marriage = data.marryStatus
|
||||
|
||||
// 计算年龄
|
||||
// let age = utilsAge.getAge(this.userInfo.birthday, new Date())
|
||||
@@ -772,7 +987,7 @@ export default {
|
||||
Object.assign(this.insuredInfo, this.userInfo)
|
||||
}
|
||||
|
||||
this.$validator.validate().then(valid => {
|
||||
this.$validator.validate().then((valid) => {
|
||||
if (true === valid) {
|
||||
// localStorage.chooseProductCodesNew = localStorage.chooseProductCodes
|
||||
//投保人校验
|
||||
@@ -987,16 +1202,16 @@ export default {
|
||||
let params = {
|
||||
orderDTO: {
|
||||
orderInfoDTO: {
|
||||
bnfFlag: '0'
|
||||
bnfFlag: '0',
|
||||
// cvaliDate: this.cvaliDate
|
||||
},
|
||||
appntDTO: {},
|
||||
insuredDTOs: [
|
||||
{
|
||||
riskDTOLst: this.riskDTOLst
|
||||
}
|
||||
]
|
||||
}
|
||||
riskDTOLst: this.riskDTOLst,
|
||||
},
|
||||
],
|
||||
},
|
||||
}
|
||||
params.orderDTO.appntDTO = this.userInfo
|
||||
params.orderDTO.insuredDTOs = [this.insuredInfo]
|
||||
@@ -1019,7 +1234,7 @@ export default {
|
||||
standPrem: this.trialList[index] && this.trialList[index].standPrem,
|
||||
predictTransferPrem: item.predictTransferPrem,
|
||||
thirdInsuraceNo: this.policyNo,
|
||||
mult: this.mult
|
||||
mult: this.mult,
|
||||
}
|
||||
if (item.hasPredictTransferPrem && item.hasPredictTransferPrem === '0') {
|
||||
//增加万能险 预计转入保费校验
|
||||
@@ -1070,10 +1285,9 @@ export default {
|
||||
// localStorage.saleInsuredInfo = JSON.stringify(this.userInfo)
|
||||
// console.log(this.userInfo)
|
||||
|
||||
let orderNo = localStorage.orderNo = resultData.content.object
|
||||
|
||||
let orderNo = (localStorage.orderNo = resultData.content.object)
|
||||
|
||||
this.underWrite(orderNo)
|
||||
|
||||
} else {
|
||||
console.error(resultData.resultMessage)
|
||||
this.$toast(resultData.resultMessage)
|
||||
@@ -1088,7 +1302,7 @@ export default {
|
||||
this.areaShow = false
|
||||
break
|
||||
case '2': //家庭地址
|
||||
this.homeName = getAreaName(area)
|
||||
this.userInfo.homeName = getAreaName(area)
|
||||
;[this.userInfo.homeProvince, this.userInfo.homeCity, this.userInfo.homeArea] = [area[0].code, area[1].code, area[2].code]
|
||||
this.homeShow = false
|
||||
break
|
||||
@@ -1147,7 +1361,7 @@ export default {
|
||||
this.insuredInfo.birthday = idToData(val).birthday
|
||||
this.insuredInfo.sex = idToData(val).sex
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
// beforeDestroy() {
|
||||
// //清理计时器
|
||||
@@ -1166,9 +1380,9 @@ export default {
|
||||
}
|
||||
},
|
||||
immediate: true,
|
||||
deep: true
|
||||
}
|
||||
}
|
||||
deep: true,
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
<style lang="scss">
|
||||
@@ -1187,4 +1401,9 @@ export default {
|
||||
.van-checkbox__label {
|
||||
font-size: 13px;
|
||||
}
|
||||
.tips {
|
||||
font-size: 14px;
|
||||
color: #333;
|
||||
padding: 15px;
|
||||
}
|
||||
</style>
|
||||
|
||||
134
src/views/ebiz/cardList/phoneCode.vue
Normal file
134
src/views/ebiz/cardList/phoneCode.vue
Normal file
@@ -0,0 +1,134 @@
|
||||
<template>
|
||||
<div>
|
||||
<van-notice-bar
|
||||
wrapable
|
||||
:scrollable="false"
|
||||
text="特别提示:国富人寿为保证您的投保安全,请您点击发送验证码至投保人手机号,输入正确的验证码后点击下一步进入投保流程。"
|
||||
/>
|
||||
<van-field
|
||||
:value="userInfo.mobile | filterMobile"
|
||||
clearable
|
||||
label="投保人手机号"
|
||||
name="投保人手机号"
|
||||
placeholder="请输入手机号"
|
||||
v-validate="'required|mobile'"
|
||||
maxlength="11"
|
||||
/>
|
||||
<van-field v-model="userInfo.authCode" center clearable label="" name="短信验证码" placeholder="请输入短信验证码" v-validate="'required'" maxlength="6">
|
||||
<van-button slot="button" size="small" type="danger" @click="getCode()" :disabled="codeDisabled" v-no-more-click="2000">{{
|
||||
codeDisabled ? `${countDown}s后重新获取` : '发送验证码'
|
||||
}}</van-button>
|
||||
</van-field>
|
||||
<div class="bg-white bottom-btn"><van-button type="danger" size="large" @click="nextStep" v-no-more-click="1000">下一步</van-button></div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { NoticeBar, Field, Button } from 'vant'
|
||||
import { getOrderDetail, getAuthCode, autchCodeCheck } from '@/api/ebiz/sale/sale'
|
||||
export default {
|
||||
name: 'phoneCode',
|
||||
components: {
|
||||
[NoticeBar.name]: NoticeBar,
|
||||
[Field.name]: Field,
|
||||
[Button.name]: Button,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
orderNo: this.$route.query.orderNo,
|
||||
isWeixin: this.$utils.device().isWeixin,
|
||||
userInfo: {},
|
||||
codeDisabled: false,
|
||||
countDown: 60,
|
||||
timeId: null,
|
||||
sessionId: '',
|
||||
}
|
||||
},
|
||||
created() {
|
||||
console.log(this.$route.query)
|
||||
// if(isWeixin){
|
||||
|
||||
// }
|
||||
if (this.$route.query.token) {
|
||||
localStorage.token = this.$route.query.token
|
||||
this.init()
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
init() {
|
||||
localStorage.orderNo = this.$route.query.orderNo;
|
||||
this.getOrderDetail()
|
||||
},
|
||||
nextStep() {
|
||||
autchCodeCheck({
|
||||
smsId: this.sessionId,
|
||||
code: this.userInfo.authCode,
|
||||
}).then((res) => {
|
||||
if (res.result == 0) {
|
||||
this.$jump({
|
||||
flag: 'h5',
|
||||
extra: {
|
||||
url: location.origin + `/#/cardList/cardDetail`,
|
||||
},
|
||||
routerInfo: {
|
||||
path: `/cardList/cardDetail`,
|
||||
},
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
getCode() {
|
||||
if (this.userInfo.mobile == '') {
|
||||
return this.$toast('请填写移动电话')
|
||||
}
|
||||
let data = {
|
||||
operateType: 'appntInfoEntry',
|
||||
type: 'H5',
|
||||
operateCode: this.userInfo.mobile,
|
||||
system: 'agentApp',
|
||||
operateCodeType: '0',
|
||||
}
|
||||
//获取验证码
|
||||
getAuthCode(data).then((res) => {
|
||||
console.log(res)
|
||||
if (res.result == 0) {
|
||||
this.sessionId = res.sessionId
|
||||
this.codeDisabled = true
|
||||
//倒计时
|
||||
this.timeId = setInterval(() => {
|
||||
this.countDown--
|
||||
if (this.countDown <= 0) {
|
||||
window.clearInterval(this.timeId)
|
||||
this.codeDisabled = false
|
||||
this.countDown = 60
|
||||
}
|
||||
}, 1000)
|
||||
} else {
|
||||
this.$toast(res.resultMessage)
|
||||
}
|
||||
})
|
||||
},
|
||||
// 获取订单详情
|
||||
getOrderDetail() {
|
||||
getOrderDetail({ orderNo: this.orderNo }).then((res) => {
|
||||
console.log('getOrderDetail', res)
|
||||
if (res.result == '0') {
|
||||
this.userInfo = res.orderDTO.appntDTO
|
||||
sessionStorage.orderDetail =JSON.stringify(res.orderDTO);
|
||||
this.$store.commit('setOrderDetail', res.orderDTO)
|
||||
} else {
|
||||
// window.localStorage.setItem('underWriteData', JSON.stringify(underWriteData))
|
||||
this.$toast(res.resultMessage)
|
||||
}
|
||||
})
|
||||
},
|
||||
},
|
||||
filters: {
|
||||
filterMobile(val) {
|
||||
if (val == undefined) return ''
|
||||
if (val.length != 11) return val
|
||||
return val.slice(0, 3) + '****' + val.slice(-4)
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
@@ -15,19 +15,19 @@
|
||||
</div>
|
||||
<div class="bottom-area bottom-btn">
|
||||
<van-button type="danger" size="large" @click="gotoInformation" v-if="shareInfo.isShare != '2'">下一步</van-button>
|
||||
<van-button type="danger" size="large" @click="shareItem" :disabled="shareInfo.shareFlag" v-if="shareInfo.isShare == '2'">分享</van-button>
|
||||
<van-button type="danger" size="large" @click="shareItem" :disabled="shareInfo.shareFlag" v-if="shareInfo.isShare == '2'">分享</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { Cell, Toast } from 'vant'
|
||||
import { Cell, Toast, Dialog } from 'vant'
|
||||
import { getProductDetails, getProductInfo, insureTrial } from '@/api/ebiz/cardList/cardList.js'
|
||||
import { getAgentInfo } from '@/api/ebiz/my/my.js'
|
||||
export default {
|
||||
name: 'Chanpingxiangqing.vue',
|
||||
components: {
|
||||
[Cell.name]: Cell
|
||||
[Cell.name]: Cell,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@@ -40,8 +40,8 @@ export default {
|
||||
shareInfo: {
|
||||
isShare: '',
|
||||
shareURL: '',
|
||||
shareFlag: true
|
||||
}
|
||||
shareFlag: true,
|
||||
},
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
@@ -61,11 +61,11 @@ export default {
|
||||
extra: {
|
||||
title: name,
|
||||
// url: 'http://47.96.143.111/pdfjs/web/viewer.html?file=' + url //测试代码
|
||||
url: location.origin + '/#/cardList/ShowPDF'
|
||||
url: location.origin + '/#/cardList/ShowPDF',
|
||||
},
|
||||
routerInfo: {
|
||||
path: '/cardList/ShowPDF'
|
||||
}
|
||||
path: '/cardList/ShowPDF',
|
||||
},
|
||||
})
|
||||
// 跳转到产品资料详情
|
||||
// 保存url
|
||||
@@ -84,23 +84,37 @@ export default {
|
||||
// })
|
||||
},
|
||||
gotoInformation() {
|
||||
this.$jump({
|
||||
flag: 'h5',
|
||||
extra: {
|
||||
url: location.origin + '/#/cardList/information'
|
||||
},
|
||||
routerInfo: {
|
||||
path: '/cardList/information'
|
||||
}
|
||||
Dialog.confirm({
|
||||
title: '温馨提示',
|
||||
messageAlign:'left',
|
||||
confirmButtonColor:'#ee0a24',
|
||||
confirmButtonText:'立即投保',
|
||||
cancelButtonText:'返回',
|
||||
message: `1、您即将进入投保流程,为维护您的合法权益,投保时请您务必仔细阅读和确认保险条款、投保须知、免除保险人责任条款、犹豫期条款等页面所有内容。<br/>2.您的投保过程和操作将被记录。`,
|
||||
})
|
||||
.then(() => {
|
||||
// on confirm
|
||||
this.$jump({
|
||||
flag: 'h5',
|
||||
extra: {
|
||||
url: location.origin + '/#/cardList/information',
|
||||
},
|
||||
routerInfo: {
|
||||
path: '/cardList/information',
|
||||
},
|
||||
})
|
||||
})
|
||||
.catch(() => {
|
||||
// on cancel
|
||||
})
|
||||
},
|
||||
async getData(code) {
|
||||
let data = {
|
||||
itemCode: code,
|
||||
platform: 'app'
|
||||
platform: 'app',
|
||||
}
|
||||
await getProductDetails(data)
|
||||
.then(res => {
|
||||
.then((res) => {
|
||||
if (res.result == 0) {
|
||||
// 获取产品特色图片
|
||||
this.introductImages = res.productShowInfo.introductImages
|
||||
@@ -108,18 +122,18 @@ export default {
|
||||
this.docuList = res.productShowInfo.documents
|
||||
this.productInfo = res.productShowInfo.itemProductDTOS[0]
|
||||
this.shareInfo.isShare = res.productShowInfo.itemProductBaseInfoDTO.itemType
|
||||
this.shareInfo.shareURL = res.productShowInfo.itemProductBaseInfoDTO.itemDesc + '';
|
||||
this.shareInfo.shareURL = res.productShowInfo.itemProductBaseInfoDTO.itemDesc + ''
|
||||
this.productCode = res.productShowInfo.itemProductDTOS[0].productCode
|
||||
this.results = res.productShowInfo.itemProductDTOS[0]
|
||||
} else {
|
||||
Toast.fail(res.resultMessage)
|
||||
}
|
||||
})
|
||||
.catch(err => {
|
||||
.catch((err) => {
|
||||
console.log('errerr', err)
|
||||
})
|
||||
if(this.shareInfo.isShare == '2'){
|
||||
const resAgent = await getAgentInfo({});
|
||||
if (this.shareInfo.isShare == '2') {
|
||||
const resAgent = await getAgentInfo({})
|
||||
if (resAgent.result == 0) {
|
||||
this.shareInfo.shareURL = this.shareInfo.shareURL
|
||||
this.shareInfo.shareFlag = false
|
||||
@@ -131,11 +145,11 @@ export default {
|
||||
EWebBridge.webCallAppInJs('bridge', {
|
||||
flag: 'share',
|
||||
extra: {
|
||||
title: '分享给您一个产品《'+this.productInfo.productName+'》',
|
||||
title: '分享给您一个产品《' + this.productInfo.productName + '》',
|
||||
content: '快来投保吧!',
|
||||
url: this.shareInfo.shareURL,
|
||||
img: this.$assetsUrl + 'images/logo.png'
|
||||
}
|
||||
img: this.$assetsUrl + 'images/logo.png',
|
||||
},
|
||||
})
|
||||
},
|
||||
async getProductDetail() {
|
||||
@@ -144,17 +158,17 @@ export default {
|
||||
let data = {
|
||||
platform: 'app',
|
||||
productCodes: [that.productCode],
|
||||
type: '1'
|
||||
type: '1',
|
||||
}
|
||||
console.log('data', data)
|
||||
await getProductInfo(data)
|
||||
.then(res => {
|
||||
.then((res) => {
|
||||
if (res.result == 0) {
|
||||
this.trialInfos = res.trialDTOS[0].productTrialInfoDTO
|
||||
console.log('this.trialInfos', this.trialInfos)
|
||||
let resultData = res.trialDTOS[0]
|
||||
if (resultData.productTrialInfoDTO.dutyGroup != null) {
|
||||
resultData.productTrialInfoDTO.dutyGroup.map(item => {
|
||||
resultData.productTrialInfoDTO.dutyGroup.map((item) => {
|
||||
if (item.dutyName == '意外身故/伤残保险金') {
|
||||
item.defaultDutyAmt = '50'
|
||||
}
|
||||
@@ -180,7 +194,7 @@ export default {
|
||||
influences: resultData.productTrialInfoDTO.influences,
|
||||
isRemit: resultData.productTrialInfoDTO.isRemit,
|
||||
hasPredictTransferPrem: resultData.productTrialInfoDTO.hasPredictTransferPrem, //建议书使用 是否展示预计转入保费
|
||||
predictTransferPrem: null //建议书使用 预计转入保费字段
|
||||
predictTransferPrem: null, //建议书使用 预计转入保费字段
|
||||
}
|
||||
|
||||
//构建险种数组
|
||||
@@ -199,7 +213,7 @@ export default {
|
||||
Toast.fail(res.resultMessage)
|
||||
}
|
||||
})
|
||||
.catch(err => {
|
||||
.catch((err) => {
|
||||
console.log('errerr', err)
|
||||
})
|
||||
},
|
||||
@@ -207,11 +221,11 @@ export default {
|
||||
let that = this
|
||||
// 获取卡单列表
|
||||
let data = {
|
||||
trialInfos: [{ productCode: that.productCode }]
|
||||
trialInfos: [{ productCode: that.productCode }],
|
||||
}
|
||||
|
||||
insureTrial(data)
|
||||
.then(res => {
|
||||
.then((res) => {
|
||||
console.log('resrrrrrr', res)
|
||||
if (res.result == 0) {
|
||||
localStorage.trialList = JSON.stringify(res.trialList)
|
||||
@@ -219,7 +233,7 @@ export default {
|
||||
Toast.fail(res.resultMessage)
|
||||
}
|
||||
})
|
||||
.catch(err => {
|
||||
.catch((err) => {
|
||||
console.log('errerr', err)
|
||||
})
|
||||
},
|
||||
@@ -230,12 +244,12 @@ export default {
|
||||
let calFactorLst = resultData.productTrialInfoDTO.calFactorLst
|
||||
console.log('calFactorLst', calFactorLst)
|
||||
|
||||
calFactorLst.forEach(item => {
|
||||
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 => {
|
||||
productTrialInfoDTO[item.code].forEach((factor) => {
|
||||
if (factor.defaultValue == 0) {
|
||||
item.showContent = factor.showContent
|
||||
if (factor[item.code + 'Flag'] != undefined) {
|
||||
@@ -250,7 +264,7 @@ export default {
|
||||
})
|
||||
} else if (item.type == 1) {
|
||||
//按年龄选择
|
||||
productTrialInfoDTO[item.code].forEach(factor => {
|
||||
productTrialInfoDTO[item.code].forEach((factor) => {
|
||||
item = Object.assign(item, factor)
|
||||
})
|
||||
if (item.code == 'inputPrem') {
|
||||
@@ -271,11 +285,13 @@ export default {
|
||||
// }
|
||||
// })
|
||||
return calFactorLst
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
</style>
|
||||
<style lang="scss" scoped>
|
||||
img {
|
||||
width: 100%;
|
||||
|
||||
@@ -32,5 +32,8 @@ module.exports = {
|
||||
// options[0].fileBlacklist.push(/myasyncRoute(.)+?\.js$/)
|
||||
// return options
|
||||
// })
|
||||
},
|
||||
devServer: {
|
||||
port: 8082,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user