[fix] 添加查看条款功能,并通过eslint --fix 修复卡单模块代码

This commit is contained in:
tian.guangyuan
2020-04-21 14:48:00 +08:00
parent d97bba7845
commit 8b32ccdbaa
10 changed files with 372 additions and 281 deletions

View File

@@ -6,6 +6,8 @@ const pay = () => import('@/views/ebiz/cardList/Pay')
const payResult = () => import('@/views/ebiz/cardList/PayResult') 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')
export default [ export default [
{ {
path: '/cardList/information', path: '/cardList/information',
@@ -69,5 +71,15 @@ export default [
title: '支付失败', title: '支付失败',
index: 6 index: 6
} }
},
{
path: '/cardList/ShowPDF',
name: 'ShowPDF',
component: ShowPDF,
meta: {
title: '',
index: 7
}
} }
] ]

View File

@@ -3,43 +3,45 @@
<div class="card-Insurance-box"> <div class="card-Insurance-box">
<div class="card-Insurance-header"> <div class="card-Insurance-header">
<div class="Tab"> <div class="Tab">
<div class="tab" v-for="(item,index) in arr" :key="index" @click="fnTab(index)"> <div class="tab" v-for="(item, index) in arr" :key="index" @click="fnTab(index)">
<span :class="{ac:iNow==index}">{{item}}</span> <span :class="{ ac: iNow == index }">{{ item }}</span>
</div> </div>
</div> </div>
<div class="show"> <div class="show">
<ul <ul class="card-Products" :style="this.iNow == 0 ? 'display:block' : 'display:none'">
class="card-Products" <li v-for="(itemIcon, index) in list" :key="index" class="border-gb" @click="formsD(itemIcon.productCode)">
:style="(this.iNow==0) ? 'display:block':'display:none' "
>
<li v-for="(itemIcon,index) in list" :key="index" class="border-gb" @click="formsD(itemIcon.productCode)">
<div> <div>
<img :src="itemIcon.productImageUrl" class="ml10" width="118" height="70" /> <img :src="itemIcon.productImageUrl" class="ml10" width="118" height="70" />
</div> </div>
<div> <div>
<p>{{itemIcon.productName}}</p> <p>{{ itemIcon.productName }}</p>
<span>{{itemIcon.productDesc}}</span> <span>{{ itemIcon.productDesc }}</span>
</div> </div>
</li> </li>
<template v-if="list.length === 0"> <template v-if="list.length === 0">
<li class="flex flex-direction-colunm align-items-c"> <li class="flex flex-direction-colunm align-items-c">
<img src="@/assets/images/pic_page-non.png" class="mt50" alt="" /> <img src="@/assets/images/pic_page-non.png" class="mt50" alt="" />
<p class="gray text-center pt20">暂无产品</p> <p class="gray text-center pt20">暂无产品</p>
</li> </li>
</template> </template>
</ul> </ul>
<ul class="myCard" :style="(this.iNow==1) ? 'display:block':'display:none' "> <ul class="myCard" :style="this.iNow == 1 ? 'display:block' : 'display:none'">
<li v-for="(itemiNow,index) in tAb" style=" border: 1px solid #dadada;box-shadow: 0 3px 9px 1px hsla(0, 0%, 80%, 0.35);" class="mb10 pl15 pt15" :key="index"> <li
<p>{{itemiNow.h}}</p> v-for="(itemiNow, index) in tAb"
<span>{{itemiNow.span1}}</span> style=" border: 1px solid #dadada;box-shadow: 0 3px 9px 1px hsla(0, 0%, 80%, 0.35);"
<span>{{itemiNow.span2}}</span> class="mb10 pl15 pt15"
<span>{{itemiNow.span3}}</span> :key="index"
<span>{{itemiNow.span4}}</span> >
<p>{{ itemiNow.h }}</p>
<span>{{ itemiNow.span1 }}</span>
<span>{{ itemiNow.span2 }}</span>
<span>{{ itemiNow.span3 }}</span>
<span>{{ itemiNow.span4 }}</span>
</li> </li>
<template v-if="tAb.length === 0"> <template v-if="tAb.length === 0">
<li class="flex flex-direction-colunm align-items-c"> <li class="flex flex-direction-colunm align-items-c">
<img src="@/assets/images/pic_page-non.png" class="mt50" alt="" /> <img src="@/assets/images/pic_page-non.png" class="mt50" alt="" />
<p class="gray text-center pt20">暂无产品</p> <p class="gray text-center pt20">暂无产品</p>
</li> </li>
</template> </template>
</ul> </ul>
@@ -50,7 +52,6 @@
</template> </template>
<script> <script>
import icon1 from '@/assets/images/u10247.png'
import { getCardList } from '@/api/ebiz/cardList/cardList.js' import { getCardList } from '@/api/ebiz/cardList/cardList.js'
export default { export default {
name: 'kadantoubao.vue', name: 'kadantoubao.vue',
@@ -151,14 +152,14 @@ export default {
getCardList(data) getCardList(data)
.then(res => { .then(res => {
console.log('res', res) console.log('res', res)
if (res.result == 0) { if (res.result == 0) {
this.list = res.productList this.list = res.productList
} else { } else {
Toast.fail(res.resultMessage) this.$toast.fail(res.resultMessage)
} }
}) })
.catch(err => { .catch(err => {
console.log("errerr", err) console.log('errerr', err)
}) })
} }
} }
@@ -298,4 +299,4 @@ export default {
box-sizing: border-box; box-sizing: border-box;
font-size: 14px; font-size: 14px;
} }
</style> </style>

View File

@@ -1,31 +1,36 @@
<template> <template>
<div class="pay"> <div class="pay">
<div v-if="!isScan"> <div v-if="!isScan">
<van-cell-group> <van-cell-group>
<van-field <van-field v-model="underWriteData.appntName" readonly label="产品名称" class="projuct" />
v-model="underWriteData.appntName" <van-field :value="underWriteData.orderAmount == undefined ? '' : `${underWriteData.orderAmount} 元`" readonly label="支付金额" />
readonly </van-cell-group>
label="产品名称"
class="projuct"
/>
<van-field :value="underWriteData.orderAmount == undefined ? '' : `${underWriteData.orderAmount} 元`" readonly label="支付金额" />
</van-cell-group>
<!-- 银行卡支付开始 --> <!-- 银行卡支付开始 -->
<div class="money"> <div class="money">
<div> <div>
<img src="../../../assets/images/u10280.png" alt style="margin-top:-5px;margin-right:10px;" /> <img src="../../../assets/images/u10280.png" alt style="margin-top:-5px;margin-right:10px;" />
<span class="oi">银行卡支付</span> <span class="oi">银行卡支付</span>
</div>
<div class="i mr20">
<van-radio-group v-model="radio" class="flex justify-content-fe">
<van-radio name="1"></van-radio>
</van-radio-group>
</div>
</div> </div>
<div class="i mr20">
<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> <van-cell-group>
<van-field v-model="underWriteData.name" label="姓名" name="姓名" placeholder="请输入" v-validate="'required|name'" maxlength="6" clearable required /> <van-field v-model="underWriteData.name" label="姓名" name="姓名" placeholder="请输入" v-validate="'required|name'" maxlength="6" clearable required />
<van-field v-model="underWriteData.bankCode" maxlength="19" label="银行卡号" name="银行卡号" placeholder="请输入" required clearable v-validate="'required|bankCard'" data-vv-name="银行卡号"> <van-field
v-model="underWriteData.bankCode"
maxlength="19"
label="银行卡号"
name="银行卡号"
placeholder="请输入"
required
clearable
v-validate="'required|bankCard'"
data-vv-name="银行卡号"
>
<van-button slot="button" size="small" type="danger" round @click="cardScanning('0')">银行卡扫描</van-button> <van-button slot="button" size="small" type="danger" round @click="cardScanning('0')">银行卡扫描</van-button>
</van-field> </van-field>
<van-field <van-field
@@ -40,7 +45,7 @@
data-vv-name="开户银行" data-vv-name="开户银行"
required required
/> />
<!-- <van-field v-model="bank" label="开户银行" placeholder="请选择" required @click="focus" readonly v-validate="'required'" data-vv-name="开户银行" /> --> <!-- <van-field v-model="bank" label="开户银行" placeholder="请选择" required @click="focus" readonly v-validate="'required'" data-vv-name="开户银行" /> -->
</van-cell-group> </van-cell-group>
<!-- 第三方支付所需表单 --> <!-- 第三方支付所需表单 -->
<form ref="payForm" :action="formActionUrl" method="post"> <form ref="payForm" :action="formActionUrl" method="post">
@@ -82,17 +87,17 @@
<div class="bg-white bottom-btn"> <div class="bg-white bottom-btn">
<van-button type="danger" size="large" @click="payMent" v-no-more-click="1000">支付</van-button> <van-button type="danger" size="large" @click="payMent" v-no-more-click="1000">支付</van-button>
</div> </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>
</div> </div>
</template> </template>
@@ -185,16 +190,16 @@ export default {
window.appCallBack = this.appCallBack window.appCallBack = this.appCallBack
// 获取银行卡 // 获取银行卡
this.getBankList() this.getBankList()
this.getOrderDetail() // this.getOrderDetail()
// console.log('----保融form.action', config.payUrl) // console.log('----保融form.action', config.payUrl)
// if (localStorage.salelist == '1') { // if (localStorage.salelist == '1') {
// 第一次支付 调核保获取 // 第一次支付 调核保获取
// this.underWrite() // this.underWrite()
// this.underWriteData = JSON.parse(window.localStorage.getItem('underWriteData')) // this.underWriteData = JSON.parse(window.localStorage.getItem('underWriteData'))
// } else { // } else {
// 再次支付 调详情 获取信息 // 再次支付 调详情 获取信息
this.getOrderDetail() this.getOrderDetail()
// this.underWriteData = JSON.parse(window.localStorage.getItem('underWriteData')) // this.underWriteData = JSON.parse(window.localStorage.getItem('underWriteData'))
// } // }
// console.log('--自核结果--支付信息:', JSON.stringify(this.underWriteData)) // console.log('--自核结果--支付信息:', JSON.stringify(this.underWriteData))
}, },
@@ -382,66 +387,66 @@ export default {
*/ */
let res = await saveOrUpdateAccount(data) let res = await saveOrUpdateAccount(data)
// .then(res => { // .then(res => {
console.log('res', res) console.log('res', res)
that.$toast.clear() that.$toast.clear()
if (res.result == '0') { if (res.result == '0') {
this.$toast.loading({ this.$toast.loading({
duration: 0, // 持续展示 toast duration: 0, // 持续展示 toast
forbidClick: true, // 禁用背景点击 forbidClick: true, // 禁用背景点击
loadingType: 'spinner', loadingType: 'spinner',
message: '加载中……' message: '加载中……'
}) })
let that = this let that = this
let data = { let data = {
orderNo: window.localStorage.getItem('orderNo') orderNo: window.localStorage.getItem('orderNo')
}
let rs = await this.underWrite()
if (rs.result != '0') {
this.$toast.clear()
this.$toast(rs.resultMessage)
}
acceptInsurance(data).then(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'}}
if (res.result == '0') {
// 1成 4支付中 2支付失败 8转批扣(无此情况)
this.payStatus = res.payStatus
if (this.payStatus == '1') {
this.$toast({ message: '当前投保单已支付成功,请返回列表页查询', duration: 5000 })
return
}
// 支付参数大小写转换
let keyMap = {}
for (let key in this.payParam) {
keyMap[key.toLowerCase()] = key
}
let paramKey
for (let rKey in res.brPayReturnData) {
if (keyMap.hasOwnProperty(rKey.toLowerCase())) {
paramKey = keyMap[rKey.toLowerCase()]
this.payParam[paramKey] = res.brPayReturnData[rKey]
}
}
console.log('----支付参数this.payParam:', JSON.stringify(this.payParam))
this.gotPayParam = true
this.$forceUpdate()
let thisRef = this
this.$nextTick(() => {
thisRef.$refs.payForm.submit() // 表单提交,发起支付,跳至收银台
})
window.localStorage.setItem('resMessage', res.resultMessage)
window.localStorage.setItem('payStatus', res.payStatus)
window.localStorage.setItem('payInfo', JSON.stringify(res))
} else {
that.$toast.clear()
that.$toast(res.resultMessage)
}
})
} else {
this.$toast(res.resultMessage)
} }
let rs = await this.underWrite()
if (rs.result != '0') {
this.$toast.clear()
this.$toast(rs.resultMessage)
}
acceptInsurance(data).then(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'}}
if (res.result == '0') {
// 1成 4支付中 2支付失败 8转批扣(无此情况)
this.payStatus = res.payStatus
if (this.payStatus == '1') {
this.$toast({ message: '当前投保单已支付成功,请返回列表页查询', duration: 5000 })
return
}
// 支付参数大小写转换
let keyMap = {}
for (let key in this.payParam) {
keyMap[key.toLowerCase()] = key
}
let paramKey
for (let rKey in res.brPayReturnData) {
if (keyMap.hasOwnProperty(rKey.toLowerCase())) {
paramKey = keyMap[rKey.toLowerCase()]
this.payParam[paramKey] = res.brPayReturnData[rKey]
}
}
console.log('----支付参数this.payParam:', JSON.stringify(this.payParam))
this.gotPayParam = true
this.$forceUpdate()
let thisRef = this
this.$nextTick(() => {
thisRef.$refs.payForm.submit() // 表单提交,发起支付,跳至收银台
})
window.localStorage.setItem('resMessage', res.resultMessage)
window.localStorage.setItem('payStatus', res.payStatus)
window.localStorage.setItem('payInfo', JSON.stringify(res))
} else {
that.$toast.clear()
that.$toast(res.resultMessage)
}
})
} else {
this.$toast(res.resultMessage)
}
// }) // })
} }
} }

View File

@@ -1,52 +1,49 @@
<template> <template>
<div class="PayLoser"> <div class="PayLoser">
<div> <div>
<img src="../../../assets/images/u10608.svg" alt=""> <img src="../../../assets/images/u10608.svg" alt="" />
<p>支付失败</p> <p>支付失败</p>
</div> </div>
<van-button type="info" size="large" class="payBtn">返回首页</van-button> <van-button type="info" size="large" class="payBtn">返回首页</van-button>
</div>
</div>
</template> </template>
<script> <script>
export default { export default {}
}
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
*{ * {
margin: 0; margin: 0;
padding: 0; padding: 0;
} }
html,body{ html,
margin: 0; body {
padding: 0; margin: 0;
width:100%; padding: 0;
height:100%; width: 100%;
height: 100%;
} }
.PayLoser{ .PayLoser {
display: flex; display: flex;
flex-direction:column; flex-direction: column;
height: 650px; height: 650px;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
img{ img {
width:100px; width: 100px;
height: 100px; height: 100px;
} }
}
.PayLoser>div:nth-of-type(1){
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
box-sizing: border-box;
margin-top: 100px;
p{
margin-top: 30px;
}
} }
.PayLoser > div:nth-of-type(1) {
</style> display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
box-sizing: border-box;
margin-top: 100px;
p {
margin-top: 30px;
}
}
</style>

View File

@@ -115,7 +115,7 @@ export default {
this.$toast(res.resultMessage) this.$toast(res.resultMessage)
} }
}) })
}, }
// // 重新支付 // // 重新支付
// rePayMent() { // rePayMent() {
// // localStorage.orderNo = order.orderInfoDTO.orderNo // // localStorage.orderNo = order.orderInfoDTO.orderNo

View File

@@ -2,7 +2,7 @@
<div class="paySuccess"> <div class="paySuccess">
<template v-if="payStatus == '1'"> <template v-if="payStatus == '1'">
<div class="paySucc"> <div class="paySucc">
<van-icon name="passed" size="100px" color="#1296DB"/> <van-icon name="passed" size="100px" color="#1296DB" />
<span>支付成功</span> <span>支付成功</span>
</div> </div>
<van-cell-group> <van-cell-group>
@@ -13,15 +13,14 @@
</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="../../../assets/images/u10608.svg" class="w100 h100" alt=""> <img src="../../../assets/images/u10608.svg" class="w100 h100" alt="" />
<p class="mt30">支付失败</p> <p class="mt30">支付失败</p>
</div> </div>
<div class="bg-white bottom-btn"> <div class="bg-white bottom-btn">
<van-button type="danger" size="large" class="payBtn">返回首页</van-button> <van-button type="danger" size="large" class="payBtn">返回首页</van-button>
</div> </div>
</template> </template>
</div> </div>
</template> </template>
<script> <script>
@@ -52,7 +51,7 @@ export default {
appntName: '', // 投保人 appntName: '', // 投保人
prtNo: '', // 投保单号 prtNo: '', // 投保单号
amnt: '' // 支付金额 amnt: '' // 支付金额
}, }
} }
} }
} }

View File

@@ -0,0 +1,29 @@
<template>
<div>
<iframe :src="src + pdfUrl" style="width:100vw;height:100vh"></iframe>
</div>
</template>
<script>
export default {
data() {
return {
pdfUrl: '',
src: location.origin + '/pdfjs/web/viewer.html?file='
}
},
created() {
this.init()
},
mounted() {},
methods: {
init() {
let cardListPDF = JSON.parse(localStorage.cardListPDF)
console.log(cardListPDF)
this.pdfUrl = this.$mainUrl + cardListPDF.url
this.shareContent = cardListPDF.title
document.title = cardListPDF.title
}
}
}
</script>

View File

@@ -12,10 +12,10 @@
:parentShowPicker.sync="customerShowPicker" :parentShowPicker.sync="customerShowPicker"
:value.sync="userInfo.name" :value.sync="userInfo.name"
@nameChange="nameChange" @nameChange="nameChange"
@on-click="selectClick('1','0')" @on-click="selectClick('1', '0')"
></customer-picker> ></customer-picker>
<select-radio required :radios="sexRadio" label="性别" name="性别" v-validate="'required'" :value.sync="userInfo.sex"></select-radio> <select-radio required :radios="sexRadio" label="性别" name="性别" v-validate="'required'" :value.sync="userInfo.sex"></select-radio>
<FieldDatePicter <FieldDatePicter
v-validate="'required'" v-validate="'required'"
label="出生日期" label="出生日期"
name="出生日期" name="出生日期"
@@ -26,8 +26,8 @@
@confirm="onDateConfirm($event, '2')" @confirm="onDateConfirm($event, '2')"
ref="birthday" ref="birthday"
:maxDate="maxDate" :maxDate="maxDate"
> >
</FieldDatePicter> </FieldDatePicter>
<van-field <van-field
:value="userInfo.idType | idToText('insuredIdType')" :value="userInfo.idType | idToText('insuredIdType')"
v-validate="'required'" v-validate="'required'"
@@ -40,25 +40,44 @@
@click="toSelect('2')" @click="toSelect('2')"
/> />
<!-- <van-field v-model="userInfo.idNo" v-validate="'required|idNo'" maxlength="18" label="证件号码" name="证件号码" placeholder="请输入" clearable> --> <!-- <van-field v-model="userInfo.idNo" v-validate="'required|idNo'" maxlength="18" label="证件号码" name="证件号码" placeholder="请输入" clearable> -->
<van-field v-model="userInfo.idNo" maxlength="18" required label="证件号码" v-validate="'required'" name="证件号码" placeholder="请输入" clearable @blur="getRelatedData(userInfo.idNo,'1')"> <van-field
v-model="userInfo.idNo"
maxlength="18"
required
label="证件号码"
v-validate="'required'"
name="证件号码"
placeholder="请输入"
clearable
@blur="getRelatedData(userInfo.idNo, '1')"
>
<van-button v-if="userInfo.idType == 1" slot="button" size="small" type="danger" round @click="selectClick('3')">证件扫描</van-button> <van-button v-if="userInfo.idType == 1" slot="button" size="small" type="danger" round @click="selectClick('3')">证件扫描</van-button>
</van-field> </van-field>
<van-field required v-model="userInfo.mobile" clearable label="手机号码" name="手机号码" placeholder="请输入" v-validate="'required|mobile'" maxlength="11" /> <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 /> <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 /> -->
<van-field <van-field
v-model="homeName" v-model="homeName"
readonly readonly
label="地址" label="地址"
name="地址" name="地址"
required required
right-icon="arrow" right-icon="arrow"
placeholder="请选择" placeholder="请选择"
v-validate="'required'" v-validate="'required'"
@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" />
<van-field <van-field
:value="userInfo.relationToInsured | idToText('relationToAppnt')" :value="userInfo.relationToInsured | idToText('relationToAppnt')"
readonly readonly
required required
@@ -69,8 +88,8 @@
v-validate="'required'" v-validate="'required'"
@click="toSelect('9')" @click="toSelect('9')"
/> />
</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>
<customer-picker <customer-picker
@@ -82,10 +101,10 @@
:parentShowPicker.sync="customerShowPicker2" :parentShowPicker.sync="customerShowPicker2"
:value.sync="insuredInfo.name" :value.sync="insuredInfo.name"
@nameChange="nameChanges" @nameChange="nameChanges"
@on-click="selectClick('1','1')" @on-click="selectClick('1', '1')"
></customer-picker> ></customer-picker>
<select-radio required :radios="sexRadio" label="性别" name="性别" v-validate="'required'" :value.sync="userInfo.insuredSex"></select-radio> <select-radio required :radios="sexRadio" label="性别" name="性别" v-validate="'required'" :value.sync="userInfo.insuredSex"></select-radio>
<FieldDatePicter <FieldDatePicter
v-validate="'required'" v-validate="'required'"
label="出生日期" label="出生日期"
name="出生日期" name="出生日期"
@@ -108,41 +127,52 @@
placeholder="请选择" placeholder="请选择"
@click="toSelect('11')" @click="toSelect('11')"
/> />
<van-field v-model="insuredInfo.idNo" maxlength="18" required label="证件号码" v-validate="'required'" name="证件号码" placeholder="请输入" clearable @blur="getRelatedData(insuredInfo.idNo,'2')" > <van-field
v-model="insuredInfo.idNo"
maxlength="18"
required
label="证件号码"
v-validate="'required'"
name="证件号码"
placeholder="请输入"
clearable
@blur="getRelatedData(insuredInfo.idNo, '2')"
>
<van-button v-if="insuredInfo.idType == 1" slot="button" size="small" type="danger" round @click="selectClick('3')">证件扫描</van-button> <van-button v-if="insuredInfo.idType == 1" slot="button" size="small" type="danger" round @click="selectClick('3')">证件扫描</van-button>
</van-field> </van-field>
</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 v-model="bnfTypeVal" clearable label="受益人类型" v-validate="'required'" style="border-bottom: 1px solid #ebedf0;"/> <van-field required 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>
<FieldDatePicter <FieldDatePicter
v-validate="'required'" v-validate="'required'"
label="指定生效日期" label="指定生效日期"
name="指定生效日期" name="指定生效日期"
required required
:minDate="now" :minDate="now"
:value.sync="userInfo.effectiveDate" :value.sync="userInfo.effectiveDate"
type="date" type="date"
:flag="true" :flag="true"
@confirm="onDateConfirm($event, '6')" @confirm="onDateConfirm($event, '6')"
ref="effectiveDate" ref="effectiveDate"
input-align:right input-align:right
> >
</FieldDatePicter> </FieldDatePicter>
<van-checkbox-group v-model="result" ref="checkboxGroup" style="height:34px;box-sizing:border-box;" class="pl8 pt10 bg-white"> <van-checkbox-group v-model="result" ref="checkboxGroup" style="height:34px;box-sizing:border-box;" class="pl8 pt10 bg-white">
<van-checkbox name="a" shape="square" icon-size="13px">我已阅读并同意投保须知</van-checkbox> <van-checkbox name="a" shape="square" icon-size="13px">我已阅读并同意投保须知</van-checkbox>
</van-checkbox-group> </van-checkbox-group>
<van-goods-action>
<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 type="danger" text="提交" @click="nextStep" v-no-more-click="1000" style="border-radius:0em;width:50%;height:40px;" />
</van-goods-action>
<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 type="danger" text="提交" @click="nextStep" v-no-more-click="1000" style="border-radius:0em;width:50%;height:40px;" />
</van-goods-action>
<!-- 字段选择 --> <!-- 字段选择 -->
<van-popup v-model="popupShow" position="bottom"> <van-popup v-model="popupShow" position="bottom">
@@ -208,7 +238,7 @@ export default {
}, },
data() { data() {
return { return {
now : new Date(), now: new Date(),
isScan: false, //是否显示证件扫描组件 isScan: false, //是否显示证件扫描组件
allPrice: 0, allPrice: 0,
result: [], result: [],
@@ -242,7 +272,7 @@ export default {
columns: [], columns: [],
valueKey: 'text', valueKey: 'text',
homeName: '', //家庭地址 homeName: '', //家庭地址
bnfTypeVal:'法定受益人', //受益人类型文字展示 bnfTypeVal: '法定受益人', //受益人类型文字展示
//投保人信息 //投保人信息
userInfo: { userInfo: {
name: '', //投保人姓名 name: '', //投保人姓名
@@ -321,7 +351,7 @@ export default {
this.insuredInfo.name = name this.insuredInfo.name = name
}, },
selectClick(index, value) { selectClick(index, value) {
if(value !== undefined){ if (value !== undefined) {
this.selectUser = value this.selectUser = value
} }
// console.log(index, value) // console.log(index, value)
@@ -352,9 +382,9 @@ export default {
} }
}) })
if (this.currentPopupIndex == 1) { if (this.currentPopupIndex == 1) {
if(this.selectUser == '1'){ if (this.selectUser == '1') {
this.customerShowPicker2 = false this.customerShowPicker2 = false
}else{ } else {
this.customerShowPicker = false this.customerShowPicker = false
} }
} else if (this.currentPopupIndex == 2) { } else if (this.currentPopupIndex == 2) {
@@ -386,7 +416,10 @@ export default {
} else if (pickerType == '3') { } else if (pickerType == '3') {
this.columns = DataDictionary.degree this.columns = DataDictionary.degree
} else if (pickerType == '4') { } else if (pickerType == '4') {
this.columns = [{ id: 0, text: '有' }, { id: 1, text: '无' }] this.columns = [
{ id: 0, text: '有' },
{ id: 1, text: '无' }
]
} else if (pickerType == '5') { } else if (pickerType == '5') {
this.columns = DataDictionary.taxIdentity this.columns = DataDictionary.taxIdentity
} else if (pickerType == '6') { } else if (pickerType == '6') {
@@ -397,6 +430,8 @@ 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 == '11') {
this.columns = DataDictionary.insuredIdType
} }
}, },
//确认选择字段 //确认选择字段
@@ -427,6 +462,10 @@ export default {
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
// 如果关系为本人,将投保人信息带入到被保人信息上
if(this.userInfo.relationToInsured == 1){
Object.assign(this.insuredInfo , this.userInfo)
}
} else if (this.pickerType == '11') { } else if (this.pickerType == '11') {
this.insuredInfo.idType = value.id this.insuredInfo.idType = value.id
} }
@@ -530,9 +569,9 @@ export default {
//指定生效日期 //指定生效日期
//如果录入日期晚于当前日期 //如果录入日期晚于当前日期
// if (Date.parse(val) < Date.parse(new Date())) { // if (Date.parse(val) < Date.parse(new Date())) {
// this.userInfo.birthday = '' // this.userInfo.birthday = ''
// this.$refs.birthday.date = '' // this.$refs.birthday.date = ''
// return this.$toast('当前日期早于当日') // return this.$toast('当前日期早于当日')
// } // }
} }
break break
@@ -543,13 +582,13 @@ export default {
data = data[0] data = data[0]
console.log(data) console.log(data)
console.log(typeof this.selectUser) console.log(typeof this.selectUser)
if(this.selectUser == '1'){ if (this.selectUser == '1') {
this.customerShowPicker2 = false this.customerShowPicker2 = false
}else{ } else {
this.customerShowPicker = false this.customerShowPicker = false
} }
this.$jump({ this.$jump({
flag: 'navigation', flag: 'navigation',
extra: { extra: {
@@ -564,20 +603,21 @@ export default {
this.userInfo.birthday = data.birthday //出生日期 this.userInfo.birthday = data.birthday //出生日期
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.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.homeName = getAreaName([{ code: data.homeProvince }, { code: data.homeCity }, { code: data.homeArea }]) //家庭地址
} }
this.userInfo.homeAddress = data.homeAddress //家庭详细地址 this.userInfo.homeAddress = data.homeAddress //家庭详细地址
// 计算年龄 // 计算年龄
// let age = utilsAge.getAge(this.userInfo.birthday, new Date()) // let age = utilsAge.getAge(this.userInfo.birthday, new Date())
this.getRelatedData(this.userInfo.idNo,'1') this.getRelatedData(this.userInfo.idNo, '1')
} else if (this.selectUser == '1') { } else if (this.selectUser == '1') {
let { customerName, customerSex } = data let { customerName, customerSex } = data
this.insuredInfo.name = customerName //用户名 this.insuredInfo.name = customerName //用户名
@@ -593,7 +633,7 @@ export default {
// 计算年龄 // 计算年龄
// let age = utilsAge.getAge(this.userInfo.birthday, new Date()) // let age = utilsAge.getAge(this.userInfo.birthday, new Date())
this.getRelatedData(this.insuredInfo.idNo,'2') this.getRelatedData(this.insuredInfo.idNo, '2')
} }
// console.log(data, val) // console.log(data, val)
}, },
@@ -602,7 +642,11 @@ export default {
// console.log(this.userInfo.salarySource) // console.log(this.userInfo.salarySource)
// console.log(this.userInfo.otherSalarySource) // console.log(this.userInfo.otherSalarySource)
//表单校验, 成功跳转 //表单校验, 成功跳转
// if()
this.$validator.validate().then(valid => { this.$validator.validate().then(valid => {
if (true === valid) { if (true === valid) {
// localStorage.chooseProductCodesNew = localStorage.chooseProductCodes // localStorage.chooseProductCodesNew = localStorage.chooseProductCodes
// 计算年龄 // 计算年龄
@@ -849,19 +893,19 @@ export default {
let resultData = await saveOrUpdateCard(params) let resultData = await saveOrUpdateCard(params)
if (resultData.result == 0) { if (resultData.result == 0) {
console.log(' resultData.orderNo', resultData.content.object) console.log(' resultData.orderNo', resultData.content.object)
//存储被保人信息 //存储被保人信息
// let age = utilsAge.getAge(this.userInfo.birthday, new Date()) // let age = utilsAge.getAge(this.userInfo.birthday, new Date())
// localStorage.saleInsuredInfo = JSON.stringify({ // localStorage.saleInsuredInfo = JSON.stringify({
// birthday: this.userInfo.birthday, // birthday: this.userInfo.birthday,
// name: this.userInfo.name, // name: this.userInfo.name,
// sex: this.userInfo.sex, // sex: this.userInfo.sex,
// idType: this.userInfo.idType, // idType: this.userInfo.idType,
// age // age
// }) // })
// this.userInfo.age = age // this.userInfo.age = age
// localStorage.saleInsuredInfo = JSON.stringify(this.userInfo) // localStorage.saleInsuredInfo = JSON.stringify(this.userInfo)
// console.log(this.userInfo) // console.log(this.userInfo)
localStorage.orderNo = resultData.content.object localStorage.orderNo = resultData.content.object
this.$jump({ this.$jump({

View File

@@ -3,9 +3,9 @@ export function selectComp(that, index, type = '') {
that.currentPopupIndex = index that.currentPopupIndex = index
let title = '' let title = ''
if (index == 1) { if (index == 1) {
if(that.selectUser == '1'){ if (that.selectUser == '1') {
;[that.customerShowPicker2, title] = [true, '客户列表'] ;[that.customerShowPicker2, title] = [true, '客户列表']
}else{ } else {
;[that.customerShowPicker, title] = [true, '客户列表'] ;[that.customerShowPicker, title] = [true, '客户列表']
} }
// ;[that.customerShowPicker, title] = [true, '客户列表'] // ;[that.customerShowPicker, title] = [true, '客户列表']

View File

@@ -5,17 +5,17 @@
</div> </div>
<div class="pb50 pt10"> <div class="pb50 pt10">
<van-cell <van-cell
class="product-detail-list-item p10 fs12 fw400 bg-white" class="product-detail-list-item p10 fs12 fw400 bg-white"
:title="item.name" :title="item.name"
is-link is-link
v-for="(item, index) in docuList" v-for="(item, index) in docuList"
:key="index" :key="index"
@click="goDocu(item.url, item.type, item.name)" @click="goDocu(item.url, item.type, item.name)"
/> />
</div> </div>
<div class="bottom-area bottom-btn"> <div class="bottom-area bottom-btn">
<van-button type="danger" size="large" @click="gotoInformation">下一步</van-button> <van-button type="danger" size="large" @click="gotoInformation">下一步</van-button>
</div> </div>
</div> </div>
</template> </template>
@@ -36,7 +36,7 @@ export default {
introductImages: [], introductImages: [],
docuList: [], docuList: [],
productCode: '', productCode: '',
results:[], results: [],
trialInfos: [] trialInfos: []
} }
}, },
@@ -49,14 +49,18 @@ export default {
}, },
methods: { methods: {
goDocu(url, type, name) { goDocu(url, type, name) {
let pdfUrl = encodeURIComponent(url) // let pdfUrl = //encodeURIComponent(url)
console.log('pdfUrl', pdfUrl) localStorage.setItem('cardListPDF', JSON.stringify({ documentUrl: url, title: name }))
console.log('url', url)
this.$jump({ this.$jump({
flag: 'h5', flag: 'h5',
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: this.$mainUrl + '/pdfjs/web/viewer.html?file=' + pdfUrl url: location.origin + '/#/cardList/ShowPDF'
},
routerInfo: {
path: '/cardList/ShowPDF'
} }
}) })
// 跳转到产品资料详情 // 跳转到产品资料详情
@@ -173,8 +177,8 @@ export default {
// productsData = JSON.parse(localStorage.chooseProducts) // productsData = JSON.parse(localStorage.chooseProducts)
// productsData.push(currentProductInfo) // productsData.push(currentProductInfo)
// } else { // } else {
productsData = [currentProductInfo] productsData = [currentProductInfo]
console.log('productsDataproductsData', productsData) console.log('productsDataproductsData', productsData)
// } // }
//保存选择险种 //保存选择险种
@@ -260,8 +264,8 @@ export default {
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
img { img {
width: 100%; width: 100%;
} }
</style> </style>