From 3fa7cdec6ce44f07a0dc7e1910511ead606990f3 Mon Sep 17 00:00:00 2001
From: zhang <zc857179121@qq.com>
Date: 星期四, 11 九月 2025 08:19:53 +0800
Subject: [PATCH] 1

---
 zy-acs-flow/src/page/sta/StaList.jsx |   49 ++++++++++++++++++++++---------------------------
 1 files changed, 22 insertions(+), 27 deletions(-)

diff --git a/zy-acs-flow/src/page/sta/StaList.jsx b/zy-acs-flow/src/page/sta/StaList.jsx
index dba430b..6a6e484 100644
--- a/zy-acs-flow/src/page/sta/StaList.jsx
+++ b/zy-acs-flow/src/page/sta/StaList.jsx
@@ -40,8 +40,9 @@
 import MyExportButton from '../components/MyExportButton';
 import PageDrawer from "../components/PageDrawer";
 import MyField from "../components/MyField";
-import { PAGE_DRAWER_WIDTH, OPERATE_MODE } from '@/config/setting';
+import { PAGE_DRAWER_WIDTH, OPERATE_MODE, DEFAULT_PAGE_SIZE } from '@/config/setting';
 import * as Common from '@/utils/common';
+import rowSx from "./rowSx";
 
 const StyledDatagrid = styled(DatagridConfigurable)(({ theme }) => ({
     '& .css-1vooibu-MuiSvgIcon-root': {
@@ -58,30 +59,28 @@
 }));
 
 const filters = [
-    <SearchInput source="condition" alwaysOn />,
-    <DateInput label='common.time.after' source="timeStart" alwaysOn />,
-    <DateInput label='common.time.before' source="timeEnd" alwaysOn />,
-
+    // <SearchInput source="condition" alwaysOn />,
+    <TextInput source="staNo" label="table.field.sta.staNo" alwaysOn resettable />,
+    // <DateInput label='common.time.after' source="timeStart" alwaysOn />,
+    // <DateInput label='common.time.before' source="timeEnd" alwaysOn />,
     <TextInput source="uuid" label="table.field.sta.uuid" />,
     <ReferenceInput source="zoneId" label="table.field.sta.zoneId" reference="zone">
-        <AutocompleteInput label="table.field.sta.zoneId" optionText="name" />
+        <AutocompleteInput label="table.field.sta.zoneId" optionText="name" filterToQuery={(val) => ({ name: val })} />
     </ReferenceInput>,
-    <TextInput source="staNo" label="table.field.sta.staNo" />,
+    <ReferenceInput source="code" label="table.field.sta.code" reference="code" alwaysOn>
+        <AutocompleteInput label="table.field.sta.code" optionText="data" filterToQuery={(val) => ({ data: val })} />
+    </ReferenceInput>,
     <TextInput source="name" label="table.field.sta.name" />,
     <ReferenceInput source="staType" label="table.field.sta.staType" reference="staType">
-        <AutocompleteInput label="table.field.sta.staType" optionText="name" />
-    </ReferenceInput>,
-    <ReferenceInput source="code" label="table.field.sta.code" reference="code">
-        <AutocompleteInput label="table.field.sta.code" optionText="uuid" />
+        <AutocompleteInput label="table.field.sta.staType" optionText="name" filterToQuery={(val) => ({ name: val })} />
     </ReferenceInput>,
     <NumberInput source="offset" label="table.field.sta.offset" />,
     <TextInput source="autoing" label="table.field.sta.autoing" />,
     <TextInput source="loading" label="table.field.sta.loading" />,
     <TextInput source="inEnable" label="table.field.sta.inEnable" />,
     <TextInput source="outEnable" label="table.field.sta.outEnable" />,
-    <TextInput source="zpallet" label="table.field.sta.zpallet" />,
-    <ReferenceInput source="staSts" label="table.field.sta.staSts" reference="staSts">
-        <AutocompleteInput label="table.field.sta.staSts" optionText="name" />
+    <ReferenceInput source="staSts" label="table.field.sta.staSts" reference="staSts" alwaysOn>
+        <AutocompleteInput label="table.field.sta.staSts" optionText="name" filterToQuery={(val) => ({ name: val })} />
     </ReferenceInput>,
 
     <TextInput label="common.field.memo" source="memo" />,
@@ -124,7 +123,7 @@
                         <MyExportButton />
                     </TopToolbar>
                 )}
-                perPage={25}
+                perPage={DEFAULT_PAGE_SIZE}
             >
                 <StyledDatagrid
                     preferenceKey='sta'
@@ -132,7 +131,8 @@
                     rowClick={(id, resource, record) => false}
                     expand={() => <StaPanel />}
                     expandSingle={true}
-                    omit={['id', 'uuid', 'offset', 'updateBy', 'createTime', 'createBy', 'memo']}
+                    rowSx={rowSx(drawerVal || null)}
+                    omit={['id', 'uuid', 'name', 'zpallet', 'updateBy', 'createTime', 'createBy', 'statusBool', 'memo']}
                 >
                     <NumberField source="id" />
                     <TextField source="uuid" label="table.field.sta.uuid" />
@@ -140,31 +140,26 @@
                     <ReferenceField source="zoneId" label="table.field.sta.zoneId" reference="zone" link={false} sortable={false}>
                         <TextField source="name" />
                     </ReferenceField>
-                    <TextField source="name" label="table.field.sta.name" />
-                    <ReferenceField source="staType" label="table.field.sta.staType" reference="staType" link={false} sortable={false}>
-                        <TextField source="name" />
-                    </ReferenceField>
                     <ReferenceField source="code" label="table.field.sta.code" reference="code" link={false} sortable={false}>
                         <TextField source="data" />
                     </ReferenceField>
+                    <ReferenceField source="staSts" label="table.field.sta.staSts" reference="staSts" link={false} sortable={false}>
+                        <TextField source="name" />
+                    </ReferenceField>
+                    <TextField source="name" label="table.field.sta.name" />
                     <NumberField source="offset" label="table.field.sta.offset" />
                     <TextField source="autoing" label="table.field.sta.autoing" />
                     <TextField source="loading" label="table.field.sta.loading" />
                     <TextField source="inEnable" label="table.field.sta.inEnable" />
                     <TextField source="outEnable" label="table.field.sta.outEnable" />
                     <TextField source="zpallet" label="table.field.sta.zpallet" />
-                    <ReferenceField source="staSts" label="table.field.sta.staSts" reference="staSts" link={false} sortable={false}>
-                        <TextField source="name" />
-                    </ReferenceField>
-
                     <ReferenceField source="updateBy" label="common.field.updateBy" reference="user" link={false} sortable={false}>
                         <TextField source="nickname" />
                     </ReferenceField>
                     <DateField source="updateTime" label="common.field.updateTime" showTime />
-                    <ReferenceField source="createBy" label="common.field.createBy" reference="user" link={false} sortable={false}>
-                        <TextField source="nickname" />
+                    <ReferenceField source="staType" label="table.field.sta.staType" reference="staType" link={false} sortable={false}>
+                        <TextField source="name" />
                     </ReferenceField>
-                    <DateField source="createTime" label="common.field.createTime" showTime />
                     <BooleanField source="statusBool" label="common.field.status" sortable={false} />
                     <TextField source="memo" label="common.field.memo" sortable={false} />
                     <WrapperField cellClassName="opt" label="common.field.opt">

--
Gitblit v1.9.1