feature: 惠桂保数据查询

1. 增加刷新功能
This commit is contained in:
mengxiaolong
2020-11-26 11:08:24 +08:00
parent 73c9d0d5fb
commit 290651af10

View File

@@ -1,4 +1,5 @@
<template> <template>
<van-pull-refresh v-model="isLoading" @refresh="onRefresh">
<div class="hgb bg-white pb60"> <div class="hgb bg-white pb60">
<p class="title p15">惠桂保销售量</p> <p class="title p15">惠桂保销售量</p>
<div class="order-count"> <div class="order-count">
@@ -71,10 +72,11 @@
</transition> </transition>
</van-popup> </van-popup>
</div> </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
}, },