master #3
@@ -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',
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
|
@@ -65,7 +65,7 @@ async function externalLoginOnLoad() {
|
||||
|
||||
const formOptions: VbenFormProps = {
|
||||
commonConfig: {
|
||||
labelWidth: 120,
|
||||
labelWidth: 140,
|
||||
componentProps: {
|
||||
allowClear: true,
|
||||
},
|
||||
@@ -94,17 +94,9 @@ const gridOptions: VxeGridProps = {
|
||||
await externalLoginOnLoad();
|
||||
if (token.value) {
|
||||
try {
|
||||
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({
|
||||
const params: any = {
|
||||
// plNos、carNumber、orgId、orderStates、parkOrderTypes、terminalSource为接口参数固定需求
|
||||
// parkStates:10-在场、20-离场
|
||||
pageReq: {
|
||||
pageNum: page.currentPage,
|
||||
pageSize: page.pageSize,
|
||||
@@ -116,8 +108,48 @@ const gridOptions: VxeGridProps = {
|
||||
orderStates: [],
|
||||
parkOrderTypes: [100, 200, 201, 300, 500],
|
||||
terminalSource: 50,
|
||||
// plNos、carNumber、orgId、orderStates、parkOrderTypes、terminalSource为接口参数固定需求
|
||||
// parkStates:10-在场、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,
|
||||
}),
|
||||
},
|
||||
);
|
||||
|
Reference in New Issue
Block a user