mirror of
http://112.124.100.131/GFRS/ebiz-h5.git
synced 2025-12-09 23:56:43 +08:00
feature: 惠桂保数据查询
1. 调试数据查询接口 2. 调试详情信息接口
This commit is contained in:
@@ -9,3 +9,11 @@ export function selectHgb(data) {
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function selectHgbDetail(data) {
|
||||
return request({
|
||||
url: getUrl('/sale/order/getHgbDetail', 1),
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
@@ -79,14 +79,13 @@ let productStore = [
|
||||
'/customer/shop/getShareList' //查询分享轨迹(转发记录)
|
||||
]
|
||||
|
||||
// 卡单
|
||||
let cardList = []
|
||||
|
||||
// 续期
|
||||
let renewalManage = [
|
||||
'/renewal/getRenewalList' //续期列表查询
|
||||
]
|
||||
|
||||
let hgb = ['/sale/order/selectHgb', '/sale/order/getHgbDetail']
|
||||
|
||||
let whiteList = [
|
||||
'/customer/agent/getCustomersList',
|
||||
...proposal,
|
||||
@@ -97,7 +96,8 @@ let whiteList = [
|
||||
...manpower,
|
||||
...productStore,
|
||||
...preserve,
|
||||
...renewalManage
|
||||
...renewalManage,
|
||||
...hgb
|
||||
]
|
||||
|
||||
// 创建axios实例
|
||||
|
||||
@@ -12,8 +12,9 @@ export default [
|
||||
},
|
||||
{
|
||||
name: 'HgbDetail',
|
||||
path: '/hgb/orderDetail',
|
||||
path: '/hgb/orderDetail/:prtNo',
|
||||
component: Detail,
|
||||
props: true,
|
||||
meta: {
|
||||
title: '保单详情'
|
||||
}
|
||||
|
||||
@@ -1,11 +1,17 @@
|
||||
<template>
|
||||
<div class="hgb-detail bg-white mt10 p20">
|
||||
<van-cell :title="row.rowName" :value="row[row.key] | blankFilter" v-for="(row, i) in rowInfos" :key="i" />
|
||||
<van-cell :title="row.rowName" :value="blankFilter(row.key)" v-for="(row, i) in rowInfos" :key="i" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { selectHgbDetail } from '@/api/ebiz/hgb'
|
||||
export default {
|
||||
props: {
|
||||
prtNo: {
|
||||
type: String
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
rowInfos: [
|
||||
@@ -18,12 +24,51 @@ export default {
|
||||
{ rowName: '被保人出生日期', key: 'insuredBirthday' },
|
||||
{ rowName: '生效日', key: 'effectiveDate' },
|
||||
{ rowName: '到期日', key: 'expireDate' }
|
||||
]
|
||||
],
|
||||
orderNumber: '',
|
||||
applicantName: '',
|
||||
applicantPhone: '',
|
||||
insuredName: '',
|
||||
insuredPhone: '',
|
||||
insuredGender: '',
|
||||
insuredBirthday: '',
|
||||
effectiveDate: '',
|
||||
expireDate: ''
|
||||
}
|
||||
},
|
||||
filters: {
|
||||
created() {
|
||||
this.getData()
|
||||
},
|
||||
methods: {
|
||||
async getData() {
|
||||
const res = await selectHgbDetail({ policyNo: this.prtNo })
|
||||
if (res.result === '0') {
|
||||
if (res.content && res.content.data) {
|
||||
let appntDTO = res.content.data.appntDTO
|
||||
if (appntDTO) {
|
||||
this.applicantName = appntDTO.name
|
||||
this.applicantPhone = appntDTO.mobile
|
||||
}
|
||||
let insuredDTO = res.content.data.insuredDTOs[0]
|
||||
if (insuredDTO) {
|
||||
this.insuredName = insuredDTO.name
|
||||
this.insuredPhone = insuredDTO.mobile
|
||||
this.insuredGender = insuredDTO.sex === '0' ? '男' : insuredDTO.sex === '1' ? '女' : '-'
|
||||
this.insuredBirthday = insuredDTO.birthday
|
||||
}
|
||||
let orderInfoDTO = res.content.data.orderInfoDTO
|
||||
if (orderInfoDTO) {
|
||||
this.orderNumber = orderInfoDTO.prtNo
|
||||
this.effectiveDate = orderInfoDTO.cvaliDate
|
||||
this.expireDate = orderInfoDTO.expiryDate
|
||||
}
|
||||
}
|
||||
} else {
|
||||
this.$toast(res.resultMessage)
|
||||
}
|
||||
},
|
||||
blankFilter(val) {
|
||||
return val ? val : '-'
|
||||
return this[val] ? this[val] : '-'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
<th>序号</th>
|
||||
<th>生效日</th>
|
||||
<th>投保人</th>
|
||||
<th>分单日</th>
|
||||
<th>分单号</th>
|
||||
<th>到期日</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -30,8 +30,8 @@
|
||||
<template v-if="tableData.length">
|
||||
<tr v-for="(data, i) in tableData" :key="i" @click="toDetail(data)">
|
||||
<td>{{ i + 1 }}</td>
|
||||
<td v-for="(value, key, j) in data" :key="j">
|
||||
{{ value }}
|
||||
<td v-for="(key, j) in keys" :key="j">
|
||||
{{ data[key] }}
|
||||
</td>
|
||||
</tr>
|
||||
</template>
|
||||
@@ -44,7 +44,7 @@
|
||||
|
||||
<!-- 分页 -->
|
||||
<div class="pagination bg-white" v-if="tableData.length">
|
||||
<van-pagination v-model="currentPage" :total-items="totalItems" :items-per-page="10" />
|
||||
<van-pagination v-model="currentPage" :total-items="totalItems" :items-per-page="10" @change="onPageChanged" />
|
||||
</div>
|
||||
|
||||
<!-- 弹出层 -->
|
||||
@@ -96,6 +96,7 @@ export default {
|
||||
idSidebarShow: false,
|
||||
isSearchDateShow: false,
|
||||
tableData: [],
|
||||
keys: ['startDate', 'prtName', 'prtNo', 'endDate'],
|
||||
form: {
|
||||
availableDate: '',
|
||||
applicant: ''
|
||||
@@ -115,6 +116,11 @@ export default {
|
||||
this.getData()
|
||||
},
|
||||
methods: {
|
||||
onPageChanged(page) {
|
||||
this.currentPage = page
|
||||
this.param.pageInfo.pageNum = page
|
||||
this.getData()
|
||||
},
|
||||
queryData() {
|
||||
if (!this.param.startDate) {
|
||||
return this.$toast('请选择生效日')
|
||||
@@ -132,10 +138,12 @@ export default {
|
||||
},
|
||||
async getData(param) {
|
||||
const res = await selectHgb(param ? param : this.param)
|
||||
console.dir(res)
|
||||
if (res.result === '0') {
|
||||
this.cvilNum = res.content.cvilNum
|
||||
this.uncvilNum = res.content.uncvilNum
|
||||
this.totalItems = res.content.list.total
|
||||
this.tableData = res.content.list.list
|
||||
} else {
|
||||
this.$toast(res.resultMessage)
|
||||
}
|
||||
@@ -145,9 +153,9 @@ export default {
|
||||
this.$jump({
|
||||
flag: 'h5',
|
||||
extra: {
|
||||
url: location.origin + `/#/hgb/orderDetail`
|
||||
url: location.origin + `/#/hgb/orderDetail/${data.prtNo}`
|
||||
},
|
||||
routerInfo: { path: `/hgb/orderDetail` }
|
||||
routerInfo: { path: `/hgb/orderDetail/${data.prtNo}` }
|
||||
})
|
||||
},
|
||||
onSideBarClosed() {
|
||||
|
||||
Reference in New Issue
Block a user