diff --git a/apps/web-antd/src/views/property/resident/carPassRecordManagement/data.ts b/apps/web-antd/src/views/property/resident/carPassRecordManagement/data.ts index 11573ef1..2a48106e 100644 --- a/apps/web-antd/src/views/property/resident/carPassRecordManagement/data.ts +++ b/apps/web-antd/src/views/property/resident/carPassRecordManagement/data.ts @@ -3,10 +3,76 @@ import type { VxeGridProps } from '#/adapter/vxe-table'; import dayjs from 'dayjs'; export const querySchema: FormSchemaGetter = () => [ + { + component: 'Select', + fieldName: 'plName', + label: '停车场', + componentProps: { + // 只有以下固定的停车场名称 + options: [ + { + label: '综合服务中心负二楼停车场', + value: 'PFN000000025', + }, + { + label: '综合服务中心地面停车场', + value: 'PFN000000022', + }, + { + label: '综合服务中心负一楼停车场', + value: 'PFN000000012', + }, + ], + }, + }, { component: 'Input', - fieldName: 'orderId', - label: '订单编号', + fieldName: 'carNumber', + label: '车牌号', + }, + { + component: 'DatePicker', + fieldName: 'parkInBeginTime', + label: '进场时间', + formItemClass: 'col-span-1', + componentProps: { + showTime: true, + format: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'YYYY-MM-DD HH:mm:ss', + placeholder: '开始时间', + style: { width: '100%' }, + }, + }, + { + component: 'DatePicker', + fieldName: 'parkInEndTime', + label: '', + labelWidth: 0, + formItemClass: 'col-span-1', + componentProps: { + showTime: true, + format: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'YYYY-MM-DD HH:mm:ss', + placeholder: '结束时间', + style: { width: 'calc(100% - 140px)' }, + }, + }, + { + component: 'Select', + fieldName: 'carBusiType', + label: '停车类型', + componentProps: { + options: [ + { + label: '临时车', + value: '1', + }, + { + label: '月租车', + value: '2', + }, + ], + }, }, ]; diff --git a/apps/web-antd/src/views/property/resident/carPassRecordManagement/index.vue b/apps/web-antd/src/views/property/resident/carPassRecordManagement/index.vue index 928130b0..5d4153a4 100644 --- a/apps/web-antd/src/views/property/resident/carPassRecordManagement/index.vue +++ b/apps/web-antd/src/views/property/resident/carPassRecordManagement/index.vue @@ -65,7 +65,7 @@ async function externalLoginOnLoad() { const formOptions: VbenFormProps = { commonConfig: { - labelWidth: 120, + labelWidth: 140, componentProps: { allowClear: true, }, @@ -94,6 +94,50 @@ const gridOptions: VxeGridProps = { await externalLoginOnLoad(); if (token.value) { try { + const params: any = { + // plNos、carNumber、orgId、orderStates、parkOrderTypes、terminalSource为接口参数固定需求 + // parkStates:10-在场、20-离场 + pageReq: { + pageNum: page.currentPage, + pageSize: page.pageSize, + }, + plNos: ['PFN000000025', 'PFN000000022', 'PFN000000012'], + carNumber: null, + orgId: 10012, + parkStates: Number(parkStates.value), + orderStates: [], + parkOrderTypes: [100, 200, 201, 300, 500], + terminalSource: 50, + }; + // 条件查询 + // 车牌号 + if (formValues.carNumber) { + params.carNumber = formValues.carNumber; + } + // 停车场名称 + if (formValues.plName) { + params.plNos = [formValues.plName]; + } + // 停车类型 + if (formValues.carBusiType) { + if (formValues.carBusiType === '1') { + params.carBusiTypeList = [10]; + } else { + params.carBusiTypeList = [11, 12, 13]; + } + } + // 进场时间——开始时间 + if (formValues.parkInBeginTime) { + params.parkInBeginTime = new Date( + formValues.parkInBeginTime, + ).toISOString(); + } + // 进场时间——结束时间 + if (formValues.parkInEndTime) { + params.parkInEndTime = new Date( + formValues.parkInEndTime, + ).toISOString(); + } const response = await fetch( 'https://server.cqnctc.com:6081/web/lot/net/queryOrderParkForPage', { @@ -105,19 +149,7 @@ const gridOptions: VxeGridProps = { Accept: 'application/json, text/plain, */*', }, body: JSON.stringify({ - pageReq: { - pageNum: page.currentPage, - pageSize: page.pageSize, - }, - plNos: ['PFN000000025', 'PFN000000022', 'PFN000000012'], - carNumber: null, - orgId: 10012, - parkStates: Number(parkStates.value), - orderStates: [], - parkOrderTypes: [100, 200, 201, 300, 500], - terminalSource: 50, - // plNos、carNumber、orgId、orderStates、parkOrderTypes、terminalSource为接口参数固定需求 - // parkStates:10-在场、20-离场 + ...params, }), }, );