소스 검색

对接停车场实收统计

空白格 3 년 전
부모
커밋
62a6f7010d
3개의 변경된 파일49개의 추가작업 그리고 5개의 파일을 삭제
  1. 5 1
      common/apiurl.js
  2. 8 0
      common/http.api.js
  3. 36 4
      pages/dataOverview/statisticalReport/components/parkingReallyIncome.vue

+ 5 - 1
common/apiurl.js

@@ -58,7 +58,11 @@ export const apiurl = {
 		// 获取实收应收分析列表接口
 		getReallyReceivableListUrl: '/admin/report/amt',
 		// 获取考勤统计列表接口
-		getPunchListUrl: '/admin/report/punch'
+		getPunchListUrl: '/admin/report/punch',
+		// 获取停车场实收统计接口
+		getParkingReallyIncomeUrl: '/admin/reportparking/realamt',
+		// 获取停车场实收统计总数据接口
+		getParkingReallyIncomeTotalUrl: '/admin/reportparking/realamttotal'
 	},
 	// 设备异常记录模块接口
 	deviceAbnormal: {

+ 8 - 0
common/http.api.js

@@ -119,6 +119,14 @@ const install = (Vue, vm) => {
 		// 获取考勤统计列表
 		getPunchListApi: (params = {}) => vm.$u.http.get(apiurl.statisticalReport.getPunchListUrl, {
 			params
+		}),
+		// 获取停车场实收统计
+		getParkingReallyIncomeApi: (params = {}) => vm.$u.http.get(apiurl.statisticalReport.getParkingReallyIncomeUrl, {
+			params
+		}),
+		// 获取停车场实收统计总数据
+		getParkingReallyIncomeTotalApi: (params = {}) => vm.$u.http.get(apiurl.statisticalReport.getParkingReallyIncomeTotalUrl, {
+			params
 		})
 	};
 	// 设备异常记录模块

+ 36 - 4
pages/dataOverview/statisticalReport/components/parkingReallyIncome.vue

@@ -10,7 +10,7 @@
 		</view>
 		<view class="total">
 			<view>
-				停车数量<text>{{ totalData.num || 0 }}</text>辆,实收金额<text>{{ totalData.really || 0 }}</text>元
+				停车数量<text>{{ totalData.vehicleCount || 0 }}</text>辆,实收金额<text>{{ totalData.realAmount || 0 }}</text>元
 			</view>
 		</view>
 	</view>
@@ -28,15 +28,18 @@
 				default: () => {
 					return [{
 							field: '停车场名称',
-							width: 120
+							width: 120,
+							key: 'parkingName'
 						},
 						{
 							field: '停车数量(次)',
-							width: 120
+							width: 120,
+							key: 'vehicleCount'
 						},
 						{
 							field: '实收金额(元)',
-							width: 80
+							width: 80,
+							key: 'realAmount'
 						}
 					]
 				}
@@ -64,6 +67,35 @@
 				}
 				this.currentDate = data
 				this.tableData.current = 1
+				this.getList();
+				this.getTotal();
+			},
+			getList() {
+				this.loading = true
+				uni.$u.api.statisticalReportApi.getParkingReallyIncomeApi({
+					pageNum: this.tableData.current,
+					pageSize: 10,
+					beginTime: this.beginTime,
+					endTime: this.endTime
+				}).then(res => {
+					if (res.code === 200) {
+						this.tableData.list = res.rows
+						this.tableData.total = res.total
+					}
+					this.loading = false
+				})
+			},
+			getTotal() {
+				uni.$u.api.statisticalReportApi.getParkingReallyIncomeTotalApi({
+					beginTime: this.beginTime,
+					endTime: this.endTime
+				}).then(res => {
+					if (res.code === 200) {
+						const { realAmount, vehicleCount } = res.data
+						this.totalData.realAmount = realAmount
+						this.totalData.vehicleCount = vehicleCount
+					}
+				})
 			}
 		}
 	}