Compare commits
7 Commits
f9edd8138b
...
2bf1eadb1b
Author | SHA1 | Date | |
---|---|---|---|
2bf1eadb1b | |||
7c5408f7a2 | |||
369992c35c | |||
896fa99546 | |||
587c832c77 | |||
759c94f483 | |||
9c57166a6d |
45
.drone.yml
Normal file
45
.drone.yml
Normal file
@ -0,0 +1,45 @@
|
||||
kind: pipeline
|
||||
type: docker
|
||||
name: ludu-admin-vue3
|
||||
|
||||
steps:
|
||||
# - name: build
|
||||
# image: node:18.18.0
|
||||
# volumes:
|
||||
# - name: build-file
|
||||
# path: /build/dist
|
||||
# commands:
|
||||
# - npm install --registry=https://registry.npmmirror.com/
|
||||
# - npm run build:prod
|
||||
# - cp -r dist-prod/. /build/dist
|
||||
|
||||
- name: remote_transmit
|
||||
|
||||
image: appleboy/drone-ssh # SSH工具镜像
|
||||
settings:
|
||||
|
||||
host: 101.43.112.107 # 远程连接地址
|
||||
|
||||
username: root # 远程连接账号
|
||||
|
||||
password:
|
||||
|
||||
from_secret: ssh_password # 从Secret中读取SSH密码
|
||||
|
||||
port: 22 # 远程连接端口
|
||||
|
||||
command_timeout: 5m # 远程执行命令超时时间
|
||||
|
||||
script:
|
||||
- rm -rf ludu-admin-vue3
|
||||
- git clone http://101.43.112.107:3000/root/ludu-admin-vue3.git
|
||||
- cd ludu-admin-vue3
|
||||
- npm install --registry=https://registry.npmmirror.com/
|
||||
- npm run build:prod
|
||||
- cp -r dist-prod/. /lundu-build/font
|
||||
- scp -r /lundu-build/font/. root@120.46.37.243:/root/buildIndex
|
||||
|
||||
# volumes: # 定义流水线挂载目录,用于共享数据
|
||||
# - name: build-file
|
||||
# host:
|
||||
# path: /mydata/buildIndex # 从宿主机中挂载的目录
|
67
src/api/parking/appearancerecord/index.ts
Normal file
67
src/api/parking/appearancerecord/index.ts
Normal file
@ -0,0 +1,67 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
// 出场记录 VO
|
||||
export interface AppearanceRecordVO {
|
||||
id: number // id
|
||||
orderId: string // 入场记录编号
|
||||
parkNumber: string // 停车场编号
|
||||
operatorId: string // 操作员 Id
|
||||
operatorName: string // 操作员姓名
|
||||
invoiceNo: string // 发票号码
|
||||
plate: string // 车牌
|
||||
idCard: string // 证件号码
|
||||
inTime: string // 入场时间
|
||||
outTime: string // 出场时间
|
||||
inImage: string // 入场图片名
|
||||
outImage: string // 出场图片名
|
||||
inChannel: string // 入口通道名称
|
||||
outChannel: string // 出口通道名称
|
||||
openGateMode: string // 抬杆模式
|
||||
matchMode: string // 匹配模式
|
||||
charge: string // 总停车费
|
||||
onLineCharge: string // 线上总收费
|
||||
offLineCharge: string // 线下总收费
|
||||
profitChargeTotal: string // 线上线下金额和时间优惠累计抵扣值
|
||||
onLineProfitChargeNum: string // 线上累计优惠金额总面值
|
||||
onLineProfitChargeValue: string // 线上累计优惠金额总抵扣值
|
||||
offLineProfitChargeNum: string // 线下累计优惠金额总面值
|
||||
offLineProfitChargeValue: string // 线下累计优惠金额总抵扣值
|
||||
onLineProfitTimeNum: string // 线上累计优惠时间
|
||||
onLineProfitTimeValue: string // 线上累计优惠时间总抵扣值
|
||||
offLineProfitTimeNum: string // 线下累计优惠时间
|
||||
offLineProfitTimeValue: string // 线下累计优惠时间总抵扣值
|
||||
costTime: string // 时间
|
||||
}
|
||||
|
||||
// 出场记录 API
|
||||
export const AppearanceRecordApi = {
|
||||
// 查询出场记录分页
|
||||
getAppearanceRecordPage: async (params: any) => {
|
||||
return await request.get({ url: `/parking/appearance-record/page`, params })
|
||||
},
|
||||
|
||||
// 查询出场记录详情
|
||||
getAppearanceRecord: async (id: number) => {
|
||||
return await request.get({ url: `/parking/appearance-record/get?id=` + id })
|
||||
},
|
||||
|
||||
// 新增出场记录
|
||||
createAppearanceRecord: async (data: AppearanceRecordVO) => {
|
||||
return await request.post({ url: `/parking/appearance-record/create`, data })
|
||||
},
|
||||
|
||||
// 修改出场记录
|
||||
updateAppearanceRecord: async (data: AppearanceRecordVO) => {
|
||||
return await request.put({ url: `/parking/appearance-record/update`, data })
|
||||
},
|
||||
|
||||
// 删除出场记录
|
||||
deleteAppearanceRecord: async (id: number) => {
|
||||
return await request.delete({ url: `/parking/appearance-record/delete?id=` + id })
|
||||
},
|
||||
|
||||
// 导出出场记录 Excel
|
||||
exportAppearanceRecord: async (params) => {
|
||||
return await request.download({ url: `/parking/appearance-record/export-excel`, params })
|
||||
},
|
||||
}
|
43
src/api/parking/black/index.ts
Normal file
43
src/api/parking/black/index.ts
Normal file
@ -0,0 +1,43 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
// 黑名单 VO
|
||||
export interface BlackVO {
|
||||
id: number // id
|
||||
parkNumber: string // 场库编号
|
||||
source: string // 来源
|
||||
plate: string // 车牌号
|
||||
memo: string // 备注
|
||||
}
|
||||
|
||||
// 黑名单 API
|
||||
export const BlackApi = {
|
||||
// 查询黑名单分页
|
||||
getBlackPage: async (params: any) => {
|
||||
return await request.get({ url: `/parking/black/page`, params })
|
||||
},
|
||||
|
||||
// 查询黑名单详情
|
||||
getBlack: async (id: number) => {
|
||||
return await request.get({ url: `/parking/black/get?id=` + id })
|
||||
},
|
||||
|
||||
// 新增黑名单
|
||||
createBlack: async (data: BlackVO) => {
|
||||
return await request.post({ url: `/parking/black/create`, data })
|
||||
},
|
||||
|
||||
// 修改黑名单
|
||||
updateBlack: async (data: BlackVO) => {
|
||||
return await request.put({ url: `/parking/black/update`, data })
|
||||
},
|
||||
|
||||
// 删除黑名单
|
||||
deleteBlack: async (id: number) => {
|
||||
return await request.delete({ url: `/parking/black/delete?id=` + id })
|
||||
},
|
||||
|
||||
// 导出黑名单 Excel
|
||||
exportBlack: async (params) => {
|
||||
return await request.download({ url: `/parking/black/export-excel`, params })
|
||||
},
|
||||
}
|
51
src/api/parking/entryrecord/index.ts
Normal file
51
src/api/parking/entryrecord/index.ts
Normal file
@ -0,0 +1,51 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
// 入场记录 VO
|
||||
export interface EntryRecordVO {
|
||||
id: number // 入场id
|
||||
orderId: string // 入场记录编号
|
||||
parkNumber: string // 场库编号
|
||||
plate: string // 车牌
|
||||
idCard: string // 证件号码
|
||||
inTime: string // 入场时间
|
||||
inChannel: string // 入场通道名称
|
||||
inImage: string // 入场图片名
|
||||
visitReason: string // 访问事由
|
||||
openGateMode: string // 放行类型
|
||||
matchMode: string // 匹配模式
|
||||
barriorOpen: string // 是否开闸
|
||||
costTime: string // 开闸耗时
|
||||
}
|
||||
|
||||
// 入场记录 API
|
||||
export const EntryRecordApi = {
|
||||
// 查询入场记录分页
|
||||
getEntryRecordPage: async (params: any) => {
|
||||
return await request.get({ url: `/parking/entry-record/page`, params })
|
||||
},
|
||||
|
||||
// 查询入场记录详情
|
||||
getEntryRecord: async (id: number) => {
|
||||
return await request.get({ url: `/parking/entry-record/get?id=` + id })
|
||||
},
|
||||
|
||||
// 新增入场记录
|
||||
createEntryRecord: async (data: EntryRecordVO) => {
|
||||
return await request.post({ url: `/parking/entry-record/create`, data })
|
||||
},
|
||||
|
||||
// 修改入场记录
|
||||
updateEntryRecord: async (data: EntryRecordVO) => {
|
||||
return await request.put({ url: `/parking/entry-record/update`, data })
|
||||
},
|
||||
|
||||
// 删除入场记录
|
||||
deleteEntryRecord: async (id: number) => {
|
||||
return await request.delete({ url: `/parking/entry-record/delete?id=` + id })
|
||||
},
|
||||
|
||||
// 导出入场记录 Excel
|
||||
exportEntryRecord: async (params) => {
|
||||
return await request.download({ url: `/parking/entry-record/export-excel`, params })
|
||||
},
|
||||
}
|
46
src/api/parking/heartbeat/message/index.ts
Normal file
46
src/api/parking/heartbeat/message/index.ts
Normal file
@ -0,0 +1,46 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
// 心跳管理 VO
|
||||
export interface HeartbeatVO {
|
||||
id: number // 编号
|
||||
parkNumber: string // 场库编号
|
||||
parkName: string // 场库名称
|
||||
spaceCount: number // 场库总车位数
|
||||
freeSpaceCount: number // 场库空车位数
|
||||
bookSpaceCount: number // 场库可预约数
|
||||
bookInParkCount: number // 场库在场预约数
|
||||
areaList: string // 区域属性
|
||||
}
|
||||
|
||||
// 心跳管理 API
|
||||
export const HeartbeatApi = {
|
||||
// 查询心跳管理分页
|
||||
getHeartbeatPage: async (params: any) => {
|
||||
return await request.get({ url: `/parking/heartbeat/page`, params })
|
||||
},
|
||||
|
||||
// 查询心跳管理详情
|
||||
getHeartbeat: async (id: number) => {
|
||||
return await request.get({ url: `/parking/heartbeat/get?id=` + id })
|
||||
},
|
||||
|
||||
// 新增心跳管理
|
||||
createHeartbeat: async (data: HeartbeatVO) => {
|
||||
return await request.post({ url: `/parking/heartbeat/create`, data })
|
||||
},
|
||||
|
||||
// 修改心跳管理
|
||||
updateHeartbeat: async (data: HeartbeatVO) => {
|
||||
return await request.put({ url: `/parking/heartbeat/update`, data })
|
||||
},
|
||||
|
||||
// 删除心跳管理
|
||||
deleteHeartbeat: async (id: number) => {
|
||||
return await request.delete({ url: `/parking/heartbeat/delete?id=` + id })
|
||||
},
|
||||
|
||||
// 导出心跳管理 Excel
|
||||
exportHeartbeat: async (params) => {
|
||||
return await request.download({ url: `/parking/heartbeat/export-excel`, params })
|
||||
},
|
||||
}
|
41
src/api/parking/instructiondelivery/liftingrod/index.ts
Normal file
41
src/api/parking/instructiondelivery/liftingrod/index.ts
Normal file
@ -0,0 +1,41 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
// 远程抬杠日志 VO
|
||||
export interface LiftingRodVO {
|
||||
id: number // id
|
||||
parkNumber: string // 停车场编号
|
||||
passagewayId: string // 通道Id
|
||||
}
|
||||
|
||||
// 远程抬杠日志 API
|
||||
export const LiftingRodApi = {
|
||||
// 查询远程抬杠日志分页
|
||||
getLiftingRodPage: async (params: any) => {
|
||||
return await request.get({ url: `/parking/lifting-rod/page`, params })
|
||||
},
|
||||
|
||||
// 查询远程抬杠日志详情
|
||||
getLiftingRod: async (id: number) => {
|
||||
return await request.get({ url: `/parking/lifting-rod/get?id=` + id })
|
||||
},
|
||||
|
||||
// 新增远程抬杠日志
|
||||
createLiftingRod: async (data: LiftingRodVO) => {
|
||||
return await request.post({ url: `/parking/lifting-rod/create`, data })
|
||||
},
|
||||
|
||||
// 修改远程抬杠日志
|
||||
updateLiftingRod: async (data: LiftingRodVO) => {
|
||||
return await request.put({ url: `/parking/lifting-rod/update`, data })
|
||||
},
|
||||
|
||||
// 删除远程抬杠日志
|
||||
deleteLiftingRod: async (id: number) => {
|
||||
return await request.delete({ url: `/parking/lifting-rod/delete?id=` + id })
|
||||
},
|
||||
|
||||
// 导出远程抬杠日志 Excel
|
||||
exportLiftingRod: async (params) => {
|
||||
return await request.download({ url: `/parking/lifting-rod/export-excel`, params })
|
||||
},
|
||||
}
|
59
src/api/parking/moneymanage/chargeinfo/index.ts
Normal file
59
src/api/parking/moneymanage/chargeinfo/index.ts
Normal file
@ -0,0 +1,59 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
// 收费信息 VO
|
||||
export interface chargeInfoVO {
|
||||
id: number // id
|
||||
parkNumber: string // 场库编号
|
||||
plate: string // 车牌号
|
||||
inTime: string // 入场时间
|
||||
outTime: string // 结算时间
|
||||
inChannel: string // 入场通道
|
||||
outChannel: string // 出场通道
|
||||
payKind: string // 支付类型
|
||||
payChannel: string // 支付渠道
|
||||
orderId: string // 入场订单号
|
||||
carType: string // 车辆类型
|
||||
payNo: string // 支付订单号
|
||||
memo: string // 备注
|
||||
charge: string // 应缴金额
|
||||
realCharge: string // 实收金额
|
||||
couponCharge: string // 优惠金额
|
||||
areaId: string // 区域 ID
|
||||
operatorName: string // 操作员名称
|
||||
operatorTelphone: string // 操作员联系电话
|
||||
outTradeNo: string // 支付订单号
|
||||
plateColor: string // 车牌颜色
|
||||
}
|
||||
|
||||
// 收费信息 API
|
||||
export const chargeInfoApi = {
|
||||
// 查询收费信息分页
|
||||
getchargeInfoPage: async (params: any) => {
|
||||
return await request.get({ url: `/parking/charge-info/page`, params })
|
||||
},
|
||||
|
||||
// 查询收费信息详情
|
||||
getchargeInfo: async (id: number) => {
|
||||
return await request.get({ url: `/parking/charge-info/get?id=` + id })
|
||||
},
|
||||
|
||||
// 新增收费信息
|
||||
createchargeInfo: async (data: chargeInfoVO) => {
|
||||
return await request.post({ url: `/parking/charge-info/create`, data })
|
||||
},
|
||||
|
||||
// 修改收费信息
|
||||
updatechargeInfo: async (data: chargeInfoVO) => {
|
||||
return await request.put({ url: `/parking/charge-info/update`, data })
|
||||
},
|
||||
|
||||
// 删除收费信息
|
||||
deletechargeInfo: async (id: number) => {
|
||||
return await request.delete({ url: `/parking/charge-info/delete?id=` + id })
|
||||
},
|
||||
|
||||
// 导出收费信息 Excel
|
||||
exportchargeInfo: async (params) => {
|
||||
return await request.download({ url: `/parking/charge-info/export-excel`, params })
|
||||
},
|
||||
}
|
46
src/api/parking/parkmanage/area/index.ts
Normal file
46
src/api/parking/parkmanage/area/index.ts
Normal file
@ -0,0 +1,46 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
// 区域列表 VO
|
||||
export interface AreaVO {
|
||||
areaName: string // 区域名称
|
||||
spaceCount: number // 区域车位数
|
||||
lastSpaceCount: number // 区域空位数
|
||||
bookSpaceCount: number // 区域可预约车位数
|
||||
bookInParkCount: number // 区域在场预约数
|
||||
id: number // id
|
||||
areaId: number // 区域Id
|
||||
parkNumber: string // 场库编号
|
||||
}
|
||||
|
||||
// 区域列表 API
|
||||
export const AreaApi = {
|
||||
// 查询区域列表分页
|
||||
getAreaPage: async (params: any) => {
|
||||
return await request.get({ url: `/parking/area/page`, params })
|
||||
},
|
||||
|
||||
// 查询区域列表详情
|
||||
getArea: async (id: number) => {
|
||||
return await request.get({ url: `/parking/area/get?id=` + id })
|
||||
},
|
||||
|
||||
// 新增区域列表
|
||||
createArea: async (data: AreaVO) => {
|
||||
return await request.post({ url: `/parking/area/create`, data })
|
||||
},
|
||||
|
||||
// 修改区域列表
|
||||
updateArea: async (data: AreaVO) => {
|
||||
return await request.put({ url: `/parking/area/update`, data })
|
||||
},
|
||||
|
||||
// 删除区域列表
|
||||
deleteArea: async (id: number) => {
|
||||
return await request.delete({ url: `/parking/area/delete?id=` + id })
|
||||
},
|
||||
|
||||
// 导出区域列表 Excel
|
||||
exportArea: async (params) => {
|
||||
return await request.download({ url: `/parking/area/export-excel`, params })
|
||||
},
|
||||
}
|
44
src/api/parking/parkmanage/park/index.ts
Normal file
44
src/api/parking/parkmanage/park/index.ts
Normal file
@ -0,0 +1,44 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
// 场库列表 VO
|
||||
export interface ParkVO {
|
||||
parkNumber: string // 场库编号
|
||||
parkName: string // 场库名称
|
||||
spaceCount: number // 场库总车位数
|
||||
freeSpaceCount: number // 场库空车位数
|
||||
bookSpaceCount: number // 场库可预约数
|
||||
bookInParkCount: number // 场库在场预约数
|
||||
}
|
||||
|
||||
// 场库列表 API
|
||||
export const ParkApi = {
|
||||
// 查询场库列表分页
|
||||
getParkPage: async (params: any) => {
|
||||
return await request.get({ url: `/parking/park/page`, params })
|
||||
},
|
||||
|
||||
// 查询场库列表详情
|
||||
getPark: async (id: number) => {
|
||||
return await request.get({ url: `/parking/park/get?id=` + id })
|
||||
},
|
||||
|
||||
// 新增场库列表
|
||||
createPark: async (data: ParkVO) => {
|
||||
return await request.post({ url: `/parking/park/create`, data })
|
||||
},
|
||||
|
||||
// 修改场库列表
|
||||
updatePark: async (data: ParkVO) => {
|
||||
return await request.put({ url: `/parking/park/update`, data })
|
||||
},
|
||||
|
||||
// 删除场库列表
|
||||
deletePark: async (id: number) => {
|
||||
return await request.delete({ url: `/parking/park/delete?id=` + id })
|
||||
},
|
||||
|
||||
// 导出场库列表 Excel
|
||||
exportPark: async (params) => {
|
||||
return await request.download({ url: `/parking/park/export-excel`, params })
|
||||
},
|
||||
}
|
43
src/api/parking/parkmanage/passageway/index.ts
Normal file
43
src/api/parking/parkmanage/passageway/index.ts
Normal file
@ -0,0 +1,43 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
// 通道信息 VO
|
||||
export interface PassagewayVO {
|
||||
passagewayId: string // 通道 Id
|
||||
parkNumber: string // 场库编号
|
||||
passagewayName: string // 通道名称
|
||||
sourceAreaId: string // 源区域 Id
|
||||
targetAreaId: string // 目标区域 Id
|
||||
}
|
||||
|
||||
// 通道信息 API
|
||||
export const PassagewayApi = {
|
||||
// 查询通道信息分页
|
||||
getPassagewayPage: async (params: any) => {
|
||||
return await request.get({ url: `/parking/passageway/page`, params })
|
||||
},
|
||||
|
||||
// 查询通道信息详情
|
||||
getPassageway: async (id: number) => {
|
||||
return await request.get({ url: `/parking/passageway/get?id=` + id })
|
||||
},
|
||||
|
||||
// 新增通道信息
|
||||
createPassageway: async (data: PassagewayVO) => {
|
||||
return await request.post({ url: `/parking/passageway/create`, data })
|
||||
},
|
||||
|
||||
// 修改通道信息
|
||||
updatePassageway: async (data: PassagewayVO) => {
|
||||
return await request.put({ url: `/parking/passageway/update`, data })
|
||||
},
|
||||
|
||||
// 删除通道信息
|
||||
deletePassageway: async (id: number) => {
|
||||
return await request.delete({ url: `/parking/passageway/delete?id=` + id })
|
||||
},
|
||||
|
||||
// 导出通道信息 Excel
|
||||
exportPassageway: async (params) => {
|
||||
return await request.download({ url: `/parking/passageway/export-excel`, params })
|
||||
},
|
||||
}
|
@ -38,7 +38,7 @@ export const WhiteApi = {
|
||||
|
||||
// 删除白名单管理
|
||||
deleteWhite: async (id: number) => {
|
||||
return await request.delete({ url: `/parking/white/delete?id=` + id })
|
||||
return await request.delete({ url: `/parking/white/delete?fixedId=` + id })
|
||||
},
|
||||
|
||||
// 导出白名单管理 Excel
|
||||
|
@ -115,6 +115,9 @@ export enum DICT_TYPE {
|
||||
//告警
|
||||
OBJECT_TYPE = 'object_type',
|
||||
WARNING_TYPE = 'warning_type',
|
||||
|
||||
//黑名单来源
|
||||
BLACK_SOURCE = 'black_source',
|
||||
|
||||
// ========== SYSTEM 模块 ==========
|
||||
SYSTEM_USER_SEX = 'system_user_sex',
|
||||
|
262
src/views/parking/appearancerecord/AppearanceRecordForm.vue
Normal file
262
src/views/parking/appearancerecord/AppearanceRecordForm.vue
Normal file
@ -0,0 +1,262 @@
|
||||
<template>
|
||||
<Dialog :title="dialogTitle" v-model="dialogVisible">
|
||||
<el-form
|
||||
ref="formRef"
|
||||
:model="formData"
|
||||
:rules="formRules"
|
||||
label-width="100px"
|
||||
v-loading="formLoading"
|
||||
>
|
||||
<el-form-item label="入场记录编号" prop="orderId">
|
||||
<el-input v-model="formData.orderId" placeholder="请输入入场记录编号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="停车场编号" prop="parkNumber">
|
||||
<el-input v-model="formData.parkNumber" placeholder="请输入停车场编号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="操作员 Id" prop="operatorId">
|
||||
<el-input v-model="formData.operatorId" placeholder="请输入操作员 Id" />
|
||||
</el-form-item>
|
||||
<el-form-item label="操作员姓名" prop="operatorName">
|
||||
<el-input v-model="formData.operatorName" placeholder="请输入操作员姓名" />
|
||||
</el-form-item>
|
||||
<el-form-item label="发票号码" prop="invoiceNo">
|
||||
<el-input v-model="formData.invoiceNo" placeholder="请输入发票号码" />
|
||||
</el-form-item>
|
||||
<el-form-item label="车牌" prop="plate">
|
||||
<el-input v-model="formData.plate" placeholder="请输入车牌" />
|
||||
</el-form-item>
|
||||
<el-form-item label="证件号码" prop="idCard">
|
||||
<el-input v-model="formData.idCard" placeholder="请输入证件号码" />
|
||||
</el-form-item>
|
||||
<el-form-item label="入场时间" prop="inTime">
|
||||
<el-date-picker
|
||||
v-model="formData.inTime"
|
||||
type="date"
|
||||
value-format="x"
|
||||
placeholder="选择入场时间"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="出场时间" prop="outTime">
|
||||
<el-date-picker
|
||||
v-model="formData.outTime"
|
||||
type="date"
|
||||
value-format="x"
|
||||
placeholder="选择出场时间"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="入场图片名" prop="inImage">
|
||||
<UploadImg v-model="formData.inImage" />
|
||||
</el-form-item>
|
||||
<el-form-item label="出场图片名" prop="outImage">
|
||||
<UploadImg v-model="formData.outImage" />
|
||||
</el-form-item>
|
||||
<el-form-item label="入口通道名称" prop="inChannel">
|
||||
<el-input v-model="formData.inChannel" placeholder="请输入入口通道名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="出口通道名称" prop="outChannel">
|
||||
<el-input v-model="formData.outChannel" placeholder="请输入出口通道名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="抬杆模式" prop="openGateMode">
|
||||
<el-input v-model="formData.openGateMode" placeholder="请输入抬杆模式" />
|
||||
</el-form-item>
|
||||
<el-form-item label="匹配模式" prop="matchMode">
|
||||
<el-input v-model="formData.matchMode" placeholder="请输入匹配模式" />
|
||||
</el-form-item>
|
||||
<el-form-item label="总停车费" prop="charge">
|
||||
<el-input v-model="formData.charge" placeholder="请输入总停车费" />
|
||||
</el-form-item>
|
||||
<el-form-item label="线上总收费" prop="onLineCharge">
|
||||
<el-input v-model="formData.onLineCharge" placeholder="请输入线上总收费" />
|
||||
</el-form-item>
|
||||
<el-form-item label="线下总收费" prop="offLineCharge">
|
||||
<el-input v-model="formData.offLineCharge" placeholder="请输入线下总收费" />
|
||||
</el-form-item>
|
||||
<el-form-item label="线上线下金额和时间优惠累计抵扣值" prop="profitChargeTotal">
|
||||
<el-input v-model="formData.profitChargeTotal" placeholder="请输入线上线下金额和时间优惠累计抵扣值" />
|
||||
</el-form-item>
|
||||
<el-form-item label="线上累计优惠金额总面值" prop="onLineProfitChargeNum">
|
||||
<el-input v-model="formData.onLineProfitChargeNum" placeholder="请输入线上累计优惠金额总面值" />
|
||||
</el-form-item>
|
||||
<el-form-item label="线上累计优惠金额总抵扣值" prop="onLineProfitChargeValue">
|
||||
<el-input v-model="formData.onLineProfitChargeValue" placeholder="请输入线上累计优惠金额总抵扣值" />
|
||||
</el-form-item>
|
||||
<el-form-item label="线下累计优惠金额总面值" prop="offLineProfitChargeNum">
|
||||
<el-input v-model="formData.offLineProfitChargeNum" placeholder="请输入线下累计优惠金额总面值" />
|
||||
</el-form-item>
|
||||
<el-form-item label="线下累计优惠金额总抵扣值" prop="offLineProfitChargeValue">
|
||||
<el-input v-model="formData.offLineProfitChargeValue" placeholder="请输入线下累计优惠金额总抵扣值" />
|
||||
</el-form-item>
|
||||
<el-form-item label="线上累计优惠时间" prop="onLineProfitTimeNum">
|
||||
<el-input v-model="formData.onLineProfitTimeNum" placeholder="请输入线上累计优惠时间" />
|
||||
</el-form-item>
|
||||
<el-form-item label="线上累计优惠时间总抵扣值" prop="onLineProfitTimeValue">
|
||||
<el-input v-model="formData.onLineProfitTimeValue" placeholder="请输入线上累计优惠时间总抵扣值" />
|
||||
</el-form-item>
|
||||
<el-form-item label="线下累计优惠时间" prop="offLineProfitTimeNum">
|
||||
<el-input v-model="formData.offLineProfitTimeNum" placeholder="请输入线下累计优惠时间" />
|
||||
</el-form-item>
|
||||
<el-form-item label="线下累计优惠时间总抵扣值" prop="offLineProfitTimeValue">
|
||||
<el-input v-model="formData.offLineProfitTimeValue" placeholder="请输入线下累计优惠时间总抵扣值" />
|
||||
</el-form-item>
|
||||
<el-form-item label="时间" prop="costTime">
|
||||
<el-date-picker
|
||||
v-model="formData.costTime"
|
||||
type="date"
|
||||
value-format="x"
|
||||
placeholder="选择时间"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<el-button @click="submitForm" type="primary" :disabled="formLoading">确 定</el-button>
|
||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||
</template>
|
||||
</Dialog>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { AppearanceRecordApi, AppearanceRecordVO } from '@/api/parking/appearancerecord'
|
||||
|
||||
/** 出场记录 表单 */
|
||||
defineOptions({ name: 'AppearanceRecordForm' })
|
||||
|
||||
const { t } = useI18n() // 国际化
|
||||
const message = useMessage() // 消息弹窗
|
||||
|
||||
const dialogVisible = ref(false) // 弹窗的是否展示
|
||||
const dialogTitle = ref('') // 弹窗的标题
|
||||
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
|
||||
const formType = ref('') // 表单的类型:create - 新增;update - 修改
|
||||
const formData = ref({
|
||||
id: undefined,
|
||||
orderId: undefined,
|
||||
parkNumber: undefined,
|
||||
operatorId: undefined,
|
||||
operatorName: undefined,
|
||||
invoiceNo: undefined,
|
||||
plate: undefined,
|
||||
idCard: undefined,
|
||||
inTime: undefined,
|
||||
outTime: undefined,
|
||||
inImage: undefined,
|
||||
outImage: undefined,
|
||||
inChannel: undefined,
|
||||
outChannel: undefined,
|
||||
openGateMode: undefined,
|
||||
matchMode: undefined,
|
||||
charge: undefined,
|
||||
onLineCharge: undefined,
|
||||
offLineCharge: undefined,
|
||||
profitChargeTotal: undefined,
|
||||
onLineProfitChargeNum: undefined,
|
||||
onLineProfitChargeValue: undefined,
|
||||
offLineProfitChargeNum: undefined,
|
||||
offLineProfitChargeValue: undefined,
|
||||
onLineProfitTimeNum: undefined,
|
||||
onLineProfitTimeValue: undefined,
|
||||
offLineProfitTimeNum: undefined,
|
||||
offLineProfitTimeValue: undefined,
|
||||
costTime: undefined,
|
||||
})
|
||||
const formRules = reactive({
|
||||
orderId: [{ required: true, message: '入场记录编号不能为空', trigger: 'blur' }],
|
||||
parkNumber: [{ required: true, message: '停车场编号不能为空', trigger: 'blur' }],
|
||||
plate: [{ required: true, message: '车牌不能为空', trigger: 'blur' }],
|
||||
outTime: [{ required: true, message: '出场时间不能为空', trigger: 'blur' }],
|
||||
outImage: [{ required: true, message: '出场图片名不能为空', trigger: 'blur' }],
|
||||
outChannel: [{ required: true, message: '出口通道名称不能为空', trigger: 'blur' }],
|
||||
openGateMode: [{ required: true, message: '抬杆模式不能为空', trigger: 'blur' }],
|
||||
matchMode: [{ required: true, message: '匹配模式不能为空', trigger: 'blur' }],
|
||||
charge: [{ required: true, message: '总停车费不能为空', trigger: 'blur' }],
|
||||
onLineCharge: [{ required: true, message: '线上总收费不能为空', trigger: 'blur' }],
|
||||
offLineCharge: [{ required: true, message: '线下总收费不能为空', trigger: 'blur' }],
|
||||
profitChargeTotal: [{ required: true, message: '线上线下金额和时间优惠累计抵扣值不能为空', trigger: 'blur' }],
|
||||
onLineProfitChargeNum: [{ required: true, message: '线上累计优惠金额总面值不能为空', trigger: 'blur' }],
|
||||
onLineProfitChargeValue: [{ required: true, message: '线上累计优惠金额总抵扣值不能为空', trigger: 'blur' }],
|
||||
offLineProfitChargeNum: [{ required: true, message: '线下累计优惠金额总面值不能为空', trigger: 'blur' }],
|
||||
offLineProfitChargeValue: [{ required: true, message: '线下累计优惠金额总抵扣值不能为空', trigger: 'blur' }],
|
||||
onLineProfitTimeNum: [{ required: true, message: '线上累计优惠时间不能为空', trigger: 'blur' }],
|
||||
onLineProfitTimeValue: [{ required: true, message: '线上累计优惠时间总抵扣值不能为空', trigger: 'blur' }],
|
||||
offLineProfitTimeNum: [{ required: true, message: '线下累计优惠时间不能为空', trigger: 'blur' }],
|
||||
offLineProfitTimeValue: [{ required: true, message: '线下累计优惠时间总抵扣值不能为空', trigger: 'blur' }],
|
||||
costTime: [{ required: true, message: '时间不能为空', trigger: 'blur' }],
|
||||
})
|
||||
const formRef = ref() // 表单 Ref
|
||||
|
||||
/** 打开弹窗 */
|
||||
const open = async (type: string, id?: number) => {
|
||||
dialogVisible.value = true
|
||||
dialogTitle.value = t('action.' + type)
|
||||
formType.value = type
|
||||
resetForm()
|
||||
// 修改时,设置数据
|
||||
if (id) {
|
||||
formLoading.value = true
|
||||
try {
|
||||
formData.value = await AppearanceRecordApi.getAppearanceRecord(id)
|
||||
} finally {
|
||||
formLoading.value = false
|
||||
}
|
||||
}
|
||||
}
|
||||
defineExpose({ open }) // 提供 open 方法,用于打开弹窗
|
||||
|
||||
/** 提交表单 */
|
||||
const emit = defineEmits(['success']) // 定义 success 事件,用于操作成功后的回调
|
||||
const submitForm = async () => {
|
||||
// 校验表单
|
||||
await formRef.value.validate()
|
||||
// 提交请求
|
||||
formLoading.value = true
|
||||
try {
|
||||
const data = formData.value as unknown as AppearanceRecordVO
|
||||
if (formType.value === 'create') {
|
||||
await AppearanceRecordApi.createAppearanceRecord(data)
|
||||
message.success(t('common.createSuccess'))
|
||||
} else {
|
||||
await AppearanceRecordApi.updateAppearanceRecord(data)
|
||||
message.success(t('common.updateSuccess'))
|
||||
}
|
||||
dialogVisible.value = false
|
||||
// 发送操作成功的事件
|
||||
emit('success')
|
||||
} finally {
|
||||
formLoading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
/** 重置表单 */
|
||||
const resetForm = () => {
|
||||
formData.value = {
|
||||
id: undefined,
|
||||
orderId: undefined,
|
||||
parkNumber: undefined,
|
||||
operatorId: undefined,
|
||||
operatorName: undefined,
|
||||
invoiceNo: undefined,
|
||||
plate: undefined,
|
||||
idCard: undefined,
|
||||
inTime: undefined,
|
||||
outTime: undefined,
|
||||
inImage: undefined,
|
||||
outImage: undefined,
|
||||
inChannel: undefined,
|
||||
outChannel: undefined,
|
||||
openGateMode: undefined,
|
||||
matchMode: undefined,
|
||||
charge: undefined,
|
||||
onLineCharge: undefined,
|
||||
offLineCharge: undefined,
|
||||
profitChargeTotal: undefined,
|
||||
onLineProfitChargeNum: undefined,
|
||||
onLineProfitChargeValue: undefined,
|
||||
offLineProfitChargeNum: undefined,
|
||||
offLineProfitChargeValue: undefined,
|
||||
onLineProfitTimeNum: undefined,
|
||||
onLineProfitTimeValue: undefined,
|
||||
offLineProfitTimeNum: undefined,
|
||||
offLineProfitTimeValue: undefined,
|
||||
costTime: undefined,
|
||||
}
|
||||
formRef.value?.resetFields()
|
||||
}
|
||||
</script>
|
472
src/views/parking/appearancerecord/index.vue
Normal file
472
src/views/parking/appearancerecord/index.vue
Normal file
@ -0,0 +1,472 @@
|
||||
<template>
|
||||
<ContentWrap>
|
||||
<!-- 搜索工作栏 -->
|
||||
<el-form
|
||||
class="-mb-15px"
|
||||
:model="queryParams"
|
||||
ref="queryFormRef"
|
||||
:inline="true"
|
||||
label-width="100px"
|
||||
>
|
||||
<el-form-item label="入场记录编号" prop="orderId">
|
||||
<el-input
|
||||
v-model="queryParams.orderId"
|
||||
placeholder="请输入入场记录编号"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="停车场编号" prop="parkNumber">
|
||||
<el-input
|
||||
v-model="queryParams.parkNumber"
|
||||
placeholder="请输入停车场编号"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="操作员 Id" prop="operatorId">
|
||||
<el-input
|
||||
v-model="queryParams.operatorId"
|
||||
placeholder="请输入操作员 Id"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="操作员姓名" prop="operatorName">
|
||||
<el-input
|
||||
v-model="queryParams.operatorName"
|
||||
placeholder="请输入操作员姓名"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="发票号码" prop="invoiceNo">
|
||||
<el-input
|
||||
v-model="queryParams.invoiceNo"
|
||||
placeholder="请输入发票号码"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="车牌" prop="plate">
|
||||
<el-input
|
||||
v-model="queryParams.plate"
|
||||
placeholder="请输入车牌"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="证件号码" prop="idCard">
|
||||
<el-input
|
||||
v-model="queryParams.idCard"
|
||||
placeholder="请输入证件号码"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="入场时间" prop="inTime">
|
||||
<el-date-picker
|
||||
v-model="queryParams.inTime"
|
||||
value-format="YYYY-MM-DD HH:mm:ss"
|
||||
type="daterange"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
:default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="出场时间" prop="outTime">
|
||||
<el-date-picker
|
||||
v-model="queryParams.outTime"
|
||||
value-format="YYYY-MM-DD HH:mm:ss"
|
||||
type="daterange"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
:default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="入口通道名称" prop="inChannel">
|
||||
<el-input
|
||||
v-model="queryParams.inChannel"
|
||||
placeholder="请输入入口通道名称"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="出口通道名称" prop="outChannel">
|
||||
<el-input
|
||||
v-model="queryParams.outChannel"
|
||||
placeholder="请输入出口通道名称"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="抬杆模式" prop="openGateMode">
|
||||
<el-input
|
||||
v-model="queryParams.openGateMode"
|
||||
placeholder="请输入抬杆模式"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="匹配模式" prop="matchMode">
|
||||
<el-input
|
||||
v-model="queryParams.matchMode"
|
||||
placeholder="请输入匹配模式"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="总停车费" prop="charge">
|
||||
<el-input
|
||||
v-model="queryParams.charge"
|
||||
placeholder="请输入总停车费"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="线上总收费" prop="onLineCharge">
|
||||
<el-input
|
||||
v-model="queryParams.onLineCharge"
|
||||
placeholder="请输入线上总收费"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="线下总收费" prop="offLineCharge">
|
||||
<el-input
|
||||
v-model="queryParams.offLineCharge"
|
||||
placeholder="请输入线下总收费"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="线上线下金额和时间优惠累计抵扣值" prop="profitChargeTotal">
|
||||
<el-input
|
||||
v-model="queryParams.profitChargeTotal"
|
||||
placeholder="请输入线上线下金额和时间优惠累计抵扣值"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="线上累计优惠金额总面值" prop="onLineProfitChargeNum">
|
||||
<el-input
|
||||
v-model="queryParams.onLineProfitChargeNum"
|
||||
placeholder="请输入线上累计优惠金额总面值"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="线上累计优惠金额总抵扣值" prop="onLineProfitChargeValue">
|
||||
<el-input
|
||||
v-model="queryParams.onLineProfitChargeValue"
|
||||
placeholder="请输入线上累计优惠金额总抵扣值"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="线下累计优惠金额总面值" prop="offLineProfitChargeNum">
|
||||
<el-input
|
||||
v-model="queryParams.offLineProfitChargeNum"
|
||||
placeholder="请输入线下累计优惠金额总面值"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="线下累计优惠金额总抵扣值" prop="offLineProfitChargeValue">
|
||||
<el-input
|
||||
v-model="queryParams.offLineProfitChargeValue"
|
||||
placeholder="请输入线下累计优惠金额总抵扣值"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="线上累计优惠时间" prop="onLineProfitTimeNum">
|
||||
<el-input
|
||||
v-model="queryParams.onLineProfitTimeNum"
|
||||
placeholder="请输入线上累计优惠时间"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="线上累计优惠时间总抵扣值" prop="onLineProfitTimeValue">
|
||||
<el-input
|
||||
v-model="queryParams.onLineProfitTimeValue"
|
||||
placeholder="请输入线上累计优惠时间总抵扣值"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="线下累计优惠时间" prop="offLineProfitTimeNum">
|
||||
<el-input
|
||||
v-model="queryParams.offLineProfitTimeNum"
|
||||
placeholder="请输入线下累计优惠时间"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="线下累计优惠时间总抵扣值" prop="offLineProfitTimeValue">
|
||||
<el-input
|
||||
v-model="queryParams.offLineProfitTimeValue"
|
||||
placeholder="请输入线下累计优惠时间总抵扣值"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item> -->
|
||||
<!-- <el-form-item label="时间" prop="costTime">
|
||||
<el-date-picker
|
||||
v-model="queryParams.costTime"
|
||||
value-format="YYYY-MM-DD HH:mm:ss"
|
||||
type="daterange"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
:default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="创建时间" prop="createTime">
|
||||
<el-date-picker
|
||||
v-model="queryParams.createTime"
|
||||
value-format="YYYY-MM-DD HH:mm:ss"
|
||||
type="daterange"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
:default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item> -->
|
||||
<el-form-item>
|
||||
<el-button @click="handleQuery"><Icon icon="ep:search" class="mr-5px" /> 搜索</el-button>
|
||||
<el-button @click="resetQuery"><Icon icon="ep:refresh" class="mr-5px" /> 重置</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
@click="openForm('create')"
|
||||
v-hasPermi="['parking:appearance-record:create']"
|
||||
>
|
||||
<Icon icon="ep:plus" class="mr-5px" /> 新增
|
||||
</el-button>
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
@click="handleExport"
|
||||
:loading="exportLoading"
|
||||
v-hasPermi="['parking:appearance-record:export']"
|
||||
>
|
||||
<Icon icon="ep:download" class="mr-5px" /> 导出
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</ContentWrap>
|
||||
|
||||
<!-- 列表 -->
|
||||
<ContentWrap>
|
||||
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true">
|
||||
<el-table-column label="ID" align="center" prop="id" />
|
||||
<el-table-column label="入场记录编号" align="center" prop="orderId" width='110px' />
|
||||
<el-table-column label="停车场编号" align="center" prop="parkNumber" width='110px'/>
|
||||
<el-table-column label="操作员 Id" align="center" prop="operatorId" width='110px' />
|
||||
<el-table-column label="操作员姓名" align="center" prop="operatorName" width='110px' />
|
||||
<el-table-column label="发票号码" align="center" prop="invoiceNo" />
|
||||
<el-table-column label="车牌" align="center" prop="plate" />
|
||||
<el-table-column label="证件号码" align="center" prop="idCard" />
|
||||
<el-table-column label="入场时间" align="center" prop="inTime" />
|
||||
<el-table-column label="出场时间" align="center" prop="outTime" />
|
||||
<el-table-column label="入场图片名" align="center" prop="inImage" width='110px'/>
|
||||
<el-table-column label="出场图片名" align="center" prop="outImage" width='110px'/>
|
||||
<el-table-column label="入口通道名称" align="center" prop="inChannel" width='110px'/>
|
||||
<el-table-column label="出口通道名称" align="center" prop="outChannel" width='110px'/>
|
||||
<el-table-column label="抬杆模式" align="center" prop="openGateMode" />
|
||||
<el-table-column label="匹配模式" align="center" prop="matchMode" />
|
||||
<el-table-column label="总停车费" align="center" prop="charge" />
|
||||
<el-table-column label="线上总收费" align="center" prop="onLineCharge" width='110px'/>
|
||||
<el-table-column label="线下总收费" align="center" prop="offLineCharge" width='110px'/>
|
||||
<!-- <el-table-column label="线上线下金额和时间优惠累计抵扣值" align="center" prop="profitChargeTotal" />
|
||||
<el-table-column label="线上累计优惠金额总面值" align="center" prop="onLineProfitChargeNum" />
|
||||
<el-table-column label="线上累计优惠金额总抵扣值" align="center" prop="onLineProfitChargeValue" />
|
||||
<el-table-column label="线下累计优惠金额总面值" align="center" prop="offLineProfitChargeNum" />
|
||||
<el-table-column label="线下累计优惠金额总抵扣值" align="center" prop="offLineProfitChargeValue" />
|
||||
<el-table-column label="线上累计优惠时间" align="center" prop="onLineProfitTimeNum" />
|
||||
<el-table-column label="线上累计优惠时间总抵扣值" align="center" prop="onLineProfitTimeValue" />
|
||||
<el-table-column label="线下累计优惠时间" align="center" prop="offLineProfitTimeNum" />
|
||||
<el-table-column label="线下累计优惠时间总抵扣值" align="center" prop="offLineProfitTimeValue" /> -->
|
||||
<el-table-column label="时间" align="center" prop="costTime" />
|
||||
<el-table-column
|
||||
label="创建时间"
|
||||
align="center"
|
||||
prop="createTime"
|
||||
:formatter="dateFormatter"
|
||||
width="180px"
|
||||
/>
|
||||
<el-table-column label="操作" align="center" fixed="right" width="110">
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
@click="openForm('update', scope.row.id)"
|
||||
v-hasPermi="['parking:appearance-record:update']"
|
||||
>
|
||||
编辑
|
||||
</el-button>
|
||||
<el-button
|
||||
link
|
||||
type="danger"
|
||||
@click="handleDelete(scope.row.id)"
|
||||
v-hasPermi="['parking:appearance-record:delete']"
|
||||
>
|
||||
删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!-- 分页 -->
|
||||
<Pagination
|
||||
:total="total"
|
||||
v-model:page="queryParams.pageNo"
|
||||
v-model:limit="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</ContentWrap>
|
||||
|
||||
<!-- 表单弹窗:添加/修改 -->
|
||||
<AppearanceRecordForm ref="formRef" @success="getList" />
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { dateFormatter } from '@/utils/formatTime'
|
||||
import download from '@/utils/download'
|
||||
import { AppearanceRecordApi, AppearanceRecordVO } from '@/api/parking/appearancerecord'
|
||||
import AppearanceRecordForm from './AppearanceRecordForm.vue'
|
||||
|
||||
/** 出场记录 列表 */
|
||||
defineOptions({ name: 'AppearanceRecord' })
|
||||
|
||||
const message = useMessage() // 消息弹窗
|
||||
const { t } = useI18n() // 国际化
|
||||
|
||||
const loading = ref(true) // 列表的加载中
|
||||
const list = ref<AppearanceRecordVO[]>([]) // 列表的数据
|
||||
const total = ref(0) // 列表的总页数
|
||||
const queryParams = reactive({
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
orderId: undefined,
|
||||
parkNumber: undefined,
|
||||
operatorId: undefined,
|
||||
operatorName: undefined,
|
||||
invoiceNo: undefined,
|
||||
plate: undefined,
|
||||
idCard: undefined,
|
||||
inTime: [],
|
||||
outTime: [],
|
||||
inImage: undefined,
|
||||
outImage: undefined,
|
||||
inChannel: undefined,
|
||||
outChannel: undefined,
|
||||
openGateMode: undefined,
|
||||
matchMode: undefined,
|
||||
charge: undefined,
|
||||
onLineCharge: undefined,
|
||||
offLineCharge: undefined,
|
||||
profitChargeTotal: undefined,
|
||||
onLineProfitChargeNum: undefined,
|
||||
onLineProfitChargeValue: undefined,
|
||||
offLineProfitChargeNum: undefined,
|
||||
offLineProfitChargeValue: undefined,
|
||||
onLineProfitTimeNum: undefined,
|
||||
onLineProfitTimeValue: undefined,
|
||||
offLineProfitTimeNum: undefined,
|
||||
offLineProfitTimeValue: undefined,
|
||||
costTime: [],
|
||||
createTime: [],
|
||||
})
|
||||
const queryFormRef = ref() // 搜索的表单
|
||||
const exportLoading = ref(false) // 导出的加载中
|
||||
|
||||
/** 查询列表 */
|
||||
const getList = async () => {
|
||||
loading.value = true
|
||||
try {
|
||||
const data = await AppearanceRecordApi.getAppearanceRecordPage(queryParams)
|
||||
list.value = data.list
|
||||
total.value = data.total
|
||||
} finally {
|
||||
loading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
const handleQuery = () => {
|
||||
queryParams.pageNo = 1
|
||||
getList()
|
||||
}
|
||||
|
||||
/** 重置按钮操作 */
|
||||
const resetQuery = () => {
|
||||
queryFormRef.value.resetFields()
|
||||
handleQuery()
|
||||
}
|
||||
|
||||
/** 添加/修改操作 */
|
||||
const formRef = ref()
|
||||
const openForm = (type: string, id?: number) => {
|
||||
formRef.value.open(type, id)
|
||||
}
|
||||
|
||||
/** 删除按钮操作 */
|
||||
const handleDelete = async (id: number) => {
|
||||
try {
|
||||
// 删除的二次确认
|
||||
await message.delConfirm()
|
||||
// 发起删除
|
||||
await AppearanceRecordApi.deleteAppearanceRecord(id)
|
||||
message.success(t('common.delSuccess'))
|
||||
// 刷新列表
|
||||
await getList()
|
||||
} catch {}
|
||||
}
|
||||
|
||||
/** 导出按钮操作 */
|
||||
const handleExport = async () => {
|
||||
try {
|
||||
// 导出的二次确认
|
||||
await message.exportConfirm()
|
||||
// 发起导出
|
||||
exportLoading.value = true
|
||||
const data = await AppearanceRecordApi.exportAppearanceRecord(queryParams)
|
||||
download.excel(data, '出场记录.xls')
|
||||
} catch {
|
||||
} finally {
|
||||
exportLoading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
/** 初始化 **/
|
||||
onMounted(() => {
|
||||
getList()
|
||||
})
|
||||
</script>
|
114
src/views/parking/black/BlackForm.vue
Normal file
114
src/views/parking/black/BlackForm.vue
Normal file
@ -0,0 +1,114 @@
|
||||
<template>
|
||||
<Dialog :title="dialogTitle" v-model="dialogVisible">
|
||||
<el-form
|
||||
ref="formRef"
|
||||
:model="formData"
|
||||
:rules="formRules"
|
||||
label-width="100px"
|
||||
v-loading="formLoading"
|
||||
>
|
||||
<el-form-item label="场库编号" prop="parkNumber">
|
||||
<el-input v-model="formData.parkNumber" placeholder="请输入场库编号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="来源" prop="source">
|
||||
<el-select v-model="formData.source" placeholder="请选择来源">
|
||||
<el-option
|
||||
v-for="dict in getStrDictOptions(DICT_TYPE.BLACK_SOURCE)"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="车牌号" prop="plate">
|
||||
<el-input v-model="formData.plate" placeholder="请输入车牌号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="memo">
|
||||
<el-input v-model="formData.memo" placeholder="请输入备注" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<el-button @click="submitForm" type="primary" :disabled="formLoading">确 定</el-button>
|
||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||
</template>
|
||||
</Dialog>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { getStrDictOptions, DICT_TYPE } from '@/utils/dict'
|
||||
import { BlackApi, BlackVO } from '@/api/parking/black'
|
||||
|
||||
/** 黑名单 表单 */
|
||||
defineOptions({ name: 'BlackForm' })
|
||||
|
||||
const { t } = useI18n() // 国际化
|
||||
const message = useMessage() // 消息弹窗
|
||||
|
||||
const dialogVisible = ref(false) // 弹窗的是否展示
|
||||
const dialogTitle = ref('') // 弹窗的标题
|
||||
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
|
||||
const formType = ref('') // 表单的类型:create - 新增;update - 修改
|
||||
const formData = ref({
|
||||
id: undefined,
|
||||
parkNumber: undefined,
|
||||
source: undefined,
|
||||
plate: undefined,
|
||||
memo: undefined,
|
||||
})
|
||||
const formRules = reactive({
|
||||
})
|
||||
const formRef = ref() // 表单 Ref
|
||||
|
||||
/** 打开弹窗 */
|
||||
const open = async (type: string, id?: number) => {
|
||||
dialogVisible.value = true
|
||||
dialogTitle.value = t('action.' + type)
|
||||
formType.value = type
|
||||
resetForm()
|
||||
// 修改时,设置数据
|
||||
if (id) {
|
||||
formLoading.value = true
|
||||
try {
|
||||
formData.value = await BlackApi.getBlack(id)
|
||||
} finally {
|
||||
formLoading.value = false
|
||||
}
|
||||
}
|
||||
}
|
||||
defineExpose({ open }) // 提供 open 方法,用于打开弹窗
|
||||
|
||||
/** 提交表单 */
|
||||
const emit = defineEmits(['success']) // 定义 success 事件,用于操作成功后的回调
|
||||
const submitForm = async () => {
|
||||
// 校验表单
|
||||
await formRef.value.validate()
|
||||
// 提交请求
|
||||
formLoading.value = true
|
||||
try {
|
||||
const data = formData.value as unknown as BlackVO
|
||||
if (formType.value === 'create') {
|
||||
await BlackApi.createBlack(data)
|
||||
message.success(t('common.createSuccess'))
|
||||
} else {
|
||||
await BlackApi.updateBlack(data)
|
||||
message.success(t('common.updateSuccess'))
|
||||
}
|
||||
dialogVisible.value = false
|
||||
// 发送操作成功的事件
|
||||
emit('success')
|
||||
} finally {
|
||||
formLoading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
/** 重置表单 */
|
||||
const resetForm = () => {
|
||||
formData.value = {
|
||||
id: undefined,
|
||||
parkNumber: undefined,
|
||||
source: undefined,
|
||||
plate: undefined,
|
||||
memo: undefined,
|
||||
}
|
||||
formRef.value?.resetFields()
|
||||
}
|
||||
</script>
|
231
src/views/parking/black/index.vue
Normal file
231
src/views/parking/black/index.vue
Normal file
@ -0,0 +1,231 @@
|
||||
<template>
|
||||
<ContentWrap>
|
||||
<!-- 搜索工作栏 -->
|
||||
<el-form
|
||||
class="-mb-15px"
|
||||
:model="queryParams"
|
||||
ref="queryFormRef"
|
||||
:inline="true"
|
||||
label-width="68px"
|
||||
>
|
||||
<el-form-item label="场库编号" prop="parkNumber">
|
||||
<el-input
|
||||
v-model="queryParams.parkNumber"
|
||||
placeholder="请输入场库编号"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="来源" prop="source">
|
||||
<el-select
|
||||
v-model="queryParams.source"
|
||||
placeholder="请选择来源"
|
||||
clearable
|
||||
class="!w-240px"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in getStrDictOptions(DICT_TYPE.BLACK_SOURCE)"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="车牌号" prop="plate">
|
||||
<el-input
|
||||
v-model="queryParams.plate"
|
||||
placeholder="请输入车牌号"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="备注" prop="memo">
|
||||
<el-input
|
||||
v-model="queryParams.memo"
|
||||
placeholder="请输入备注"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item> -->
|
||||
<el-form-item label="创建时间" prop="createTime">
|
||||
<el-date-picker
|
||||
v-model="queryParams.createTime"
|
||||
value-format="YYYY-MM-DD HH:mm:ss"
|
||||
type="daterange"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
:default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button @click="handleQuery"><Icon icon="ep:search" class="mr-5px" /> 搜索</el-button>
|
||||
<el-button @click="resetQuery"><Icon icon="ep:refresh" class="mr-5px" /> 重置</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
@click="openForm('create')"
|
||||
v-hasPermi="['parking:black:create']"
|
||||
>
|
||||
<Icon icon="ep:plus" class="mr-5px" /> 新增
|
||||
</el-button>
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
@click="handleExport"
|
||||
:loading="exportLoading"
|
||||
v-hasPermi="['parking:black:export']"
|
||||
>
|
||||
<Icon icon="ep:download" class="mr-5px" /> 导出
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</ContentWrap>
|
||||
|
||||
<!-- 列表 -->
|
||||
<ContentWrap>
|
||||
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true">
|
||||
<!-- <el-table-column label="id" align="center" prop="id" /> -->
|
||||
<el-table-column label="场库编号" align="center" prop="parkNumber" />
|
||||
<el-table-column label="来源" align="center" prop="source">
|
||||
<template #default="scope">
|
||||
<dict-tag :type="DICT_TYPE.BLACK_SOURCE" :value="scope.row.source" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="车牌号" align="center" prop="plate" />
|
||||
<el-table-column label="备注" align="center" prop="memo" />
|
||||
<el-table-column
|
||||
label="创建时间"
|
||||
align="center"
|
||||
prop="createTime"
|
||||
:formatter="dateFormatter"
|
||||
width="180px"
|
||||
/>
|
||||
<el-table-column label="操作" align="center">
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
@click="openForm('update', scope.row.id)"
|
||||
v-hasPermi="['parking:black:update']"
|
||||
>
|
||||
编辑
|
||||
</el-button>
|
||||
<el-button
|
||||
link
|
||||
type="danger"
|
||||
@click="handleDelete(scope.row.id)"
|
||||
v-hasPermi="['parking:black:delete']"
|
||||
>
|
||||
删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!-- 分页 -->
|
||||
<Pagination
|
||||
:total="total"
|
||||
v-model:page="queryParams.pageNo"
|
||||
v-model:limit="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</ContentWrap>
|
||||
|
||||
<!-- 表单弹窗:添加/修改 -->
|
||||
<BlackForm ref="formRef" @success="getList" />
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { getStrDictOptions, DICT_TYPE } from '@/utils/dict'
|
||||
import { dateFormatter } from '@/utils/formatTime'
|
||||
import download from '@/utils/download'
|
||||
import { BlackApi, BlackVO } from '@/api/parking/black'
|
||||
import BlackForm from './BlackForm.vue'
|
||||
|
||||
/** 黑名单 列表 */
|
||||
defineOptions({ name: 'Black' })
|
||||
|
||||
const message = useMessage() // 消息弹窗
|
||||
const { t } = useI18n() // 国际化
|
||||
|
||||
const loading = ref(true) // 列表的加载中
|
||||
const list = ref<BlackVO[]>([]) // 列表的数据
|
||||
const total = ref(0) // 列表的总页数
|
||||
const queryParams = reactive({
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
parkNumber: undefined,
|
||||
source: undefined,
|
||||
plate: undefined,
|
||||
memo: undefined,
|
||||
createTime: [],
|
||||
})
|
||||
const queryFormRef = ref() // 搜索的表单
|
||||
const exportLoading = ref(false) // 导出的加载中
|
||||
|
||||
/** 查询列表 */
|
||||
const getList = async () => {
|
||||
loading.value = true
|
||||
try {
|
||||
const data = await BlackApi.getBlackPage(queryParams)
|
||||
list.value = data.list
|
||||
total.value = data.total
|
||||
} finally {
|
||||
loading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
const handleQuery = () => {
|
||||
queryParams.pageNo = 1
|
||||
getList()
|
||||
}
|
||||
|
||||
/** 重置按钮操作 */
|
||||
const resetQuery = () => {
|
||||
queryFormRef.value.resetFields()
|
||||
handleQuery()
|
||||
}
|
||||
|
||||
/** 添加/修改操作 */
|
||||
const formRef = ref()
|
||||
const openForm = (type: string, id?: number) => {
|
||||
formRef.value.open(type, id)
|
||||
}
|
||||
|
||||
/** 删除按钮操作 */
|
||||
const handleDelete = async (id: number) => {
|
||||
try {
|
||||
// 删除的二次确认
|
||||
await message.delConfirm()
|
||||
// 发起删除
|
||||
await BlackApi.deleteBlack(id)
|
||||
message.success(t('common.delSuccess'))
|
||||
// 刷新列表
|
||||
await getList()
|
||||
} catch {}
|
||||
}
|
||||
|
||||
/** 导出按钮操作 */
|
||||
const handleExport = async () => {
|
||||
try {
|
||||
// 导出的二次确认
|
||||
await message.exportConfirm()
|
||||
// 发起导出
|
||||
exportLoading.value = true
|
||||
const data = await BlackApi.exportBlack(queryParams)
|
||||
download.excel(data, '黑名单.xls')
|
||||
} catch {
|
||||
} finally {
|
||||
exportLoading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
/** 初始化 **/
|
||||
onMounted(() => {
|
||||
getList()
|
||||
})
|
||||
</script>
|
168
src/views/parking/entryrecord/EntryRecordForm.vue
Normal file
168
src/views/parking/entryrecord/EntryRecordForm.vue
Normal file
@ -0,0 +1,168 @@
|
||||
<template>
|
||||
<Dialog :title="dialogTitle" v-model="dialogVisible">
|
||||
<el-form
|
||||
ref="formRef"
|
||||
:model="formData"
|
||||
:rules="formRules"
|
||||
label-width="100px"
|
||||
v-loading="formLoading"
|
||||
>
|
||||
<el-form-item label="入场记录编号" prop="orderId">
|
||||
<el-input v-model="formData.orderId" placeholder="请输入入场记录编号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="场库编号" prop="parkNumber">
|
||||
<el-input v-model="formData.parkNumber" placeholder="请输入场库编号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="车牌" prop="plate">
|
||||
<el-input v-model="formData.plate" placeholder="请输入车牌" />
|
||||
</el-form-item>
|
||||
<el-form-item label="证件号码" prop="idCard">
|
||||
<el-input v-model="formData.idCard" placeholder="请输入证件号码" />
|
||||
</el-form-item>
|
||||
<el-form-item label="入场时间" prop="inTime">
|
||||
<el-date-picker
|
||||
v-model="formData.inTime"
|
||||
type="date"
|
||||
value-format="x"
|
||||
placeholder="选择入场时间"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="入场通道名称" prop="inChannel">
|
||||
<el-input v-model="formData.inChannel" placeholder="请输入入场通道名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="入场图片名" prop="inImage">
|
||||
<UploadImg v-model="formData.inImage" />
|
||||
</el-form-item>
|
||||
<el-form-item label="访问事由" prop="visitReason">
|
||||
<el-input v-model="formData.visitReason" placeholder="请输入访问事由" />
|
||||
</el-form-item>
|
||||
<el-form-item label="放行类型" prop="openGateMode">
|
||||
<el-input v-model="formData.openGateMode" placeholder="请输入放行类型" />
|
||||
</el-form-item>
|
||||
<el-form-item label="匹配模式" prop="matchMode">
|
||||
<el-input v-model="formData.matchMode" placeholder="请输入匹配模式" />
|
||||
</el-form-item>
|
||||
<el-form-item label="是否开闸" prop="barriorOpen">
|
||||
<el-input v-model="formData.barriorOpen" placeholder="请输入是否开闸" />
|
||||
</el-form-item>
|
||||
<el-form-item label="开闸耗时" prop="costTime">
|
||||
<el-date-picker
|
||||
v-model="formData.costTime"
|
||||
type="date"
|
||||
value-format="x"
|
||||
placeholder="选择开闸耗时"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<el-button @click="submitForm" type="primary" :disabled="formLoading">确 定</el-button>
|
||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||
</template>
|
||||
</Dialog>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { EntryRecordApi, EntryRecordVO } from '@/api/parking/entryrecord'
|
||||
|
||||
/** 入场记录 表单 */
|
||||
defineOptions({ name: 'EntryRecordForm' })
|
||||
|
||||
const { t } = useI18n() // 国际化
|
||||
const message = useMessage() // 消息弹窗
|
||||
|
||||
const dialogVisible = ref(false) // 弹窗的是否展示
|
||||
const dialogTitle = ref('') // 弹窗的标题
|
||||
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
|
||||
const formType = ref('') // 表单的类型:create - 新增;update - 修改
|
||||
const formData = ref({
|
||||
id: undefined,
|
||||
orderId: undefined,
|
||||
parkNumber: undefined,
|
||||
plate: undefined,
|
||||
idCard: undefined,
|
||||
inTime: undefined,
|
||||
inChannel: undefined,
|
||||
inImage: undefined,
|
||||
visitReason: undefined,
|
||||
openGateMode: undefined,
|
||||
matchMode: undefined,
|
||||
barriorOpen: undefined,
|
||||
costTime: undefined,
|
||||
})
|
||||
const formRules = reactive({
|
||||
orderId: [{ required: true, message: '入场记录编号不能为空', trigger: 'blur' }],
|
||||
parkNumber: [{ required: true, message: '场库编号不能为空', trigger: 'blur' }],
|
||||
plate: [{ required: true, message: '车牌不能为空', trigger: 'blur' }],
|
||||
idCard: [{ required: true, message: '证件号码不能为空', trigger: 'blur' }],
|
||||
inTime: [{ required: true, message: '入场时间不能为空', trigger: 'blur' }],
|
||||
inChannel: [{ required: true, message: '入场通道名称不能为空', trigger: 'blur' }],
|
||||
inImage: [{ required: true, message: '入场图片名不能为空', trigger: 'blur' }],
|
||||
visitReason: [{ required: true, message: '访问事由不能为空', trigger: 'blur' }],
|
||||
openGateMode: [{ required: true, message: '放行类型不能为空', trigger: 'blur' }],
|
||||
matchMode: [{ required: true, message: '匹配模式不能为空', trigger: 'blur' }],
|
||||
barriorOpen: [{ required: true, message: '是否开闸不能为空', trigger: 'blur' }],
|
||||
costTime: [{ required: true, message: '开闸耗时不能为空', trigger: 'blur' }],
|
||||
})
|
||||
const formRef = ref() // 表单 Ref
|
||||
|
||||
/** 打开弹窗 */
|
||||
const open = async (type: string, id?: number) => {
|
||||
dialogVisible.value = true
|
||||
dialogTitle.value = t('action.' + type)
|
||||
formType.value = type
|
||||
resetForm()
|
||||
// 修改时,设置数据
|
||||
if (id) {
|
||||
formLoading.value = true
|
||||
try {
|
||||
formData.value = await EntryRecordApi.getEntryRecord(id)
|
||||
} finally {
|
||||
formLoading.value = false
|
||||
}
|
||||
}
|
||||
}
|
||||
defineExpose({ open }) // 提供 open 方法,用于打开弹窗
|
||||
|
||||
/** 提交表单 */
|
||||
const emit = defineEmits(['success']) // 定义 success 事件,用于操作成功后的回调
|
||||
const submitForm = async () => {
|
||||
// 校验表单
|
||||
await formRef.value.validate()
|
||||
// 提交请求
|
||||
formLoading.value = true
|
||||
try {
|
||||
const data = formData.value as unknown as EntryRecordVO
|
||||
if (formType.value === 'create') {
|
||||
await EntryRecordApi.createEntryRecord(data)
|
||||
message.success(t('common.createSuccess'))
|
||||
} else {
|
||||
await EntryRecordApi.updateEntryRecord(data)
|
||||
message.success(t('common.updateSuccess'))
|
||||
}
|
||||
dialogVisible.value = false
|
||||
// 发送操作成功的事件
|
||||
emit('success')
|
||||
} finally {
|
||||
formLoading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
/** 重置表单 */
|
||||
const resetForm = () => {
|
||||
formData.value = {
|
||||
id: undefined,
|
||||
orderId: undefined,
|
||||
parkNumber: undefined,
|
||||
plate: undefined,
|
||||
idCard: undefined,
|
||||
inTime: undefined,
|
||||
inChannel: undefined,
|
||||
inImage: undefined,
|
||||
visitReason: undefined,
|
||||
openGateMode: undefined,
|
||||
matchMode: undefined,
|
||||
barriorOpen: undefined,
|
||||
costTime: undefined,
|
||||
}
|
||||
formRef.value?.resetFields()
|
||||
}
|
||||
</script>
|
303
src/views/parking/entryrecord/index.vue
Normal file
303
src/views/parking/entryrecord/index.vue
Normal file
@ -0,0 +1,303 @@
|
||||
<template>
|
||||
<ContentWrap>
|
||||
<!-- 搜索工作栏 -->
|
||||
<el-form
|
||||
class="-mb-15px"
|
||||
:model="queryParams"
|
||||
ref="queryFormRef"
|
||||
:inline="true"
|
||||
label-width="100px"
|
||||
>
|
||||
<el-form-item label="入场记录编号" prop="orderId">
|
||||
<el-input
|
||||
v-model="queryParams.orderId"
|
||||
placeholder="请输入入场记录编号"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="场库编号" prop="parkNumber">
|
||||
<el-input
|
||||
v-model="queryParams.parkNumber"
|
||||
placeholder="请输入场库编号"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="车牌" prop="plate">
|
||||
<el-input
|
||||
v-model="queryParams.plate"
|
||||
placeholder="请输入车牌"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="证件号码" prop="idCard">
|
||||
<el-input
|
||||
v-model="queryParams.idCard"
|
||||
placeholder="请输入证件号码"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="入场时间" prop="inTime">
|
||||
<el-date-picker
|
||||
v-model="queryParams.inTime"
|
||||
value-format="YYYY-MM-DD HH:mm:ss"
|
||||
type="daterange"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
:default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="入场通道名称" prop="inChannel">
|
||||
<el-input
|
||||
v-model="queryParams.inChannel"
|
||||
placeholder="请输入入场通道名称"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="访问事由" prop="visitReason">
|
||||
<el-input
|
||||
v-model="queryParams.visitReason"
|
||||
placeholder="请输入访问事由"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="放行类型" prop="openGateMode">
|
||||
<el-input
|
||||
v-model="queryParams.openGateMode"
|
||||
placeholder="请输入放行类型"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="匹配模式" prop="matchMode">
|
||||
<el-input
|
||||
v-model="queryParams.matchMode"
|
||||
placeholder="请输入匹配模式"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否开闸" prop="barriorOpen">
|
||||
<el-input
|
||||
v-model="queryParams.barriorOpen"
|
||||
placeholder="请输入是否开闸"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="开闸耗时" prop="costTime">
|
||||
<el-date-picker
|
||||
v-model="queryParams.costTime"
|
||||
value-format="YYYY-MM-DD HH:mm:ss"
|
||||
type="daterange"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
:default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="创建时间" prop="createTime">
|
||||
<el-date-picker
|
||||
v-model="queryParams.createTime"
|
||||
value-format="YYYY-MM-DD HH:mm:ss"
|
||||
type="daterange"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
:default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button @click="handleQuery"><Icon icon="ep:search" class="mr-5px" /> 搜索</el-button>
|
||||
<el-button @click="resetQuery"><Icon icon="ep:refresh" class="mr-5px" /> 重置</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
@click="openForm('create')"
|
||||
v-hasPermi="['parking:entry-record:create']"
|
||||
>
|
||||
<Icon icon="ep:plus" class="mr-5px" /> 新增
|
||||
</el-button>
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
@click="handleExport"
|
||||
:loading="exportLoading"
|
||||
v-hasPermi="['parking:entry-record:export']"
|
||||
>
|
||||
<Icon icon="ep:download" class="mr-5px" /> 导出
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</ContentWrap>
|
||||
|
||||
<!-- 列表 -->
|
||||
<ContentWrap>
|
||||
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true">
|
||||
<el-table-column label="入场id" align="center" prop="id" />
|
||||
<el-table-column label="入场记录编号" align="center" prop="orderId" width='110px'/>
|
||||
<el-table-column label="场库编号" align="center" prop="parkNumber" />
|
||||
<el-table-column label="车牌" align="center" prop="plate" />
|
||||
<el-table-column label="证件号码" align="center" prop="idCard" />
|
||||
<el-table-column label="入场时间" align="center" prop="inTime" />
|
||||
<el-table-column label="入场通道名称" align="center" prop="inChannel" width='110px'/>
|
||||
<el-table-column label="入场图片名" align="center" prop="inImage" width='100px'/>
|
||||
<el-table-column label="访问事由" align="center" prop="visitReason" />
|
||||
<el-table-column label="放行类型" align="center" prop="openGateMode" />
|
||||
<el-table-column label="匹配模式" align="center" prop="matchMode" />
|
||||
<el-table-column label="是否开闸" align="center" prop="barriorOpen" />
|
||||
<el-table-column label="开闸耗时" align="center" prop="costTime" />
|
||||
<el-table-column
|
||||
label="创建时间"
|
||||
align="center"
|
||||
prop="createTime"
|
||||
:formatter="dateFormatter"
|
||||
width="180px"
|
||||
/>
|
||||
<el-table-column label="操作" align="center" fixed="right" width="110">
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
@click="openForm('update', scope.row.id)"
|
||||
v-hasPermi="['parking:entry-record:update']"
|
||||
>
|
||||
编辑
|
||||
</el-button>
|
||||
<el-button
|
||||
link
|
||||
type="danger"
|
||||
@click="handleDelete(scope.row.id)"
|
||||
v-hasPermi="['parking:entry-record:delete']"
|
||||
>
|
||||
删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!-- 分页 -->
|
||||
<Pagination
|
||||
:total="total"
|
||||
v-model:page="queryParams.pageNo"
|
||||
v-model:limit="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</ContentWrap>
|
||||
|
||||
<!-- 表单弹窗:添加/修改 -->
|
||||
<EntryRecordForm ref="formRef" @success="getList" />
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { dateFormatter } from '@/utils/formatTime'
|
||||
import download from '@/utils/download'
|
||||
import { EntryRecordApi, EntryRecordVO } from '@/api/parking/entryrecord'
|
||||
import EntryRecordForm from './EntryRecordForm.vue'
|
||||
|
||||
/** 入场记录 列表 */
|
||||
defineOptions({ name: 'EntryRecord' })
|
||||
|
||||
const message = useMessage() // 消息弹窗
|
||||
const { t } = useI18n() // 国际化
|
||||
|
||||
const loading = ref(true) // 列表的加载中
|
||||
const list = ref<EntryRecordVO[]>([]) // 列表的数据
|
||||
const total = ref(0) // 列表的总页数
|
||||
const queryParams = reactive({
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
orderId: undefined,
|
||||
parkNumber: undefined,
|
||||
plate: undefined,
|
||||
idCard: undefined,
|
||||
inTime: [],
|
||||
inChannel: undefined,
|
||||
inImage: undefined,
|
||||
visitReason: undefined,
|
||||
openGateMode: undefined,
|
||||
matchMode: undefined,
|
||||
barriorOpen: undefined,
|
||||
costTime: [],
|
||||
createTime: [],
|
||||
})
|
||||
const queryFormRef = ref() // 搜索的表单
|
||||
const exportLoading = ref(false) // 导出的加载中
|
||||
|
||||
/** 查询列表 */
|
||||
const getList = async () => {
|
||||
loading.value = true
|
||||
try {
|
||||
const data = await EntryRecordApi.getEntryRecordPage(queryParams)
|
||||
list.value = data.list
|
||||
total.value = data.total
|
||||
} finally {
|
||||
loading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
const handleQuery = () => {
|
||||
queryParams.pageNo = 1
|
||||
getList()
|
||||
}
|
||||
|
||||
/** 重置按钮操作 */
|
||||
const resetQuery = () => {
|
||||
queryFormRef.value.resetFields()
|
||||
handleQuery()
|
||||
}
|
||||
|
||||
/** 添加/修改操作 */
|
||||
const formRef = ref()
|
||||
const openForm = (type: string, id?: number) => {
|
||||
formRef.value.open(type, id)
|
||||
}
|
||||
|
||||
/** 删除按钮操作 */
|
||||
const handleDelete = async (id: number) => {
|
||||
try {
|
||||
// 删除的二次确认
|
||||
await message.delConfirm()
|
||||
// 发起删除
|
||||
await EntryRecordApi.deleteEntryRecord(id)
|
||||
message.success(t('common.delSuccess'))
|
||||
// 刷新列表
|
||||
await getList()
|
||||
} catch {}
|
||||
}
|
||||
|
||||
/** 导出按钮操作 */
|
||||
const handleExport = async () => {
|
||||
try {
|
||||
// 导出的二次确认
|
||||
await message.exportConfirm()
|
||||
// 发起导出
|
||||
exportLoading.value = true
|
||||
const data = await EntryRecordApi.exportEntryRecord(queryParams)
|
||||
download.excel(data, '入场记录.xls')
|
||||
} catch {
|
||||
} finally {
|
||||
exportLoading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
/** 初始化 **/
|
||||
onMounted(() => {
|
||||
getList()
|
||||
})
|
||||
</script>
|
128
src/views/parking/heartbeat/message/HeartbeatForm.vue
Normal file
128
src/views/parking/heartbeat/message/HeartbeatForm.vue
Normal file
@ -0,0 +1,128 @@
|
||||
<template>
|
||||
<Dialog :title="dialogTitle" v-model="dialogVisible">
|
||||
<el-form
|
||||
ref="formRef"
|
||||
:model="formData"
|
||||
:rules="formRules"
|
||||
label-width="100px"
|
||||
v-loading="formLoading"
|
||||
>
|
||||
<el-form-item label="场库编号" prop="parkNumber">
|
||||
<el-input v-model="formData.parkNumber" placeholder="请输入场库编号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="场库名称" prop="parkName">
|
||||
<el-input v-model="formData.parkName" placeholder="请输入场库名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="场库总车位数" prop="spaceCount">
|
||||
<el-input v-model="formData.spaceCount" placeholder="请输入场库总车位数" />
|
||||
</el-form-item>
|
||||
<el-form-item label="场库空车位数" prop="freeSpaceCount">
|
||||
<el-input v-model="formData.freeSpaceCount" placeholder="请输入场库空车位数" />
|
||||
</el-form-item>
|
||||
<el-form-item label="场库可预约数" prop="bookSpaceCount">
|
||||
<el-input v-model="formData.bookSpaceCount" placeholder="请输入场库可预约数" />
|
||||
</el-form-item>
|
||||
<el-form-item label="场库在场预约数" prop="bookInParkCount">
|
||||
<el-input v-model="formData.bookInParkCount" placeholder="请输入场库在场预约数" />
|
||||
</el-form-item>
|
||||
<el-form-item label="区域属性" prop="areaList">
|
||||
<el-input v-model="formData.areaList" placeholder="请输入区域属性" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<el-button @click="submitForm" type="primary" :disabled="formLoading">确 定</el-button>
|
||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||
</template>
|
||||
</Dialog>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { HeartbeatApi, HeartbeatVO } from '@/api/parking/heartbeat/message'
|
||||
|
||||
/** 心跳管理 表单 */
|
||||
defineOptions({ name: 'HeartbeatForm' })
|
||||
|
||||
const { t } = useI18n() // 国际化
|
||||
const message = useMessage() // 消息弹窗
|
||||
|
||||
const dialogVisible = ref(false) // 弹窗的是否展示
|
||||
const dialogTitle = ref('') // 弹窗的标题
|
||||
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
|
||||
const formType = ref('') // 表单的类型:create - 新增;update - 修改
|
||||
const formData = ref({
|
||||
id: undefined,
|
||||
parkNumber: undefined,
|
||||
parkName: undefined,
|
||||
spaceCount: undefined,
|
||||
freeSpaceCount: undefined,
|
||||
bookSpaceCount: undefined,
|
||||
bookInParkCount: undefined,
|
||||
areaList: undefined,
|
||||
})
|
||||
const formRules = reactive({
|
||||
parkNumber: [{ required: true, message: '场库编号不能为空', trigger: 'blur' }],
|
||||
parkName: [{ required: true, message: '场库名称不能为空', trigger: 'blur' }],
|
||||
spaceCount: [{ required: true, message: '场库总车位数不能为空', trigger: 'blur' }],
|
||||
freeSpaceCount: [{ required: true, message: '场库空车位数不能为空', trigger: 'blur' }],
|
||||
bookSpaceCount: [{ required: true, message: '场库可预约数不能为空', trigger: 'blur' }],
|
||||
bookInParkCount: [{ required: true, message: '场库在场预约数不能为空', trigger: 'blur' }],
|
||||
areaList: [{ required: true, message: '区域属性不能为空', trigger: 'blur' }],
|
||||
})
|
||||
const formRef = ref() // 表单 Ref
|
||||
|
||||
/** 打开弹窗 */
|
||||
const open = async (type: string, id?: number) => {
|
||||
dialogVisible.value = true
|
||||
dialogTitle.value = t('action.' + type)
|
||||
formType.value = type
|
||||
resetForm()
|
||||
// 修改时,设置数据
|
||||
if (id) {
|
||||
formLoading.value = true
|
||||
try {
|
||||
formData.value = await HeartbeatApi.getHeartbeat(id)
|
||||
} finally {
|
||||
formLoading.value = false
|
||||
}
|
||||
}
|
||||
}
|
||||
defineExpose({ open }) // 提供 open 方法,用于打开弹窗
|
||||
|
||||
/** 提交表单 */
|
||||
const emit = defineEmits(['success']) // 定义 success 事件,用于操作成功后的回调
|
||||
const submitForm = async () => {
|
||||
// 校验表单
|
||||
await formRef.value.validate()
|
||||
// 提交请求
|
||||
formLoading.value = true
|
||||
try {
|
||||
const data = formData.value as unknown as HeartbeatVO
|
||||
if (formType.value === 'create') {
|
||||
await HeartbeatApi.createHeartbeat(data)
|
||||
message.success(t('common.createSuccess'))
|
||||
} else {
|
||||
await HeartbeatApi.updateHeartbeat(data)
|
||||
message.success(t('common.updateSuccess'))
|
||||
}
|
||||
dialogVisible.value = false
|
||||
// 发送操作成功的事件
|
||||
emit('success')
|
||||
} finally {
|
||||
formLoading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
/** 重置表单 */
|
||||
const resetForm = () => {
|
||||
formData.value = {
|
||||
id: undefined,
|
||||
parkNumber: undefined,
|
||||
parkName: undefined,
|
||||
spaceCount: undefined,
|
||||
freeSpaceCount: undefined,
|
||||
bookSpaceCount: undefined,
|
||||
bookInParkCount: undefined,
|
||||
areaList: undefined,
|
||||
}
|
||||
formRef.value?.resetFields()
|
||||
}
|
||||
</script>
|
253
src/views/parking/heartbeat/message/index.vue
Normal file
253
src/views/parking/heartbeat/message/index.vue
Normal file
@ -0,0 +1,253 @@
|
||||
<template>
|
||||
<ContentWrap>
|
||||
<!-- 搜索工作栏 -->
|
||||
<el-form
|
||||
class="-mb-15px"
|
||||
:model="queryParams"
|
||||
ref="queryFormRef"
|
||||
:inline="true"
|
||||
label-width="auto"
|
||||
>
|
||||
<el-form-item label="场库编号" prop="parkNumber">
|
||||
<el-input
|
||||
v-model="queryParams.parkNumber"
|
||||
placeholder="请输入场库编号"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="场库名称" prop="parkName">
|
||||
<el-input
|
||||
v-model="queryParams.parkName"
|
||||
placeholder="请输入场库名称"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="场库总车位数" prop="spaceCount">
|
||||
<el-input
|
||||
v-model="queryParams.spaceCount"
|
||||
placeholder="请输入场库总车位数"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="场库空车位数" prop="freeSpaceCount">
|
||||
<el-input
|
||||
v-model="queryParams.freeSpaceCount"
|
||||
placeholder="请输入场库空车位数"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="场库可预约数" prop="bookSpaceCount">
|
||||
<el-input
|
||||
v-model="queryParams.bookSpaceCount"
|
||||
placeholder="请输入场库可预约数"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="场库在场预约数" prop="bookInParkCount">
|
||||
<el-input
|
||||
v-model="queryParams.bookInParkCount"
|
||||
placeholder="请输入场库在场预约数"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="区域属性" prop="areaList">
|
||||
<el-input
|
||||
v-model="queryParams.areaList"
|
||||
placeholder="请输入区域属性"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="创建时间" prop="createTime">
|
||||
<el-date-picker
|
||||
v-model="queryParams.createTime"
|
||||
value-format="YYYY-MM-DD HH:mm:ss"
|
||||
type="daterange"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
:default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button @click="handleQuery"><Icon icon="ep:search" class="mr-5px" /> 搜索</el-button>
|
||||
<el-button @click="resetQuery"><Icon icon="ep:refresh" class="mr-5px" /> 重置</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
@click="openForm('create')"
|
||||
v-hasPermi="['parking:heartbeat:create']"
|
||||
>
|
||||
<Icon icon="ep:plus" class="mr-5px" /> 新增
|
||||
</el-button>
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
@click="handleExport"
|
||||
:loading="exportLoading"
|
||||
v-hasPermi="['parking:heartbeat:export']"
|
||||
>
|
||||
<Icon icon="ep:download" class="mr-5px" /> 导出
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</ContentWrap>
|
||||
|
||||
<!-- 列表 -->
|
||||
<ContentWrap>
|
||||
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true">
|
||||
<el-table-column label="编号" align="center" prop="id" />
|
||||
<el-table-column label="场库编号" align="center" prop="parkNumber" />
|
||||
<el-table-column label="场库名称" align="center" prop="parkName" />
|
||||
<el-table-column label="场库总车位数" align="center" prop="spaceCount" />
|
||||
<el-table-column label="场库空车位数" align="center" prop="freeSpaceCount" />
|
||||
<el-table-column label="场库可预约数" align="center" prop="bookSpaceCount" />
|
||||
<el-table-column label="场库在场预约数" align="center" prop="bookInParkCount" />
|
||||
<el-table-column label="区域属性" align="center" prop="areaList" />
|
||||
<el-table-column
|
||||
label="创建时间"
|
||||
align="center"
|
||||
prop="createTime"
|
||||
:formatter="dateFormatter"
|
||||
width="180px"
|
||||
/>
|
||||
<el-table-column label="操作" align="center">
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
@click="openForm('update', scope.row.id)"
|
||||
v-hasPermi="['parking:heartbeat:update']"
|
||||
>
|
||||
编辑
|
||||
</el-button>
|
||||
<el-button
|
||||
link
|
||||
type="danger"
|
||||
@click="handleDelete(scope.row.id)"
|
||||
v-hasPermi="['parking:heartbeat:delete']"
|
||||
>
|
||||
删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!-- 分页 -->
|
||||
<Pagination
|
||||
:total="total"
|
||||
v-model:page="queryParams.pageNo"
|
||||
v-model:limit="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</ContentWrap>
|
||||
|
||||
<!-- 表单弹窗:添加/修改 -->
|
||||
<HeartbeatForm ref="formRef" @success="getList" />
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { dateFormatter } from '@/utils/formatTime'
|
||||
import download from '@/utils/download'
|
||||
import { HeartbeatApi, HeartbeatVO } from '@/api/parking/heartbeat/message'
|
||||
import HeartbeatForm from './HeartbeatForm.vue'
|
||||
|
||||
/** 心跳管理 列表 */
|
||||
defineOptions({ name: 'Heartbeat' })
|
||||
|
||||
const message = useMessage() // 消息弹窗
|
||||
const { t } = useI18n() // 国际化
|
||||
|
||||
const loading = ref(true) // 列表的加载中
|
||||
const list = ref<HeartbeatVO[]>([]) // 列表的数据
|
||||
const total = ref(0) // 列表的总页数
|
||||
const queryParams = reactive({
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
parkNumber: undefined,
|
||||
parkName: undefined,
|
||||
spaceCount: undefined,
|
||||
freeSpaceCount: undefined,
|
||||
bookSpaceCount: undefined,
|
||||
bookInParkCount: undefined,
|
||||
areaList: undefined,
|
||||
createTime: [],
|
||||
})
|
||||
const queryFormRef = ref() // 搜索的表单
|
||||
const exportLoading = ref(false) // 导出的加载中
|
||||
|
||||
/** 查询列表 */
|
||||
const getList = async () => {
|
||||
loading.value = true
|
||||
try {
|
||||
const data = await HeartbeatApi.getHeartbeatPage(queryParams)
|
||||
list.value = data.list
|
||||
total.value = data.total
|
||||
} finally {
|
||||
loading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
const handleQuery = () => {
|
||||
queryParams.pageNo = 1
|
||||
getList()
|
||||
}
|
||||
|
||||
/** 重置按钮操作 */
|
||||
const resetQuery = () => {
|
||||
queryFormRef.value.resetFields()
|
||||
handleQuery()
|
||||
}
|
||||
|
||||
/** 添加/修改操作 */
|
||||
const formRef = ref()
|
||||
const openForm = (type: string, id?: number) => {
|
||||
formRef.value.open(type, id)
|
||||
}
|
||||
|
||||
/** 删除按钮操作 */
|
||||
const handleDelete = async (id: number) => {
|
||||
try {
|
||||
// 删除的二次确认
|
||||
await message.delConfirm()
|
||||
// 发起删除
|
||||
await HeartbeatApi.deleteHeartbeat(id)
|
||||
message.success(t('common.delSuccess'))
|
||||
// 刷新列表
|
||||
await getList()
|
||||
} catch {}
|
||||
}
|
||||
|
||||
/** 导出按钮操作 */
|
||||
const handleExport = async () => {
|
||||
try {
|
||||
// 导出的二次确认
|
||||
await message.exportConfirm()
|
||||
// 发起导出
|
||||
exportLoading.value = true
|
||||
const data = await HeartbeatApi.exportHeartbeat(queryParams)
|
||||
download.excel(data, '心跳管理.xls')
|
||||
} catch {
|
||||
} finally {
|
||||
exportLoading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
/** 初始化 **/
|
||||
onMounted(() => {
|
||||
getList()
|
||||
})
|
||||
</script>
|
@ -0,0 +1,98 @@
|
||||
<template>
|
||||
<Dialog :title="dialogTitle" v-model="dialogVisible">
|
||||
<el-form
|
||||
ref="formRef"
|
||||
:model="formData"
|
||||
:rules="formRules"
|
||||
label-width="100px"
|
||||
v-loading="formLoading"
|
||||
>
|
||||
<el-form-item label="停车场编号" prop="parkNumber">
|
||||
<el-input v-model="formData.parkNumber" placeholder="请输入停车场编号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="通道Id" prop="passagewayId">
|
||||
<el-input v-model="formData.passagewayId" placeholder="请输入通道Id" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<el-button @click="submitForm" type="primary" :disabled="formLoading">确 定</el-button>
|
||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||
</template>
|
||||
</Dialog>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { LiftingRodApi, LiftingRodVO } from '@/api/parking/instructiondelivery/liftingrod'
|
||||
|
||||
/** 远程抬杠日志 表单 */
|
||||
defineOptions({ name: 'LiftingRodForm' })
|
||||
|
||||
const { t } = useI18n() // 国际化
|
||||
const message = useMessage() // 消息弹窗
|
||||
|
||||
const dialogVisible = ref(false) // 弹窗的是否展示
|
||||
const dialogTitle = ref('') // 弹窗的标题
|
||||
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
|
||||
const formType = ref('') // 表单的类型:create - 新增;update - 修改
|
||||
const formData = ref({
|
||||
id: undefined,
|
||||
parkNumber: undefined,
|
||||
passagewayId: undefined,
|
||||
})
|
||||
const formRules = reactive({
|
||||
parkNumber: [{ required: true, message: '停车场编号不能为空', trigger: 'blur' }],
|
||||
passagewayId: [{ required: true, message: '通道Id不能为空', trigger: 'blur' }],
|
||||
})
|
||||
const formRef = ref() // 表单 Ref
|
||||
|
||||
/** 打开弹窗 */
|
||||
const open = async (type: string, id?: number) => {
|
||||
dialogVisible.value = true
|
||||
dialogTitle.value = t('action.' + type)
|
||||
formType.value = type
|
||||
resetForm()
|
||||
// 修改时,设置数据
|
||||
if (id) {
|
||||
formLoading.value = true
|
||||
try {
|
||||
formData.value = await LiftingRodApi.getLiftingRod(id)
|
||||
} finally {
|
||||
formLoading.value = false
|
||||
}
|
||||
}
|
||||
}
|
||||
defineExpose({ open }) // 提供 open 方法,用于打开弹窗
|
||||
|
||||
/** 提交表单 */
|
||||
const emit = defineEmits(['success']) // 定义 success 事件,用于操作成功后的回调
|
||||
const submitForm = async () => {
|
||||
// 校验表单
|
||||
await formRef.value.validate()
|
||||
// 提交请求
|
||||
formLoading.value = true
|
||||
try {
|
||||
const data = formData.value as unknown as LiftingRodVO
|
||||
if (formType.value === 'create') {
|
||||
await LiftingRodApi.createLiftingRod(data)
|
||||
message.success(t('common.createSuccess'))
|
||||
} else {
|
||||
await LiftingRodApi.updateLiftingRod(data)
|
||||
message.success(t('common.updateSuccess'))
|
||||
}
|
||||
dialogVisible.value = false
|
||||
// 发送操作成功的事件
|
||||
emit('success')
|
||||
} finally {
|
||||
formLoading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
/** 重置表单 */
|
||||
const resetForm = () => {
|
||||
formData.value = {
|
||||
id: undefined,
|
||||
parkNumber: undefined,
|
||||
passagewayId: undefined,
|
||||
}
|
||||
formRef.value?.resetFields()
|
||||
}
|
||||
</script>
|
198
src/views/parking/instructiondelivery/liftingrod/index.vue
Normal file
198
src/views/parking/instructiondelivery/liftingrod/index.vue
Normal file
@ -0,0 +1,198 @@
|
||||
<template>
|
||||
<ContentWrap>
|
||||
<!-- 搜索工作栏 -->
|
||||
<el-form
|
||||
class="-mb-15px"
|
||||
:model="queryParams"
|
||||
ref="queryFormRef"
|
||||
:inline="true"
|
||||
label-width="auto"
|
||||
>
|
||||
<el-form-item label="停车场编号" prop="parkNumber">
|
||||
<el-input
|
||||
v-model="queryParams.parkNumber"
|
||||
placeholder="请输入停车场编号"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="通道Id" prop="passagewayId">
|
||||
<el-input
|
||||
v-model="queryParams.passagewayId"
|
||||
placeholder="请输入通道Id"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="创建时间" prop="createTime">
|
||||
<el-date-picker
|
||||
v-model="queryParams.createTime"
|
||||
value-format="YYYY-MM-DD HH:mm:ss"
|
||||
type="daterange"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
:default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button @click="handleQuery"><Icon icon="ep:search" class="mr-5px" /> 搜索</el-button>
|
||||
<el-button @click="resetQuery"><Icon icon="ep:refresh" class="mr-5px" /> 重置</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
@click="openForm('create')"
|
||||
v-hasPermi="['parking:lifting-rod:create']"
|
||||
>
|
||||
<Icon icon="ep:plus" class="mr-5px" /> 新增
|
||||
</el-button>
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
@click="handleExport"
|
||||
:loading="exportLoading"
|
||||
v-hasPermi="['parking:lifting-rod:export']"
|
||||
>
|
||||
<Icon icon="ep:download" class="mr-5px" /> 导出
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</ContentWrap>
|
||||
|
||||
<!-- 列表 -->
|
||||
<ContentWrap>
|
||||
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true">
|
||||
<el-table-column label="id" align="center" prop="id" />
|
||||
<el-table-column label="停车场编号" align="center" prop="parkNumber" />
|
||||
<el-table-column label="通道Id" align="center" prop="passagewayId" />
|
||||
<el-table-column
|
||||
label="创建时间"
|
||||
align="center"
|
||||
prop="createTime"
|
||||
:formatter="dateFormatter"
|
||||
width="180px"
|
||||
/>
|
||||
<el-table-column label="操作" align="center">
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
@click="openForm('update', scope.row.id)"
|
||||
v-hasPermi="['parking:lifting-rod:update']"
|
||||
>
|
||||
编辑
|
||||
</el-button>
|
||||
<el-button
|
||||
link
|
||||
type="danger"
|
||||
@click="handleDelete(scope.row.id)"
|
||||
v-hasPermi="['parking:lifting-rod:delete']"
|
||||
>
|
||||
删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!-- 分页 -->
|
||||
<Pagination
|
||||
:total="total"
|
||||
v-model:page="queryParams.pageNo"
|
||||
v-model:limit="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</ContentWrap>
|
||||
|
||||
<!-- 表单弹窗:添加/修改 -->
|
||||
<LiftingRodForm ref="formRef" @success="getList" />
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { dateFormatter } from '@/utils/formatTime'
|
||||
import download from '@/utils/download'
|
||||
import { LiftingRodApi, LiftingRodVO } from '@/api/parking/instructiondelivery/liftingrod'
|
||||
import LiftingRodForm from './LiftingRodForm.vue'
|
||||
|
||||
/** 远程抬杠日志 列表 */
|
||||
defineOptions({ name: 'LiftingRod' })
|
||||
|
||||
const message = useMessage() // 消息弹窗
|
||||
const { t } = useI18n() // 国际化
|
||||
|
||||
const loading = ref(true) // 列表的加载中
|
||||
const list = ref<LiftingRodVO[]>([]) // 列表的数据
|
||||
const total = ref(0) // 列表的总页数
|
||||
const queryParams = reactive({
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
parkNumber: undefined,
|
||||
passagewayId: undefined,
|
||||
createTime: [],
|
||||
})
|
||||
const queryFormRef = ref() // 搜索的表单
|
||||
const exportLoading = ref(false) // 导出的加载中
|
||||
|
||||
/** 查询列表 */
|
||||
const getList = async () => {
|
||||
loading.value = true
|
||||
try {
|
||||
const data = await LiftingRodApi.getLiftingRodPage(queryParams)
|
||||
list.value = data.list
|
||||
total.value = data.total
|
||||
} finally {
|
||||
loading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
const handleQuery = () => {
|
||||
queryParams.pageNo = 1
|
||||
getList()
|
||||
}
|
||||
|
||||
/** 重置按钮操作 */
|
||||
const resetQuery = () => {
|
||||
queryFormRef.value.resetFields()
|
||||
handleQuery()
|
||||
}
|
||||
|
||||
/** 添加/修改操作 */
|
||||
const formRef = ref()
|
||||
const openForm = (type: string, id?: number) => {
|
||||
formRef.value.open(type, id)
|
||||
}
|
||||
|
||||
/** 删除按钮操作 */
|
||||
const handleDelete = async (id: number) => {
|
||||
try {
|
||||
// 删除的二次确认
|
||||
await message.delConfirm()
|
||||
// 发起删除
|
||||
await LiftingRodApi.deleteLiftingRod(id)
|
||||
message.success(t('common.delSuccess'))
|
||||
// 刷新列表
|
||||
await getList()
|
||||
} catch {}
|
||||
}
|
||||
|
||||
/** 导出按钮操作 */
|
||||
const handleExport = async () => {
|
||||
try {
|
||||
// 导出的二次确认
|
||||
await message.exportConfirm()
|
||||
// 发起导出
|
||||
exportLoading.value = true
|
||||
const data = await LiftingRodApi.exportLiftingRod(queryParams)
|
||||
download.excel(data, '远程抬杠日志.xls')
|
||||
} catch {
|
||||
} finally {
|
||||
exportLoading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
/** 初始化 **/
|
||||
onMounted(() => {
|
||||
getList()
|
||||
})
|
||||
</script>
|
212
src/views/parking/moneymanage/chargeinfo/chargeInfoForm.vue
Normal file
212
src/views/parking/moneymanage/chargeinfo/chargeInfoForm.vue
Normal file
@ -0,0 +1,212 @@
|
||||
<template>
|
||||
<Dialog :title="dialogTitle" v-model="dialogVisible">
|
||||
<el-form
|
||||
ref="formRef"
|
||||
:model="formData"
|
||||
:rules="formRules"
|
||||
label-width="100px"
|
||||
v-loading="formLoading"
|
||||
>
|
||||
<el-form-item label="场库编号" prop="parkNumber">
|
||||
<el-input v-model="formData.parkNumber" placeholder="请输入场库编号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="车牌号" prop="plate">
|
||||
<el-input v-model="formData.plate" placeholder="请输入车牌号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="入场时间" prop="inTime">
|
||||
<el-date-picker
|
||||
v-model="formData.inTime"
|
||||
type="date"
|
||||
value-format="x"
|
||||
placeholder="选择入场时间"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="结算时间" prop="outTime">
|
||||
<el-date-picker
|
||||
v-model="formData.outTime"
|
||||
type="date"
|
||||
value-format="x"
|
||||
placeholder="选择结算时间"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="入场通道" prop="inChannel">
|
||||
<el-input v-model="formData.inChannel" placeholder="请输入入场通道" />
|
||||
</el-form-item>
|
||||
<el-form-item label="出场通道" prop="outChannel">
|
||||
<el-input v-model="formData.outChannel" placeholder="请输入出场通道" />
|
||||
</el-form-item>
|
||||
<el-form-item label="支付类型" prop="payKind">
|
||||
<el-input v-model="formData.payKind" placeholder="请输入支付类型" />
|
||||
</el-form-item>
|
||||
<el-form-item label="支付渠道" prop="payChannel">
|
||||
<el-input v-model="formData.payChannel" placeholder="请输入支付渠道" />
|
||||
</el-form-item>
|
||||
<el-form-item label="入场订单号" prop="orderId">
|
||||
<el-input v-model="formData.orderId" placeholder="请输入入场订单号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="车辆类型" prop="carType">
|
||||
<el-select v-model="formData.carType" placeholder="请选择车辆类型">
|
||||
<el-option label="请选择字典生成" value="" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="支付订单号" prop="payNo">
|
||||
<el-input v-model="formData.payNo" placeholder="请输入支付订单号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="memo">
|
||||
<el-input v-model="formData.memo" placeholder="请输入备注" />
|
||||
</el-form-item>
|
||||
<el-form-item label="应缴金额" prop="charge">
|
||||
<el-input v-model="formData.charge" placeholder="请输入应缴金额" />
|
||||
</el-form-item>
|
||||
<el-form-item label="实收金额" prop="realCharge">
|
||||
<el-input v-model="formData.realCharge" placeholder="请输入实收金额" />
|
||||
</el-form-item>
|
||||
<el-form-item label="优惠金额" prop="couponCharge">
|
||||
<el-input v-model="formData.couponCharge" placeholder="请输入优惠金额" />
|
||||
</el-form-item>
|
||||
<el-form-item label="区域 ID" prop="areaId">
|
||||
<el-input v-model="formData.areaId" placeholder="请输入区域 ID" />
|
||||
</el-form-item>
|
||||
<el-form-item label="操作员名称" prop="operatorName">
|
||||
<el-input v-model="formData.operatorName" placeholder="请输入操作员名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="操作员联系电话" prop="operatorTelphone">
|
||||
<el-input v-model="formData.operatorTelphone" placeholder="请输入操作员联系电话" />
|
||||
</el-form-item>
|
||||
<el-form-item label="支付订单号" prop="outTradeNo">
|
||||
<el-input v-model="formData.outTradeNo" placeholder="请输入支付订单号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="车牌颜色" prop="plateColor">
|
||||
<el-input v-model="formData.plateColor" placeholder="请输入车牌颜色" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<el-button @click="submitForm" type="primary" :disabled="formLoading">确 定</el-button>
|
||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||
</template>
|
||||
</Dialog>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { chargeInfoApi, chargeInfoVO } from '@/api/parking/moneymanage/chargeinfo'
|
||||
|
||||
/** 收费信息 表单 */
|
||||
defineOptions({ name: 'ChargeInfoForm' })
|
||||
|
||||
const { t } = useI18n() // 国际化
|
||||
const message = useMessage() // 消息弹窗
|
||||
|
||||
const dialogVisible = ref(false) // 弹窗的是否展示
|
||||
const dialogTitle = ref('') // 弹窗的标题
|
||||
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
|
||||
const formType = ref('') // 表单的类型:create - 新增;update - 修改
|
||||
const formData = ref({
|
||||
id: undefined,
|
||||
parkNumber: undefined,
|
||||
plate: undefined,
|
||||
inTime: undefined,
|
||||
outTime: undefined,
|
||||
inChannel: undefined,
|
||||
outChannel: undefined,
|
||||
payKind: undefined,
|
||||
payChannel: undefined,
|
||||
orderId: undefined,
|
||||
carType: undefined,
|
||||
payNo: undefined,
|
||||
memo: undefined,
|
||||
charge: undefined,
|
||||
realCharge: undefined,
|
||||
couponCharge: undefined,
|
||||
areaId: undefined,
|
||||
operatorName: undefined,
|
||||
operatorTelphone: undefined,
|
||||
outTradeNo: undefined,
|
||||
plateColor: undefined,
|
||||
})
|
||||
const formRules = reactive({
|
||||
plate: [{ required: true, message: '车牌号不能为空', trigger: 'blur' }],
|
||||
inTime: [{ required: true, message: '入场时间不能为空', trigger: 'blur' }],
|
||||
outTime: [{ required: true, message: '结算时间不能为空', trigger: 'blur' }],
|
||||
payKind: [{ required: true, message: '支付类型不能为空', trigger: 'blur' }],
|
||||
payChannel: [{ required: true, message: '支付渠道不能为空', trigger: 'blur' }],
|
||||
memo: [{ required: true, message: '备注不能为空', trigger: 'blur' }],
|
||||
charge: [{ required: true, message: '应缴金额不能为空', trigger: 'blur' }],
|
||||
realCharge: [{ required: true, message: '实收金额不能为空', trigger: 'blur' }],
|
||||
couponCharge: [{ required: true, message: '优惠金额不能为空', trigger: 'blur' }],
|
||||
areaId: [{ required: true, message: '区域 ID不能为空', trigger: 'blur' }],
|
||||
operatorName: [{ required: true, message: '操作员名称不能为空', trigger: 'blur' }],
|
||||
operatorTelphone: [{ required: true, message: '操作员联系电话不能为空', trigger: 'blur' }],
|
||||
outTradeNo: [{ required: true, message: '支付订单号不能为空', trigger: 'blur' }],
|
||||
plateColor: [{ required: true, message: '车牌颜色不能为空', trigger: 'blur' }],
|
||||
})
|
||||
const formRef = ref() // 表单 Ref
|
||||
|
||||
/** 打开弹窗 */
|
||||
const open = async (type: string, id?: number) => {
|
||||
dialogVisible.value = true
|
||||
dialogTitle.value = t('action.' + type)
|
||||
formType.value = type
|
||||
resetForm()
|
||||
// 修改时,设置数据
|
||||
if (id) {
|
||||
formLoading.value = true
|
||||
try {
|
||||
formData.value = await chargeInfoApi.getchargeInfo(id)
|
||||
} finally {
|
||||
formLoading.value = false
|
||||
}
|
||||
}
|
||||
}
|
||||
defineExpose({ open }) // 提供 open 方法,用于打开弹窗
|
||||
|
||||
/** 提交表单 */
|
||||
const emit = defineEmits(['success']) // 定义 success 事件,用于操作成功后的回调
|
||||
const submitForm = async () => {
|
||||
// 校验表单
|
||||
await formRef.value.validate()
|
||||
// 提交请求
|
||||
formLoading.value = true
|
||||
try {
|
||||
const data = formData.value as unknown as chargeInfoVO
|
||||
if (formType.value === 'create') {
|
||||
await chargeInfoApi.createchargeInfo(data)
|
||||
message.success(t('common.createSuccess'))
|
||||
} else {
|
||||
await chargeInfoApi.updatechargeInfo(data)
|
||||
message.success(t('common.updateSuccess'))
|
||||
}
|
||||
dialogVisible.value = false
|
||||
// 发送操作成功的事件
|
||||
emit('success')
|
||||
} finally {
|
||||
formLoading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
/** 重置表单 */
|
||||
const resetForm = () => {
|
||||
formData.value = {
|
||||
id: undefined,
|
||||
parkNumber: undefined,
|
||||
plate: undefined,
|
||||
inTime: undefined,
|
||||
outTime: undefined,
|
||||
inChannel: undefined,
|
||||
outChannel: undefined,
|
||||
payKind: undefined,
|
||||
payChannel: undefined,
|
||||
orderId: undefined,
|
||||
carType: undefined,
|
||||
payNo: undefined,
|
||||
memo: undefined,
|
||||
charge: undefined,
|
||||
realCharge: undefined,
|
||||
couponCharge: undefined,
|
||||
areaId: undefined,
|
||||
operatorName: undefined,
|
||||
operatorTelphone: undefined,
|
||||
outTradeNo: undefined,
|
||||
plateColor: undefined,
|
||||
}
|
||||
formRef.value?.resetFields()
|
||||
}
|
||||
</script>
|
401
src/views/parking/moneymanage/chargeinfo/index.vue
Normal file
401
src/views/parking/moneymanage/chargeinfo/index.vue
Normal file
@ -0,0 +1,401 @@
|
||||
<template>
|
||||
<ContentWrap>
|
||||
<!-- 搜索工作栏 -->
|
||||
<el-form
|
||||
class="-mb-15px"
|
||||
:model="queryParams"
|
||||
ref="queryFormRef"
|
||||
:inline="true"
|
||||
label-width="auto"
|
||||
>
|
||||
<el-form-item label="场库编号" prop="parkNumber">
|
||||
<el-input
|
||||
v-model="queryParams.parkNumber"
|
||||
placeholder="请输入场库编号"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="车牌号" prop="plate">
|
||||
<el-input
|
||||
v-model="queryParams.plate"
|
||||
placeholder="请输入车牌号"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="入场时间" prop="inTime">
|
||||
<el-date-picker
|
||||
v-model="queryParams.inTime"
|
||||
value-format="YYYY-MM-DD HH:mm:ss"
|
||||
type="daterange"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
:default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="结算时间" prop="outTime">
|
||||
<el-date-picker
|
||||
v-model="queryParams.outTime"
|
||||
value-format="YYYY-MM-DD HH:mm:ss"
|
||||
type="daterange"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
:default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="入场通道" prop="inChannel">
|
||||
<el-input
|
||||
v-model="queryParams.inChannel"
|
||||
placeholder="请输入入场通道"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="出场通道" prop="outChannel">
|
||||
<el-input
|
||||
v-model="queryParams.outChannel"
|
||||
placeholder="请输入出场通道"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="支付类型" prop="payKind">
|
||||
<el-input
|
||||
v-model="queryParams.payKind"
|
||||
placeholder="请输入支付类型"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="支付渠道" prop="payChannel">
|
||||
<el-input
|
||||
v-model="queryParams.payChannel"
|
||||
placeholder="请输入支付渠道"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="入场订单号" prop="orderId">
|
||||
<el-input
|
||||
v-model="queryParams.orderId"
|
||||
placeholder="请输入入场订单号"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item> -->
|
||||
<el-form-item label="车辆类型" prop="carType">
|
||||
<el-select
|
||||
v-model="queryParams.carType"
|
||||
placeholder="请选择车辆类型"
|
||||
clearable
|
||||
class="!w-240px"
|
||||
>
|
||||
<el-option label="请选择字典生成" value="" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="支付订单号" prop="payNo">
|
||||
<el-input
|
||||
v-model="queryParams.payNo"
|
||||
placeholder="请输入支付订单号"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="备注" prop="memo">
|
||||
<el-input
|
||||
v-model="queryParams.memo"
|
||||
placeholder="请输入备注"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="应缴金额" prop="charge">
|
||||
<el-input
|
||||
v-model="queryParams.charge"
|
||||
placeholder="请输入应缴金额"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="实收金额" prop="realCharge">
|
||||
<el-input
|
||||
v-model="queryParams.realCharge"
|
||||
placeholder="请输入实收金额"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="优惠金额" prop="couponCharge">
|
||||
<el-input
|
||||
v-model="queryParams.couponCharge"
|
||||
placeholder="请输入优惠金额"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item> -->
|
||||
<el-form-item label="区域 ID" prop="areaId">
|
||||
<el-input
|
||||
v-model="queryParams.areaId"
|
||||
placeholder="请输入区域 ID"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="操作员名称" prop="operatorName">
|
||||
<el-input
|
||||
v-model="queryParams.operatorName"
|
||||
placeholder="请输入操作员名称"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="操作员联系电话" prop="operatorTelphone">
|
||||
<el-input
|
||||
v-model="queryParams.operatorTelphone"
|
||||
placeholder="请输入操作员联系电话"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="支付订单号" prop="outTradeNo">
|
||||
<el-input
|
||||
v-model="queryParams.outTradeNo"
|
||||
placeholder="请输入支付订单号"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="车牌颜色" prop="plateColor">
|
||||
<el-input
|
||||
v-model="queryParams.plateColor"
|
||||
placeholder="请输入车牌颜色"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="创建时间" prop="createTime">
|
||||
<el-date-picker
|
||||
v-model="queryParams.createTime"
|
||||
value-format="YYYY-MM-DD HH:mm:ss"
|
||||
type="daterange"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
:default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item> -->
|
||||
<el-form-item>
|
||||
<el-button @click="handleQuery"><Icon icon="ep:search" class="mr-5px" /> 搜索</el-button>
|
||||
<el-button @click="resetQuery"><Icon icon="ep:refresh" class="mr-5px" /> 重置</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
@click="openForm('create')"
|
||||
v-hasPermi="['parking:charge-info:create']"
|
||||
>
|
||||
<Icon icon="ep:plus" class="mr-5px" /> 新增
|
||||
</el-button>
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
@click="handleExport"
|
||||
:loading="exportLoading"
|
||||
v-hasPermi="['parking:charge-info:export']"
|
||||
>
|
||||
<Icon icon="ep:download" class="mr-5px" /> 导出
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</ContentWrap>
|
||||
|
||||
<!-- 列表 -->
|
||||
<ContentWrap>
|
||||
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true">
|
||||
<!-- <el-table-column label="id" align="center" prop="id" /> -->
|
||||
<el-table-column label="场库编号" align="center" prop="parkNumber" />
|
||||
<el-table-column label="车牌号" align="center" prop="plate" />
|
||||
<!-- <el-table-column label="入场时间" align="center" prop="inTime" />
|
||||
<el-table-column label="结算时间" align="center" prop="outTime" />
|
||||
<el-table-column label="入场通道" align="center" prop="inChannel" />
|
||||
<el-table-column label="出场通道" align="center" prop="outChannel" /> -->
|
||||
<el-table-column label="支付类型" align="center" prop="payKind" />
|
||||
<el-table-column label="支付渠道" align="center" prop="payChannel" />
|
||||
<!-- <el-table-column label="入场订单号" align="center" prop="orderId" /> -->
|
||||
<el-table-column label="车辆类型" align="center" prop="carType" />
|
||||
<el-table-column label="支付订单号" align="center" prop="payNo" />
|
||||
<!-- <el-table-column label="备注" align="center" prop="memo" /> -->
|
||||
<el-table-column label="应缴金额" align="center" prop="charge" />
|
||||
<el-table-column label="实收金额" align="center" prop="realCharge" />
|
||||
<el-table-column label="优惠金额" align="center" prop="couponCharge" />
|
||||
<el-table-column label="区域 ID" align="center" prop="areaId" />
|
||||
<!-- <el-table-column label="操作员名称" align="center" prop="operatorName" />
|
||||
<el-table-column label="操作员联系电话" align="center" prop="operatorTelphone" /> -->
|
||||
<!-- <el-table-column label="支付订单号" align="center" prop="outTradeNo" /> -->
|
||||
<!-- <el-table-column label="车牌颜色" align="center" prop="plateColor" />
|
||||
<el-table-column
|
||||
label="创建时间"
|
||||
align="center"
|
||||
prop="createTime"
|
||||
:formatter="dateFormatter"
|
||||
width="180px"
|
||||
/> -->
|
||||
<el-table-column label="操作" align="center">
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
@click="openForm('update', scope.row.id)"
|
||||
v-hasPermi="['parking:charge-info:update']"
|
||||
>
|
||||
编辑
|
||||
</el-button>
|
||||
<el-button
|
||||
link
|
||||
type="danger"
|
||||
@click="handleDelete(scope.row.id)"
|
||||
v-hasPermi="['parking:charge-info:delete']"
|
||||
>
|
||||
删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!-- 分页 -->
|
||||
<Pagination
|
||||
:total="total"
|
||||
v-model:page="queryParams.pageNo"
|
||||
v-model:limit="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</ContentWrap>
|
||||
|
||||
<!-- 表单弹窗:添加/修改 -->
|
||||
<chargeInfoForm ref="formRef" @success="getList" />
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { dateFormatter } from '@/utils/formatTime'
|
||||
import download from '@/utils/download'
|
||||
import { chargeInfoApi, chargeInfoVO } from '@/api/parking/moneymanage/chargeinfo'
|
||||
import chargeInfoForm from './chargeInfoForm.vue'
|
||||
|
||||
/** 收费信息 列表 */
|
||||
defineOptions({ name: 'ChargeInfo' })
|
||||
|
||||
const message = useMessage() // 消息弹窗
|
||||
const { t } = useI18n() // 国际化
|
||||
|
||||
const loading = ref(true) // 列表的加载中
|
||||
const list = ref<chargeInfoVO[]>([]) // 列表的数据
|
||||
const total = ref(0) // 列表的总页数
|
||||
const queryParams = reactive({
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
parkNumber: undefined,
|
||||
plate: undefined,
|
||||
inTime: [],
|
||||
outTime: [],
|
||||
inChannel: undefined,
|
||||
outChannel: undefined,
|
||||
payKind: undefined,
|
||||
payChannel: undefined,
|
||||
orderId: undefined,
|
||||
carType: undefined,
|
||||
payNo: undefined,
|
||||
memo: undefined,
|
||||
charge: undefined,
|
||||
realCharge: undefined,
|
||||
couponCharge: undefined,
|
||||
areaId: undefined,
|
||||
operatorName: undefined,
|
||||
operatorTelphone: undefined,
|
||||
outTradeNo: undefined,
|
||||
plateColor: undefined,
|
||||
createTime: [],
|
||||
})
|
||||
const queryFormRef = ref() // 搜索的表单
|
||||
const exportLoading = ref(false) // 导出的加载中
|
||||
|
||||
/** 查询列表 */
|
||||
const getList = async () => {
|
||||
loading.value = true
|
||||
try {
|
||||
const data = await chargeInfoApi.getchargeInfoPage(queryParams)
|
||||
list.value = data.list
|
||||
total.value = data.total
|
||||
} finally {
|
||||
loading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
const handleQuery = () => {
|
||||
queryParams.pageNo = 1
|
||||
getList()
|
||||
}
|
||||
|
||||
/** 重置按钮操作 */
|
||||
const resetQuery = () => {
|
||||
queryFormRef.value.resetFields()
|
||||
handleQuery()
|
||||
}
|
||||
|
||||
/** 添加/修改操作 */
|
||||
const formRef = ref()
|
||||
const openForm = (type: string, id?: number) => {
|
||||
formRef.value.open(type, id)
|
||||
}
|
||||
|
||||
/** 删除按钮操作 */
|
||||
const handleDelete = async (id: number) => {
|
||||
try {
|
||||
// 删除的二次确认
|
||||
await message.delConfirm()
|
||||
// 发起删除
|
||||
await chargeInfoApi.deletechargeInfo(id)
|
||||
message.success(t('common.delSuccess'))
|
||||
// 刷新列表
|
||||
await getList()
|
||||
} catch {}
|
||||
}
|
||||
|
||||
/** 导出按钮操作 */
|
||||
const handleExport = async () => {
|
||||
try {
|
||||
// 导出的二次确认
|
||||
await message.exportConfirm()
|
||||
// 发起导出
|
||||
exportLoading.value = true
|
||||
const data = await chargeInfoApi.exportchargeInfo(queryParams)
|
||||
download.excel(data, '收费信息.xls')
|
||||
} catch {
|
||||
} finally {
|
||||
exportLoading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
/** 初始化 **/
|
||||
onMounted(() => {
|
||||
getList()
|
||||
})
|
||||
</script>
|
128
src/views/parking/parkmanage/area/AreaForm.vue
Normal file
128
src/views/parking/parkmanage/area/AreaForm.vue
Normal file
@ -0,0 +1,128 @@
|
||||
<template>
|
||||
<Dialog :title="dialogTitle" v-model="dialogVisible">
|
||||
<el-form
|
||||
ref="formRef"
|
||||
:model="formData"
|
||||
:rules="formRules"
|
||||
label-width="100px"
|
||||
v-loading="formLoading"
|
||||
>
|
||||
<el-form-item label="区域名称" prop="areaName">
|
||||
<el-input v-model="formData.areaName" placeholder="请输入区域名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="区域车位数" prop="spaceCount">
|
||||
<el-input v-model="formData.spaceCount" placeholder="请输入区域车位数" />
|
||||
</el-form-item>
|
||||
<el-form-item label="区域空位数" prop="lastSpaceCount">
|
||||
<el-input v-model="formData.lastSpaceCount" placeholder="请输入区域空位数" />
|
||||
</el-form-item>
|
||||
<el-form-item label="区域可预约车位数" prop="bookSpaceCount">
|
||||
<el-input v-model="formData.bookSpaceCount" placeholder="请输入区域可预约车位数" />
|
||||
</el-form-item>
|
||||
<el-form-item label="区域在场预约数" prop="bookInParkCount">
|
||||
<el-input v-model="formData.bookInParkCount" placeholder="请输入区域在场预约数" />
|
||||
</el-form-item>
|
||||
<el-form-item label="区域Id" prop="areaId">
|
||||
<el-input v-model="formData.areaId" placeholder="请输入区域Id" />
|
||||
</el-form-item>
|
||||
<el-form-item label="场库编号" prop="parkNumber">
|
||||
<el-input v-model="formData.parkNumber" placeholder="请输入场库编号" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<el-button @click="submitForm" type="primary" :disabled="formLoading">确 定</el-button>
|
||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||
</template>
|
||||
</Dialog>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { AreaApi, AreaVO } from '@/api/parking/parkmanage/area'
|
||||
|
||||
/** 区域列表 表单 */
|
||||
defineOptions({ name: 'AreaForm' })
|
||||
|
||||
const { t } = useI18n() // 国际化
|
||||
const message = useMessage() // 消息弹窗
|
||||
|
||||
const dialogVisible = ref(false) // 弹窗的是否展示
|
||||
const dialogTitle = ref('') // 弹窗的标题
|
||||
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
|
||||
const formType = ref('') // 表单的类型:create - 新增;update - 修改
|
||||
const formData = ref({
|
||||
areaName: undefined,
|
||||
spaceCount: undefined,
|
||||
lastSpaceCount: undefined,
|
||||
bookSpaceCount: undefined,
|
||||
bookInParkCount: undefined,
|
||||
id: undefined,
|
||||
areaId: undefined,
|
||||
parkNumber: undefined,
|
||||
})
|
||||
const formRules = reactive({
|
||||
areaName: [{ required: true, message: '区域名称不能为空', trigger: 'blur' }],
|
||||
spaceCount: [{ required: true, message: '区域车位数不能为空', trigger: 'blur' }],
|
||||
lastSpaceCount: [{ required: true, message: '区域空位数不能为空', trigger: 'blur' }],
|
||||
bookSpaceCount: [{ required: true, message: '区域可预约车位数不能为空', trigger: 'blur' }],
|
||||
bookInParkCount: [{ required: true, message: '区域在场预约数不能为空', trigger: 'blur' }],
|
||||
areaId: [{ required: true, message: '区域Id不能为空', trigger: 'blur' }],
|
||||
parkNumber: [{ required: true, message: '场库编号不能为空', trigger: 'blur' }],
|
||||
})
|
||||
const formRef = ref() // 表单 Ref
|
||||
|
||||
/** 打开弹窗 */
|
||||
const open = async (type: string, id?: number) => {
|
||||
dialogVisible.value = true
|
||||
dialogTitle.value = t('action.' + type)
|
||||
formType.value = type
|
||||
resetForm()
|
||||
// 修改时,设置数据
|
||||
if (id) {
|
||||
formLoading.value = true
|
||||
try {
|
||||
formData.value = await AreaApi.getArea(id)
|
||||
} finally {
|
||||
formLoading.value = false
|
||||
}
|
||||
}
|
||||
}
|
||||
defineExpose({ open }) // 提供 open 方法,用于打开弹窗
|
||||
|
||||
/** 提交表单 */
|
||||
const emit = defineEmits(['success']) // 定义 success 事件,用于操作成功后的回调
|
||||
const submitForm = async () => {
|
||||
// 校验表单
|
||||
await formRef.value.validate()
|
||||
// 提交请求
|
||||
formLoading.value = true
|
||||
try {
|
||||
const data = formData.value as unknown as AreaVO
|
||||
if (formType.value === 'create') {
|
||||
await AreaApi.createArea(data)
|
||||
message.success(t('common.createSuccess'))
|
||||
} else {
|
||||
await AreaApi.updateArea(data)
|
||||
message.success(t('common.updateSuccess'))
|
||||
}
|
||||
dialogVisible.value = false
|
||||
// 发送操作成功的事件
|
||||
emit('success')
|
||||
} finally {
|
||||
formLoading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
/** 重置表单 */
|
||||
const resetForm = () => {
|
||||
formData.value = {
|
||||
areaName: undefined,
|
||||
spaceCount: undefined,
|
||||
lastSpaceCount: undefined,
|
||||
bookSpaceCount: undefined,
|
||||
bookInParkCount: undefined,
|
||||
id: undefined,
|
||||
areaId: undefined,
|
||||
parkNumber: undefined,
|
||||
}
|
||||
formRef.value?.resetFields()
|
||||
}
|
||||
</script>
|
253
src/views/parking/parkmanage/area/index.vue
Normal file
253
src/views/parking/parkmanage/area/index.vue
Normal file
@ -0,0 +1,253 @@
|
||||
<template>
|
||||
<ContentWrap>
|
||||
<!-- 搜索工作栏 -->
|
||||
<el-form
|
||||
class="-mb-15px"
|
||||
:model="queryParams"
|
||||
ref="queryFormRef"
|
||||
:inline="true"
|
||||
label-width="auto"
|
||||
>
|
||||
<el-form-item label="区域名称" prop="areaName">
|
||||
<el-input
|
||||
v-model="queryParams.areaName"
|
||||
placeholder="请输入区域名称"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="区域车位数" prop="spaceCount">
|
||||
<el-input
|
||||
v-model="queryParams.spaceCount"
|
||||
placeholder="请输入区域车位数"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="区域空位数" prop="lastSpaceCount">
|
||||
<el-input
|
||||
v-model="queryParams.lastSpaceCount"
|
||||
placeholder="请输入区域空位数"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="区域可预约车位数" prop="bookSpaceCount">
|
||||
<el-input
|
||||
v-model="queryParams.bookSpaceCount"
|
||||
placeholder="请输入区域可预约车位数"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="区域在场预约数" prop="bookInParkCount">
|
||||
<el-input
|
||||
v-model="queryParams.bookInParkCount"
|
||||
placeholder="请输入区域在场预约数"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="创建时间" prop="createTime">
|
||||
<el-date-picker
|
||||
v-model="queryParams.createTime"
|
||||
value-format="YYYY-MM-DD HH:mm:ss"
|
||||
type="daterange"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
:default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="区域Id" prop="areaId">
|
||||
<el-input
|
||||
v-model="queryParams.areaId"
|
||||
placeholder="请输入区域Id"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="场库编号" prop="parkNumber">
|
||||
<el-input
|
||||
v-model="queryParams.parkNumber"
|
||||
placeholder="请输入场库编号"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button @click="handleQuery"><Icon icon="ep:search" class="mr-5px" /> 搜索</el-button>
|
||||
<el-button @click="resetQuery"><Icon icon="ep:refresh" class="mr-5px" /> 重置</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
@click="openForm('create')"
|
||||
v-hasPermi="['parking:area:create']"
|
||||
>
|
||||
<Icon icon="ep:plus" class="mr-5px" /> 新增
|
||||
</el-button>
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
@click="handleExport"
|
||||
:loading="exportLoading"
|
||||
v-hasPermi="['parking:area:export']"
|
||||
>
|
||||
<Icon icon="ep:download" class="mr-5px" /> 导出
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</ContentWrap>
|
||||
|
||||
<!-- 列表 -->
|
||||
<ContentWrap>
|
||||
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true">
|
||||
<el-table-column label="id" align="center" prop="id" />
|
||||
<el-table-column label="区域名称" align="center" prop="areaName" />
|
||||
<el-table-column label="区域车位数" align="center" prop="spaceCount" />
|
||||
<el-table-column label="区域空位数" align="center" prop="lastSpaceCount" />
|
||||
<el-table-column label="区域可预约车位数" align="center" prop="bookSpaceCount" />
|
||||
<el-table-column label="区域在场预约数" align="center" prop="bookInParkCount" />
|
||||
<el-table-column
|
||||
label="创建时间"
|
||||
align="center"
|
||||
prop="createTime"
|
||||
:formatter="dateFormatter"
|
||||
width="180px"
|
||||
/>
|
||||
<el-table-column label="区域Id" align="center" prop="areaId" />
|
||||
<el-table-column label="场库编号" align="center" prop="parkNumber" />
|
||||
<el-table-column label="操作" align="center">
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
@click="openForm('update', scope.row.id)"
|
||||
v-hasPermi="['parking:area:update']"
|
||||
>
|
||||
编辑
|
||||
</el-button>
|
||||
<el-button
|
||||
link
|
||||
type="danger"
|
||||
@click="handleDelete(scope.row.id)"
|
||||
v-hasPermi="['parking:area:delete']"
|
||||
>
|
||||
删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!-- 分页 -->
|
||||
<Pagination
|
||||
:total="total"
|
||||
v-model:page="queryParams.pageNo"
|
||||
v-model:limit="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</ContentWrap>
|
||||
|
||||
<!-- 表单弹窗:添加/修改 -->
|
||||
<AreaForm ref="formRef" @success="getList" />
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { dateFormatter } from '@/utils/formatTime'
|
||||
import download from '@/utils/download'
|
||||
import { AreaApi, AreaVO } from '@/api/parking/parkmanage/area'
|
||||
import AreaForm from './AreaForm.vue'
|
||||
|
||||
/** 区域列表 列表 */
|
||||
defineOptions({ name: 'Area' })
|
||||
|
||||
const message = useMessage() // 消息弹窗
|
||||
const { t } = useI18n() // 国际化
|
||||
|
||||
const loading = ref(true) // 列表的加载中
|
||||
const list = ref<AreaVO[]>([]) // 列表的数据
|
||||
const total = ref(0) // 列表的总页数
|
||||
const queryParams = reactive({
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
areaName: undefined,
|
||||
spaceCount: undefined,
|
||||
lastSpaceCount: undefined,
|
||||
bookSpaceCount: undefined,
|
||||
bookInParkCount: undefined,
|
||||
createTime: [],
|
||||
areaId: undefined,
|
||||
parkNumber: undefined,
|
||||
})
|
||||
const queryFormRef = ref() // 搜索的表单
|
||||
const exportLoading = ref(false) // 导出的加载中
|
||||
|
||||
/** 查询列表 */
|
||||
const getList = async () => {
|
||||
loading.value = true
|
||||
try {
|
||||
const data = await AreaApi.getAreaPage(queryParams)
|
||||
list.value = data.list
|
||||
total.value = data.total
|
||||
} finally {
|
||||
loading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
const handleQuery = () => {
|
||||
queryParams.pageNo = 1
|
||||
getList()
|
||||
}
|
||||
|
||||
/** 重置按钮操作 */
|
||||
const resetQuery = () => {
|
||||
queryFormRef.value.resetFields()
|
||||
handleQuery()
|
||||
}
|
||||
|
||||
/** 添加/修改操作 */
|
||||
const formRef = ref()
|
||||
const openForm = (type: string, id?: number) => {
|
||||
formRef.value.open(type, id)
|
||||
}
|
||||
|
||||
/** 删除按钮操作 */
|
||||
const handleDelete = async (id: number) => {
|
||||
try {
|
||||
// 删除的二次确认
|
||||
await message.delConfirm()
|
||||
// 发起删除
|
||||
await AreaApi.deleteArea(id)
|
||||
message.success(t('common.delSuccess'))
|
||||
// 刷新列表
|
||||
await getList()
|
||||
} catch {}
|
||||
}
|
||||
|
||||
/** 导出按钮操作 */
|
||||
const handleExport = async () => {
|
||||
try {
|
||||
// 导出的二次确认
|
||||
await message.exportConfirm()
|
||||
// 发起导出
|
||||
exportLoading.value = true
|
||||
const data = await AreaApi.exportArea(queryParams)
|
||||
download.excel(data, '区域列表.xls')
|
||||
} catch {
|
||||
} finally {
|
||||
exportLoading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
/** 初始化 **/
|
||||
onMounted(() => {
|
||||
getList()
|
||||
})
|
||||
</script>
|
116
src/views/parking/parkmanage/park/ParkForm.vue
Normal file
116
src/views/parking/parkmanage/park/ParkForm.vue
Normal file
@ -0,0 +1,116 @@
|
||||
<template>
|
||||
<Dialog :title="dialogTitle" v-model="dialogVisible">
|
||||
<el-form
|
||||
ref="formRef"
|
||||
:model="formData"
|
||||
:rules="formRules"
|
||||
label-width="100px"
|
||||
v-loading="formLoading"
|
||||
>
|
||||
<el-form-item label="场库名称" prop="parkName">
|
||||
<el-input v-model="formData.parkName" placeholder="请输入场库名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="场库总车位数" prop="spaceCount">
|
||||
<el-input v-model="formData.spaceCount" placeholder="请输入场库总车位数" />
|
||||
</el-form-item>
|
||||
<el-form-item label="场库空车位数" prop="freeSpaceCount">
|
||||
<el-input v-model="formData.freeSpaceCount" placeholder="请输入场库空车位数" />
|
||||
</el-form-item>
|
||||
<el-form-item label="场库可预约数" prop="bookSpaceCount">
|
||||
<el-input v-model="formData.bookSpaceCount" placeholder="请输入场库可预约数" />
|
||||
</el-form-item>
|
||||
<el-form-item label="场库在场预约数" prop="bookInParkCount">
|
||||
<el-input v-model="formData.bookInParkCount" placeholder="请输入场库在场预约数" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<el-button @click="submitForm" type="primary" :disabled="formLoading">确 定</el-button>
|
||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||
</template>
|
||||
</Dialog>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ParkApi, ParkVO } from '@/api/parking/parkmanage/park'
|
||||
|
||||
/** 场库列表 表单 */
|
||||
defineOptions({ name: 'ParkForm' })
|
||||
|
||||
const { t } = useI18n() // 国际化
|
||||
const message = useMessage() // 消息弹窗
|
||||
|
||||
const dialogVisible = ref(false) // 弹窗的是否展示
|
||||
const dialogTitle = ref('') // 弹窗的标题
|
||||
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
|
||||
const formType = ref('') // 表单的类型:create - 新增;update - 修改
|
||||
const formData = ref({
|
||||
parkNumber: undefined,
|
||||
parkName: undefined,
|
||||
spaceCount: undefined,
|
||||
freeSpaceCount: undefined,
|
||||
bookSpaceCount: undefined,
|
||||
bookInParkCount: undefined,
|
||||
})
|
||||
const formRules = reactive({
|
||||
parkName: [{ required: true, message: '场库名称不能为空', trigger: 'blur' }],
|
||||
spaceCount: [{ required: true, message: '场库总车位数不能为空', trigger: 'blur' }],
|
||||
freeSpaceCount: [{ required: true, message: '场库空车位数不能为空', trigger: 'blur' }],
|
||||
bookSpaceCount: [{ required: true, message: '场库可预约数不能为空', trigger: 'blur' }],
|
||||
bookInParkCount: [{ required: true, message: '场库在场预约数不能为空', trigger: 'blur' }],
|
||||
})
|
||||
const formRef = ref() // 表单 Ref
|
||||
|
||||
/** 打开弹窗 */
|
||||
const open = async (type: string, id?: number) => {
|
||||
dialogVisible.value = true
|
||||
dialogTitle.value = t('action.' + type)
|
||||
formType.value = type
|
||||
resetForm()
|
||||
// 修改时,设置数据
|
||||
if (id) {
|
||||
formLoading.value = true
|
||||
try {
|
||||
formData.value = await ParkApi.getPark(id)
|
||||
} finally {
|
||||
formLoading.value = false
|
||||
}
|
||||
}
|
||||
}
|
||||
defineExpose({ open }) // 提供 open 方法,用于打开弹窗
|
||||
|
||||
/** 提交表单 */
|
||||
const emit = defineEmits(['success']) // 定义 success 事件,用于操作成功后的回调
|
||||
const submitForm = async () => {
|
||||
// 校验表单
|
||||
await formRef.value.validate()
|
||||
// 提交请求
|
||||
formLoading.value = true
|
||||
try {
|
||||
const data = formData.value as unknown as ParkVO
|
||||
if (formType.value === 'create') {
|
||||
await ParkApi.createPark(data)
|
||||
message.success(t('common.createSuccess'))
|
||||
} else {
|
||||
await ParkApi.updatePark(data)
|
||||
message.success(t('common.updateSuccess'))
|
||||
}
|
||||
dialogVisible.value = false
|
||||
// 发送操作成功的事件
|
||||
emit('success')
|
||||
} finally {
|
||||
formLoading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
/** 重置表单 */
|
||||
const resetForm = () => {
|
||||
formData.value = {
|
||||
parkNumber: undefined,
|
||||
parkName: undefined,
|
||||
spaceCount: undefined,
|
||||
freeSpaceCount: undefined,
|
||||
bookSpaceCount: undefined,
|
||||
bookInParkCount: undefined,
|
||||
}
|
||||
formRef.value?.resetFields()
|
||||
}
|
||||
</script>
|
231
src/views/parking/parkmanage/park/index.vue
Normal file
231
src/views/parking/parkmanage/park/index.vue
Normal file
@ -0,0 +1,231 @@
|
||||
<template>
|
||||
<ContentWrap>
|
||||
<!-- 搜索工作栏 -->
|
||||
<el-form
|
||||
class="-mb-15px"
|
||||
:model="queryParams"
|
||||
ref="queryFormRef"
|
||||
:inline="true"
|
||||
label-width="auto"
|
||||
>
|
||||
<el-form-item label="场库名称" prop="parkName">
|
||||
<el-input
|
||||
v-model="queryParams.parkName"
|
||||
placeholder="请输入场库名称"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="场库总车位数" prop="spaceCount">
|
||||
<el-input
|
||||
v-model="queryParams.spaceCount"
|
||||
placeholder="请输入场库总车位数"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="场库空车位数" prop="freeSpaceCount">
|
||||
<el-input
|
||||
v-model="queryParams.freeSpaceCount"
|
||||
placeholder="请输入场库空车位数"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="场库可预约数" prop="bookSpaceCount">
|
||||
<el-input
|
||||
v-model="queryParams.bookSpaceCount"
|
||||
placeholder="请输入场库可预约数"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="场库在场预约数" prop="bookInParkCount">
|
||||
<el-input
|
||||
v-model="queryParams.bookInParkCount"
|
||||
placeholder="请输入场库在场预约数"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="创建时间" prop="createTime">
|
||||
<el-date-picker
|
||||
v-model="queryParams.createTime"
|
||||
value-format="YYYY-MM-DD HH:mm:ss"
|
||||
type="daterange"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
:default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button @click="handleQuery"><Icon icon="ep:search" class="mr-5px" /> 搜索</el-button>
|
||||
<el-button @click="resetQuery"><Icon icon="ep:refresh" class="mr-5px" /> 重置</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
@click="openForm('create')"
|
||||
v-hasPermi="['parking:park:create']"
|
||||
>
|
||||
<Icon icon="ep:plus" class="mr-5px" /> 新增
|
||||
</el-button>
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
@click="handleExport"
|
||||
:loading="exportLoading"
|
||||
v-hasPermi="['parking:park:export']"
|
||||
>
|
||||
<Icon icon="ep:download" class="mr-5px" /> 导出
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</ContentWrap>
|
||||
|
||||
<!-- 列表 -->
|
||||
<ContentWrap>
|
||||
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true">
|
||||
<el-table-column label="场库编号" align="center" prop="parkNumber" />
|
||||
<el-table-column label="场库名称" align="center" prop="parkName" />
|
||||
<el-table-column label="场库总车位数" align="center" prop="spaceCount" />
|
||||
<el-table-column label="场库空车位数" align="center" prop="freeSpaceCount" />
|
||||
<el-table-column label="场库可预约数" align="center" prop="bookSpaceCount" />
|
||||
<el-table-column label="场库在场预约数" align="center" prop="bookInParkCount" />
|
||||
<el-table-column
|
||||
label="创建时间"
|
||||
align="center"
|
||||
prop="createTime"
|
||||
:formatter="dateFormatter"
|
||||
width="180px"
|
||||
/>
|
||||
<el-table-column label="操作" align="center">
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
@click="openForm('update', scope.row.parkNumber)"
|
||||
v-hasPermi="['parking:park:update']"
|
||||
>
|
||||
编辑
|
||||
</el-button>
|
||||
<el-button
|
||||
link
|
||||
type="danger"
|
||||
@click="handleDelete(scope.row.parkNumber)"
|
||||
v-hasPermi="['parking:park:delete']"
|
||||
>
|
||||
删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!-- 分页 -->
|
||||
<Pagination
|
||||
:total="total"
|
||||
v-model:page="queryParams.pageNo"
|
||||
v-model:limit="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</ContentWrap>
|
||||
|
||||
<!-- 表单弹窗:添加/修改 -->
|
||||
<ParkForm ref="formRef" @success="getList" />
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { dateFormatter } from '@/utils/formatTime'
|
||||
import download from '@/utils/download'
|
||||
import { ParkApi, ParkVO } from '@/api/parking/parkmanage/park'
|
||||
import ParkForm from './ParkForm.vue'
|
||||
|
||||
/** 场库列表 列表 */
|
||||
defineOptions({ name: 'Park' })
|
||||
|
||||
const message = useMessage() // 消息弹窗
|
||||
const { t } = useI18n() // 国际化
|
||||
|
||||
const loading = ref(true) // 列表的加载中
|
||||
const list = ref<ParkVO[]>([]) // 列表的数据
|
||||
const total = ref(0) // 列表的总页数
|
||||
const queryParams = reactive({
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
parkName: undefined,
|
||||
spaceCount: undefined,
|
||||
freeSpaceCount: undefined,
|
||||
bookSpaceCount: undefined,
|
||||
bookInParkCount: undefined,
|
||||
createTime: [],
|
||||
})
|
||||
const queryFormRef = ref() // 搜索的表单
|
||||
const exportLoading = ref(false) // 导出的加载中
|
||||
|
||||
/** 查询列表 */
|
||||
const getList = async () => {
|
||||
loading.value = true
|
||||
try {
|
||||
const data = await ParkApi.getParkPage(queryParams)
|
||||
list.value = data.list
|
||||
total.value = data.total
|
||||
} finally {
|
||||
loading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
const handleQuery = () => {
|
||||
queryParams.pageNo = 1
|
||||
getList()
|
||||
}
|
||||
|
||||
/** 重置按钮操作 */
|
||||
const resetQuery = () => {
|
||||
queryFormRef.value.resetFields()
|
||||
handleQuery()
|
||||
}
|
||||
|
||||
/** 添加/修改操作 */
|
||||
const formRef = ref()
|
||||
const openForm = (type: string, id?: number) => {
|
||||
formRef.value.open(type, id)
|
||||
}
|
||||
|
||||
/** 删除按钮操作 */
|
||||
const handleDelete = async (id: number) => {
|
||||
try {
|
||||
// 删除的二次确认
|
||||
await message.delConfirm()
|
||||
// 发起删除
|
||||
await ParkApi.deletePark(id)
|
||||
message.success(t('common.delSuccess'))
|
||||
// 刷新列表
|
||||
await getList()
|
||||
} catch {}
|
||||
}
|
||||
|
||||
/** 导出按钮操作 */
|
||||
const handleExport = async () => {
|
||||
try {
|
||||
// 导出的二次确认
|
||||
await message.exportConfirm()
|
||||
// 发起导出
|
||||
exportLoading.value = true
|
||||
const data = await ParkApi.exportPark(queryParams)
|
||||
download.excel(data, '场库列表.xls')
|
||||
} catch {
|
||||
} finally {
|
||||
exportLoading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
/** 初始化 **/
|
||||
onMounted(() => {
|
||||
getList()
|
||||
})
|
||||
</script>
|
110
src/views/parking/parkmanage/passageway/PassagewayForm.vue
Normal file
110
src/views/parking/parkmanage/passageway/PassagewayForm.vue
Normal file
@ -0,0 +1,110 @@
|
||||
<template>
|
||||
<Dialog :title="dialogTitle" v-model="dialogVisible">
|
||||
<el-form
|
||||
ref="formRef"
|
||||
:model="formData"
|
||||
:rules="formRules"
|
||||
label-width="100px"
|
||||
v-loading="formLoading"
|
||||
>
|
||||
<el-form-item label="场库编号" prop="parkNumber">
|
||||
<el-input v-model="formData.parkNumber" placeholder="请输入场库编号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="通道名称" prop="passagewayName">
|
||||
<el-input v-model="formData.passagewayName" placeholder="请输入通道名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="源区域 Id" prop="sourceAreaId">
|
||||
<el-input v-model="formData.sourceAreaId" placeholder="请输入源区域 Id" />
|
||||
</el-form-item>
|
||||
<el-form-item label="目标区域 Id" prop="targetAreaId">
|
||||
<el-input v-model="formData.targetAreaId" placeholder="请输入目标区域 Id" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<el-button @click="submitForm" type="primary" :disabled="formLoading">确 定</el-button>
|
||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||
</template>
|
||||
</Dialog>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { PassagewayApi, PassagewayVO } from '@/api/parking/parkmanage/passageway'
|
||||
|
||||
/** 通道信息 表单 */
|
||||
defineOptions({ name: 'PassagewayForm' })
|
||||
|
||||
const { t } = useI18n() // 国际化
|
||||
const message = useMessage() // 消息弹窗
|
||||
|
||||
const dialogVisible = ref(false) // 弹窗的是否展示
|
||||
const dialogTitle = ref('') // 弹窗的标题
|
||||
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
|
||||
const formType = ref('') // 表单的类型:create - 新增;update - 修改
|
||||
const formData = ref({
|
||||
passagewayId: undefined,
|
||||
parkNumber: undefined,
|
||||
passagewayName: undefined,
|
||||
sourceAreaId: undefined,
|
||||
targetAreaId: undefined,
|
||||
})
|
||||
const formRules = reactive({
|
||||
parkNumber: [{ required: true, message: '场库编号不能为空', trigger: 'blur' }],
|
||||
passagewayName: [{ required: true, message: '通道名称不能为空', trigger: 'blur' }],
|
||||
sourceAreaId: [{ required: true, message: '源区域 Id不能为空', trigger: 'blur' }],
|
||||
targetAreaId: [{ required: true, message: '目标区域 Id不能为空', trigger: 'blur' }],
|
||||
})
|
||||
const formRef = ref() // 表单 Ref
|
||||
|
||||
/** 打开弹窗 */
|
||||
const open = async (type: string, id?: number) => {
|
||||
dialogVisible.value = true
|
||||
dialogTitle.value = t('action.' + type)
|
||||
formType.value = type
|
||||
resetForm()
|
||||
// 修改时,设置数据
|
||||
if (id) {
|
||||
formLoading.value = true
|
||||
try {
|
||||
formData.value = await PassagewayApi.getPassageway(id)
|
||||
} finally {
|
||||
formLoading.value = false
|
||||
}
|
||||
}
|
||||
}
|
||||
defineExpose({ open }) // 提供 open 方法,用于打开弹窗
|
||||
|
||||
/** 提交表单 */
|
||||
const emit = defineEmits(['success']) // 定义 success 事件,用于操作成功后的回调
|
||||
const submitForm = async () => {
|
||||
// 校验表单
|
||||
await formRef.value.validate()
|
||||
// 提交请求
|
||||
formLoading.value = true
|
||||
try {
|
||||
const data = formData.value as unknown as PassagewayVO
|
||||
if (formType.value === 'create') {
|
||||
await PassagewayApi.createPassageway(data)
|
||||
message.success(t('common.createSuccess'))
|
||||
} else {
|
||||
await PassagewayApi.updatePassageway(data)
|
||||
message.success(t('common.updateSuccess'))
|
||||
}
|
||||
dialogVisible.value = false
|
||||
// 发送操作成功的事件
|
||||
emit('success')
|
||||
} finally {
|
||||
formLoading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
/** 重置表单 */
|
||||
const resetForm = () => {
|
||||
formData.value = {
|
||||
passagewayId: undefined,
|
||||
parkNumber: undefined,
|
||||
passagewayName: undefined,
|
||||
sourceAreaId: undefined,
|
||||
targetAreaId: undefined,
|
||||
}
|
||||
formRef.value?.resetFields()
|
||||
}
|
||||
</script>
|
220
src/views/parking/parkmanage/passageway/index.vue
Normal file
220
src/views/parking/parkmanage/passageway/index.vue
Normal file
@ -0,0 +1,220 @@
|
||||
<template>
|
||||
<ContentWrap>
|
||||
<!-- 搜索工作栏 -->
|
||||
<el-form
|
||||
class="-mb-15px"
|
||||
:model="queryParams"
|
||||
ref="queryFormRef"
|
||||
:inline="true"
|
||||
label-width="auto"
|
||||
>
|
||||
<el-form-item label="场库编号" prop="parkNumber">
|
||||
<el-input
|
||||
v-model="queryParams.parkNumber"
|
||||
placeholder="请输入场库编号"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="通道名称" prop="passagewayName">
|
||||
<el-input
|
||||
v-model="queryParams.passagewayName"
|
||||
placeholder="请输入通道名称"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="源区域 Id" prop="sourceAreaId">
|
||||
<el-input
|
||||
v-model="queryParams.sourceAreaId"
|
||||
placeholder="请输入源区域 Id"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="目标区域 Id" prop="targetAreaId">
|
||||
<el-input
|
||||
v-model="queryParams.targetAreaId"
|
||||
placeholder="请输入目标区域 Id"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="创建时间" prop="createTime">
|
||||
<el-date-picker
|
||||
v-model="queryParams.createTime"
|
||||
value-format="YYYY-MM-DD HH:mm:ss"
|
||||
type="daterange"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
:default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button @click="handleQuery"><Icon icon="ep:search" class="mr-5px" /> 搜索</el-button>
|
||||
<el-button @click="resetQuery"><Icon icon="ep:refresh" class="mr-5px" /> 重置</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
@click="openForm('create')"
|
||||
v-hasPermi="['parking:passageway:create']"
|
||||
>
|
||||
<Icon icon="ep:plus" class="mr-5px" /> 新增
|
||||
</el-button>
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
@click="handleExport"
|
||||
:loading="exportLoading"
|
||||
v-hasPermi="['parking:passageway:export']"
|
||||
>
|
||||
<Icon icon="ep:download" class="mr-5px" /> 导出
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</ContentWrap>
|
||||
|
||||
<!-- 列表 -->
|
||||
<ContentWrap>
|
||||
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true">
|
||||
<el-table-column label="通道 Id" align="center" prop="passagewayId" />
|
||||
<el-table-column label="场库编号" align="center" prop="parkNumber" />
|
||||
<el-table-column label="通道名称" align="center" prop="passagewayName" />
|
||||
<el-table-column label="源区域 Id" align="center" prop="sourceAreaId" />
|
||||
<el-table-column label="目标区域 Id" align="center" prop="targetAreaId" />
|
||||
<el-table-column
|
||||
label="创建时间"
|
||||
align="center"
|
||||
prop="createTime"
|
||||
:formatter="dateFormatter"
|
||||
width="180px"
|
||||
/>
|
||||
<el-table-column label="操作" align="center">
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
@click="openForm('update', scope.row.id)"
|
||||
v-hasPermi="['parking:passageway:update']"
|
||||
>
|
||||
编辑
|
||||
</el-button>
|
||||
<el-button
|
||||
link
|
||||
type="danger"
|
||||
@click="handleDelete(scope.row.id)"
|
||||
v-hasPermi="['parking:passageway:delete']"
|
||||
>
|
||||
删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!-- 分页 -->
|
||||
<Pagination
|
||||
:total="total"
|
||||
v-model:page="queryParams.pageNo"
|
||||
v-model:limit="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</ContentWrap>
|
||||
|
||||
<!-- 表单弹窗:添加/修改 -->
|
||||
<PassagewayForm ref="formRef" @success="getList" />
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { dateFormatter } from '@/utils/formatTime'
|
||||
import download from '@/utils/download'
|
||||
import { PassagewayApi, PassagewayVO } from '@/api/parking/parkmanage/passageway'
|
||||
import PassagewayForm from './PassagewayForm.vue'
|
||||
|
||||
/** 通道信息 列表 */
|
||||
defineOptions({ name: 'Passageway' })
|
||||
|
||||
const message = useMessage() // 消息弹窗
|
||||
const { t } = useI18n() // 国际化
|
||||
|
||||
const loading = ref(true) // 列表的加载中
|
||||
const list = ref<PassagewayVO[]>([]) // 列表的数据
|
||||
const total = ref(0) // 列表的总页数
|
||||
const queryParams = reactive({
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
parkNumber: undefined,
|
||||
passagewayName: undefined,
|
||||
sourceAreaId: undefined,
|
||||
targetAreaId: undefined,
|
||||
createTime: [],
|
||||
})
|
||||
const queryFormRef = ref() // 搜索的表单
|
||||
const exportLoading = ref(false) // 导出的加载中
|
||||
|
||||
/** 查询列表 */
|
||||
const getList = async () => {
|
||||
loading.value = true
|
||||
try {
|
||||
const data = await PassagewayApi.getPassagewayPage(queryParams)
|
||||
list.value = data.list
|
||||
total.value = data.total
|
||||
} finally {
|
||||
loading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
const handleQuery = () => {
|
||||
queryParams.pageNo = 1
|
||||
getList()
|
||||
}
|
||||
|
||||
/** 重置按钮操作 */
|
||||
const resetQuery = () => {
|
||||
queryFormRef.value.resetFields()
|
||||
handleQuery()
|
||||
}
|
||||
|
||||
/** 添加/修改操作 */
|
||||
const formRef = ref()
|
||||
const openForm = (type: string, id?: number) => {
|
||||
formRef.value.open(type, id)
|
||||
}
|
||||
|
||||
/** 删除按钮操作 */
|
||||
const handleDelete = async (id: number) => {
|
||||
try {
|
||||
// 删除的二次确认
|
||||
await message.delConfirm()
|
||||
// 发起删除
|
||||
await PassagewayApi.deletePassageway(id)
|
||||
message.success(t('common.delSuccess'))
|
||||
// 刷新列表
|
||||
await getList()
|
||||
} catch {}
|
||||
}
|
||||
|
||||
/** 导出按钮操作 */
|
||||
const handleExport = async () => {
|
||||
try {
|
||||
// 导出的二次确认
|
||||
await message.exportConfirm()
|
||||
// 发起导出
|
||||
exportLoading.value = true
|
||||
const data = await PassagewayApi.exportPassageway(queryParams)
|
||||
download.excel(data, '通道信息.xls')
|
||||
} catch {
|
||||
} finally {
|
||||
exportLoading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
/** 初始化 **/
|
||||
onMounted(() => {
|
||||
getList()
|
||||
})
|
||||
</script>
|
@ -50,7 +50,7 @@
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="生效日期" prop="start">
|
||||
<!-- <el-form-item label="生效日期" prop="start">
|
||||
<el-input
|
||||
v-model="queryParams.start"
|
||||
placeholder="请输入生效日期"
|
||||
@ -67,8 +67,8 @@
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="部门" prop="dept">
|
||||
</el-form-item> -->
|
||||
<!-- <el-form-item label="部门" prop="dept">
|
||||
<el-input
|
||||
v-model="queryParams.dept"
|
||||
placeholder="请输入部门"
|
||||
@ -94,8 +94,8 @@
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="创建时间" prop="createTime">
|
||||
</el-form-item> -->
|
||||
<!-- <el-form-item label="创建时间" prop="createTime">
|
||||
<el-date-picker
|
||||
v-model="queryParams.createTime"
|
||||
value-format="YYYY-MM-DD HH:mm:ss"
|
||||
@ -105,7 +105,7 @@
|
||||
:default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-form-item> -->
|
||||
<el-form-item>
|
||||
<el-button @click="handleQuery"><Icon icon="ep:search" class="mr-5px" /> 搜索</el-button>
|
||||
<el-button @click="resetQuery"><Icon icon="ep:refresh" class="mr-5px" /> 重置</el-button>
|
||||
@ -154,7 +154,7 @@
|
||||
:formatter="dateFormatter"
|
||||
width="180px"
|
||||
/>
|
||||
<el-table-column label="操作" align="center">
|
||||
<el-table-column label="操作" align="center" fixed="right" width="110">
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
link
|
||||
@ -167,7 +167,7 @@
|
||||
<el-button
|
||||
link
|
||||
type="danger"
|
||||
@click="handleDelete(scope.row.id)"
|
||||
@click="handleDelete(scope.row.fixedId)"
|
||||
v-hasPermi="['parking:white:delete']"
|
||||
>
|
||||
删除
|
||||
|
Loading…
Reference in New Issue
Block a user