mirror of
http://112.124.100.131/GFRS/ebiz-h5.git
synced 2025-12-16 09:56:44 +08:00
Merge branch 'feature/GFRS-2065【1125】惠桂保数据导入' into release/1203
This commit is contained in:
19
src/api/ebiz/hgb/index.js
Normal file
19
src/api/ebiz/hgb/index.js
Normal file
@@ -0,0 +1,19 @@
|
||||
import request from '@/assets/js/utils/request'
|
||||
import getUrl from '@/assets/js/utils/get-url'
|
||||
|
||||
// 惠桂保数据查询
|
||||
export function selectHgb(data) {
|
||||
return request({
|
||||
url: getUrl('/sale/order/selectHgb', 1),
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function selectHgbDetail(data) {
|
||||
return request({
|
||||
url: getUrl('/sale/order/getHgbDetail', 1),
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
@@ -90,6 +90,8 @@ let renewalManage = [
|
||||
'/renewal/getRenewalList' //续期列表查询
|
||||
]
|
||||
|
||||
let hgb = ['/sale/order/selectHgb', '/sale/order/getHgbDetail']
|
||||
|
||||
let whiteList = [
|
||||
'/customer/agent/getCustomersList',
|
||||
...proposal,
|
||||
@@ -100,7 +102,8 @@ let whiteList = [
|
||||
...manpower,
|
||||
...productStore,
|
||||
...preserve,
|
||||
...renewalManage
|
||||
...renewalManage,
|
||||
...hgb
|
||||
]
|
||||
|
||||
// 创建axios实例
|
||||
|
||||
22
src/router/ebiz/hgb.js
Normal file
22
src/router/ebiz/hgb.js
Normal file
@@ -0,0 +1,22 @@
|
||||
// 惠桂保路由信息
|
||||
const HgbIndex = () => import('@/views/ebiz/hgb')
|
||||
const Detail = () => import('@/views/ebiz/hgb/Detail')
|
||||
export default [
|
||||
{
|
||||
name: 'HgbIndex',
|
||||
path: '/hgb/index',
|
||||
component: HgbIndex,
|
||||
meta: {
|
||||
title: '惠桂保客户清单'
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'HgbDetail',
|
||||
path: '/hgb/orderDetail/:prtNo',
|
||||
component: Detail,
|
||||
props: true,
|
||||
meta: {
|
||||
title: '保单详情'
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -25,6 +25,7 @@ import attendance from './attendance'
|
||||
|
||||
import renewalManage from './renewalManage'
|
||||
import question from './question'
|
||||
import hgb from './hgb'
|
||||
export default [
|
||||
...proposal,
|
||||
...sale,
|
||||
@@ -49,5 +50,6 @@ export default [
|
||||
...attendance,
|
||||
...congratulation,
|
||||
...renewalManage,
|
||||
...question
|
||||
...question,
|
||||
...hgb
|
||||
] //根据需要进行删减
|
||||
|
||||
81
src/views/ebiz/hgb/Detail.vue
Normal file
81
src/views/ebiz/hgb/Detail.vue
Normal file
@@ -0,0 +1,81 @@
|
||||
<template>
|
||||
<div class="hgb-detail bg-white mt10 p20">
|
||||
<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: [
|
||||
{ rowName: '保单号', key: 'orderNumber' },
|
||||
{ rowName: '投保人姓名', key: 'applicantName' },
|
||||
{ rowName: '投保人电话', key: 'applicantPhone' },
|
||||
{ rowName: '被保人姓名', key: 'insuredName' },
|
||||
{ rowName: '被保人电话', key: 'insuredPhone' },
|
||||
{ rowName: '被保人性别', key: 'insuredGender' },
|
||||
{ rowName: '被保人出生日期', key: 'insuredBirthday' },
|
||||
{ rowName: '生效日', key: 'effectiveDate' },
|
||||
{ rowName: '到期日', key: 'expireDate' }
|
||||
],
|
||||
orderNumber: '',
|
||||
applicantName: '',
|
||||
applicantPhone: '',
|
||||
insuredName: '',
|
||||
insuredPhone: '',
|
||||
insuredGender: '',
|
||||
insuredBirthday: '',
|
||||
effectiveDate: '',
|
||||
expireDate: ''
|
||||
}
|
||||
},
|
||||
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 this[val] ? this[val] : '-'
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
::v-deep .van-cell::after {
|
||||
border: none;
|
||||
}
|
||||
</style>
|
||||
304
src/views/ebiz/hgb/index.vue
Normal file
304
src/views/ebiz/hgb/index.vue
Normal file
@@ -0,0 +1,304 @@
|
||||
<template>
|
||||
<van-pull-refresh style="height: 100vh;" v-model="isLoading" @refresh="onRefresh">
|
||||
<div class="hgb bg-white">
|
||||
<p class="title p15">惠桂保销售量</p>
|
||||
<div class="order-count">
|
||||
<div class="available-count">
|
||||
<p class="count-num active">{{ cvilNum }}</p>
|
||||
<p class="count-text active">生效单量</p>
|
||||
</div>
|
||||
<div class="unavailable-count">
|
||||
<p class="count-num inactive">{{ uncvilNum }}</p>
|
||||
<p class="count-text inactive">失效单量</p>
|
||||
</div>
|
||||
</div>
|
||||
<p class="title p15 search">
|
||||
<span>惠桂保客户明细</span>
|
||||
<van-icon name="search" @click="idSidebarShow = true" />
|
||||
</p>
|
||||
|
||||
<div class="table-container pb60">
|
||||
<table class="gridtable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width: 3em;">序号</th>
|
||||
<th class="fixedWidth">生效日</th>
|
||||
<th style="width: 4em;">投保人</th>
|
||||
<th class="fixedWidth">分单号</th>
|
||||
<th class="fixedWidth">到期日</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<template v-if="tableData.length">
|
||||
<tr v-for="(data, i) in tableData" :key="i" @click="toDetail(data)">
|
||||
<td>{{ i + 1 }}</td>
|
||||
<td v-for="(key, j) in keys" :key="j">
|
||||
{{ data[key] }}
|
||||
</td>
|
||||
</tr>
|
||||
</template>
|
||||
<tr v-else>
|
||||
<td colspan="5">
|
||||
<span style="margin-left: -20%;" v-if="isDataLoaded">暂无数据</span>
|
||||
<van-loading style="margin-left: -20%;" v-else type="spinner" />
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<!-- 分页 -->
|
||||
<div class="pagination bg-white" v-if="tableData.length">
|
||||
<van-pagination v-model="currentPage" :total-items="totalItems" :items-per-page="10" @change="onPageChanged" />
|
||||
</div>
|
||||
|
||||
<!-- 弹出层 -->
|
||||
<van-popup
|
||||
@click.native.self="isSearchDateShow = false"
|
||||
v-model="idSidebarShow"
|
||||
position="left"
|
||||
:style="{ width: '70vw', height: '100%' }"
|
||||
@open="onSidebarOpen"
|
||||
>
|
||||
<p class="p15 fw600">查找</p>
|
||||
<van-field v-model="param.startDate" label="生效日" placeholder="请选择" readonly @click="isSearchDateShow = true" />
|
||||
<van-field v-model="param.prtName" maxlength="10" label="投保人" placeholder="请输入" />
|
||||
|
||||
<div class="btn-group">
|
||||
<van-button size="small" @click="idSidebarShow = false">取消</van-button>
|
||||
<van-button size="small" type="danger" @click="queryData">确定</van-button>
|
||||
</div>
|
||||
|
||||
<transition name="van-slide-up">
|
||||
<div class="search-date" v-show="isSearchDateShow">
|
||||
<van-datetime-picker v-model="currentDate" type="date" @confirm="onSearchDateConfirm" @cancel="isSearchDateShow = false" />
|
||||
</div>
|
||||
</transition>
|
||||
</van-popup>
|
||||
</div>
|
||||
</van-pull-refresh>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { Popup, DatetimePicker, Field, Pagination, PullRefresh, Loading, Icon } from 'vant'
|
||||
import { getAgentInfo } from '@/api/ebiz/my/my'
|
||||
import { selectHgb } from '@/api/ebiz/hgb'
|
||||
import dateUtil from '@/assets/js/utils/date-utils'
|
||||
|
||||
export default {
|
||||
name: 'HgbIndex',
|
||||
components: {
|
||||
[Popup.name]: Popup,
|
||||
[DatetimePicker.name]: DatetimePicker,
|
||||
[Field.name]: Field,
|
||||
[Pagination.name]: Pagination,
|
||||
[PullRefresh.name]: PullRefresh,
|
||||
[Loading.name]: Loading,
|
||||
[Icon.name]: Icon
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
isDataLoaded: false,
|
||||
isLoading: false,
|
||||
totalItems: 0,
|
||||
cvilNum: 0,
|
||||
uncvilNum: 0,
|
||||
currentDate: new Date(),
|
||||
idSidebarShow: false,
|
||||
isSearchDateShow: false,
|
||||
tableData: [],
|
||||
keys: ['startDate', 'prtName', 'prtNo', 'endDate'],
|
||||
form: {
|
||||
availableDate: '',
|
||||
applicant: ''
|
||||
},
|
||||
currentPage: 1,
|
||||
param: {
|
||||
prtName: '',
|
||||
startDate: '',
|
||||
agentIdNo: '',
|
||||
pageInfo: {
|
||||
pageNum: 1,
|
||||
pageSize: 10
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
const res = await getAgentInfo({})
|
||||
if (res.result === '0') {
|
||||
this.param.agentIdNo = res.cardNo
|
||||
this.getData()
|
||||
} else {
|
||||
this.$toast(res.resultMessage)
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onRefresh() {
|
||||
location.reload()
|
||||
},
|
||||
onPageChanged(page) {
|
||||
this.currentPage = page
|
||||
this.param.pageInfo.pageNum = page
|
||||
this.getData()
|
||||
},
|
||||
queryData() {
|
||||
this.currentPage = 1
|
||||
this.param.pageInfo.pageNum = 1
|
||||
this.getData({ ...this.param })
|
||||
this.idSidebarShow = false
|
||||
},
|
||||
onSearchDateConfirm(date) {
|
||||
this.param.startDate = dateUtil.formatDate(date, 'yyyy-MM-dd')
|
||||
this.isSearchDateShow = false
|
||||
},
|
||||
async getData(param) {
|
||||
const res = await selectHgb(param ? param : this.param)
|
||||
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
|
||||
this.isDataLoaded = true
|
||||
} else {
|
||||
this.$toast(res.resultMessage)
|
||||
}
|
||||
},
|
||||
toDetail(data) {
|
||||
this.$jump({
|
||||
flag: 'h5',
|
||||
extra: {
|
||||
url: location.origin + `/#/hgb/orderDetail/${data.prtNo}`
|
||||
},
|
||||
routerInfo: { path: `/hgb/orderDetail/${data.prtNo}` }
|
||||
})
|
||||
},
|
||||
onSidebarOpen() {
|
||||
this.param.startDate = ''
|
||||
this.param.prtName = ''
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
#app {
|
||||
height: 100vh;
|
||||
}
|
||||
</style>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.hgb {
|
||||
.search {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
.search-date {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
}
|
||||
.btn-group {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: space-evenly;
|
||||
position: absolute;
|
||||
bottom: 20px;
|
||||
}
|
||||
.order-count {
|
||||
text-align: center;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
width: 70vw;
|
||||
margin: 0 auto;
|
||||
border: 1px solid #e4e4e4;
|
||||
border-radius: 15px;
|
||||
.available-count {
|
||||
border-right: 1px solid #e4e4e4;
|
||||
}
|
||||
.available-count,
|
||||
.unavailable-count {
|
||||
flex: 1;
|
||||
padding: 20px;
|
||||
}
|
||||
.count-num {
|
||||
font-size: 20px;
|
||||
font-weight: bolder;
|
||||
}
|
||||
.count-text {
|
||||
margin-top: 1em;
|
||||
font-size: 14px;
|
||||
font-weight: bolder;
|
||||
}
|
||||
.active {
|
||||
color: #ff0000;
|
||||
}
|
||||
.inactive {
|
||||
color: #949494;
|
||||
}
|
||||
}
|
||||
.table-container {
|
||||
padding: 2px;
|
||||
overflow: auto;
|
||||
table.gridtable {
|
||||
font-size: 12px;
|
||||
min-width: 120vw;
|
||||
border-width: 1px;
|
||||
border-color: #e4e4e4;
|
||||
border-collapse: collapse;
|
||||
thead {
|
||||
background-color: #ff0033;
|
||||
color: #fff;
|
||||
border: 1px solid #ff0033;
|
||||
}
|
||||
th {
|
||||
font-weight: normal;
|
||||
padding: 8px;
|
||||
}
|
||||
th.fixedWidth {
|
||||
width: 6em;
|
||||
}
|
||||
th:nth-of-type(4) {
|
||||
width: 10em;
|
||||
}
|
||||
td {
|
||||
border-width: 1px;
|
||||
border-style: solid;
|
||||
border-color: #e4e4e4;
|
||||
background-color: #ffffff;
|
||||
text-align: center;
|
||||
padding: 9px 0;
|
||||
border: 1px solid #bcbcbc;
|
||||
word-break: break-all;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.pagination {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
}
|
||||
}
|
||||
|
||||
::v-deep .van-pagination__item {
|
||||
color: #ff0033;
|
||||
}
|
||||
|
||||
::v-deep .van-pagination__item--active {
|
||||
background-color: #ff0033;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.van-pull-refresh {
|
||||
overflow: auto;
|
||||
background-color: #ffffff;
|
||||
}
|
||||
|
||||
::v-deep .van-pull-refresh__track {
|
||||
height: 100%;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user