'无忧卡新原型页面'

This commit is contained in:
proudlx
2021-04-01 09:39:46 +08:00
parent b9e0f704ad
commit 934e1dcd5d
13 changed files with 1065 additions and 253 deletions

View File

@@ -133,6 +133,10 @@ service.interceptors.request.use(
message: '加载中……' 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)) res = JSON.parse(AESTools.AESDecrypt(res.response, configApp.REQ_PWD))
} }
} }
console.log('请求结果')
console.log(response)
console.log(res)
Toast.clear() Toast.clear()
if (res.code != 0) { if (res.code != 0) {
if (res.code == 10001 || res.code == 10002) { if (res.code == 10001 || res.code == 10002) {

View File

@@ -7,6 +7,9 @@ const payResult = () => import('@/views/ebiz/cardList/PayResult')
const paySuccess = () => import('@/views/ebiz/cardList/PaySuccess') const paySuccess = () => import('@/views/ebiz/cardList/PaySuccess')
const payLoser = () => import('@/views/ebiz/cardList/PayLoser') const payLoser = () => import('@/views/ebiz/cardList/PayLoser')
const ShowPDF = () => import('@/views/ebiz/cardList/ShowPDF') 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 [ export default [
{ {
@@ -80,6 +83,33 @@ export default [
title: '', title: '',
index: 7 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
}
},
] ]

View File

@@ -19,9 +19,14 @@ export default new Vuex.Store({
eodrApplyNo: '', //保全-保全受理号 eodrApplyNo: '', //保全-保全受理号
agentGrade: '', //用户的agentGrade判断用户权限 agentGrade: '', //用户的agentGrade判断用户权限
secondManageCode: '', //内勤所需参数 secondManageCode: '', //内勤所需参数
thirdManageCode: '' //内勤所需参数 thirdManageCode: '' ,//内勤所需参数
orderDetail:{},//无优卡分享微信端订单信息
}, },
mutations: { mutations: {
setOrderDetail(state,data){
console.log('更新订单信息')
state.orderDetail = data;
},
setThirdManageCode(state, code) { setThirdManageCode(state, code) {
state.thirdManageCode = code state.thirdManageCode = code
}, },

View File

@@ -2,7 +2,10 @@
<div class="pay"> <div class="pay">
<div v-if="!isScan"> <div v-if="!isScan">
<van-cell-group> <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-field :value="underWriteData.orderAmount == undefined ? '' : `${underWriteData.orderAmount} 元`" readonly label="支付金额" />
</van-cell-group> </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> <van-radio-group v-model="radio" class="flex justify-content-fe"><van-radio name="1"></van-radio></van-radio-group>
</div> </div>
</div> --> </div> -->
<van-cell-group class="flex align-items-c"> <div v-if="isWeixin">
<img :src="src" class="pl10" /> <van-cell-group class="flex align-items-c">
<van-cell title="银行卡支付" clickable> <img :src="src" class="pl10" />
<!-- <van-checkbox v-model="checked" class="flex justify-content-fe"></van-checkbox> --> <van-cell title="银行卡支付" clickable>
<van-radio-group v-model="radio" :disabled="noEdit" class="flex justify-content-fe"> <!-- <van-checkbox v-model="checked" class="flex justify-content-fe"></van-checkbox> -->
<van-radio name=""></van-radio> <van-radio-group v-model="radio" class="flex justify-content-fe">
</van-radio-group> <van-radio name=""></van-radio>
</van-cell> </van-radio-group>
</van-cell-group> </van-cell>
<van-cell-group class="flex align-items-c"> </van-cell-group>
<img :src="vxSrc" class="vximg" /> <van-cell-group class="flex align-items-c">
<van-cell title="微信支付" clickable> <img :src="vxSrc" class="vximg" />
<van-radio-group v-model="radio" :disabled="noEdit" class="flex justify-content-fe"> <van-cell title="微信支付" clickable>
<van-radio name="3" @click="vxVerify"></van-radio> <van-radio-group v-model="radio" class="flex justify-content-fe">
</van-radio-group> <van-radio name="3" @click="vxVerify"></van-radio>
</van-cell> </van-radio-group>
</van-cell-group> </van-cell>
</van-cell-group>
</div>
<!-- 银行卡支付结束 --> <!-- 银行卡支付结束 -->
<van-cell-group v-if="radio != '3'"> <van-cell-group v-if="radio != '3'">
<van-field <van-field
v-model="underWriteData.name" v-model="underWriteData.appntName"
label="姓名" label="姓名"
name="姓名" name="姓名"
readonly readonly
@@ -46,7 +51,7 @@
required required
/> />
<template v-if="noEdit"> <!-- <template v-if="noEdit">
<van-field <van-field
v-model="underWriteData.bankCode" v-model="underWriteData.bankCode"
maxlength="19" maxlength="19"
@@ -71,8 +76,8 @@
data-vv-name="开户银行" data-vv-name="开户银行"
required required
/> />
</template> </template> -->
<template v-else> <template>
<van-field <van-field
v-model="underWriteData.bankCode" v-model="underWriteData.bankCode"
maxlength="19" maxlength="19"
@@ -139,24 +144,24 @@
<input name="ReqReserved5" type="hidden" v-model="payParam.ReqReserved5" /> <input name="ReqReserved5" type="hidden" v-model="payParam.ReqReserved5" />
<input name="S3Sign" type="hidden" v-model="payParam.S3Sign" /> <input name="S3Sign" type="hidden" v-model="payParam.S3Sign" />
</form> </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="!isWeixin">
<div class="bg-white bottom-btn" v-if="radio == '3' && !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: 50vw;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>
<van-button type="danger" style="width: 50vw;height: 13vw" @click="share" v-no-more-click="1000">分享</van-button>
</div> </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> </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> <BankCardScan :scanShow="isScan" :clear="isClear" @getScanInfo="getBankCardInfo"></BankCardScan>
</van-popup> </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-list>
<van-cell v-for="item in bankList" :key="item.code" :title="item.bankName" class="text-center" @click="clickList(item.bankName, item.code)" /> <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-list>
</van-popup> </van-popup>
<!-- 分享到微信的页面loading --> <!-- 分享到微信的页面loading -->
<Loading :isLoading="isLoading"></Loading> <!-- <Loading :isLoading="isLoading"></Loading> -->
</div> </div>
</template> </template>
@@ -182,7 +187,7 @@ export default {
[Cell.name]: Cell, [Cell.name]: Cell,
[RadioGroup.name]: RadioGroup, [RadioGroup.name]: RadioGroup,
[Radio.name]: Radio, [Radio.name]: Radio,
Loading Loading,
}, },
data() { data() {
let isWeixin = this.$utils.device().isWeixin //判断环境 let isWeixin = this.$utils.device().isWeixin //判断环境
@@ -199,7 +204,7 @@ export default {
orderAmount: '', //支付金额 orderAmount: '', //支付金额
name: '', name: '',
bankCode: '', //银行卡号 bankCode: '', //银行卡号
bankName: '' //开户银行 bankName: '', //开户银行
}, },
radio: '3', radio: '3',
result: [], result: [],
@@ -244,42 +249,46 @@ export default {
ReqReserved4: '', // 备用字段4 ReqReserved4: '', // 备用字段4
ReqReserved5: '', // 备用字段5 ReqReserved5: '', // 备用字段5
S3Sign: '', // 验签信息 S3Sign: '', // 验签信息
tradeState: '' // 状态 tradeState: '', // 状态
}, },
gotPayParam: false, // 是否已正确获取支付参数, gotPayParam: false, // 是否已正确获取支付参数,
payStatus: '', // 接口返回的支付状态 payStatus: '', // 接口返回的支付状态
noEdit: true, //是否为编辑 noEdit: true, //是否为编辑
isWeixin, // 是否为微信环境 isWeixin, // 是否为微信环境
isLoading: false // 分享到微信后的页面loading isLoading: false, // 分享到微信后的页面loading
} }
}, },
created() { created() {
if (this.isWeixin) { if (this.isWeixin) {
this.radio = '3' let orderDetail = JSON.parse(sessionStorage.orderDetail)
let token = this.$route.query.token this.underWriteData.riskName = orderDetail.insuredDTOs[0].riskDTOLst[0].riskName
let orderNo = this.$route.query.orderNo this.underWriteData.appntName = orderDetail.appntDTO.name
localStorage.token = token this.underWriteData.insuredName = orderDetail.insuredDTOs[0].name
localStorage.orderNo = orderNo this.underWriteData.orderAmount = orderDetail.insuredDTOs[0].riskDTOLst[0].prem
this.isLoading = true this.orderStatus = orderDetail.orderInfoDTO.orderStatus
this.$toast.loading({ this.underWriteData.idType = orderDetail.appntDTO.idType
duration: 0, // 持续展示 toast // this.radio = '3'
forbidClick: true, // 禁用背景点击 // this.isLoading = true
loadingType: 'spinner', // this.$toast.loading({
message: '加载中……' // duration: 0, // 持续展示 toast
}) // forbidClick: true, // 禁用背景点击
setTimeout(() => { // loadingType: 'spinner',
this.pay() // message: '加载中……'
}, 500) // })
// setTimeout(() => {
// this.pay()
// }, 500)
} else {
// 再次支付 调详情 获取信息
this.getOrderDetail()
} }
// 再次支付 调详情 获取信息
this.getOrderDetail()
}, },
mounted() { mounted() {
setTimeout(() => { setTimeout(() => {
// eslint-disable-next-line no-undef // eslint-disable-next-line no-undef
EWebBridge.webCallAppInJs('webview_left_button', { EWebBridge.webCallAppInJs('webview_left_button', {
img: this.$assetsUrl + 'images/del-close-btn@3x.png', img: this.$assetsUrl + 'images/del-close-btn@3x.png',
intercept: '1' //是否拦截原生返回事件 1是 其他否 intercept: '1', //是否拦截原生返回事件 1是 其他否
}) })
}, 100) }, 100)
// window.appCallBack = this.appCallBack // window.appCallBack = this.appCallBack
@@ -287,27 +296,24 @@ export default {
// this.underWrite.orderAmount = this.trialList[0].prem // this.underWrite.orderAmount = this.trialList[0].prem
document.body.style.backgroundColor = '#fff' document.body.style.backgroundColor = '#fff'
window.appCallBack = this.appCallBack window.appCallBack = this.appCallBack
// 不在微信环境下
// if (!this.isWeixin) {
// 获取银行卡 // 获取银行卡
this.getBankList() this.getBankList()
// this.getOrderDetail() // 不在微信环境下
// console.log('----保融form.action', config.payUrl) if (!this.isWeixin) {
// if (localStorage.salelist == '1') { // this.getOrderDetail()
// 第一次支付 调核保获取 // console.log('----保融form.action', config.payUrl)
// this.underWrite() // if (localStorage.salelist == '1') {
// this.underWriteData = JSON.parse(window.localStorage.getItem('underWriteData')) // 第一次支付 调核保获取
// } else { // this.underWrite()
// 再次支付 调详情 获取信息 // this.underWriteData = JSON.parse(window.localStorage.getItem('underWriteData'))
this.getOrderDetail() // } else {
// this.underWriteData = JSON.parse(window.localStorage.getItem('underWriteData')) // 再次支付 调详情 获取信息
// } this.getOrderDetail()
// console.log('--自核结果--支付信息:', JSON.stringify(this.underWriteData)) // this.underWriteData = JSON.parse(window.localStorage.getItem('underWriteData'))
this.getPayTemp() // }
// console.log('--自核结果--支付信息:', JSON.stringify(this.underWriteData))
this.getPayTemp()
// } }
}, },
beforeRouteLeave(to, from, next) { beforeRouteLeave(to, from, next) {
document.body.style.backgroundColor = '' document.body.style.backgroundColor = ''
@@ -317,7 +323,7 @@ export default {
setTimeout(() => { setTimeout(() => {
// eslint-disable-next-line no-undef // eslint-disable-next-line no-undef
EWebBridge.webCallAppInJs('webview_left_button', { EWebBridge.webCallAppInJs('webview_left_button', {
intercept: '0' //是否拦截原生返回事件 1是 其他否 intercept: '0', //是否拦截原生返回事件 1是 其他否
}) })
// window.appCallBack = this.appCallBack // window.appCallBack = this.appCallBack
}, 100) }, 100)
@@ -331,7 +337,7 @@ export default {
title: '提示', title: '提示',
message: '是否确认退出?', message: '是否确认退出?',
cancelButtonColor: '#E9332E', cancelButtonColor: '#E9332E',
confirmButtonColor: '#FFFFFF' confirmButtonColor: '#FFFFFF',
}) })
.then(() => { .then(() => {
this.$jump({ this.$jump({
@@ -339,12 +345,12 @@ export default {
extra: { extra: {
title: '产品列表', title: '产品列表',
forbidSwipeBack: 1, //当前页面禁止右滑返回 forbidSwipeBack: 1, //当前页面禁止右滑返回
url: location.origin + `/#/cardList/CardTotreasure` url: location.origin + `/#/cardList/CardTotreasure`,
}, },
routerInfo: { routerInfo: {
path: `/cardList/CardTotreasure`, path: `/cardList/CardTotreasure`,
type: '1' type: '1',
} },
}) })
}) })
.catch(() => { .catch(() => {
@@ -356,8 +362,8 @@ export default {
flag: 'navigation', flag: 'navigation',
extra: { extra: {
title: '支付', title: '支付',
hiddenRight: '1' hiddenRight: '1',
} },
}) })
this.isScan = false this.isScan = false
} }
@@ -369,8 +375,8 @@ export default {
flag: 'navigation', flag: 'navigation',
extra: { extra: {
title: '账户信息', title: '账户信息',
hiddenRight: '1' hiddenRight: '1',
} },
}) })
this.isScan = false this.isScan = false
}, },
@@ -386,8 +392,8 @@ export default {
flag: 'navigation', flag: 'navigation',
extra: { extra: {
title, title,
hiddenLeft: '1' hiddenLeft: '1',
} },
}) })
this.closeBtn() this.closeBtn()
}, 400) }, 400)
@@ -400,10 +406,10 @@ export default {
btns: [ btns: [
{ {
img: this.$assetsUrl + 'images/del-close.png', img: this.$assetsUrl + 'images/del-close.png',
route: { flag: '', extra: {} } route: { flag: '', extra: {} },
} },
] ],
} },
}) })
}, },
// 获取银行列表的focus // 获取银行列表的focus
@@ -416,9 +422,9 @@ export default {
getBankList() { getBankList() {
let self = this let self = this
let data = { let data = {
operateType: 'bank_type' operateType: 'bank_type',
} }
getBankList(data).then(res => { getBankList(data).then((res) => {
if (res.result == '0') { if (res.result == '0') {
console.log('银行卡列表', res.content) console.log('银行卡列表', res.content)
self.bankList = res.content self.bankList = res.content
@@ -436,18 +442,18 @@ export default {
}, },
getPayTemp() { getPayTemp() {
getPayTemp({ orderNo: window.localStorage.getItem('orderNo') }) getPayTemp({ orderNo: window.localStorage.getItem('orderNo') })
.then(res => { .then((res) => {
if (res.result == '0') { if (res.result == '0') {
this.noEdit = res.content.flag != 'false' this.noEdit = res.content.flag != 'false'
} }
}) })
.catch(e => { .catch((e) => {
console.error(e) console.error(e)
}) })
}, },
// 再次支付 // 获取支付详情
getOrderDetail() { getOrderDetail() {
getOrderDetail({ orderNo: window.localStorage.getItem('orderNo') }).then(res => { getOrderDetail({ orderNo: window.localStorage.getItem('orderNo') }).then((res) => {
console.log('getOrderDetail', res) console.log('getOrderDetail', res)
if (res.result == '0') { if (res.result == '0') {
this.orderStatus = res.orderDTO.orderInfoDTO.orderStatus this.orderStatus = res.orderDTO.orderInfoDTO.orderStatus
@@ -465,8 +471,9 @@ export default {
this.$toast.clear() this.$toast.clear()
console.log(res.orderDTO.orderAccountDTO.bankCode) console.log(res.orderDTO.orderAccountDTO.bankCode)
this.underWriteData = { this.underWriteData = {
appntName: res.orderDTO.insuredDTOs[0].riskDTOLst[0].riskName, riskName: res.orderDTO.insuredDTOs[0].riskDTOLst[0].riskName,
name: res.orderDTO.appntDTO.name, appntName: res.orderDTO.appntDTO.name,
insuredName: res.orderDTO.insuredDTOs[0].name,
// bankName: res.orderDTO.orderAccountDTO.bankCode, // bankName: res.orderDTO.orderAccountDTO.bankCode,
// bankCode: res.orderDTO.orderAccountDTO.cardBookCode, // bankCode: res.orderDTO.orderAccountDTO.cardBookCode,
// cardBookCode: res.orderDTO.orderAccountDTO.cardBookCode, // cardBookCode: res.orderDTO.orderAccountDTO.cardBookCode,
@@ -475,7 +482,7 @@ export default {
orderNo: res.orderDTO.orderAccountDTO.orderNo, orderNo: res.orderDTO.orderAccountDTO.orderNo,
result: '', result: '',
resultMessage: '交易处理成功', resultMessage: '交易处理成功',
uwResult: '02' uwResult: '02',
} }
// this.bankListName = res.orderDTO.orderAccountDTO.bankName // this.bankListName = res.orderDTO.orderAccountDTO.bankName
this.underWriteData.bankCode = this.underWriteData.bankCode =
@@ -491,7 +498,9 @@ export default {
} else { } else {
this.underWriteData = { this.underWriteData = {
accountName: '', accountName: '',
riskName: '',
appntName: '', appntName: '',
insuredName: '',
idType: '', idType: '',
bankCode: '', bankCode: '',
bankName: '', bankName: '',
@@ -500,7 +509,7 @@ export default {
orderNo: '', orderNo: '',
result: '', result: '',
resultMessage: '交易处理失败', resultMessage: '交易处理失败',
uwResult: '00' uwResult: '00',
} }
// window.localStorage.setItem('underWriteData', JSON.stringify(underWriteData)) // window.localStorage.setItem('underWriteData', JSON.stringify(underWriteData))
this.$toast(res.resultMessage) this.$toast(res.resultMessage)
@@ -565,9 +574,33 @@ export default {
let data = { let data = {
orderNo: window.localStorage.getItem('orderNo'), orderNo: window.localStorage.getItem('orderNo'),
cardOrder: 'cardOrder', 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)) 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'}} // 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') { if (res.result == '0') {
@@ -596,7 +629,7 @@ export default {
window.localStorage.setItem('payStatus', res.payStatus) window.localStorage.setItem('payStatus', res.payStatus)
window.localStorage.setItem('payInfo', JSON.stringify(res)) window.localStorage.setItem('payInfo', JSON.stringify(res))
this.underWriteData.bankListName = this.bankListName this.underWriteData.bankListName = this.bankListName
if(this.radio == '3'){ if (this.radio == '3') {
this.underWriteData.bankCode = '' this.underWriteData.bankCode = ''
} }
localStorage['cardList-detail'] = JSON.stringify(this.underWriteData) localStorage['cardList-detail'] = JSON.stringify(this.underWriteData)
@@ -606,7 +639,7 @@ export default {
setTimeout(() => { setTimeout(() => {
// eslint-disable-next-line no-undef // eslint-disable-next-line no-undef
EWebBridge.webCallAppInJs('webview_left_button', { EWebBridge.webCallAppInJs('webview_left_button', {
intercept: '0' //是否拦截原生返回事件 1是 其他否 intercept: '0', //是否拦截原生返回事件 1是 其他否
}) })
}, 100) }, 100)
}) })
@@ -626,7 +659,7 @@ export default {
let data = { let data = {
orderDTO: { orderDTO: {
orderInfoDTO: { orderInfoDTO: {
orderNo: window.localStorage.getItem('orderNo') orderNo: window.localStorage.getItem('orderNo'),
}, },
orderAccountDTO: { orderAccountDTO: {
accountType: '0', accountType: '0',
@@ -636,15 +669,15 @@ export default {
cardBookType: '1', cardBookType: '1',
cardBookCode: this.underWriteData.bankCode, cardBookCode: this.underWriteData.bankCode,
isAutoPay: '0', isAutoPay: '0',
isAutoRenewal: '1' isAutoRenewal: '1',
} },
} },
} }
this.$toast.loading({ this.$toast.loading({
duration: 0, // 持续展示 toast duration: 0, // 持续展示 toast
forbidClick: true, // 禁用背景点击 forbidClick: true, // 禁用背景点击
loadingType: 'spinner', loadingType: 'spinner',
message: '加载中……' message: '加载中……',
}) })
/* /*
支付之前要先保存银行账户信息 支付之前要先保存银行账户信息
@@ -658,7 +691,7 @@ export default {
duration: 0, // 持续展示 toast duration: 0, // 持续展示 toast
forbidClick: true, // 禁用背景点击 forbidClick: true, // 禁用背景点击
loadingType: 'spinner', loadingType: 'spinner',
message: '加载中……' message: '加载中……',
}) })
// if (!flag) { // if (!flag) {
@@ -685,7 +718,7 @@ export default {
duration: 0, // 持续展示 toast duration: 0, // 持续展示 toast
forbidClick: true, // 禁用背景点击 forbidClick: true, // 禁用背景点击
loadingType: 'spinner', loadingType: 'spinner',
message: '加载中……' message: '加载中……',
}) })
// if (!flag) { // if (!flag) {
@@ -710,7 +743,7 @@ export default {
this.$dialog this.$dialog
.confirm({ .confirm({
message: '证件类型不是身份证,无法使用微信支付', message: '证件类型不是身份证,无法使用微信支付',
showCancelButton: false showCancelButton: false,
}) })
.then(() => { .then(() => {
this.radio = '' this.radio = ''
@@ -724,13 +757,13 @@ export default {
console.log(this.$validator) console.log(this.$validator)
return this.$toast(this.$validator.errors.all()[0]) return this.$toast(this.$validator.errors.all()[0])
} }
let shareName = this.underWriteData.name let shareName = this.underWriteData.appntName
localStorage.name = this.underWriteData.name localStorage.appntName = this.underWriteData.appntName
localStorage.bankName = this.underWriteData.bankName localStorage.bankName = this.underWriteData.bankName
localStorage.bankCode = this.underWriteData.bankCode localStorage.bankCode = this.underWriteData.bankCode
localStorage.bankListName = this.bankListName localStorage.bankListName = this.bankListName
console.log(this.underWriteData.bankName, this.underWriteData.bankCode, this.bankListName, this.underWriteData.name) 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) console.log(url)
EWebBridge.webCallAppInJs('bridge', { EWebBridge.webCallAppInJs('bridge', {
flag: 'share', flag: 'share',
@@ -738,11 +771,11 @@ export default {
title: `国富人寿卡单投保(${shareName})付款`, title: `国富人寿卡单投保(${shareName})付款`,
content: '付款进行', content: '付款进行',
url: url, url: url,
img: this.$assetsUrl + 'images/logo.png' img: this.$assetsUrl + 'images/logo.png',
} },
}) })
} },
} },
} }
</script> </script>
@@ -759,4 +792,8 @@ export default {
padding-right: 3px; padding-right: 3px;
box-sizing: content-box; box-sizing: content-box;
} }
.bottom-btn {
display: flex;
justify-content: center;
}
</style> </style>

View File

@@ -1,10 +1,11 @@
<template> <template>
<div class="PayLoser"> <div class="PayLoser">
<div> <div>
<img src="../../../assets/images/u10608.svg" alt="" /> <!-- <img src="../../../assets/images/u10608.svg" alt="" /> -->
<img :src="$assetsUrl + 'images/fail.png'" alt="">
<p>支付失败</p> <p>支付失败</p>
</div> </div>
<van-button type="info" size="large" class="payBtn">返回首页</van-button> <van-button type="danger" size="large" class="payBtn">返回首页</van-button>
</div> </div>
</template> </template>

View File

@@ -1,22 +1,22 @@
<template> <template>
<div class="paySuccess"> <div class="paySuccess">
<template v-if="payStatus == '1'"> <template>
<div class="paySucc"> <div class="paySucc">
<van-icon name="passed" size="100px" color="#1296DB" /> <van-icon name="passed" size="100px" color="#E9332E" />
<span>支付成功</span> <span>支付成功</span>
</div> </div>
<van-cell-group name="payInfo"> <van-cell-group name="payInfo">
<van-field v-model="payInfo.productName" readonly clearable label="产品名称" name="产品名称" placeholder="国富安全出行2.0" /> <van-field v-model="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="paymentAmount" readonly clearable label="支付金额" name="支付金额" placeholder="100.00元" />
<van-field v-model="payInfo.bankCardNumber" readonly clearable label="卡号" name="卡号" placeholder="1297793740298" /> <van-field v-model="bankCardNumber" readonly clearable label="卡号" name="卡号" placeholder="1297793740298" />
</van-cell-group> </van-cell-group>
</template> </template>
<template v-else-if="payStatus == '2'"> <!-- <template v-else-if="payStatus == '2'">
<div class="flex flex-direction-colunm align-items-c pt100"> <div class="flex flex-direction-colunm align-items-c pt100">
<img :src="this.$assetsUrl + 'images/fail.png'" class="w100 h100" alt="" /> <img :src="this.$assetsUrl + 'images/fail.png'" class="w100 h100" alt="" />
<p class="mt30">支付失败</p> <p class="mt30">支付失败</p>
</div> </div>
</template> </template> -->
<div class="bg-white bottom-btn"> <div class="bg-white bottom-btn">
<van-button type="danger" size="large" class="payBtn" @click="goHome">返回首页</van-button> <van-button type="danger" size="large" class="payBtn" @click="goHome">返回首页</van-button>
</div> </div>

View File

@@ -1,29 +1,65 @@
<template> <template>
<div> <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> </div>
</template> </template>
<script> <script>
import { Button, NoticeBar } from 'vant'
export default { export default {
data() { data() {
return { return {
pdfUrl: '', 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() { created() {
this.init() this.init()
}, },
mounted() {}, mounted() {},
methods: { methods: {
init() { init() {
let cardListPDF = JSON.parse(localStorage.cardListPDF) console.log('init')
console.log(cardListPDF) this.cardListPDF = JSON.parse(localStorage.cardListPDF)
this.pdfUrl = cardListPDF.documentUrl console.log(this.cardListPDF)
this.shareContent = cardListPDF.title this.pdfUrl = this.cardListPDF[this.index].documentUrl
document.title = cardListPDF.title 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> </script>

View 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>

View 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>

View File

@@ -65,12 +65,49 @@
/> />
<van-field v-model="userInfo.email" required label="邮箱" name="邮箱" placeholder="请输入" v-validate="'required|email'" clearable /> <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 /> --> <!-- <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 <van-field
v-model="homeName" :value="userInfo.nativeplace | idToText('nativeplace')"
readonly readonly
label="地址" required
name="地址" 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 required
right-icon="arrow" right-icon="arrow"
placeholder="请选择" placeholder="请选择"
@@ -78,7 +115,7 @@
@click="homeShow = true" @click="homeShow = true"
/> />
<van-field v-model="userInfo.homeAddress" label name="详细地址" placeholder="请输入详细地址" v-validate="'required'" clearable maxlength="30" /> <van-field v-model="userInfo.homeAddress" label name="详细地址" placeholder="请输入详细地址" v-validate="'required'" clearable maxlength="30" />
</template> --> <!-- </template> -->
<van-field <van-field
:value="userInfo.relationToInsured | idToText('relationToAppnt')" :value="userInfo.relationToInsured | idToText('relationToAppnt')"
readonly readonly
@@ -93,7 +130,7 @@
</van-cell-group> </van-cell-group>
<!-- 被保险人信息 --> <!-- 被保险人信息 -->
<van-cell-group class="mt10" v-if="userInfo.relationToInsured != 1"> <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 <customer-picker
@on-choose="chooseCustomer(arguments)" @on-choose="chooseCustomer(arguments)"
v-validate="'required|name'" v-validate="'required|name'"
@@ -143,6 +180,66 @@
ref="insuredBirthday" ref="insuredBirthday"
:maxDate="insuredMaxDate" :maxDate="insuredMaxDate"
></FieldDatePicter> ></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>
<van-cell-group class="mt10" v-else> <van-cell-group class="mt10" v-else>
<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>
@@ -187,14 +284,85 @@
:flag="true" :flag="true"
ref="insuredBirthday" ref="insuredBirthday"
:maxDate="maxDate" :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>
<!-- 受益人信息 --> <!-- 受益人信息 -->
<van-cell-group class="mt10"> <van-cell-group class="mt10">
<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>
<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> </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 <FieldDatePicter
v-validate="'required'" v-validate="'required'"
label="指定生效日期" label="指定生效日期"
@@ -209,8 +377,8 @@
input-align:right input-align:right
> >
</FieldDatePicter> </FieldDatePicter>
<van-field value="7天" clearable label="保险期间" style="border-bottom: 1px solid #ebedf0;" /> <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-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" <van-checkbox name="a" shape="square" icon-size="13px"
>本人已仔细阅读并了解 >本人已仔细阅读并了解
<span class="blue" @click.stop="goDocu($assetsUrl + 'product/GFRS_M0022/M0022Notice.pdf', '短期交通卡投保须知')">投保须知</span> <span class="blue" @click.stop="goDocu($assetsUrl + 'product/GFRS_M0022/M0022Notice.pdf', '短期交通卡投保须知')">投保须知</span>
@@ -222,21 +390,15 @@
等内容自愿为被保险人投保本保险<br /> 等内容自愿为被保险人投保本保险<br />
为未成年子女投保的人身保险在被保险人成年之前因被保险人身故给付的保险金总和不得超过国务院保险监督管理机构规定的限额身故给付的保险金额总和的约定也不得超过前述限额但航空意外死亡保险金额及重大自然灾害意外死亡保险金额不计算在上述规定限额之中</van-checkbox 为未成年子女投保的人身保险在被保险人成年之前因被保险人身故给付的保险金总和不得超过国务院保险监督管理机构规定的限额身故给付的保险金额总和的约定也不得超过前述限额但航空意外死亡保险金额及重大自然灾害意外死亡保险金额不计算在上述规定限额之中</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-goods-action style="z-index: 99">
<van-button type="default" style="width:50%;font-size:14px;height:40px;background:white" <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 >总保费:<span style="color: red; font-weight: bold; font-size: 18px; font-weight: 400">{{ allPrice }}</span
></van-button ></van-button
> >
<van-goods-action-button <van-goods-action-button type="danger" text="立即投保" @click="nextStep" v-no-more-click="1000" style="border-radius: 0em; width: 50%; height: 40px" />
:disabled="!result.length"
type="danger"
text="立即投保"
@click="nextStep"
v-no-more-click="1000"
style="border-radius:0em;width:50%;height:40px;"
/>
</van-goods-action> </van-goods-action>
<!-- 字段选择 --> <!-- 字段选择 -->
@@ -283,9 +445,7 @@ import Vue from 'vue'
import { GoodsAction, GoodsActionIcon, GoodsActionButton } from 'vant' import { GoodsAction, GoodsActionIcon, GoodsActionButton } from 'vant'
DataDictionary.relationToAppnt = DataDictionary.relationToAppnt.slice(0, 4) DataDictionary.relationToAppnt = DataDictionary.relationToAppnt.slice(0, 4)
Vue.use(Checkbox).use(CheckboxGroup) Vue.use(Checkbox).use(CheckboxGroup)
Vue.use(GoodsAction) Vue.use(GoodsAction).use(GoodsActionIcon).use(GoodsActionButton)
.use(GoodsActionIcon)
.use(GoodsActionButton)
export default { export default {
name: 'insuredInfo', name: 'insuredInfo',
components: { components: {
@@ -301,35 +461,39 @@ export default {
[Area.name]: Area, [Area.name]: Area,
[RadioGroup.name]: RadioGroup, [RadioGroup.name]: RadioGroup,
[Radio.name]: Radio, [Radio.name]: Radio,
[IdentityCardScan.name]: IdentityCardScan [IdentityCardScan.name]: IdentityCardScan,
}, },
data() { data() {
return { return {
schemeName:'',//保障方案
schemeCode:'',
productDate:'',//保险期间
now: afterDate.getAfterDays(1), //指定生效日期最小值 now: afterDate.getAfterDays(1), //指定生效日期最小值
insuredSex: '男', insuredSex: '男',
isScan: false, //是否显示证件扫描组件 isScan: false, //是否显示证件扫描组件
allPrice: 0, allPrice: 0,
result: [], result: [],
checked: true, checked: true,
current:'userInfo',
sexRadio: [ sexRadio: [
{ {
label: '男', label: '男',
value: '0' value: '0',
}, },
{ {
label: '女', label: '女',
value: '1' value: '1',
} },
], ],
medicalRadio: [ medicalRadio: [
{ {
label: '有', label: '有',
value: '0' value: '0',
}, },
{ {
label: '无', label: '无',
value: '1' value: '1',
} },
], ],
maxDate: beforeDate.getBeforeYear(18), //投保人出生日期可选最大值 maxDate: beforeDate.getBeforeYear(18), //投保人出生日期可选最大值
insuredMaxDate: beforeDate.getBeforeDays(28), //被保人出生日期可选最大值 insuredMaxDate: beforeDate.getBeforeDays(28), //被保人出生日期可选最大值
@@ -354,12 +518,19 @@ export default {
relationToInsured: '1', relationToInsured: '1',
idType: '1', //证件类型 idType: '1', //证件类型
idNo: '', //证件号码 idNo: '', //证件号码
// homeProvince: '1', //家庭省 occupationCode:'',//职业代码
// homeCity: '1', //家庭市 occupationName:'',//职业名称
// homeArea: '1', //家庭区 lifeGrade:'',//寿险等级
// homeAddress: '1', //详细地址 healthGrade:'',//健康等级
nativeplace: '1', //国家地区
marriageStatus:'',//婚姻状况
homeProvince: '1', //家庭省
homeCity: '1', //家庭市
homeArea: '1', //家庭区
homeName: '', //联系地址
homeAddress: '', //详细地址
mobile: '', //移动电话 mobile: '', //移动电话
email: '' //电子邮箱 email: '', //电子邮箱
// effectiveDate: '' //指定生效日期 // effectiveDate: '' //指定生效日期
}, },
//被保人信息 //被保人信息
@@ -368,7 +539,20 @@ export default {
idType: '1', //被保人证件类型 idType: '1', //被保人证件类型
idNo: '', //被保人证件号码 idNo: '', //被保人证件号码
sex: '0', //被保人性别 sex: '0', //被保人性别
birthday: '' //被保人出生日期 birthday: '', //被保人出生日期
occupationCode:'',//职业代码
occupationName:'',//职业名称
lifeGrade:'',//寿险等级
healthGrade:'',//健康等级
nativeplace: '1', //国家地区
marriageStatus:'',//婚姻状况
homeProvince: '1', //家庭省
homeCity: '1', //家庭市
homeArea: '1', //家庭区
homeName: '', //联系地址
homeAddress: '1', //详细地址
mobile: '', //移动电话
email: '', //电子邮箱
}, },
selectUser: '', selectUser: '',
areaList: areaList, areaList: areaList,
@@ -379,7 +563,7 @@ export default {
timeId: null, timeId: null,
chooseProducts: JSON.parse(localStorage.chooseProducts), chooseProducts: JSON.parse(localStorage.chooseProducts),
trialList: JSON.parse(localStorage.trialList), trialList: JSON.parse(localStorage.trialList),
pdf: ['', '', ''] pdf: ['', '', ''],
} }
}, },
created() { created() {
@@ -417,13 +601,12 @@ export default {
type: '1', type: '1',
orderDTO: { orderDTO: {
orderInfoDTO: { orderInfoDTO: {
orderNo: orderNo orderNo: orderNo,
} },
} },
} }
underWrite(data) underWrite(data).then((res) => {
.then(res => { console.log(res)
console.log(res);
if (res.result == '0') { if (res.result == '0') {
this.$toast.clear() this.$toast.clear()
if (res.uwResult == '33') { if (res.uwResult == '33') {
@@ -437,11 +620,11 @@ export default {
flag: 'h5', flag: 'h5',
extra: { extra: {
url: location.origin + `/#/cardList/pay`, url: location.origin + `/#/cardList/pay`,
forbidSwipeBack: 1 forbidSwipeBack: 1,
}, },
routerInfo: { routerInfo: {
path: `/cardList/pay` path: `/cardList/pay`,
} },
}) })
return true return true
} else { } else {
@@ -459,11 +642,11 @@ export default {
extra: { extra: {
title: name, title: name,
// url: 'http://47.96.143.111/pdfjs/web/viewer.html?file=' + url //测试代码 // url: 'http://47.96.143.111/pdfjs/web/viewer.html?file=' + url //测试代码
url: location.origin + '/#/cardList/ShowPDF' url: location.origin + '/#/cardList/ShowPDF',
}, },
routerInfo: { routerInfo: {
path: '/cardList/ShowPDF' path: '/cardList/ShowPDF',
} },
}) })
}, },
//监听名字变化 //监听名字变化
@@ -504,8 +687,8 @@ export default {
flag: 'navigation', flag: 'navigation',
extra: { extra: {
title: '投被保人信息', title: '投被保人信息',
hiddenRight: '1' hiddenRight: '1',
} },
}) })
if (this.currentPopupIndex == 1) { if (this.currentPopupIndex == 1) {
if (this.selectUser == '1') { if (this.selectUser == '1') {
@@ -524,8 +707,8 @@ export default {
flag: 'navigation', flag: 'navigation',
extra: { extra: {
title: '投被保人信息', title: '投被保人信息',
hiddenRight: '1' hiddenRight: '1',
} },
}) })
this.occupationShowPicker = false this.occupationShowPicker = false
}, },
@@ -544,7 +727,7 @@ export default {
} else if (pickerType == '4') { } else if (pickerType == '4') {
this.columns = [ this.columns = [
{ id: 0, text: '有' }, { id: 0, text: '有' },
{ id: 1, text: '无' } { id: 1, text: '无' },
] ]
} else if (pickerType == '5') { } else if (pickerType == '5') {
this.columns = DataDictionary.taxIdentity this.columns = DataDictionary.taxIdentity
@@ -556,8 +739,17 @@ export default {
this.columns = DataDictionary.salarySource this.columns = DataDictionary.salarySource
} else if (pickerType == '9') { } else if (pickerType == '9') {
this.columns = DataDictionary.relationToAppnt this.columns = DataDictionary.relationToAppnt
} else if (pickerType == '10') {
this.columns = DataDictionary.marriage
} else if (pickerType == '11') { } else if (pickerType == '11') {
this.columns = DataDictionary.insuredIdType 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 this.userInfo.taxResidentId = value.id
} else if (this.pickerType == '6') { } else if (this.pickerType == '6') {
this.userInfo.marriage = value.id this.userInfo.marriage = value.id
this.userInfo.marriageStatus = value.text
} else if (this.pickerType == '7') { } else if (this.pickerType == '7') {
this.userInfo.jobStatus = value.id this.userInfo.jobStatus = value.id
} else if (this.pickerType == '8') { } else if (this.pickerType == '8') {
this.userInfo.salarySource = value.id this.userInfo.salarySource = value.id
} else if (this.pickerType == '9') { } else if (this.pickerType == '9') {
this.userInfo.relationToInsured = value.id 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') { } else if (this.pickerType == '11') {
this.insuredInfo.idType = value.id 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 = '' // this.$refs.birthday.date = ''
// return this.$toast('当前日期早于当日') // 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 break
} }
@@ -715,8 +923,8 @@ export default {
flag: 'navigation', flag: 'navigation',
extra: { extra: {
title: '投被保人信息', title: '投被保人信息',
hiddenRight: '1' hiddenRight: '1',
} },
}) })
if (this.selectUser == '0') { if (this.selectUser == '0') {
let { customerName, customerSex } = data let { customerName, customerSex } = data
@@ -724,19 +932,26 @@ export default {
this.userInfo.sex = customerSex ? customerSex.toString() : '0' //性别 this.userInfo.sex = customerSex ? customerSex.toString() : '0' //性别
this.userInfo.birthday = data.birthday //出生日期 this.userInfo.birthday = data.birthday //出生日期
if (data.customerIdType == 1) { if (data.customerIdType == 1) {
console.log(data)
this.userInfo.idType = data.customerIdType //证件类型 this.userInfo.idType = data.customerIdType //证件类型
this.userInfo.idNo = data.customerIdNumber //证件类别 this.userInfo.idNo = data.customerIdNumber //证件类别
} }
this.userInfo.email = data.email //邮箱 this.userInfo.email = data.email //邮箱
this.userInfo.mobile = data.customerPhone //移动电话 this.userInfo.mobile = data.customerPhone //移动电话
// this.userInfo.homeProvince = data.homeProvince //家庭省 this.userInfo.homeProvince = data.homeProvince //家庭省
// this.userInfo.homeCity = data.homeCity //家庭市 this.userInfo.homeCity = data.homeCity //家庭市
// this.userInfo.homeArea = data.homeArea //家庭区 this.userInfo.homeArea = data.homeArea //家庭区
// if (data.homeProvince && data.homeCity && data.homeArea) { if (data.homeProvince && data.homeCity && data.homeArea) {
// this.homeName = getAreaName([{ code: data.homeProvince }, { code: data.homeCity }, { code: data.homeArea }]) //家庭地址 this.userInfo.homeName = getAreaName([{ code: data.homeProvince }, { code: data.homeCity }, { code: data.homeArea }]) //家庭地址
// } }
// this.userInfo.homeAddress = data.homeAddress //家庭详细地址 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()) // let age = utilsAge.getAge(this.userInfo.birthday, new Date())
@@ -772,7 +987,7 @@ export default {
Object.assign(this.insuredInfo, this.userInfo) Object.assign(this.insuredInfo, this.userInfo)
} }
this.$validator.validate().then(valid => { this.$validator.validate().then((valid) => {
if (true === valid) { if (true === valid) {
// localStorage.chooseProductCodesNew = localStorage.chooseProductCodes // localStorage.chooseProductCodesNew = localStorage.chooseProductCodes
//投保人校验 //投保人校验
@@ -987,16 +1202,16 @@ export default {
let params = { let params = {
orderDTO: { orderDTO: {
orderInfoDTO: { orderInfoDTO: {
bnfFlag: '0' bnfFlag: '0',
// cvaliDate: this.cvaliDate // cvaliDate: this.cvaliDate
}, },
appntDTO: {}, appntDTO: {},
insuredDTOs: [ insuredDTOs: [
{ {
riskDTOLst: this.riskDTOLst riskDTOLst: this.riskDTOLst,
} },
] ],
} },
} }
params.orderDTO.appntDTO = this.userInfo params.orderDTO.appntDTO = this.userInfo
params.orderDTO.insuredDTOs = [this.insuredInfo] params.orderDTO.insuredDTOs = [this.insuredInfo]
@@ -1019,7 +1234,7 @@ export default {
standPrem: this.trialList[index] && this.trialList[index].standPrem, standPrem: this.trialList[index] && this.trialList[index].standPrem,
predictTransferPrem: item.predictTransferPrem, predictTransferPrem: item.predictTransferPrem,
thirdInsuraceNo: this.policyNo, thirdInsuraceNo: this.policyNo,
mult: this.mult mult: this.mult,
} }
if (item.hasPredictTransferPrem && item.hasPredictTransferPrem === '0') { if (item.hasPredictTransferPrem && item.hasPredictTransferPrem === '0') {
//增加万能险 预计转入保费校验 //增加万能险 预计转入保费校验
@@ -1070,10 +1285,9 @@ export default {
// localStorage.saleInsuredInfo = JSON.stringify(this.userInfo) // localStorage.saleInsuredInfo = JSON.stringify(this.userInfo)
// console.log(this.userInfo) // console.log(this.userInfo)
let orderNo = localStorage.orderNo = resultData.content.object let orderNo = (localStorage.orderNo = resultData.content.object)
this.underWrite(orderNo) this.underWrite(orderNo)
} else { } else {
console.error(resultData.resultMessage) console.error(resultData.resultMessage)
this.$toast(resultData.resultMessage) this.$toast(resultData.resultMessage)
@@ -1088,7 +1302,7 @@ export default {
this.areaShow = false this.areaShow = false
break break
case '2': //家庭地址 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.userInfo.homeProvince, this.userInfo.homeCity, this.userInfo.homeArea] = [area[0].code, area[1].code, area[2].code]
this.homeShow = false this.homeShow = false
break break
@@ -1147,7 +1361,7 @@ export default {
this.insuredInfo.birthday = idToData(val).birthday this.insuredInfo.birthday = idToData(val).birthday
this.insuredInfo.sex = idToData(val).sex this.insuredInfo.sex = idToData(val).sex
} }
} },
}, },
// beforeDestroy() { // beforeDestroy() {
// //清理计时器 // //清理计时器
@@ -1166,9 +1380,9 @@ export default {
} }
}, },
immediate: true, immediate: true,
deep: true deep: true,
} },
} },
} }
</script> </script>
<style lang="scss"> <style lang="scss">
@@ -1187,4 +1401,9 @@ export default {
.van-checkbox__label { .van-checkbox__label {
font-size: 13px; font-size: 13px;
} }
.tips {
font-size: 14px;
color: #333;
padding: 15px;
}
</style> </style>

View 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>

View File

@@ -15,19 +15,19 @@
</div> </div>
<div class="bottom-area bottom-btn"> <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="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>
</div> </div>
</template> </template>
<script> <script>
import { Cell, Toast } from 'vant' import { Cell, Toast, Dialog } from 'vant'
import { getProductDetails, getProductInfo, insureTrial } from '@/api/ebiz/cardList/cardList.js' import { getProductDetails, getProductInfo, insureTrial } from '@/api/ebiz/cardList/cardList.js'
import { getAgentInfo } from '@/api/ebiz/my/my.js' import { getAgentInfo } from '@/api/ebiz/my/my.js'
export default { export default {
name: 'Chanpingxiangqing.vue', name: 'Chanpingxiangqing.vue',
components: { components: {
[Cell.name]: Cell [Cell.name]: Cell,
}, },
data() { data() {
return { return {
@@ -40,8 +40,8 @@ export default {
shareInfo: { shareInfo: {
isShare: '', isShare: '',
shareURL: '', shareURL: '',
shareFlag: true shareFlag: true,
} },
} }
}, },
async created() { async created() {
@@ -61,11 +61,11 @@ export default {
extra: { extra: {
title: name, title: name,
// url: 'http://47.96.143.111/pdfjs/web/viewer.html?file=' + url //测试代码 // url: 'http://47.96.143.111/pdfjs/web/viewer.html?file=' + url //测试代码
url: location.origin + '/#/cardList/ShowPDF' url: location.origin + '/#/cardList/ShowPDF',
}, },
routerInfo: { routerInfo: {
path: '/cardList/ShowPDF' path: '/cardList/ShowPDF',
} },
}) })
// 跳转到产品资料详情 // 跳转到产品资料详情
// 保存url // 保存url
@@ -84,23 +84,37 @@ export default {
// }) // })
}, },
gotoInformation() { gotoInformation() {
this.$jump({ Dialog.confirm({
flag: 'h5', title: '温馨提示',
extra: { messageAlign:'left',
url: location.origin + '/#/cardList/information' confirmButtonColor:'#ee0a24',
}, confirmButtonText:'立即投保',
routerInfo: { cancelButtonText:'返回',
path: '/cardList/information' 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) { async getData(code) {
let data = { let data = {
itemCode: code, itemCode: code,
platform: 'app' platform: 'app',
} }
await getProductDetails(data) await getProductDetails(data)
.then(res => { .then((res) => {
if (res.result == 0) { if (res.result == 0) {
// 获取产品特色图片 // 获取产品特色图片
this.introductImages = res.productShowInfo.introductImages this.introductImages = res.productShowInfo.introductImages
@@ -108,18 +122,18 @@ export default {
this.docuList = res.productShowInfo.documents this.docuList = res.productShowInfo.documents
this.productInfo = res.productShowInfo.itemProductDTOS[0] this.productInfo = res.productShowInfo.itemProductDTOS[0]
this.shareInfo.isShare = res.productShowInfo.itemProductBaseInfoDTO.itemType 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.productCode = res.productShowInfo.itemProductDTOS[0].productCode
this.results = res.productShowInfo.itemProductDTOS[0] this.results = res.productShowInfo.itemProductDTOS[0]
} else { } else {
Toast.fail(res.resultMessage) Toast.fail(res.resultMessage)
} }
}) })
.catch(err => { .catch((err) => {
console.log('errerr', err) console.log('errerr', err)
}) })
if(this.shareInfo.isShare == '2'){ if (this.shareInfo.isShare == '2') {
const resAgent = await getAgentInfo({}); const resAgent = await getAgentInfo({})
if (resAgent.result == 0) { if (resAgent.result == 0) {
this.shareInfo.shareURL = this.shareInfo.shareURL this.shareInfo.shareURL = this.shareInfo.shareURL
this.shareInfo.shareFlag = false this.shareInfo.shareFlag = false
@@ -131,11 +145,11 @@ export default {
EWebBridge.webCallAppInJs('bridge', { EWebBridge.webCallAppInJs('bridge', {
flag: 'share', flag: 'share',
extra: { extra: {
title: '分享给您一个产品《'+this.productInfo.productName+'》', title: '分享给您一个产品《' + this.productInfo.productName + '》',
content: '快来投保吧!', content: '快来投保吧!',
url: this.shareInfo.shareURL, url: this.shareInfo.shareURL,
img: this.$assetsUrl + 'images/logo.png' img: this.$assetsUrl + 'images/logo.png',
} },
}) })
}, },
async getProductDetail() { async getProductDetail() {
@@ -144,17 +158,17 @@ export default {
let data = { let data = {
platform: 'app', platform: 'app',
productCodes: [that.productCode], productCodes: [that.productCode],
type: '1' type: '1',
} }
console.log('data', data) console.log('data', data)
await getProductInfo(data) await getProductInfo(data)
.then(res => { .then((res) => {
if (res.result == 0) { if (res.result == 0) {
this.trialInfos = res.trialDTOS[0].productTrialInfoDTO this.trialInfos = res.trialDTOS[0].productTrialInfoDTO
console.log('this.trialInfos', this.trialInfos) console.log('this.trialInfos', this.trialInfos)
let resultData = res.trialDTOS[0] let resultData = res.trialDTOS[0]
if (resultData.productTrialInfoDTO.dutyGroup != null) { if (resultData.productTrialInfoDTO.dutyGroup != null) {
resultData.productTrialInfoDTO.dutyGroup.map(item => { resultData.productTrialInfoDTO.dutyGroup.map((item) => {
if (item.dutyName == '意外身故/伤残保险金') { if (item.dutyName == '意外身故/伤残保险金') {
item.defaultDutyAmt = '50' item.defaultDutyAmt = '50'
} }
@@ -180,7 +194,7 @@ export default {
influences: resultData.productTrialInfoDTO.influences, influences: resultData.productTrialInfoDTO.influences,
isRemit: resultData.productTrialInfoDTO.isRemit, isRemit: resultData.productTrialInfoDTO.isRemit,
hasPredictTransferPrem: resultData.productTrialInfoDTO.hasPredictTransferPrem, //建议书使用 是否展示预计转入保费 hasPredictTransferPrem: resultData.productTrialInfoDTO.hasPredictTransferPrem, //建议书使用 是否展示预计转入保费
predictTransferPrem: null //建议书使用 预计转入保费字段 predictTransferPrem: null, //建议书使用 预计转入保费字段
} }
//构建险种数组 //构建险种数组
@@ -199,7 +213,7 @@ export default {
Toast.fail(res.resultMessage) Toast.fail(res.resultMessage)
} }
}) })
.catch(err => { .catch((err) => {
console.log('errerr', err) console.log('errerr', err)
}) })
}, },
@@ -207,11 +221,11 @@ export default {
let that = this let that = this
// 获取卡单列表 // 获取卡单列表
let data = { let data = {
trialInfos: [{ productCode: that.productCode }] trialInfos: [{ productCode: that.productCode }],
} }
insureTrial(data) insureTrial(data)
.then(res => { .then((res) => {
console.log('resrrrrrr', res) console.log('resrrrrrr', res)
if (res.result == 0) { if (res.result == 0) {
localStorage.trialList = JSON.stringify(res.trialList) localStorage.trialList = JSON.stringify(res.trialList)
@@ -219,7 +233,7 @@ export default {
Toast.fail(res.resultMessage) Toast.fail(res.resultMessage)
} }
}) })
.catch(err => { .catch((err) => {
console.log('errerr', err) console.log('errerr', err)
}) })
}, },
@@ -230,12 +244,12 @@ export default {
let calFactorLst = resultData.productTrialInfoDTO.calFactorLst let calFactorLst = resultData.productTrialInfoDTO.calFactorLst
console.log('calFactorLst', calFactorLst) console.log('calFactorLst', calFactorLst)
calFactorLst.forEach(item => { calFactorLst.forEach((item) => {
item['isMainRisk'] = 0 item['isMainRisk'] = 0
item.columns = [] item.columns = []
if (item.type == 0) { if (item.type == 0) {
//1、type=0 select 2、type=1 input+stepper //1、type=0 select 2、type=1 input+stepper
productTrialInfoDTO[item.code].forEach(factor => { productTrialInfoDTO[item.code].forEach((factor) => {
if (factor.defaultValue == 0) { if (factor.defaultValue == 0) {
item.showContent = factor.showContent item.showContent = factor.showContent
if (factor[item.code + 'Flag'] != undefined) { if (factor[item.code + 'Flag'] != undefined) {
@@ -250,7 +264,7 @@ export default {
}) })
} else if (item.type == 1) { } else if (item.type == 1) {
//按年龄选择 //按年龄选择
productTrialInfoDTO[item.code].forEach(factor => { productTrialInfoDTO[item.code].forEach((factor) => {
item = Object.assign(item, factor) item = Object.assign(item, factor)
}) })
if (item.code == 'inputPrem') { if (item.code == 'inputPrem') {
@@ -271,11 +285,13 @@ export default {
// } // }
// }) // })
return calFactorLst return calFactorLst
} },
} },
} }
</script> </script>
<style lang="scss">
</style>
<style lang="scss" scoped> <style lang="scss" scoped>
img { img {
width: 100%; width: 100%;

View File

@@ -32,5 +32,8 @@ module.exports = {
// options[0].fileBlacklist.push(/myasyncRoute(.)+?\.js$/) // options[0].fileBlacklist.push(/myasyncRoute(.)+?\.js$/)
// return options // return options
// }) // })
},
devServer: {
port: 8082,
} }
} }