Pārlūkot izejas kodu

对接统计报表和调整页面

空白格 3 gadi atpakaļ
vecāks
revīzija
69559957be

+ 28 - 0
common/apiurl.js

@@ -36,5 +36,33 @@ export const apiurl = {
 		getPaymentWaysDataUrl: '/admin/overview/paysource',
 		// 获取支付来源分析接口
 		getPaySourceDataUrl: '/admin/overview/payplat'
+	},
+	// 统计报表模块接口
+	statisticalReport: {
+		// 获取收费员业绩统计接口
+		getTollCollectorAchieveTotalUrl: '/admin/report/payeetotal',
+		// 获取收费员业绩统计列表接口
+		getTollCollectorAchieveListUrl: '/admin/report/payee',
+		// 获取路段泊位统计接口
+		getRoadSpaceTotalUrl: '/admin/report/spacetotal',
+		// 获取路段泊位列表接口
+		getRoadSpaceListUrl: '/admin/report/space',
+		// 获取欠费统计接口
+		getArrearsReportTotalUrl: '/admin/report/owetotal',
+		// 获取欠费统计列表接口
+		getArrearsReportListUrl: '/admin/report/owe',
+		// 获取营收统计接口
+		getIncomeTotalUrl: '/admin/report/incometotal',
+		// 获取营收列表接口
+		getIncomeListUrl: '/admin/report/income',
+		// 获取实收应收分析列表接口
+		getReallyReceivableListUrl: '/admin/report/amt',
+		// 获取考勤统计列表接口
+		getPunchListUrl: '/admin/report/punch'
+	},
+	// 设备异常记录模块接口
+	deviceAbnormal: {
+		// 获取设备异常记录列表接口
+		getDeviceAbnormalListUrl: '/admin/deviceexcptionoper'
 	}
 }

+ 103 - 15
common/http.api.js

@@ -13,43 +13,131 @@ const install = (Vue, vm) => {
 	// 今日概况
 	let todayOverviewApi = {
 		// 获取今日概况
-		getTodayDataApi: (params = {}) => vm.$u.http.get(apiurl.todayOverview.getTodayDataUrl, params),
+		getTodayDataApi: (params = {}) => vm.$u.http.get(apiurl.todayOverview.getTodayDataUrl, {
+			params
+		}),
 		// 获取路段概况
-		getRoadDataApi: (params = {}) => vm.$u.http.get(apiurl.todayOverview.getRoadDataUrl, params),
+		getRoadDataApi: (params = {}) => vm.$u.http.get(apiurl.todayOverview.getRoadDataUrl, {
+			params
+		}),
 		// 获取停车场概况
-		getParkingLotDataApi: (params = {}) => vm.$u.http.get(apiurl.todayOverview.getParkingLotDataUrl, params)
+		getParkingLotDataApi: (params = {}) => vm.$u.http.get(apiurl.todayOverview.getParkingLotDataUrl, {
+			params
+		})
 	};
 	// 运营分析
 	let operationalAnalysisApi = {
 		// 获取营收分析
-		getRevenueDataApi: (params = {}) => vm.$u.http.get(apiurl.operationalAnalysis.getRevenueDataUrl, { params }),
+		getRevenueDataApi: (params = {}) => vm.$u.http.get(apiurl.operationalAnalysis.getRevenueDataUrl, {
+			params
+		}),
 		// 获取路段/停车场营收排行
-		getParkingLotRevenueDataApi: (params = {}) => vm.$u.http.get(apiurl.operationalAnalysis.getParkingLotRevenueDataUrl, { params }),
+		getParkingLotRevenueDataApi: (params = {}) => vm.$u.http.get(apiurl.operationalAnalysis
+			.getParkingLotRevenueDataUrl, {
+				params
+			}),
 		// 获取车流量分析
-		getTrafficFlowDataApi: (params = {}) => vm.$u.http.get(apiurl.operationalAnalysis.getTrafficFlowDataUrl, { params }),
+		getTrafficFlowDataApi: (params = {}) => vm.$u.http.get(apiurl.operationalAnalysis
+			.getTrafficFlowDataUrl, {
+				params
+			}),
 		// 获取收费员业绩排行
-		getTollCollectorPerformanceApi: (params = {}) => vm.$u.http.get(apiurl.operationalAnalysis.getTollCollectorPerformanceUrl, { params }),
+		getTollCollectorPerformanceApi: (params = {}) => vm.$u.http.get(apiurl.operationalAnalysis
+			.getTollCollectorPerformanceUrl, {
+				params
+			}),
 		// 获取营收趋势统计
-		getRevenueTrendsDataApi: (params = {}) => vm.$u.http.get(apiurl.operationalAnalysis.getRevenueTrendsDataUrl, { params }),
+		getRevenueTrendsDataApi: (params = {}) => vm.$u.http.get(apiurl.operationalAnalysis
+			.getRevenueTrendsDataUrl, {
+				params
+			}),
 		// 获取路段分析车流量分析
-		getRoadTrafficFlowDataApi: (params = {}) => vm.$u.http.get(apiurl.operationalAnalysis.getRoadTrafficFlowDataUrl, { params }),
+		getRoadTrafficFlowDataApi: (params = {}) => vm.$u.http.get(apiurl.operationalAnalysis
+			.getRoadTrafficFlowDataUrl, {
+				params
+			}),
 		// 获取欠费分析
-		getArrearsDataApi: (params = {}) => vm.$u.http.get(apiurl.operationalAnalysis.getArrearsDataUrl, { params }),
+		getArrearsDataApi: (params = {}) => vm.$u.http.get(apiurl.operationalAnalysis.getArrearsDataUrl, {
+			params
+		}),
 		// 获取收入分析
-		getIncomeDataApi: (params = {}) => vm.$u.http.get(apiurl.operationalAnalysis.getIncomeDataUrl, { params }),
+		getIncomeDataApi: (params = {}) => vm.$u.http.get(apiurl.operationalAnalysis.getIncomeDataUrl, {
+			params
+		}),
 		// 获取支付方式占比分析
-		getPaymentWaysDataApi: (params = {}) => vm.$u.http.get(apiurl.operationalAnalysis.getPaymentWaysDataUrl, { params }),
+		getPaymentWaysDataApi: (params = {}) => vm.$u.http.get(apiurl.operationalAnalysis
+			.getPaymentWaysDataUrl, {
+				params
+			}),
 		// 获取支付来源
-		getPaySourceDataApi: (params = {}) => vm.$u.http.get(apiurl.operationalAnalysis.getPaySourceDataUrl, { params })
+		getPaySourceDataApi: (params = {}) => vm.$u.http.get(apiurl.operationalAnalysis.getPaySourceDataUrl, {
+			params
+		})
+	};
+	// 统计报表模块
+	let statisticalReportApi = {
+		// 获取收费员业绩统计
+		getTollCollectorAchieveTotalApi: (params = {}) => vm.$u.http.get(apiurl.statisticalReport
+			.getTollCollectorAchieveTotalUrl, {
+				params
+			}),
+		// 获取收费员业绩统计列表
+		getTollCollectorAchieveListApi: (params = {}) => vm.$u.http.get(apiurl.statisticalReport
+			.getTollCollectorAchieveListUrl, {
+				params
+			}),
+		// 获取路段泊位统计
+		getRoadSpaceTotalApi: (params = {}) => vm.$u.http.get(apiurl.statisticalReport.getRoadSpaceTotalUrl, {
+			params
+		}),
+		// 获取路段泊位列表
+		getRoadSpaceListApi: (params = {}) => vm.$u.http.get(apiurl.statisticalReport.getRoadSpaceListUrl, {
+			params
+		}),
+		// 获取欠费统计
+		getArrearsReportTotalApi: (params = {}) => vm.$u.http.get(apiurl.statisticalReport
+			.getArrearsReportTotalUrl, {
+				params
+			}),
+		// 获取欠费统计列表
+		getArrearsReportListApi: (params = {}) => vm.$u.http.get(apiurl.statisticalReport
+			.getArrearsReportListUrl, {
+				params
+			}),
+		// 获取营收统计
+		getIncomeTotalApi: (params = {}) => vm.$u.http.get(apiurl.statisticalReport.getIncomeTotalUrl, {
+			params
+		}),
+		// 获取营收列表
+		getIncomeListApi: (params = {}) => vm.$u.http.get(apiurl.statisticalReport.getIncomeListUrl, {
+			params
+		}),
+		// 获取实收应收分析列表
+		getReallyReceivableListApi: (params = {}) => vm.$u.http.get(apiurl.statisticalReport.getReallyReceivableListUrl, {
+			params
+		}),
+		// 获取考勤统计列表
+		getPunchListApi: (params = {}) => vm.$u.http.get(apiurl.statisticalReport.getPunchListUrl, {
+			params
+		})
+	};
+	// 设备异常记录模块
+	let deviceAbnormalApi = {
+		// 获取设备异常记录列表
+		getDeviceAbnormalListApi: (params = {}) => vm.$u.http.get(apiurl.deviceAbnormal.getDeviceAbnormalListUrl, {
+			params
+		})
 	}
-	
+
 	// 将各个定义的接口名称,统一放进对象挂载到vm.$u.api(因为vm就是this,也即this.$u.api)下
 	vm.$u.api = {
 		loginApi,
 		logoutApi,
 		getDictApi,
 		todayOverviewApi,
-		operationalAnalysisApi
+		operationalAnalysisApi,
+		statisticalReportApi,
+		deviceAbnormalApi
 	};
 }
 export default {

+ 1 - 1
components/columnChart.vue

@@ -2,7 +2,7 @@
 <template>
 	<view class="charts-box">
 		<view class="charts-box-title">{{ title }}</view>
-		<qiun-data-charts type="column" :chartData="chartData" :opts="opts" />
+		<qiun-data-charts type="column" :canvas2d="true" :ontouch="true" :chartData="chartData" :opts="opts" />
 	</view>
 </template>
 

+ 1 - 1
components/lineChart.vue

@@ -2,7 +2,7 @@
 <template>
 	<view class="charts-box">
 		<view class="charts-box-title">{{ title }}</view>
-		<qiun-data-charts type="line" :chartData="chartData" :opts="opts" />
+		<qiun-data-charts type="line" :canvas2d="true" :ontouch="true" :chartData="chartData" :opts="opts" />
 	</view>
 </template>
 

+ 1 - 1
components/pieChart.vue

@@ -2,7 +2,7 @@
 <template>
 	<view class="charts-box">
 		<view class="charts-box-title">{{ title }}</view>
-		<qiun-data-charts type="pie" :chartData="chartData" :opts="opts" />
+		<qiun-data-charts type="pie" :canvas2d="true" :ontouch="true" :chartData="chartData" :opts="opts" />
 	</view>
 </template>
 

+ 5 - 1
components/tableRanking.vue

@@ -1,7 +1,7 @@
 <!-- 表格 -->
 <template>
 	<view class="container">
-		<view class="table">
+		<view class="table" :style="{ padding: padding }">
 			<view class="table-title" v-if="title">{{ title }}</view>
 			<view class="table-box">
 				<uni-table emptyText="暂无更多数据" :loading="loading">
@@ -38,6 +38,10 @@
 					return false
 				}
 			},
+			padding: {
+				type: String,
+				default: '15px'
+			},
 			tableTh: {
 				type: Array,
 				default: () => {

+ 6 - 3
pages/dataOverview/operationalAnalysis/components/revenueAnalysis.vue

@@ -2,7 +2,7 @@
 <template>
 	<view class="revenue">
 		<template v-if="type === 'line'">
-			<view class="revenue-line">
+			<view class="revenue-line" v-loading="loading">
 				<LineChart v-if="chartData.series[0].data.length" :chartData="chartData" :title="title"/>
 				<view class="empty" v-else>
 					<u-empty></u-empty>
@@ -10,7 +10,7 @@
 			</view>
 		</template>
 		<template v-else>
-			<view class="revenue-line">
+			<view class="revenue-line" v-loading="loading">
 				<ColumnChart v-if="chartData.series[0].data.length" :chartData="chartData" :title="title"/>
 				<view class="empty" v-else>
 					<u-empty></u-empty>
@@ -50,7 +50,8 @@
 						name: '',
 						data: []
 					}]
-				}
+				},
+				loading: false
 			}
 		},
 		methods: {
@@ -58,6 +59,7 @@
 			 * 获取数据
 			 */
 			getData({ reportType, queryDate }) {
+				this.loading = true
 				uni.$u.api.operationalAnalysisApi.getRevenueDataApi({ reportType, queryDate }).then(res => {
 					if (res.code === 200) {
 						if (res.data.itemList && res.data.itemList.length) {
@@ -72,6 +74,7 @@
 							this.chartData.series[0].data = []
 						}
 					}
+					this.loading = false
 				})
 			}
 		}

+ 13 - 9
pages/dataOverview/operationalAnalysis/components/sectionAnalysis.vue

@@ -38,23 +38,25 @@
 		data() {
 			return {
 				opts1: {
+					enableScroll: true,
 					xAxis: {
-						rotateLabel: true
+						rotateLabel: true,
+						scrollShow: true,
+						itemCount: 8
 					},
 					yAxis: {
 						showTitle: true,
 						splitNumber: 5,
 						data: [{
 							title: '收益(元)',
-							titleOffsetY: -5
+							titleOffsetY: -3
 						}]
 					},
 					legend: {
 						show: false
 					},
 					dataLabel: false,
-					enableScroll: false,
-					padding: [0, 0, 10, 0],
+					padding: [10, 0, 10, 0],
 					extra: {
 						column: {
 							width: 20
@@ -62,22 +64,26 @@
 					}
 				},
 				opts2: {
+					enableScroll: true,
 					xAxis: {
-						rotateLabel: true
+						rotateLabel: true,
+						scrollShow: true,
+						itemCount: 8
 					},
 					yAxis: {
 						showTitle: true,
 						splitNumber: 5,
 						data: [{
 							title: '车辆(辆)',
-							titleOffsetY: -5
+							titleOffsetY: 0,
+							titleOffsetX: 10
 						}]
 					},
 					legend: {
 						show: false
 					},
 					dataLabel: false,
-					padding: [0, 0, 10, 0],
+					padding: [10, 0, 10, 0],
 					extra: {
 						column: {
 							width: 20
@@ -124,7 +130,6 @@
 							this.revenueTrendsData.categories = []
 							this.revenueTrendsData.series[0].data = []
 						}
-						console.log(this.revenueTrendsData)
 					}
 				})
 			},
@@ -145,7 +150,6 @@
 							this.trafficFlowData.categories = []
 							this.trafficFlowData.series[0].data = []
 						}
-						console.log(this.trafficFlowData)
 					}
 				})
 			}

+ 21 - 8
pages/dataOverview/operationalAnalysis/operationalAnalysis.vue

@@ -201,7 +201,7 @@
 				this.params.queryDate = `${this.currentYear}-${this.currentMonth}-${this.currentDay}`
 				setTimeout(() => {
 					this.$refs[this.currentType.key].getData(this.params)
-				}, 500)
+				}, 100)
 			},
 			getYearList() {
 				const date = new Date()
@@ -236,14 +236,17 @@
 					list[0].push(obj)
 				}
 				setTimeout(() => {
-					this.defaultMonth = [month]
+					this.defaultMonth = [0]
 				}, 1000)
 				return list
 			},
 			getDayList() {
 				const date = new Date()
 				const year = date.getFullYear()
-				const month = date.getMonth()
+				let month = date.getMonth()
+				if (this.monthObj) {
+					month = parseInt(this.monthObj.value)
+				}
 				const day = date.getDate()
 				const dayLen = (new Date(year, month, 0)).getDate()
 				const list = [
@@ -261,7 +264,7 @@
 					list[0].push(obj)
 				}
 				setTimeout(() => {
-					this.defaultDay = [day - 1]
+					this.defaultDay = [0]
 				}, 1000)
 				return list
 			},
@@ -290,7 +293,10 @@
 			 */
 			typeConfirm(e) {
 				this.currentType = e.value[0]
-				this.typePicker = false
+				setTimeout(() => {
+					this.$refs[this.currentType.key].getData(this.params)
+					this.typePicker = false
+				}, 100)
 			},
 			yearConfirm(e) {
 				this.defaultYear = [e.indexs[0]]
@@ -298,7 +304,9 @@
 				this.currentYear = e.value[0].value
 				this.yearObj = e.value[0]
 				this.params.queryDate = `${this.currentYear}-${this.currentMonth}-${this.currentDay}`
-				this.$refs[this.currentType.key].getData(this.params)
+				setTimeout(() => {
+					this.$refs[this.currentType.key].getData(this.params)
+				}, 100)
 				this.yearPicker = false
 			},
 			monthConfirm(e) {
@@ -307,8 +315,11 @@
 				this.monthObj = e.value[0]
 				this.title = `${this.yearObj.text}-${this.monthObj.text}`
 				this.params.queryDate = `${this.currentYear}-${this.currentMonth}-${this.currentDay}`
-				this.$refs[this.currentType.key].getData(this.params)
+				setTimeout(() => {
+					this.$refs[this.currentType.key].getData(this.params)
+				}, 100)
 				this.monthPicker = false
+				this.dayList = this.getDayList()
 			},
 			dayConfirm(e) {
 				this.defaultDay = [e.indexs[0]]
@@ -317,7 +328,9 @@
 				this.dayObj = e.value[0]
 				this.title = `${this.yearObj.text}-${this.monthObj.text}-${this.dayObj.text}`
 				this.params.queryDate = `${this.currentYear}-${this.currentMonth}-${this.currentDay}`
-				this.$refs[this.currentType.key].getData(this.params)
+				setTimeout(() => {
+					this.$refs[this.currentType.key].getData(this.params)
+				}, 100)
 				this.dayPicker = false
 			}
 		}

+ 63 - 105
pages/dataOverview/statisticalReport/components/arrearsReport.vue

@@ -4,133 +4,91 @@
 		<view class="table">
 			<view class="table-date" v-if="currentDate">{{ currentDate.join(' 至 ') }}</view>
 			<view class="table-box">
-				<uni-table emptyText="暂无更多数据">
-					<!-- 表头行 -->
-					<uni-tr>
-						<uni-th class="table-box-th" align="center" v-for="(item, index) in tableTh" :key="index" :width="item.width || ''">{{ item.field }}
-						</uni-th>
-					</uni-tr>
-					<!-- 表格数据行 -->
-					<uni-tr v-for="(item, index) in tableData.list" :key="index">
-						<uni-td class="table-box-td" align="center">{{ item.road }}</uni-td>
-						<uni-td class="table-box-td" align="center">{{ item.road }}</uni-td>
-						<uni-td class="table-box-td" align="center">{{ item.num }}</uni-td>
-						<uni-td class="table-box-td" align="center">{{ item.really }}</uni-td>
-						<uni-td class="table-box-td" align="center">{{ item.really }}</uni-td>
-					</uni-tr>
-				</uni-table>
-			</view>
-			<view class="table-pagination">
-				<uni-pagination show-icon="true" :total="tableData.total" :current="tableData.current"></uni-pagination>
+				<TableRanking :loading="loading" :padding="'0'" :tableTh="tableTh" :tableData="tableData"
+					@pageChange="pageChange" />
 			</view>
 		</view>
 		<view class="total">
 			<view>
-				欠费次数<text>{{ totalData.num }}</text>次,欠费金额<text>{{ totalData.really }}</text>元
+				欠费次数<text>{{ totalData.oweCount || 0 }}</text>次,欠费金额<text>{{ totalData.amtOwe || 0 }}</text>元
 			</view>
 		</view>
 	</view>
 </template>
 
 <script>
+	import TableRanking from '@/components/tableRanking.vue'
 	export default {
+		components: {
+			TableRanking
+		},
 		props: {
-			currentDate: {
-				type: Array,
-				default: []
-			},
 			tableTh: {
 				type: Array,
 				default: () => {
 					return [
-						{ field: '车牌号', width: 120 },
-						{ field: '车主姓名', width: 120 },
-						{ field: '联系方式', width: 80 },
-						{ field: '欠费次数(次)', width: 80 },
-						{ field: '欠费金额(元)', width: 80 }
+						{ field: '车牌号', key: 'vehicleNo', width: 100 },
+						{ field: '车主姓名', key: 'name', width: 100 },
+						{ field: '联系方式', key: 'mobile', width: 100 },
+						{ field: '欠费次数(次)', width: 80, key: 'oweCount' },
+						{ field: '欠费金额(元)', width: 80, key: 'amtOwe' }
 					]
 				}
+			}
+		},
+		data() {
+			return {
+				loading: false,
+				totalData: {},
+				tableData: {
+					current: 1,
+					total: 0,
+					list: []
+				},
+				currentDate: [],
+				beginTime: undefined,
+				endTime: undefined
+			}
+		},
+		methods: {
+			getData(data) {
+				if (data.length) {
+					this.beginTime = data[0]
+					this.endTime = data[1]
+				}
+				this.currentDate = data
+				this.tableData.current = 1
+				this.getArreasReportTotal()
+				this.getArreasReportList()
 			},
-			tableData: {
-				type: Object,
-				default: () => {
-					return {
-						current: 1,
-						total: 30,
-						list: [{
-								num: 1001,
-								name: 'xxx',
-								road: '金科路',
-								really: 80
-							},
-							{
-								num: 1001,
-								name: 'xxx',
-								road: '金科路',
-								should: 100,
-								really: 80
-							},
-							{
-								num: 1001,
-								name: 'xxx',
-								road: '金科路',
-								should: 100,
-								really: 80
-							},
-							{
-								num: 1001,
-								name: 'xxx',
-								road: '金科路',
-								should: 100,
-								really: 80
-							},
-							{
-								num: 1001,
-								name: 'xxx',
-								road: '金科路',
-								should: 100,
-								really: 80
-							},
-							{
-								num: 1001,
-								name: 'xxx',
-								road: '金科路',
-								should: 100,
-								really: 80
-							},
-							{
-								num: 1001,
-								name: 'xxx',
-								road: '金科路',
-								should: 100,
-								really: 80
-							},
-							{
-								num: 1001,
-								name: 'xxx',
-								road: '金科路',
-								should: 100,
-								really: 80
-							},
-							{
-								num: 1001,
-								name: 'xxx',
-								road: '金科路',
-								should: 100,
-								really: 80
-							}
-						]
+			getArreasReportTotal() {
+				uni.$u.api.statisticalReportApi.getArrearsReportTotalApi({
+					beginTime: this.beginTime,
+					endTime: this.endTime
+				}).then(res => {
+					if (res.code === 200) {
+						this.totalData = res.data
 					}
-				}
+				})
 			},
-			totalData: {
-				type: Object,
-				default: () => {
-					return {
-						num: 100,
-						really: 80
+			getArreasReportList() {
+				this.loading = true
+				uni.$u.api.statisticalReportApi.getArrearsReportListApi({
+					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()
 			}
 		}
 	}

+ 100 - 100
pages/dataOverview/statisticalReport/components/checkWorkAttendance.vue

@@ -3,122 +3,122 @@
 	<view class="container">
 		<view class="table">
 			<view class="table-date" v-if="currentDate">{{ currentDate.join(' 至 ') }}</view>
-			<view class="table-box">
-				<uni-table emptyText="暂无更多数据">
-					<!-- 表头行 -->
-					<uni-tr>
-						<uni-th class="table-box-th" align="center" v-for="(item, index) in tableTh" :key="index" :width="item.width || ''">{{ item.field }}
-						</uni-th>
-					</uni-tr>
-					<!-- 表格数据行 -->
-					<uni-tr v-for="(item, index) in tableData.list" :key="index">
-						<uni-td class="table-box-td" align="center">{{ item.road }}</uni-td>
-						<uni-td class="table-box-td" align="center">{{ item.road }}</uni-td>
-						<uni-td class="table-box-td" align="center">{{ item.num }}</uni-td>
-						<uni-td class="table-box-td" align="center">{{ item.really }}</uni-td>
-						<uni-td class="table-box-td" align="center">{{ item.really }}</uni-td>
-						<uni-td class="table-box-td" align="center">{{ item.really }}</uni-td>
-					</uni-tr>
-				</uni-table>
+			<view class="table-search">
+				<view class="table-search-item">
+					<u--input class="input" placeholder="请输入工号" v-model="payeeNo"></u--input>
+				</view>
+				<view class="table-search-item">
+					<u--input class="input" placeholder="请输入姓名" v-model="payeeName"></u--input>
+				</view>
+				<view class="table-search-item">
+					<u-button class="btn" text="确认"
+						color="linear-gradient(157deg, #FECF4C 4%, #FECF4B 5%, #FCA225 100%)" :loading="loading" @click="confirm"></u-button>
+				</view>
 			</view>
-			<view class="table-pagination">
-				<uni-pagination show-icon="true" :total="tableData.total" :current="tableData.current"></uni-pagination>
+			<view class="table-box">
+				<TableRanking :loading="loading" :padding="'0'" :tableTh="tableTh" :tableData="tableData"
+					@pageChange="pageChange" />
 			</view>
 		</view>
 	</view>
 </template>
 
 <script>
+	import TableRanking from '@/components/tableRanking.vue'
 	export default {
+		components: {
+			TableRanking
+		},
 		props: {
-			currentDate: {
-				type: Array,
-				default: []
-			},
 			tableTh: {
 				type: Array,
 				default: () => {
-					return [
-						{ field: '工号', width: 80 },
-						{ field: '姓名', width: 80 },
-						{ field: '实出勤(天)', width: 90 },
-						{ field: '缺勤(天)', width: 80 },
-						{ field: '缺卡(次)', width: 80 },
-						{ field: '早退(次)', width: 80 },
+					return [{
+							field: '工号',
+							width: 80,
+							key: 'payeeNo'
+						},
+						{
+							field: '姓名',
+							width: 90,
+							key: 'payeeName'
+						},
+						{
+							field: '实出勤(天)',
+							width: 70,
+							key: 'realDays'
+						},
+						{
+							field: '缺勤(天)',
+							width: 70,
+							key: 'missDays'
+						},
+						{
+							field: '缺卡(次)',
+							width: 70,
+							key: 'missPunchCount'
+						},
+						{
+							field: '早退(次)',
+							width: 70,
+							key: 'leavePunchCount'
+						},
 					]
 				}
+			}
+		},
+		data() {
+			return {
+				loading: false,
+				tableData: {
+					current: 1,
+					total: 0,
+					list: []
+				},
+				currentDate: [],
+				beginTime: undefined,
+				endTime: undefined,
+				payeeNo: undefined,
+				payeeName: undefined
+			}
+		},
+		methods: {
+			getData(data) {
+				if (data.length) {
+					this.beginTime = data[0]
+					this.endTime = data[1]
+				} else {
+					this.beginTime = undefined
+					this.endTime = undefined
+				}
+				this.currentDate = data
+				this.tableData.current = 1
+				this.getPunchList()
 			},
-			tableData: {
-				type: Object,
-				default: () => {
-					return {
-						current: 1,
-						total: 30,
-						list: [{
-								num: 1001,
-								name: 'xxx',
-								road: '金科路',
-								really: 80
-							},
-							{
-								num: 1001,
-								name: 'xxx',
-								road: '金科路',
-								should: 100,
-								really: 80
-							},
-							{
-								num: 1001,
-								name: 'xxx',
-								road: '金科路',
-								should: 100,
-								really: 80
-							},
-							{
-								num: 1001,
-								name: 'xxx',
-								road: '金科路',
-								should: 100,
-								really: 80
-							},
-							{
-								num: 1001,
-								name: 'xxx',
-								road: '金科路',
-								should: 100,
-								really: 80
-							},
-							{
-								num: 1001,
-								name: 'xxx',
-								road: '金科路',
-								should: 100,
-								really: 80
-							},
-							{
-								num: 1001,
-								name: 'xxx',
-								road: '金科路',
-								should: 100,
-								really: 80
-							},
-							{
-								num: 1001,
-								name: 'xxx',
-								road: '金科路',
-								should: 100,
-								really: 80
-							},
-							{
-								num: 1001,
-								name: 'xxx',
-								road: '金科路',
-								should: 100,
-								really: 80
-							}
-						]
+			getPunchList() {
+				this.loading = true
+				uni.$u.api.statisticalReportApi.getPunchListApi({
+					beginTime: this.beginTime,
+					endTime: this.endTime,
+					payeeNo: this.payeeNo,
+					payeeName: this.payeeName,
+					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.getPunchList()
+			},
+			confirm() {
+				this.tableData.current = 1
+				this.getPunchList()
 			}
 		}
 	}

+ 43 - 106
pages/dataOverview/statisticalReport/components/parkingReallyIncome.vue

@@ -4,129 +4,66 @@
 		<view class="table">
 			<view class="table-date" v-if="currentDate">{{ currentDate.join(' 至 ') }}</view>
 			<view class="table-box">
-				<uni-table emptyText="暂无更多数据">
-					<!-- 表头行 -->
-					<uni-tr>
-						<uni-th class="table-box-th" align="center" v-for="(item, index) in tableTh" :key="index" :width="item.width || ''">{{ item.field }}
-						</uni-th>
-					</uni-tr>
-					<!-- 表格数据行 -->
-					<uni-tr v-for="(item, index) in tableData.list" :key="index">
-						<uni-td class="table-box-td" align="center">{{ item.road }}</uni-td>
-						<uni-td class="table-box-td" align="center">{{ item.num }}</uni-td>
-						<uni-td class="table-box-td" align="center">{{ item.really }}</uni-td>
-					</uni-tr>
-				</uni-table>
-			</view>
-			<view class="table-pagination">
-				<uni-pagination show-icon="true" :total="tableData.total" :current="tableData.current"></uni-pagination>
+				<TableRanking :loading="loading" :padding="'0'" :tableTh="tableTh" :tableData="tableData"
+					@pageChange="pageChange" />
 			</view>
 		</view>
 		<view class="total">
 			<view>
-				停车数量<text>{{ totalData.num }}</text>辆,实收金额<text>{{ totalData.really }}</text>元
+				停车数量<text>{{ totalData.num || 0 }}</text>辆,实收金额<text>{{ totalData.really || 0 }}</text>元
 			</view>
 		</view>
 	</view>
 </template>
 
 <script>
+	import TableRanking from '@/components/tableRanking.vue'
 	export default {
+		components: {
+			TableRanking
+		},
 		props: {
-			currentDate: {
-				type: Array,
-				default: []
-			},
 			tableTh: {
 				type: Array,
 				default: () => {
-					return [
-						{ field: '停车场名称', width: 120 },
-						{ field: '停车数量(次)', width: 120 },
-						{ field: '实收金额(元)', width: 80 }
+					return [{
+							field: '停车场名称',
+							width: 120
+						},
+						{
+							field: '停车数量(次)',
+							width: 120
+						},
+						{
+							field: '实收金额(元)',
+							width: 80
+						}
 					]
 				}
-			},
-			tableData: {
-				type: Object,
-				default: () => {
-					return {
-						current: 1,
-						total: 30,
-						list: [{
-								num: 1001,
-								name: 'xxx',
-								road: '金科路',
-								really: 80
-							},
-							{
-								num: 1001,
-								name: 'xxx',
-								road: '金科路',
-								should: 100,
-								really: 80
-							},
-							{
-								num: 1001,
-								name: 'xxx',
-								road: '金科路',
-								should: 100,
-								really: 80
-							},
-							{
-								num: 1001,
-								name: 'xxx',
-								road: '金科路',
-								should: 100,
-								really: 80
-							},
-							{
-								num: 1001,
-								name: 'xxx',
-								road: '金科路',
-								should: 100,
-								really: 80
-							},
-							{
-								num: 1001,
-								name: 'xxx',
-								road: '金科路',
-								should: 100,
-								really: 80
-							},
-							{
-								num: 1001,
-								name: 'xxx',
-								road: '金科路',
-								should: 100,
-								really: 80
-							},
-							{
-								num: 1001,
-								name: 'xxx',
-								road: '金科路',
-								should: 100,
-								really: 80
-							},
-							{
-								num: 1001,
-								name: 'xxx',
-								road: '金科路',
-								should: 100,
-								really: 80
-							}
-						]
-					}
-				}
-			},
-			totalData: {
-				type: Object,
-				default: () => {
-					return {
-						num: 100,
-						really: 80
-					}
+			}
+		},
+		data() {
+			return {
+				loading: false,
+				tableData: {
+					current: 1,
+					total: 0,
+					list: []
+				},
+				totalData: {},
+				currentDate: [],
+				beginTime: undefined,
+				endTime: undefined
+			}
+		},
+		methods: {
+			getData(data) {
+				if (data.length) {
+					this.beginTime = data[0]
+					this.endTime = data[1]
 				}
+				this.currentDate = data
+				this.tableData.current = 1
 			}
 		}
 	}
@@ -134,4 +71,4 @@
 
 <style lang="scss" scoped>
 	@import './report.scss';
-</style>
+</style>

+ 73 - 98
pages/dataOverview/statisticalReport/components/reallyReceivable.vue

@@ -2,30 +2,22 @@
 <template>
 	<view class="container">
 		<view class="table">
-			<view class="table-date" v-if="currentDate">{{ currentDate.join(' 至 ') }}</view>
+			<view class="table-date" v-if="params.queryDate">{{ params.title }}</view>
 			<view class="table-box">
-				<uni-table emptyText="暂无更多数据">
+				<uni-table emptyText="暂无更多数据" :loading="loading">
 					<!-- 表头行 -->
 					<uni-tr>
-						<uni-th class="table-box-th" align="center" v-for="(item, index) in tableTh" :key="index" :width="item.width || ''">{{ item.field }}
+						<uni-th class="table-box-th" align="center" v-for="(item, index) in tableTh" :key="index"
+							:width="item.width || ''">{{ item.field }}
 						</uni-th>
 					</uni-tr>
 					<!-- 表格数据行 -->
 					<uni-tr v-for="(item, index) in tableData.list" :key="index">
-						<uni-td class="table-box-td" align="center">{{ item.road }}</uni-td>
-						<uni-td class="table-box-td" align="center">{{ item.road }}</uni-td>
-						<uni-td class="table-box-td" align="center">{{ item.num }}</uni-td>
-						<uni-td class="table-box-td" align="center">{{ item.really }}</uni-td>
-						<uni-td class="table-box-td" align="center">{{ item.road }}</uni-td>
-						<uni-td class="table-box-td" align="center">{{ item.road }}</uni-td>
-						<uni-td class="table-box-td" align="center">{{ item.num }}</uni-td>
-						<uni-td class="table-box-td" align="center">{{ item.really }}</uni-td>
+						<uni-td class="table-box-td" align="center" v-for="(field, fIndex) in tableTh" :key="fIndex">
+							{{ item[field.key] }}</uni-td>
 					</uni-tr>
 				</uni-table>
 			</view>
-			<view class="table-pagination">
-				<uni-pagination show-icon="true" :total="tableData.total" :current="tableData.current"></uni-pagination>
-			</view>
 		</view>
 	</view>
 </template>
@@ -33,97 +25,80 @@
 <script>
 	export default {
 		props: {
-			currentDate: {
-				type: Array,
-				default: []
-			},
 			tableTh: {
 				type: Array,
 				default: () => {
-					return [
-						{ field: '时间', width: 120 },
-						{ field: '应收金额(元)', width: 80 },
-						{ field: '实收金额(元)', width: 80 },
-						{ field: '逃费金额(元)', width: 80 },
-						{ field: `“一分钱停车”减免`, width: 120 },
-						{ field: '“八折停车”减免', width: 110 },
-						{ field: '欠费金额(元)', width: 80 },
-						{ field: '退款金额(元)', width: 80 }
-						
+					return [{
+							field: '时间',
+							width: 120,
+							key: 'statisTime'
+						},
+						{
+							field: '应收金额(元)',
+							width: 80,
+							key: 'payAmount'
+						},
+						{
+							field: '实收金额(元)',
+							width: 80,
+							key: 'realAmount'
+						},
+						{
+							field: '逃费金额(元)',
+							width: 80,
+							key: 'runawayAmount'
+						},
+						{
+							field: `“一分钱停车”减免`,
+							width: 120,
+							key: 'oneAmount'
+						},
+						{
+							field: '“八折停车”减免',
+							width: 110,
+							key: 'eightAmount'
+						},
+						{
+							field: '欠费金额(元)',
+							width: 80,
+							key: 'amtOwe'
+						},
+						{
+							field: '退款金额(元)',
+							width: 80,
+							key: 'backAmount'
+						}
 					]
 				}
+			}
+		},
+		data() {
+			return {
+				currentDate: [],
+				tableData: {
+					list: []
+				},
+				params: {
+					reportType: 2,
+					queryDate: '',
+					title: ''
+				},
+				loading: false
+			}
+		},
+		methods: {
+			getData(obj) {
+				this.params = obj
+				this.getReallyReceivableList()
 			},
-			tableData: {
-				type: Object,
-				default: () => {
-					return {
-						current: 1,
-						total: 30,
-						list: [{
-								num: 1001,
-								name: 'xxx',
-								road: '金科路',
-								really: 80
-							},
-							{
-								num: 1001,
-								name: 'xxx',
-								road: '金科路',
-								should: 100,
-								really: 80
-							},
-							{
-								num: 1001,
-								name: 'xxx',
-								road: '金科路',
-								should: 100,
-								really: 80
-							},
-							{
-								num: 1001,
-								name: 'xxx',
-								road: '金科路',
-								should: 100,
-								really: 80
-							},
-							{
-								num: 1001,
-								name: 'xxx',
-								road: '金科路',
-								should: 100,
-								really: 80
-							},
-							{
-								num: 1001,
-								name: 'xxx',
-								road: '金科路',
-								should: 100,
-								really: 80
-							},
-							{
-								num: 1001,
-								name: 'xxx',
-								road: '金科路',
-								should: 100,
-								really: 80
-							},
-							{
-								num: 1001,
-								name: 'xxx',
-								road: '金科路',
-								should: 100,
-								really: 80
-							},
-							{
-								num: 1001,
-								name: 'xxx',
-								road: '金科路',
-								should: 100,
-								really: 80
-							}
-						]
+			getReallyReceivableList() {
+				this.loading = true
+				uni.$u.api.statisticalReportApi.getReallyReceivableListApi(this.params).then(res => {
+					if (res.code === 200) {
+						this.tableData.list = res.data.itemList
 					}
-				}
+					this.loading = false
+				})
 			}
 		}
 	}

+ 25 - 0
pages/dataOverview/statisticalReport/components/report.scss

@@ -9,6 +9,31 @@
 	}
 	&-date {
 		margin-bottom: 10px;
+		font-size: 14px;
+		color: #434343;
+		text-align: center;
+	}
+	&-search {
+		display: flex;
+		justify-content: space-between;
+		align-items: center;
+		margin-bottom: 10px;
+		&-item {
+			width: 38%;
+			margin-right: 2%;
+			.input {
+				height: 29px;
+				padding: 0 9px!important;
+			}
+			&:last-child {
+				width: 53px;
+				margin-right: 0;
+				.btn {
+					width: 53px;
+					height: 31px;
+				}
+			}
+		}
 	}
 	&-box {
 		&-th {

+ 109 - 117
pages/dataOverview/statisticalReport/components/revenueReport.vue

@@ -4,144 +4,136 @@
 		<view class="table">
 			<view class="table-date" v-if="currentDate">{{ currentDate.join(' 至 ') }}</view>
 			<view class="table-box">
-				<uni-table emptyText="暂无更多数据">
-					<!-- 表头行 -->
-					<uni-tr>
-						<uni-th class="table-box-th" align="center" v-for="(item, index) in tableTh" :key="index" :width="item.width || ''">{{ item.field }}
-						</uni-th>
-					</uni-tr>
-					<!-- 表格数据行 -->
-					<uni-tr v-for="(item, index) in tableData.list" :key="index">
-						<uni-td class="table-box-td" align="center">{{ item.road }}</uni-td>
-						<uni-td class="table-box-td" align="center">{{ item.road }}</uni-td>
-						<uni-td class="table-box-td" align="center">{{ item.num }}</uni-td>
-						<uni-td class="table-box-td" align="center">{{ item.really }}</uni-td>
-						<uni-td class="table-box-td" align="center">{{ item.really }}</uni-td>
-						<uni-td class="table-box-td" align="center">{{ item.road }}</uni-td>
-						<uni-td class="table-box-td" align="center">{{ item.road }}</uni-td>
-						<uni-td class="table-box-td" align="center">{{ item.num }}</uni-td>
-						<uni-td class="table-box-td" align="center">{{ item.really }}</uni-td>
-						<uni-td class="table-box-td" align="center">{{ item.really }}</uni-td>
-					</uni-tr>
-				</uni-table>
-			</view>
-			<view class="table-pagination">
-				<uni-pagination show-icon="true" :total="tableData.total" :current="tableData.current"></uni-pagination>
+				<TableRanking :loading="loading" :padding="'0'" :tableTh="tableTh" :tableData="tableData"
+					@pageChange="pageChange" />
 			</view>
 		</view>
 		<view class="total">
 			<view>
-				车辆<text>{{ totalData.num }}</text>辆,应收金额<text>{{ totalData.really }}</text>元,实收金额<text>{{ totalData.really }}</text>元,
-				欠费金额<text>{{ totalData.really }}</text>元,其中贵州银行快捷支付<text>{{ totalData.really }}</text>元,贵州银行聚合支付<text>{{ totalData.really }}</text>元,微信支付<text>{{ totalData.really }}</text>元,无感支付<text>{{ totalData.really }}</text>元,现金支付<text>{{ totalData.really }}</text>元
+				车辆<text>{{ totalData.vehicleCount || 0 }}</text>辆,应收金额<text>{{ totalData.payAmount || 0 }}</text>元,实收金额<text>{{ totalData.realAmount || 0 }}</text>元,
+				欠费金额<text>{{ totalData.amtOwe || 0 }}</text>元,其中贵州银行快捷支付<text>{{ totalData.quickAmt || 0 }}</text>元,贵州银行聚合支付<text>{{ totalData.unionAmt || 0 }}</text>元,微信支付<text>{{ totalData.wechatAmt || 0 }}</text>元,无感支付<text>{{ totalData.unconsAmt || 0 }}</text>元,现金支付<text>{{ totalData.cashAmt || 0 }}</text>元
 			</view>
 		</view>
 	</view>
 </template>
 
 <script>
+	import TableRanking from '@/components/tableRanking.vue'
 	export default {
+		components: {
+			TableRanking
+		},
 		props: {
-			currentDate: {
-				type: Array,
-				default: []
-			},
 			tableTh: {
 				type: Array,
 				default: () => {
-					return [
-						{ field: '路段名称', width: 120 },
-						{ field: '车辆(辆)', width: 80 },
-						{ field: '应收金额(元)', width: 80 },
-						{ field: '实收金额(次)', width: 80 },
-						{ field: '欠费金额(元)', width: 80 },
-						{ field: '贵州银行快捷支付(元)', width: 150 },
-						{ field: '贵州银行聚合支付(元)', width: 150 },
-						{ field: '微信(元)', width: 80 },
-						{ field: '无感(元)', width: 80 },
-						{ field: '现金(元)', width: 80 }
+					return [{
+							field: '路段名称',
+							width: 120,
+							key: 'roadName'
+						},
+						{
+							field: '车辆(辆)',
+							width: 80,
+							key: 'vehicleCount'
+						},
+						{
+							field: '应收金额(元)',
+							width: 80,
+							key: 'payAmount'
+						},
+						{
+							field: '实收金额(次)',
+							width: 80,
+							key: 'realAmount'
+						},
+						{
+							field: '欠费金额(元)',
+							width: 80,
+							key: 'amtOwe'
+						},
+						{
+							field: '贵州银行快捷支付(元)',
+							width: 150,
+							key: 'quickAmt'
+						},
+						{
+							field: '贵州银行聚合支付(元)',
+							width: 150,
+							key: 'unionAmt'
+						},
+						{
+							field: '微信(元)',
+							width: 80,
+							key: 'wechatAmt'
+						},
+						{
+							field: '无感(元)',
+							width: 80,
+							key: 'unconsAmt'
+						},
+						{
+							field: '现金(元)',
+							width: 80,
+							key: 'cashAmt'
+						}
 					]
 				}
+			}
+		},
+		data() {
+			return {
+				loading: false,
+				tableData: {
+					current: 1,
+					total: 0,
+					list: []
+				},
+				totalData: {},
+				currentDate: [],
+				beginTime: undefined,
+				endTime: undefined
+			}
+		},
+		methods: {
+			getData(data) {
+				if (data.length) {
+					this.beginTime = data[0]
+					this.endTime = data[1]
+				}
+				this.currentDate = data
+				this.tableData.current = 1
+				this.getIncomeTotal()
+				this.getIncomeList()
 			},
-			tableData: {
-				type: Object,
-				default: () => {
-					return {
-						current: 1,
-						total: 30,
-						list: [{
-								num: 1001,
-								name: 'xxx',
-								road: '金科路',
-								really: 80
-							},
-							{
-								num: 1001,
-								name: 'xxx',
-								road: '金科路',
-								should: 100,
-								really: 80
-							},
-							{
-								num: 1001,
-								name: 'xxx',
-								road: '金科路',
-								should: 100,
-								really: 80
-							},
-							{
-								num: 1001,
-								name: 'xxx',
-								road: '金科路',
-								should: 100,
-								really: 80
-							},
-							{
-								num: 1001,
-								name: 'xxx',
-								road: '金科路',
-								should: 100,
-								really: 80
-							},
-							{
-								num: 1001,
-								name: 'xxx',
-								road: '金科路',
-								should: 100,
-								really: 80
-							},
-							{
-								num: 1001,
-								name: 'xxx',
-								road: '金科路',
-								should: 100,
-								really: 80
-							},
-							{
-								num: 1001,
-								name: 'xxx',
-								road: '金科路',
-								should: 100,
-								really: 80
-							},
-							{
-								num: 1001,
-								name: 'xxx',
-								road: '金科路',
-								should: 100,
-								really: 80
-							}
-						]
+			getIncomeTotal() {
+				uni.$u.api.statisticalReportApi.getIncomeTotalApi({
+					beginTime: this.beginTime,
+					endTime: this.endTime
+				}).then(res => {
+					if (res.code === 200) {
+						this.totalData = res.data
 					}
-				}
+				})
 			},
-			totalData: {
-				type: Object,
-				default: () => {
-					return {
-						num: 100,
-						really: 80
+			getIncomeList() {
+				this.loading = true
+				uni.$u.api.statisticalReportApi.getIncomeListApi({
+					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.getIncomeList()
 			}
 		}
 	}

+ 83 - 105
pages/dataOverview/statisticalReport/components/sectionBerth.vue

@@ -4,131 +4,110 @@
 		<view class="table">
 			<view class="table-date" v-if="currentDate">{{ currentDate.join(' 至 ') }}</view>
 			<view class="table-box">
-				<uni-table emptyText="暂无更多数据">
-					<!-- 表头行 -->
-					<uni-tr>
-						<uni-th class="table-box-th" align="center" v-for="(item, index) in tableTh" :key="index" :width="item.width || ''">{{ item.field }}
-						</uni-th>
-					</uni-tr>
-					<!-- 表格数据行 -->
-					<uni-tr v-for="(item, index) in tableData.list" :key="index">
-						<uni-td class="table-box-td" align="center">{{ item.road }}</uni-td>
-						<uni-td class="table-box-td" align="center">{{ item.road }}</uni-td>
-						<uni-td class="table-box-td" align="center">{{ item.num }}</uni-td>
-						<uni-td class="table-box-td" align="center">{{ item.really }}</uni-td>
-					</uni-tr>
-				</uni-table>
-			</view>
-			<view class="table-pagination">
-				<uni-pagination show-icon="true" :total="tableData.total" :current="tableData.current"></uni-pagination>
+				<TableRanking :loading="loading" :padding="'0'" :tableTh="tableTh" :tableData="tableData"
+					@pageChange="pageChange" />
 			</view>
 		</view>
 		<view class="total">
 			<view>
-				停车数量<text>{{ totalData.num }}</text>辆,实收金额<text>{{ totalData.really }}</text>元
+				停车数量<text>{{ totalData.vehicleCount || 0 }}</text>辆,实收金额<text>{{ totalData.realAmount || 0 }}</text>元
 			</view>
 		</view>
 	</view>
 </template>
 
 <script>
+	import TableRanking from '@/components/tableRanking.vue'
 	export default {
+		components: {
+			TableRanking
+		},
 		props: {
-			currentDate: {
-				type: Array,
-				default: []
-			},
 			tableTh: {
 				type: Array,
 				default: () => {
-					return [
-						{ field: '路段名称', width: 120 },
-						{ field: '所属泊位', width: 120 },
-						{ field: '停车数量(次)', width: 80 },
-						{ field: '实收金额(元)', width: 80 }
+					return [{
+							field: '路段名称',
+							key: 'roadName'
+						},
+						{
+							field: '所属泊位',
+							key: 'spaceName'
+						},
+						{
+							field: '停车数量(次)',
+							width: 80,
+							key: 'vehicleCount'
+						},
+						{
+							field: '实收金额(元)',
+							width: 80,
+							key: 'realAmount'
+						}
 					]
 				}
+			}
+		},
+		data() {
+			return {
+				beginTime: '',
+				endTime: '',
+				totalData: {},
+				tableData: {
+					current: 1,
+					total: 0,
+					list: []
+				},
+				currentDate: [],
+				loading: false
+			}
+		},
+		methods: {
+			getData(data) {
+				if (data.length) {
+					this.beginTime = data[0]
+					this.endTime = data[1]
+				} else {
+					this.beginTime = undefined
+					this.endTime = undefined
+				}
+				this.currentDate = data
+				this.tableData.current = 1
+				this.getRoadSpaceTotal()
+				this.getRoadSpaceList()
 			},
-			tableData: {
-				type: Object,
-				default: () => {
-					return {
-						current: 1,
-						total: 30,
-						list: [{
-								num: 1001,
-								name: 'xxx',
-								road: '金科路',
-								really: 80
-							},
-							{
-								num: 1001,
-								name: 'xxx',
-								road: '金科路',
-								should: 100,
-								really: 80
-							},
-							{
-								num: 1001,
-								name: 'xxx',
-								road: '金科路',
-								should: 100,
-								really: 80
-							},
-							{
-								num: 1001,
-								name: 'xxx',
-								road: '金科路',
-								should: 100,
-								really: 80
-							},
-							{
-								num: 1001,
-								name: 'xxx',
-								road: '金科路',
-								should: 100,
-								really: 80
-							},
-							{
-								num: 1001,
-								name: 'xxx',
-								road: '金科路',
-								should: 100,
-								really: 80
-							},
-							{
-								num: 1001,
-								name: 'xxx',
-								road: '金科路',
-								should: 100,
-								really: 80
-							},
-							{
-								num: 1001,
-								name: 'xxx',
-								road: '金科路',
-								should: 100,
-								really: 80
-							},
-							{
-								num: 1001,
-								name: 'xxx',
-								road: '金科路',
-								should: 100,
-								really: 80
-							}
-						]
+			getRoadSpaceTotal() {
+				uni.$u.api.statisticalReportApi.getRoadSpaceTotalApi({
+					beginTime: this.beginTime,
+					endTime: this.endTime
+				}).then(res => {
+					if (res.code === 200) {
+						this.totalData = res.data
 					}
-				}
+				})
 			},
-			totalData: {
-				type: Object,
-				default: () => {
-					return {
-						num: 100,
-						really: 80
+			getRoadSpaceList() {
+				this.loading = true
+				uni.$u.api.statisticalReportApi.getRoadSpaceListApi({
+					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
+				})
+			},
+			/**
+			 * 分页切换
+			 * @param { Number } cur
+			 */
+			pageChange(cur) {
+				this.tableData.current = cur
+				this.getRoadSpaceList()
 			}
 		}
 	}
@@ -137,4 +116,3 @@
 <style lang="scss" scoped>
 	@import './report.scss';
 </style>
-

+ 83 - 110
pages/dataOverview/statisticalReport/components/tollCollectorPerformance.vue

@@ -4,139 +4,112 @@
 		<view class="table">
 			<view class="table-date" v-if="currentDate">{{ currentDate.join(' 至 ') }}</view>
 			<view class="table-box">
-				<uni-table emptyText="暂无更多数据">
-					<!-- 表头行 -->
-					<uni-tr>
-						<uni-th class="table-box-th" align="center" v-for="(item, index) in tableTh" :key="index" :width="item.width || ''">{{ item.field }}
-						</uni-th>
-					</uni-tr>
-					<!-- 表格数据行 -->
-					<uni-tr v-for="(item, index) in tableData.list" :key="index">
-						<uni-td class="table-box-td" align="center">{{ item.num }}</uni-td>
-						<uni-td class="table-box-td" align="center">{{ item.name }}</uni-td>
-						<uni-td class="table-box-td" align="center">{{ item.road }}</uni-td>
-						<uni-td class="table-box-td" align="center">{{ item.should }}</uni-td>
-						<uni-td class="table-box-td" align="center">{{ item.really }}</uni-td>
-					</uni-tr>
-				</uni-table>
-			</view>
-			<view class="table-pagination">
-				<uni-pagination show-icon="true" :total="tableData.total" :current="tableData.current"></uni-pagination>
+				<TableRanking :loading="loading" :padding="'0'" :tableTh="tableTh" :tableData="tableData" @pageChange="pageChange"/>
 			</view>
 		</view>
 		<view class="total">
 			<view>
-				应收金额<text>{{ totalData.should }}</text>元,实收金额<text>{{ totalData.really }}</text>元
+				应收金额<text>{{ totalData.payAmount || 0 }}</text>元,实收金额<text>{{ totalData.realAmount || 0 }}</text>元
 			</view>
 			<view>
-				现金收入<text>{{ totalData.cash }}</text>元,非现金收入<text>{{ totalData.noCash }}</text>元
+				现金收入<text>{{ totalData.cashAmt || 0 }}</text>元,非现金收入<text>{{ totalData.otherAmt || 0 }}</text>元
 			</view>
 		</view>
 	</view>
 </template>
 
 <script>
+	import TableRanking from '@/components/tableRanking.vue'
 	export default {
+		components: {
+			TableRanking
+		},
 		props: {
-			currentDate: {
-				type: Array,
-				default: []
-			},
 			tableTh: {
 				type: Array,
 				default: () => {
-					return [
-						{ field: '工号', width: 80 },
-						{ field: '姓名', width: 80 },
-						{ field: '所属路段', width: 120 },
-						{ field: '应收金额(元)', width: 80 },
-						{ field: '实收金额(元)', width: 80 }
+					return [{
+							field: '工号',
+							key: 'payeeNo'
+						},
+						{
+							field: '姓名',
+							key: 'payeeName'
+						},
+						{
+							field: '所属路段',
+							key: 'roadName'
+						},
+						{
+							field: '应收金额(元)',
+							key: 'payAmount',
+							width: 80
+						},
+						{
+							field: '实收金额(元)',
+							key: 'realAmount',
+							width: 80
+						}
 					]
 				}
+			}
+		},
+		data() {
+			return {
+				tableData: {
+					current: 1,
+					total: 0,
+					list: []
+				},
+				totalData: {},
+				beginTime: undefined,
+				endTime: undefined,
+				loading: false,
+				currentDate: []
+			}
+		},
+		methods: {
+			getData(data) {
+				if (data.length) {
+					this.beginTime = data[0]
+					this.endTime = data[1]
+				} else {
+					this.beginTime = undefined
+					this.endTime = undefined
+				}
+				this.currentDate = data
+				this.tableData.current = 1
+				this.getTollCollectorAchieveTotal()
+				this.getTollCollectorAchieveList()
 			},
-			tableData: {
-				type: Object,
-				default: () => {
-					return {
-						current: 1,
-						total: 30,
-						list: [{
-								num: 1001,
-								name: 'xxx',
-								road: '金科路',
-								should: 100,
-								really: 80
-							},
-							{
-								num: 1001,
-								name: 'xxx',
-								road: '金科路',
-								should: 100,
-								really: 80
-							},
-							{
-								num: 1001,
-								name: 'xxx',
-								road: '金科路',
-								should: 100,
-								really: 80
-							},
-							{
-								num: 1001,
-								name: 'xxx',
-								road: '金科路',
-								should: 100,
-								really: 80
-							},
-							{
-								num: 1001,
-								name: 'xxx',
-								road: '金科路',
-								should: 100,
-								really: 80
-							},
-							{
-								num: 1001,
-								name: 'xxx',
-								road: '金科路',
-								should: 100,
-								really: 80
-							},
-							{
-								num: 1001,
-								name: 'xxx',
-								road: '金科路',
-								should: 100,
-								really: 80
-							},
-							{
-								num: 1001,
-								name: 'xxx',
-								road: '金科路',
-								should: 100,
-								really: 80
-							},
-							{
-								num: 1001,
-								name: 'xxx',
-								road: '金科路',
-								should: 100,
-								really: 80
-							}
-						]
+			getTollCollectorAchieveTotal() {
+				uni.$u.api.statisticalReportApi.getTollCollectorAchieveTotalApi({
+					beginTime: this.beginTime,
+					endTime: this.endTime
+				}).then(res => {
+					if (res.code === 200) {
+						this.totalData = res.data
 					}
-				}
+				})
 			},
-			totalData: {
-				type: Object,
-				default: () => {
-					return {
-						should: 100,
-						really: 80,
-						cash: 500,
-						noCash: 200
+			getTollCollectorAchieveList() {
+				this.loading = true
+				uni.$u.api.statisticalReportApi.getTollCollectorAchieveListApi({
+					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.getTollCollectorAchieveList()
 			}
 		}
 	}

+ 116 - 34
pages/dataOverview/statisticalReport/statisticalReport.vue

@@ -20,25 +20,25 @@
 		</view>
 		<view class="report-content">
 			<template v-if="currentType.value === 1">
-				<TollCollectorPerformance :currentDate="curDate"/>
+				<TollCollectorPerformance ref="tollCollectorPerformance"/>
 			</template>
 			<template v-else-if="currentType.value === 2">
-				<SectionBerth :currentDate="curDate"/>
+				<SectionBerth ref="sectionBerth"/>
 			</template>
 			<template v-else-if="currentType.value === 3">
-				<ParkingReallyIncome :currentDate="curDate"/>
+				<ParkingReallyIncome ref="parkingReallyIncome"/>
 			</template>
 			<template v-else-if="currentType.value === 4">
-				<ArrearsReport :currentDate="curDate"/>
+				<ArrearsReport ref="arrearsReport" />
 			</template>
 			<template v-else-if="currentType.value === 5">
-				<RevenueReport :currentDate="curDate"/>
+				<RevenueReport ref="revenueReport" />
 			</template>
 			<template v-else-if="currentType.value === 6">
-				<ReallyReceivable :currentDate="curDate"/>
+				<ReallyReceivable ref="reallyReceivable"/>
 			</template>
 			<template v-else-if="currentType.value === 7">
-				<CheckWorkAttendance :currentDate="curDate"/>
+				<CheckWorkAttendance ref="checkWorkAttendance" />
 			</template>
 		</view>
 		<!-- 报表类型 -->
@@ -77,69 +77,104 @@
 			return {
 				tabList: [{
 						label: '年',
-						value: 1
+						value: 2
 					},
 					{
 						label: '月',
-						value: 2
+						value: 1
 					},
 					{
 						label: '日',
-						value: 3
+						value: 0
 					}
 				],
 				currentType: {},
-				tabCur: 1,
+				tabCur: 2,
 				typePicker: false,
 				typeList: [[
 					{
 						text: '收费员业绩统计',
-						value: 1
+						value: 1,
+						key: 'tollCollectorPerformance'
 					},
 					{
 						text: '路段泊位统计',
-						value: 2
+						value: 2,
+						key: 'sectionBerth'
 					},
 					{
 						text: '停车场实收统计',
-						value: 3
+						value: 3,
+						key: 'parkingReallyIncome'
 					},
 					{
 						text: '欠费统计',
-						value: 4
+						value: 4,
+						key: 'arrearsReport'
 					},
 					{
 						text: '营收统计',
-						value: 5
+						value: 5,
+						key: 'revenueReport'
 					},
 					{
 						text: '应收实收分析',
-						value: 6
+						value: 6,
+						key: 'reallyReceivable'
 					},
 					{
 						text: '考勤统计',
-						value: 7
+						value: 7,
+						key: 'checkWorkAttendance'
 					}
 				]],
 				// 日期
 				curDate: [],
+				// 参数
+				params: {
+					reportType: 2,
+					queryDate: '',
+					title: ''
+				},
 				// 年
 				yearPicker: false,
 				yearList: this.getYearList(),
 				defaultYear: [4],
-				title: '2022年',
+				currentYear: '',
+				yearObj: {},
 				// 月
 				monthPicker: false,
 				monthList: this.getMonthList(),
 				defaultMonth: [],
+				currentMonth: '01',
+				monthObj: {},
 				// 日
 				dayPicker: false,
 				dayList: this.getDayList(),
-				defaultDay: []
+				defaultDay: [],
+				currentDay: '01',
+				dayObj: {}
 			}
 		},
 		onShow() {
 			this.currentType = this.typeList[0][0]
+			if (this.currentType.value === 5 || this.currentType.value === 7) {
+				let today = uni.$u.timeFormat(new Date(), 'yyyy-mm-dd')
+				this.curDate = [today, today]
+			} else {
+				this.curDate = []
+			}
+			setTimeout(() => {
+				if (this.currentType.value === 6) {
+					this.currentYear = this.yearList[0][4].value
+					this.yearObj = this.yearList[0][4]
+					this.params.title = this.yearList[0][4].text
+					this.params.queryDate = `${this.currentYear}-${this.currentMonth}-${this.currentDay}`
+					this.$refs[this.currentType.key].getData(this.params)
+				} else {
+					this.$refs[this.currentType.key].getData(this.curDate)
+				}
+			}, 500)
 		},
 		methods: {
 			getYearList() {
@@ -150,8 +185,8 @@
 				]
 				for (let i = year - 4; i < year + 1; i++) {
 					const obj = {
-						text: i + '年',
-						value: i
+						text: String(i),
+						value: String(i)
 					}
 					list[0].push(obj)
 				}
@@ -165,20 +200,28 @@
 				]
 				for (let i = 1; i < 13; i++) {
 					const obj = {
-						text: i + '月',
-						value: i
+						text: String(i),
+						value: String(i)
+					}
+					if (i < 10) {
+						obj.text = '0' + i
+						obj.value = '0' + i
 					}
 					list[0].push(obj)
 				}
 				setTimeout(() => {
-					this.defaultMonth = [month]
+					this.defaultMonth = [0]
 				}, 1000)
 				return list
 			},
 			getDayList() {
 				const date = new Date()
 				const year = date.getFullYear()
-				const month = date.getMonth()
+				let month = date.getMonth()
+				if (this.monthObj) {
+					month = parseInt(this.monthObj.value)
+					month = String(month)
+				}
 				const day = date.getDate()
 				const dayLen = (new Date(year, month, 0)).getDate()
 				const list = [
@@ -186,48 +229,87 @@
 				]
 				for (let i = 1; i < dayLen + 1; i++) {
 					const obj = {
-						text: i + '日',
-						value: i
+						text: String(i),
+						value: String(i)
+					}
+					if (i < 10) {
+						obj.text = '0' + i
+						obj.value = '0' + i
 					}
 					list[0].push(obj)
 				}
 				setTimeout(() => {
-					this.defaultDay = [day - 1]
+					this.defaultDay = [0]
 				}, 1000)
 				return list
 			},
 			tabClick(item) {
 				this.tabCur = item.value
 				switch (item.value) {
-					case 1:
+					case 2:
 						this.yearPicker = true
 						break
-					case 2:
+					case 1:
 						this.monthPicker = true
 						break
-					case 3:
+					case 0:
 						this.dayPicker = true
 						break
 				}
+				this.params.reportType = this.tabCur
 			},
 			typeConfirm(e) {
-				console.log(e)
 				this.currentType = e.value[0]
 				this.typePicker = false
+				if (this.currentType.value === 5 || this.currentType.value === 7) {
+					let today = uni.$u.timeFormat(new Date(), 'yyyy-mm-dd')
+					this.curDate = [today, today]
+				} else {
+					this.curDate = []
+				}
+				setTimeout(() => {
+					if (this.currentType.value === 6) {
+						this.currentYear = this.yearList[0][4].value
+						this.yearObj = this.yearList[0][4]
+						this.params.title = this.yearList[0][4].text
+						this.params.queryDate = `${this.currentYear}-${this.currentMonth}-${this.currentDay}`
+						this.$refs[this.currentType.key].getData(this.params)
+					} else {
+						this.$refs[this.currentType.key].getData(this.curDate)
+					}
+				}, 500)
 			},
 			dateChange(e) {
-				console.log(e)
+				this.curDate = e
+				this.$refs[this.currentType.key].getData(this.curDate)
 			},
 			yearConfirm(e) {
 				this.defaultYear = [e.indexs[0]]
+				this.currentYear = e.value[0].value
+				this.params.title = e.value[0].text
+				this.yearObj = e.value[0]
+				this.params.queryDate = `${this.currentYear}-${this.currentMonth}-${this.currentDay}`
+				this.$refs[this.currentType.key].getData(this.params)
 				this.yearPicker = false
 			},
 			monthConfirm(e) {
 				this.defaultMonth = [e.indexs[0]]
+				this.currentMonth = e.value[0].value
+				this.monthObj = e.value[0]
+				this.params.title = `${this.yearObj.text}-${this.monthObj.text}`
+				this.params.queryDate = `${this.currentYear}-${this.currentMonth}-${this.currentDay}`
+				this.$refs[this.currentType.key].getData(this.params)
 				this.monthPicker = false
+				this.dayList = this.getDayList()
 			},
 			dayConfirm(e) {
 				this.defaultDay = [e.indexs[0]]
+				this.title = e.value[0].text
+				this.currentDay = e.value[0].value
+				this.dayObj = e.value[0]
+				this.params.title = `${this.yearObj.text}-${this.monthObj.text}-${this.dayObj.text}`
+				this.params.queryDate = `${this.currentYear}-${this.currentMonth}-${this.currentDay}`
+				this.$refs[this.currentType.key].getData(this.params)
 				this.dayPicker = false
 			}
 		}

+ 6 - 6
pages/index/index.vue

@@ -37,7 +37,7 @@
 						<view class="menu-item" v-for="(item, index) in orderMenuList" :key="index" @click="jumpPage(item.url)">
 							<view class="menu-item-icon" :style="{ width: item.width || '30px' }">
 								<u--image :src="item.icon" :width="item.width || '30px'"
-									:height="item.height || '30px'"></u--image>
+									:height="item.height || '31px'"></u--image>
 							</view>
 							<view class="menu-item-name">
 								<text>{{ item.name }}</text>
@@ -110,8 +110,8 @@
 						icon: require('@/static/icons/fee-evasion-record-icon.svg'),
 						name: '逃费记录',
 						url: 'pages/orderManagement/feeEvasionRecord/feeEvasionRecord',
-						width: '33px',
-						height: '26px'
+						width: '39px',
+						height: '31px'
 					},
 					{
 						icon: require('@/static/icons/void-record-icon.svg'),
@@ -123,7 +123,7 @@
 						icon: require('@/static/icons/recovery-record-icon.svg'),
 						name: '追缴记录',
 						url: 'pages/orderManagement/recoveryRecord/recoveryRecord',
-						height: '32px'
+						height: '31px'
 					}
 				],
 				// 巡检管理
@@ -138,8 +138,8 @@
 						icon: require('@/static/icons/device-error-records-icon.svg'),
 						name: '设备异常记录',
 						url: 'pages/patrolManagement/deviceAbnormalRecords/deviceAbnormalRecords',
-						width: '33px',
-						height: '29px'
+						width: '35px',
+						height: '31px'
 					}
 				]
 			}

+ 8 - 2
pages/patrolManagement/deviceAbnormalRecords/deviceAbnormalRecords.vue

@@ -61,9 +61,15 @@
 		},
 		onShow() {
 			// this.recordList = []
+			this.getRecordList()
 		},
 		methods: {
 			getRecordList() {
+				// uni.$u.api.deviceAbnormalApi.getDeviceAbnormalListApi({
+				// 	pageNum: this.page, pageSize: 10
+				// }).then(res => {
+				// 	console.log(res)
+				// })
 				this.recordList.push({
 					roadName: '可处路-KC002',
 					createBy: '李四',
@@ -71,13 +77,13 @@
 					createTime: '2022-01-18 13:00:00'
 				})
 				setTimeout(() => {
-					if (this.page >= 10) this.status = 'nomore';
+					if (this.page >= 100) this.status = 'nomore';
 					else this.status = 'loading';
 				}, 1000)
 			}
 		},
 		onReachBottom() {
-			if (this.page >= 10) return;
+			if (this.page >= 100) return;
 			this.status = 'loading';
 			this.page = ++this.page;
 			this.getRecordList()