停车场vue

This commit is contained in:
zsq 2024-07-19 23:54:32 +08:00
parent 602b8d3bf0
commit a53ddd0315
13 changed files with 2963 additions and 1 deletions

3
.env
View File

@ -2,7 +2,8 @@
VITE_APP_TITLE=智慧轮渡大数据平台
# 项目本地运行端口号
VITE_PORT=80
VITE_PORT=82
# open 运行 npm run dev 时自动打开浏览器
VITE_OPEN=true

View File

@ -0,0 +1,88 @@
import request from '@/config/axios'
// 出场记录 VO
export interface RecordVO {
id: number // id
parkNumber: string // 停车场编号
size: number // 数据条数
orderId: string // 入场记录编号
operatorId: string // 操作员 Id
operatorName: string // 操作员姓名
invoiceNo: string // 发票号码
plate: string // 车牌
plateColor: string // 车牌颜色
ticketCode: string // 无牌车票号
carType: string // 车类型
confidence: number // 车牌识别可信度
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 // 线下累计优惠时间总抵扣值
payNo: string // 支付订单号
getTime: string // 结算时间
payCharge: string // 支付金额
payKind: string // 支付类型
payChannel: string // 支付渠道
memo: string // 备注
profitCode: string // 优惠码
getproTime: string // 优惠下发时间
profitTime: string // 优惠时间
profitCharge: string // 优惠金额面值
profitChargeValue: string // 生效金额
profitmemo: string // 备注
areaId: string // 区域 id
areaName: string // 区域名称
placeNumber: string // 车位编号
placememo: string // 备注信息
costTime: string // 时间
}
// 出场记录 API
export const RecordApi = {
// 查询出场记录分页
getRecordPage: async (params: any) => {
return await request.get({ url: `/parking/appearancerecord/page`, params })
},
// 查询出场记录详情
getRecord: async (id: number) => {
return await request.get({ url: `/parking/appearancerecord/get?id=` + id })
},
// 新增出场记录
createRecord: async (data: RecordVO) => {
return await request.post({ url: `/parking/appearancerecord/create`, data })
},
// 修改出场记录
updateRecord: async (data: RecordVO) => {
return await request.put({ url: `/parking/appearancerecord/update`, data })
},
// 删除出场记录
deleteRecord: async (id: number) => {
return await request.delete({ url: `/parking/appearancerecord/delete?id=` + id })
},
// 导出出场记录 Excel
exportRecord: async (params) => {
return await request.download({ url: `/parking/appearancerecord/export-excel`, params })
},
}

View File

@ -0,0 +1,45 @@
import request from '@/config/axios'
// 通道信息 VO
export interface InformationVO {
id: number // id
parkNumber: string // 场库编号
size: number // 数据条数
passagewayId: string // 通道 Id
passagewayName: string // 通道名称
sourceAreaId: string // 源区域 Id
targetAreaId: string // 目标区域 Id
}
// 通道信息 API
export const InformationApi = {
// 查询通道信息分页
getInformationPage: async (params: any) => {
return await request.get({ url: `/parking/channel/page`, params })
},
// 查询通道信息详情
getInformation: async (id: number) => {
return await request.get({ url: `/parking/channel/get?id=` + id })
},
// 新增通道信息
createInformation: async (data: InformationVO) => {
return await request.post({ url: `/parking/channel/create`, data })
},
// 修改通道信息
updateInformation: async (data: InformationVO) => {
return await request.put({ url: `/parking/channel/update`, data })
},
// 删除通道信息
deleteInformation: async (id: number) => {
return await request.delete({ url: `/parking/channel/delete?id=` + id })
},
// 导出通道信息 Excel
exportInformation: async (params) => {
return await request.download({ url: `/parking/channel/export-excel`, params })
},
}

View File

@ -0,0 +1,60 @@
import request from '@/config/axios'
// 收费信息 VO
export interface InformationVO {
id: number // id
parkNumber: string // 场库编号
size: number // 收费信息数量
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 InformationApi = {
// 查询收费信息分页
getInformationPage: async (params: any) => {
return await request.get({ url: `/parking/chargeinformation/page`, params })
},
// 查询收费信息详情
getInformation: async (id: number) => {
return await request.get({ url: `/parking/chargeinformation/get?id=` + id })
},
// 新增收费信息
createInformation: async (data: InformationVO) => {
return await request.post({ url: `/parking/chargeinformation/create`, data })
},
// 修改收费信息
updateInformation: async (data: InformationVO) => {
return await request.put({ url: `/parking/chargeinformation/update`, data })
},
// 删除收费信息
deleteInformation: async (id: number) => {
return await request.delete({ url: `/parking/chargeinformation/delete?id=` + id })
},
// 导出收费信息 Excel
exportInformation: async (params) => {
return await request.download({ url: `/parking/chargeinformation/export-excel`, params })
},
}

View File

@ -0,0 +1,64 @@
import request from '@/config/axios'
// 入场记录 VO
export interface EntryRecordVO {
id: number // id
parkNumber: string // 停车场编号
size: number // 数据条数
plate: string // 车牌
ticketCode: string // 无牌车票号
plateColor: string // 车牌颜色
inTime: string // 入场时间
inChannel: string // 入场通道名称
inImage: string // 入场图片名
orderId: string // 入场记录编号
visitReason: string // 访问事由
openGateMode: string // 放行类型
matchMode: string // 匹配模式
idCard: string // 证件号码
confidence: number // 车牌识别可信度
carType: string // 车类型
userIdCard: string // 证件号码
userName: string // 车主姓名
phone: string // 联系电话
address: string // 地址
areaId: string // 区域 id
areaName: string // 区域名称
placeNumber: string // 车位编号
memo: 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 })
},
}

View File

@ -0,0 +1,360 @@
<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="size">
<el-input v-model="formData.size" placeholder="请输入数据条数" />
</el-form-item>
<el-form-item label="入场记录编号" prop="orderId">
<el-input v-model="formData.orderId" 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="plate">
<el-input v-model="formData.plate" placeholder="请输入车牌" />
</el-form-item>
<el-form-item label="车牌颜色" prop="plateColor">
<el-input v-model="formData.plateColor" placeholder="请输入车牌颜色" />
</el-form-item>
<el-form-item label="无牌车票号" prop="ticketCode">
<el-input v-model="formData.ticketCode" 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="confidence">
<el-input v-model="formData.confidence" 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="payNo">
<el-input v-model="formData.payNo" placeholder="请输入支付订单号" />
</el-form-item>
<el-form-item label="结算时间" prop="getTime">
<el-date-picker
v-model="formData.getTime"
type="date"
value-format="x"
placeholder="选择结算时间"
/>
</el-form-item>
<el-form-item label="支付金额" prop="payCharge">
<el-input v-model="formData.payCharge" 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="memo">
<el-input v-model="formData.memo" placeholder="请输入备注" />
</el-form-item>
<el-form-item label="优惠码" prop="profitCode">
<el-input v-model="formData.profitCode" placeholder="请输入优惠码" />
</el-form-item>
<el-form-item label="优惠下发时间" prop="getproTime">
<el-date-picker
v-model="formData.getproTime"
type="date"
value-format="x"
placeholder="选择优惠下发时间"
/>
</el-form-item>
<el-form-item label="优惠时间" prop="profitTime">
<el-date-picker
v-model="formData.profitTime"
type="date"
value-format="x"
placeholder="选择优惠时间"
/>
</el-form-item>
<el-form-item label="优惠金额面值" prop="profitCharge">
<el-input v-model="formData.profitCharge" placeholder="请输入优惠金额面值" />
</el-form-item>
<el-form-item label="生效金额" prop="profitChargeValue">
<el-input v-model="formData.profitChargeValue" placeholder="请输入生效金额" />
</el-form-item>
<el-form-item label="备注" prop="profitmemo">
<el-input v-model="formData.profitmemo" 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="areaName">
<el-input v-model="formData.areaName" placeholder="请输入区域名称" />
</el-form-item>
<el-form-item label="车位编号" prop="placeNumber">
<el-input v-model="formData.placeNumber" placeholder="请输入车位编号" />
</el-form-item>
<el-form-item label="备注信息" prop="placememo">
<el-input v-model="formData.placememo" 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 { RecordApi, RecordVO } from '@/api/parking/appearancerecord'
/** 出场记录 表单 */
defineOptions({ name: 'RecordForm' })
const { t } = useI18n() //
const message = useMessage() //
const dialogVisible = ref(false) //
const dialogTitle = ref('') //
const formLoading = ref(false) // 12
const formType = ref('') // create - update -
const formData = ref({
id: undefined,
parkNumber: undefined,
size: undefined,
orderId: undefined,
operatorId: undefined,
operatorName: undefined,
invoiceNo: undefined,
plate: undefined,
plateColor: undefined,
ticketCode: undefined,
carType: undefined,
confidence: 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,
payNo: undefined,
getTime: undefined,
payCharge: undefined,
payKind: undefined,
payChannel: undefined,
memo: undefined,
profitCode: undefined,
getproTime: undefined,
profitTime: undefined,
profitCharge: undefined,
profitChargeValue: undefined,
profitmemo: undefined,
areaId: undefined,
areaName: undefined,
placeNumber: undefined,
placememo: undefined,
costTime: 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 RecordApi.getRecord(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 RecordVO
if (formType.value === 'create') {
await RecordApi.createRecord(data)
message.success(t('common.createSuccess'))
} else {
await RecordApi.updateRecord(data)
message.success(t('common.updateSuccess'))
}
dialogVisible.value = false
//
emit('success')
} finally {
formLoading.value = false
}
}
/** 重置表单 */
const resetForm = () => {
formData.value = {
id: undefined,
parkNumber: undefined,
size: undefined,
orderId: undefined,
operatorId: undefined,
operatorName: undefined,
invoiceNo: undefined,
plate: undefined,
plateColor: undefined,
ticketCode: undefined,
carType: undefined,
confidence: 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,
payNo: undefined,
getTime: undefined,
payCharge: undefined,
payKind: undefined,
payChannel: undefined,
memo: undefined,
profitCode: undefined,
getproTime: undefined,
profitTime: undefined,
profitCharge: undefined,
profitChargeValue: undefined,
profitmemo: undefined,
areaId: undefined,
areaName: undefined,
placeNumber: undefined,
placememo: undefined,
costTime: undefined,
}
formRef.value?.resetFields()
}
</script>

View File

@ -0,0 +1,700 @@
<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="size">
<el-input
v-model="queryParams.size"
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="入场记录编号" prop="orderId">
<el-input
v-model="queryParams.orderId"
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="plate">
<el-input
v-model="queryParams.plate"
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="ticketCode">
<el-input
v-model="queryParams.ticketCode"
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="confidence">
<el-input
v-model="queryParams.confidence"
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="payNo">
<el-input
v-model="queryParams.payNo"
placeholder="请输入支付订单号"
clearable
@keyup.enter="handleQuery"
class="!w-240px"
/>
</el-form-item>
<el-form-item label="结算时间" prop="getTime">
<el-date-picker
v-model="queryParams.getTime"
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="payCharge">
<el-input
v-model="queryParams.payCharge"
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="memo">
<el-input
v-model="queryParams.memo"
placeholder="请输入备注"
clearable
@keyup.enter="handleQuery"
class="!w-240px"
/>
</el-form-item>
<el-form-item label="优惠码" prop="profitCode">
<el-input
v-model="queryParams.profitCode"
placeholder="请输入优惠码"
clearable
@keyup.enter="handleQuery"
class="!w-240px"
/>
</el-form-item>
<el-form-item label="优惠下发时间" prop="getproTime">
<el-date-picker
v-model="queryParams.getproTime"
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="profitTime">
<el-date-picker
v-model="queryParams.profitTime"
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="profitCharge">
<el-input
v-model="queryParams.profitCharge"
placeholder="请输入优惠金额面值"
clearable
@keyup.enter="handleQuery"
class="!w-240px"
/>
</el-form-item>
<el-form-item label="生效金额" prop="profitChargeValue">
<el-input
v-model="queryParams.profitChargeValue"
placeholder="请输入生效金额"
clearable
@keyup.enter="handleQuery"
class="!w-240px"
/>
</el-form-item>
<el-form-item label="备注" prop="profitmemo">
<el-input
v-model="queryParams.profitmemo"
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="areaName">
<el-input
v-model="queryParams.areaName"
placeholder="请输入区域名称"
clearable
@keyup.enter="handleQuery"
class="!w-240px"
/>
</el-form-item>
<el-form-item label="车位编号" prop="placeNumber">
<el-input
v-model="queryParams.placeNumber"
placeholder="请输入车位编号"
clearable
@keyup.enter="handleQuery"
class="!w-240px"
/>
</el-form-item>
<el-form-item label="备注信息" prop="placememo">
<el-input
v-model="queryParams.placememo"
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>
<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="['appearance:record:create']"
>
<Icon icon="ep:plus" class="mr-5px" /> 新增
</el-button>
<el-button
type="success"
plain
@click="handleExport"
:loading="exportLoading"
v-hasPermi="['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="parkNumber" />
<el-table-column label="数据条数" align="center" prop="size" />
<el-table-column
label="创建时间"
align="center"
prop="createTime"
:formatter="dateFormatter"
width="180px"
/>
<el-table-column label="入场记录编号" align="center" prop="orderId" />
<el-table-column label="操作员 Id" align="center" prop="operatorId" />
<el-table-column label="操作员姓名" align="center" prop="operatorName" />
<el-table-column label="发票号码" align="center" prop="invoiceNo" />
<el-table-column label="车牌" align="center" prop="plate" />
<el-table-column label="车牌颜色" align="center" prop="plateColor" />
<el-table-column label="无牌车票号" align="center" prop="ticketCode" />
<el-table-column label="车类型" align="center" prop="carType" />
<el-table-column label="车牌识别可信度" align="center" prop="confidence" />
<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" />
<el-table-column label="出场图片名" align="center" prop="outImage" />
<el-table-column label="入口通道名称" align="center" prop="inChannel" />
<el-table-column label="出口通道名称" align="center" prop="outChannel" />
<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" />
<el-table-column label="线下总收费" align="center" prop="offLineCharge" />
<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="payNo" />
<el-table-column label="结算时间" align="center" prop="getTime" />
<el-table-column label="支付金额" align="center" prop="payCharge" />
<el-table-column label="支付类型" align="center" prop="payKind" />
<el-table-column label="支付渠道" align="center" prop="payChannel" />
<el-table-column label="备注" align="center" prop="memo" />
<el-table-column label="优惠码" align="center" prop="profitCode" />
<el-table-column label="优惠下发时间" align="center" prop="getproTime" />
<el-table-column label="优惠时间" align="center" prop="profitTime" />
<el-table-column label="优惠金额面值" align="center" prop="profitCharge" />
<el-table-column label="生效金额" align="center" prop="profitChargeValue" />
<el-table-column label="备注" align="center" prop="profitmemo" />
<el-table-column label="区域 id" align="center" prop="areaId" />
<el-table-column label="区域名称" align="center" prop="areaName" />
<el-table-column label="车位编号" align="center" prop="placeNumber" />
<el-table-column label="备注信息" align="center" prop="placememo" />
<el-table-column label="时间" align="center" prop="costTime" />
<el-table-column label="操作" align="center" width="150px">
<template #default="scope">
<el-button
link
type="primary"
@click="openForm('update', scope.row.id)"
v-hasPermi="['appearance:record:update']"
>
编辑
</el-button>
<el-button
link
type="danger"
@click="handleDelete(scope.row.id)"
v-hasPermi="['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>
<!-- 表单弹窗添加/修改 -->
<RecordForm ref="formRef" @success="getList" />
</template>
<script setup lang="ts">
import { dateFormatter } from '@/utils/formatTime'
import download from '@/utils/download'
import { RecordApi, RecordVO } from '@/api/parking/appearancerecord'
import RecordForm from './RecordForm.vue'
/** 出场记录 列表 */
defineOptions({ name: 'AppearanceRecord' })
const message = useMessage() //
const { t } = useI18n() //
const loading = ref(true) //
const list = ref<RecordVO[]>([]) //
const total = ref(0) //
const queryParams = reactive({
pageNo: 1,
pageSize: 10,
parkNumber: undefined,
size: undefined,
createTime: [],
orderId: undefined,
operatorId: undefined,
operatorName: undefined,
plate: undefined,
plateColor: undefined,
ticketCode: undefined,
carType: undefined,
confidence: 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,
payNo: undefined,
getTime: [],
payCharge: undefined,
payKind: undefined,
payChannel: undefined,
memo: undefined,
profitCode: undefined,
getproTime: [],
profitTime: [],
profitCharge: undefined,
profitChargeValue: undefined,
profitmemo: undefined,
areaId: undefined,
areaName: undefined,
placeNumber: undefined,
placememo: undefined,
costTime: [],
})
const queryFormRef = ref() //
const exportLoading = ref(false) //
/** 查询列表 */
const getList = async () => {
loading.value = true
try {
const data = await RecordApi.getRecordPage(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 RecordApi.deleteRecord(id)
message.success(t('common.delSuccess'))
//
await getList()
} catch {}
}
/** 导出按钮操作 */
const handleExport = async () => {
try {
//
await message.exportConfirm()
//
exportLoading.value = true
const data = await RecordApi.exportRecord(queryParams)
download.excel(data, '出场记录.xls')
} catch {
} finally {
exportLoading.value = false
}
}
/** 初始化 **/
onMounted(() => {
getList()
})
</script>

View 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="parkNumber">
<el-input v-model="formData.parkNumber" placeholder="请输入场库编号" />
</el-form-item>
<el-form-item label="数据条数" prop="size">
<el-input v-model="formData.size" placeholder="请输入数据条数" />
</el-form-item>
<el-form-item label="通道 Id" prop="passagewayId">
<el-input v-model="formData.passagewayId" placeholder="请输入通道 Id" />
</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 { InformationApi, InformationVO } from '@/api/parking/channel'
/** 通道信息 表单 */
defineOptions({ name: 'InformationForm' })
const { t } = useI18n() //
const message = useMessage() //
const dialogVisible = ref(false) //
const dialogTitle = ref('') //
const formLoading = ref(false) // 12
const formType = ref('') // create - update -
const formData = ref({
id: undefined,
parkNumber: undefined,
size: undefined,
passagewayId: undefined,
passagewayName: undefined,
sourceAreaId: undefined,
targetAreaId: 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 InformationApi.getInformation(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 InformationVO
if (formType.value === 'create') {
await InformationApi.createInformation(data)
message.success(t('common.createSuccess'))
} else {
await InformationApi.updateInformation(data)
message.success(t('common.updateSuccess'))
}
dialogVisible.value = false
//
emit('success')
} finally {
formLoading.value = false
}
}
/** 重置表单 */
const resetForm = () => {
formData.value = {
id: undefined,
parkNumber: undefined,
size: undefined,
passagewayId: undefined,
passagewayName: undefined,
sourceAreaId: undefined,
targetAreaId: undefined,
}
formRef.value?.resetFields()
}
</script>

View File

@ -0,0 +1,242 @@
<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="size">
<el-input
v-model="queryParams.size"
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="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="['channel:information:create']"
>
<Icon icon="ep:plus" class="mr-5px" /> 新增
</el-button>
<el-button
type="success"
plain
@click="handleExport"
:loading="exportLoading"
v-hasPermi="['channel:information: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="size" />
<el-table-column label="通道 Id" align="center" prop="passagewayId" />
<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="['channel:information:update']"
>
编辑
</el-button>
<el-button
link
type="danger"
@click="handleDelete(scope.row.id)"
v-hasPermi="['channel:information: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>
<!-- 表单弹窗添加/修改 -->
<InformationForm ref="formRef" @success="getList" />
</template>
<script setup lang="ts">
import { dateFormatter } from '@/utils/formatTime'
import download from '@/utils/download'
import { InformationApi, InformationVO } from '@/api/parking/channel'
import InformationForm from './InformationForm.vue'
/** 通道信息 列表 */
defineOptions({ name: 'ChannelInformation' })
const message = useMessage() //
const { t } = useI18n() //
const loading = ref(true) //
const list = ref<InformationVO[]>([]) //
const total = ref(0) //
const queryParams = reactive({
pageNo: 1,
pageSize: 10,
parkNumber: undefined,
size: undefined,
passagewayId: 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 InformationApi.getInformationPage(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 InformationApi.deleteInformation(id)
message.success(t('common.delSuccess'))
//
await getList()
} catch {}
}
/** 导出按钮操作 */
const handleExport = async () => {
try {
//
await message.exportConfirm()
//
exportLoading.value = true
const data = await InformationApi.exportInformation(queryParams)
download.excel(data, '通道信息.xls')
} catch {
} finally {
exportLoading.value = false
}
}
/** 初始化 **/
onMounted(() => {
getList()
})
</script>

View File

@ -0,0 +1,203 @@
<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="size">
<el-input v-model="formData.size" 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 { InformationApi, InformationVO } from '@/api/parking/chargeinformation'
/** 收费信息 表单 */
defineOptions({ name: 'InformationForm' })
const { t } = useI18n() //
const message = useMessage() //
const dialogVisible = ref(false) //
const dialogTitle = ref('') //
const formLoading = ref(false) // 12
const formType = ref('') // create - update -
const formData = ref({
id: undefined,
parkNumber: undefined,
size: 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({
})
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 InformationApi.getInformation(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 InformationVO
if (formType.value === 'create') {
await InformationApi.createInformation(data)
message.success(t('common.createSuccess'))
} else {
await InformationApi.updateInformation(data)
message.success(t('common.updateSuccess'))
}
dialogVisible.value = false
//
emit('success')
} finally {
formLoading.value = false
}
}
/** 重置表单 */
const resetForm = () => {
formData.value = {
id: undefined,
parkNumber: undefined,
size: 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>

View File

@ -0,0 +1,412 @@
<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="size">
<el-input
v-model="queryParams.size"
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="['charge:information:create']"
>
<Icon icon="ep:plus" class="mr-5px" /> 新增
</el-button>
<el-button
type="success"
plain
@click="handleExport"
:loading="exportLoading"
v-hasPermi="['charge:information: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="size" />
<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" width="150px">
<template #default="scope">
<el-button
link
type="primary"
@click="openForm('update', scope.row.id)"
v-hasPermi="['charge:information:update']"
>
编辑
</el-button>
<el-button
link
type="danger"
@click="handleDelete(scope.row.id)"
v-hasPermi="['charge:information: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>
<!-- 表单弹窗添加/修改 -->
<InformationForm ref="formRef" @success="getList" />
</template>
<script setup lang="ts">
import { dateFormatter } from '@/utils/formatTime'
import download from '@/utils/download'
import { InformationApi, InformationVO } from '@/api/parking/chargeinformation'
import InformationForm from './InformationForm.vue'
/** 收费信息 列表 */
defineOptions({ name: 'ChargeInformation' })
const message = useMessage() //
const { t } = useI18n() //
const loading = ref(true) //
const list = ref<InformationVO[]>([]) //
const total = ref(0) //
const queryParams = reactive({
pageNo: 1,
pageSize: 10,
parkNumber: undefined,
size: 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 InformationApi.getInformationPage(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 InformationApi.deleteInformation(id)
message.success(t('common.delSuccess'))
//
await getList()
} catch {}
}
/** 导出按钮操作 */
const handleExport = async () => {
try {
//
await message.exportConfirm()
//
exportLoading.value = true
const data = await InformationApi.exportInformation(queryParams)
download.excel(data, '收费信息.xls')
} catch {
} finally {
exportLoading.value = false
}
}
/** 初始化 **/
onMounted(() => {
getList()
})
</script>

View File

@ -0,0 +1,224 @@
<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="size">
<el-input v-model="formData.size" 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="ticketCode">
<el-input v-model="formData.ticketCode" placeholder="请输入无牌车票号" />
</el-form-item>
<el-form-item label="车牌颜色" prop="plateColor">
<el-input v-model="formData.plateColor" 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="orderId">
<el-input v-model="formData.orderId" placeholder="请输入入场记录编号" />
</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="idCard">
<el-input v-model="formData.idCard" placeholder="请输入证件号码" />
</el-form-item>
<el-form-item label="车牌识别可信度" prop="confidence">
<el-input v-model="formData.confidence" 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="userIdCard">
<el-input v-model="formData.userIdCard" placeholder="请输入证件号码" />
</el-form-item>
<el-form-item label="车主姓名" prop="userName">
<el-input v-model="formData.userName" placeholder="请输入车主姓名" />
</el-form-item>
<el-form-item label="联系电话" prop="phone">
<el-input v-model="formData.phone" placeholder="请输入联系电话" />
</el-form-item>
<el-form-item label="地址" prop="address">
<el-input v-model="formData.address" 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="areaName">
<el-input v-model="formData.areaName" placeholder="请输入区域名称" />
</el-form-item>
<el-form-item label="车位编号" prop="placeNumber">
<el-input v-model="formData.placeNumber" 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="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) // 12
const formType = ref('') // create - update -
const formData = ref({
id: undefined,
parkNumber: undefined,
size: undefined,
plate: undefined,
ticketCode: undefined,
plateColor: undefined,
inTime: undefined,
inChannel: undefined,
inImage: undefined,
orderId: undefined,
visitReason: undefined,
openGateMode: undefined,
matchMode: undefined,
idCard: undefined,
confidence: undefined,
carType: undefined,
userIdCard: undefined,
userName: undefined,
phone: undefined,
address: undefined,
areaId: undefined,
areaName: undefined,
placeNumber: undefined,
memo: undefined,
barriorOpen: undefined,
costTime: undefined,
})
const formRules = reactive({
phone: [{ 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,
parkNumber: undefined,
size: undefined,
plate: undefined,
ticketCode: undefined,
plateColor: undefined,
inTime: undefined,
inChannel: undefined,
inImage: undefined,
orderId: undefined,
visitReason: undefined,
openGateMode: undefined,
matchMode: undefined,
idCard: undefined,
confidence: undefined,
carType: undefined,
userIdCard: undefined,
userName: undefined,
phone: undefined,
address: undefined,
areaId: undefined,
areaName: undefined,
placeNumber: undefined,
memo: undefined,
barriorOpen: undefined,
costTime: undefined,
}
formRef.value?.resetFields()
}
</script>

View File

@ -0,0 +1,447 @@
<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="size">
<el-input
v-model="queryParams.size"
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="ticketCode">
<el-input
v-model="queryParams.ticketCode"
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="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="orderId">
<el-input
v-model="queryParams.orderId"
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="idCard">
<el-input
v-model="queryParams.idCard"
placeholder="请输入证件号码"
clearable
@keyup.enter="handleQuery"
class="!w-240px"
/>
</el-form-item>
<el-form-item label="车牌识别可信度" prop="confidence">
<el-input
v-model="queryParams.confidence"
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="userIdCard">
<el-input
v-model="queryParams.userIdCard"
placeholder="请输入证件号码"
clearable
@keyup.enter="handleQuery"
class="!w-240px"
/>
</el-form-item>
<el-form-item label="车主姓名" prop="userName">
<el-input
v-model="queryParams.userName"
placeholder="请输入车主姓名"
clearable
@keyup.enter="handleQuery"
class="!w-240px"
/>
</el-form-item>
<el-form-item label="联系电话" prop="phone">
<el-input
v-model="queryParams.phone"
placeholder="请输入联系电话"
clearable
@keyup.enter="handleQuery"
class="!w-240px"
/>
</el-form-item>
<el-form-item label="地址" prop="address">
<el-input
v-model="queryParams.address"
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="areaName">
<el-input
v-model="queryParams.areaName"
placeholder="请输入区域名称"
clearable
@keyup.enter="handleQuery"
class="!w-240px"
/>
</el-form-item>
<el-form-item label="车位编号" prop="placeNumber">
<el-input
v-model="queryParams.placeNumber"
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="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="parkNumber" />
<el-table-column label="数据条数" align="center" prop="size" />
<el-table-column label="车牌" align="center" prop="plate" />
<el-table-column label="无牌车票号" align="center" prop="ticketCode" />
<el-table-column label="车牌颜色" align="center" prop="plateColor" />
<el-table-column label="入场时间" align="center" prop="inTime" />
<el-table-column label="入场通道名称" align="center" prop="inChannel" />
<el-table-column label="入场图片名" align="center" prop="inImage" />
<el-table-column label="入场记录编号" align="center" prop="orderId" />
<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="idCard" />
<el-table-column label="车牌识别可信度" align="center" prop="confidence" />
<el-table-column label="车类型" align="center" prop="carType" />
<el-table-column label="证件号码" align="center" prop="userIdCard" />
<el-table-column label="车主姓名" align="center" prop="userName" />
<el-table-column label="联系电话" align="center" prop="phone" />
<el-table-column label="地址" align="center" prop="address" />
<el-table-column label="区域 id" align="center" prop="areaId" />
<el-table-column label="区域名称" align="center" prop="areaName" />
<el-table-column label="车位编号" align="center" prop="placeNumber" />
<el-table-column label="备注信息" align="center" prop="memo" />
<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" width="150px">
<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,
parkNumber: undefined,
size: undefined,
plate: undefined,
ticketCode: undefined,
plateColor: undefined,
inTime: [],
inChannel: undefined,
inImage: undefined,
orderId: undefined,
visitReason: undefined,
openGateMode: undefined,
matchMode: undefined,
idCard: undefined,
confidence: undefined,
carType: undefined,
userIdCard: undefined,
userName: undefined,
phone: undefined,
address: undefined,
areaId: undefined,
areaName: undefined,
placeNumber: undefined,
memo: 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>