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>
<van-pull-refresh v-model="isLoading" @refresh="onRefresh">
<div class="hgb bg-white pb60">
<p class="title p15">惠桂保销售量</p>
<div class="order-count">
@@ -71,10 +72,11 @@
</transition>
</van-popup>
</div>
</van-pull-refresh>
</template>
<script>
import { Popup, DatetimePicker, Field, Pagination } from 'vant'
import { Popup, DatetimePicker, Field, Pagination, PullRefresh } from 'vant'
import { selectHgb } from '@/api/ebiz/hgb'
import dateUtil from '@/assets/js/utils/date-utils'
@@ -84,10 +86,12 @@ export default {
[Popup.name]: Popup,
[DatetimePicker.name]: DatetimePicker,
[Field.name]: Field,
[Pagination.name]: Pagination
[Pagination.name]: Pagination,
[PullRefresh.name]: PullRefresh
},
data() {
return {
isLoading: false,
totalItems: 0,
cvilNum: 0,
uncvilNum: 0,
@@ -116,6 +120,9 @@ export default {
this.getData()
},
methods: {
onRefresh() {
location.reload()
},
onPageChanged(page) {
this.currentPage = page
this.param.pageInfo.pageNum = page
@@ -128,11 +135,12 @@ export default {
if (!this.param.prtName.trim()) {
return this.$toast('请输入担保人')
}
this.currentPage = 1
this.param.pageInfo.pageNum = 1
this.getData({ ...this.param })
this.idSidebarShow = false
},
onSearchDateConfirm(date) {
console.log(dateUtil.formatDate(date, 'yyyy-MM-dd'))
this.param.startDate = dateUtil.formatDate(date, 'yyyy-MM-dd')
this.isSearchDateShow = false
},