mirror of
http://112.124.100.131/GFRS/ebiz-h5.git
synced 2025-12-12 16:06:44 +08:00
feature: 惠桂保数据查询
1. 增加刷新功能
This commit is contained in:
@@ -1,80 +1,82 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="hgb bg-white pb60">
|
<van-pull-refresh v-model="isLoading" @refresh="onRefresh">
|
||||||
<p class="title p15">惠桂保销售量</p>
|
<div class="hgb bg-white pb60">
|
||||||
<div class="order-count">
|
<p class="title p15">惠桂保销售量</p>
|
||||||
<div class="available-count">
|
<div class="order-count">
|
||||||
<p class="count-num active">{{ cvilNum }}</p>
|
<div class="available-count">
|
||||||
<p class="count-text active">生效单量</p>
|
<p class="count-num active">{{ cvilNum }}</p>
|
||||||
</div>
|
<p class="count-text active">生效单量</p>
|
||||||
<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">
|
|
||||||
<table class="table">
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th>序号</th>
|
|
||||||
<th>生效日</th>
|
|
||||||
<th>投保人</th>
|
|
||||||
<th>分单号</th>
|
|
||||||
<th>到期日</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">暂无数据</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%' }"
|
|
||||||
@close="onSideBarClosed"
|
|
||||||
>
|
|
||||||
<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" :max-date="maxDate" @confirm="onSearchDateConfirm" @cancel="isSearchDateShow = false" />
|
|
||||||
</div>
|
</div>
|
||||||
</transition>
|
<div class="unavailable-count">
|
||||||
</van-popup>
|
<p class="count-num inactive">{{ uncvilNum }}</p>
|
||||||
</div>
|
<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">
|
||||||
|
<table class="table">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>序号</th>
|
||||||
|
<th>生效日</th>
|
||||||
|
<th>投保人</th>
|
||||||
|
<th>分单号</th>
|
||||||
|
<th>到期日</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">暂无数据</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%' }"
|
||||||
|
@close="onSideBarClosed"
|
||||||
|
>
|
||||||
|
<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" :max-date="maxDate" @confirm="onSearchDateConfirm" @cancel="isSearchDateShow = false" />
|
||||||
|
</div>
|
||||||
|
</transition>
|
||||||
|
</van-popup>
|
||||||
|
</div>
|
||||||
|
</van-pull-refresh>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { Popup, DatetimePicker, Field, Pagination } from 'vant'
|
import { Popup, DatetimePicker, Field, Pagination, PullRefresh } from 'vant'
|
||||||
import { selectHgb } from '@/api/ebiz/hgb'
|
import { selectHgb } from '@/api/ebiz/hgb'
|
||||||
import dateUtil from '@/assets/js/utils/date-utils'
|
import dateUtil from '@/assets/js/utils/date-utils'
|
||||||
|
|
||||||
@@ -84,10 +86,12 @@ export default {
|
|||||||
[Popup.name]: Popup,
|
[Popup.name]: Popup,
|
||||||
[DatetimePicker.name]: DatetimePicker,
|
[DatetimePicker.name]: DatetimePicker,
|
||||||
[Field.name]: Field,
|
[Field.name]: Field,
|
||||||
[Pagination.name]: Pagination
|
[Pagination.name]: Pagination,
|
||||||
|
[PullRefresh.name]: PullRefresh
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
isLoading: false,
|
||||||
totalItems: 0,
|
totalItems: 0,
|
||||||
cvilNum: 0,
|
cvilNum: 0,
|
||||||
uncvilNum: 0,
|
uncvilNum: 0,
|
||||||
@@ -116,6 +120,9 @@ export default {
|
|||||||
this.getData()
|
this.getData()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
onRefresh() {
|
||||||
|
location.reload()
|
||||||
|
},
|
||||||
onPageChanged(page) {
|
onPageChanged(page) {
|
||||||
this.currentPage = page
|
this.currentPage = page
|
||||||
this.param.pageInfo.pageNum = page
|
this.param.pageInfo.pageNum = page
|
||||||
@@ -128,11 +135,12 @@ export default {
|
|||||||
if (!this.param.prtName.trim()) {
|
if (!this.param.prtName.trim()) {
|
||||||
return this.$toast('请输入担保人')
|
return this.$toast('请输入担保人')
|
||||||
}
|
}
|
||||||
|
this.currentPage = 1
|
||||||
|
this.param.pageInfo.pageNum = 1
|
||||||
this.getData({ ...this.param })
|
this.getData({ ...this.param })
|
||||||
this.idSidebarShow = false
|
this.idSidebarShow = false
|
||||||
},
|
},
|
||||||
onSearchDateConfirm(date) {
|
onSearchDateConfirm(date) {
|
||||||
console.log(dateUtil.formatDate(date, 'yyyy-MM-dd'))
|
|
||||||
this.param.startDate = dateUtil.formatDate(date, 'yyyy-MM-dd')
|
this.param.startDate = dateUtil.formatDate(date, 'yyyy-MM-dd')
|
||||||
this.isSearchDateShow = false
|
this.isSearchDateShow = false
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user