|
@@ -1,6 +1,22 @@
|
|
|
<!-- 欠费统计 -->
|
|
|
<template>
|
|
|
<view class="container">
|
|
|
+ <view class="tab">
|
|
|
+ <u-tabs
|
|
|
+ :list="tabList"
|
|
|
+ lineColor="#fff"
|
|
|
+ :activeStyle="{
|
|
|
+ color: '#fff',
|
|
|
+ fontWeight: 'bold',
|
|
|
+ transform: 'scale(1.05)'
|
|
|
+ }"
|
|
|
+ :inactiveStyle="{
|
|
|
+ color: '#000',
|
|
|
+ transform: 'scale(1)'
|
|
|
+ }"
|
|
|
+ @click="tabClick">
|
|
|
+ </u-tabs>
|
|
|
+ </view>
|
|
|
<view class="table">
|
|
|
<view class="table-date" v-if="currentDate">{{ currentDate.join(' 至 ') }}</view>
|
|
|
<view class="table-box">
|
|
@@ -45,12 +61,28 @@
|
|
|
total: 0,
|
|
|
list: []
|
|
|
},
|
|
|
+ tabCurName: 'road',
|
|
|
currentDate: [],
|
|
|
beginTime: undefined,
|
|
|
- endTime: undefined
|
|
|
+ endTime: undefined,
|
|
|
+ tabList: [
|
|
|
+ { name: '路段', value: 'road' },
|
|
|
+ { name: '停车场', value: 'parking' }
|
|
|
+ ]
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+ tabClick(item) {
|
|
|
+ this.tabCurName = item.value
|
|
|
+ this.tableData.current = 1
|
|
|
+ if (this.tabCurName === 'road') {
|
|
|
+ this.getArreasReportTotal()
|
|
|
+ this.getArreasReportList()
|
|
|
+ } else {
|
|
|
+ this.getParkingArreasReportTotal()
|
|
|
+ this.getParkingArreasReportList()
|
|
|
+ }
|
|
|
+ },
|
|
|
getData(data) {
|
|
|
if (data.length) {
|
|
|
this.beginTime = data[0]
|
|
@@ -58,8 +90,13 @@
|
|
|
}
|
|
|
this.currentDate = data
|
|
|
this.tableData.current = 1
|
|
|
- this.getArreasReportTotal()
|
|
|
- this.getArreasReportList()
|
|
|
+ if (this.tabCurName === 'road') {
|
|
|
+ this.getArreasReportTotal()
|
|
|
+ this.getArreasReportList()
|
|
|
+ } else {
|
|
|
+ this.getParkingArreasReportTotal()
|
|
|
+ this.getParkingArreasReportList()
|
|
|
+ }
|
|
|
},
|
|
|
getArreasReportTotal() {
|
|
|
uni.$u.api.statisticalReportApi.getArrearsReportTotalApi({
|
|
@@ -71,6 +108,16 @@
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
+ getParkingArreasReportTotal() {
|
|
|
+ uni.$u.api.statisticalReportApi.getParkingArrearsReportTotalApi({
|
|
|
+ beginTime: this.beginTime,
|
|
|
+ endTime: this.endTime
|
|
|
+ }).then(res => {
|
|
|
+ if (res.code === 200) {
|
|
|
+ this.totalData = res.data
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
getArreasReportList() {
|
|
|
this.loading = true
|
|
|
uni.$u.api.statisticalReportApi.getArrearsReportListApi({
|
|
@@ -86,9 +133,28 @@
|
|
|
this.loading = false
|
|
|
})
|
|
|
},
|
|
|
+ getParkingArreasReportList() {
|
|
|
+ this.loading = true
|
|
|
+ uni.$u.api.statisticalReportApi.getParkingArrearsReportListApi({
|
|
|
+ beginTime: this.beginTime,
|
|
|
+ endTime: this.endTime,
|
|
|
+ pageNum: this.tableData.current,
|
|
|
+ pageSize: 10
|
|
|
+ }).then(res => {
|
|
|
+ if (res.code === 200) {
|
|
|
+ this.tableData.list = res.rows
|
|
|
+ this.tableData.total = res.total
|
|
|
+ }
|
|
|
+ this.loading = false
|
|
|
+ })
|
|
|
+ },
|
|
|
pageChange(cur) {
|
|
|
this.tableData.current = cur
|
|
|
- this.getArreasReportList()
|
|
|
+ if (this.tabCurName === 'road') {
|
|
|
+ this.getArreasReportList()
|
|
|
+ } else {
|
|
|
+ this.getParkingArreasReportList()
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -96,5 +162,8 @@
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
@import './report.scss';
|
|
|
+ .tab {
|
|
|
+ margin-bottom: 10px;
|
|
|
+ }
|
|
|
</style>
|
|
|
|