master #3

Merged
bichangxiong merged 19 commits from master into prod 2025-08-29 18:46:27 +08:00
2 changed files with 114 additions and 16 deletions
Showing only changes of commit 1383e6f9b1 - Show all commits

View File

@@ -3,10 +3,76 @@ import type { VxeGridProps } from '#/adapter/vxe-table';
import dayjs from 'dayjs'; import dayjs from 'dayjs';
export const querySchema: FormSchemaGetter = () => [ export const querySchema: FormSchemaGetter = () => [
{
component: 'Select',
fieldName: 'plName',
label: '停车场',
componentProps: {
// 只有以下固定的停车场名称
options: [
{
label: '综合服务中心负二楼停车场',
value: 'PFN000000025',
},
{
label: '综合服务中心地面停车场',
value: 'PFN000000022',
},
{
label: '综合服务中心负一楼停车场',
value: 'PFN000000012',
},
],
},
},
{ {
component: 'Input', component: 'Input',
fieldName: 'orderId', fieldName: 'carNumber',
label: '订单编号', 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',
},
],
},
}, },
]; ];

View File

@@ -65,7 +65,7 @@ async function externalLoginOnLoad() {
const formOptions: VbenFormProps = { const formOptions: VbenFormProps = {
commonConfig: { commonConfig: {
labelWidth: 120, labelWidth: 140,
componentProps: { componentProps: {
allowClear: true, allowClear: true,
}, },
@@ -94,17 +94,9 @@ const gridOptions: VxeGridProps = {
await externalLoginOnLoad(); await externalLoginOnLoad();
if (token.value) { if (token.value) {
try { try {
const response = await fetch( const params: any = {
'https://server.cqnctc.com:6081/web/lot/net/queryOrderParkForPage', // plNos、carNumber、orgId、orderStates、parkOrderTypes、terminalSource为接口参数固定需求
{ // parkStates10-在场、20-离场
method: 'POST',
headers: {
'X-Auth-Token': `${sessionStorage.getItem('token')}`,
'Content-Type': 'application/json',
Authorization: `Bearer ${sessionStorage.getItem('token')}`,
Accept: 'application/json, text/plain, */*',
},
body: JSON.stringify({
pageReq: { pageReq: {
pageNum: page.currentPage, pageNum: page.currentPage,
pageSize: page.pageSize, pageSize: page.pageSize,
@@ -116,8 +108,48 @@ const gridOptions: VxeGridProps = {
orderStates: [], orderStates: [],
parkOrderTypes: [100, 200, 201, 300, 500], parkOrderTypes: [100, 200, 201, 300, 500],
terminalSource: 50, terminalSource: 50,
// plNos、carNumber、orgId、orderStates、parkOrderTypes、terminalSource为接口参数固定需求 };
// parkStates10-在场、20-离场 // 条件查询
// 车牌号
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',
{
method: 'POST',
headers: {
'X-Auth-Token': `${sessionStorage.getItem('token')}`,
'Content-Type': 'application/json',
Authorization: `Bearer ${sessionStorage.getItem('token')}`,
Accept: 'application/json, text/plain, */*',
},
body: JSON.stringify({
...params,
}), }),
}, },
); );