From e5ff577d91179d9f0ae1f689d182bb2e0465fca1 Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期五, 08 十一月 2024 13:48:12 +0800
Subject: [PATCH] #

---
 zy-acs-flow/src/page/loc/LocList.jsx |   41 +++++++++++++++++++++++++++--------------
 1 files changed, 27 insertions(+), 14 deletions(-)

diff --git a/zy-acs-flow/src/page/loc/LocList.jsx b/zy-acs-flow/src/page/loc/LocList.jsx
index 7e55196..d06d296 100644
--- a/zy-acs-flow/src/page/loc/LocList.jsx
+++ b/zy-acs-flow/src/page/loc/LocList.jsx
@@ -46,6 +46,7 @@
 import CorporateFareIcon from '@mui/icons-material/CorporateFare';
 import LocInit from "./LocInit";
 import rowSx from "./rowSx";
+import BulkUpdateButton from "./BulkUpdateButton";
 
 const StyledDatagrid = styled(DatagridConfigurable)(({ theme }) => ({
     '& .css-1vooibu-MuiSvgIcon-root': {
@@ -63,26 +64,25 @@
 }));
 
 const filters = [
+    <TextInput source="locNo" label="table.field.loc.locNo" alwaysOn />,
+    <ReferenceInput source="locSts" label="table.field.loc.locSts" reference="locSts" alwaysOn>
+        <AutocompleteInput label="table.field.loc.locSts" optionText="name" filterToQuery={(val) => ({ name: val })} />
+    </ReferenceInput>,
+    <NumberInput source="row" label="table.field.loc.row" alwaysOn />,
+    <NumberInput source="bay" label="table.field.loc.bay" alwaysOn />,
+    <NumberInput source="lev" label="table.field.loc.lev" alwaysOn />,
     <SearchInput source="condition" alwaysOn />,
-    <DateInput label='common.time.after' source="timeStart" alwaysOn />,
-    <DateInput label='common.time.before' source="timeEnd" alwaysOn />,
-
+    <ReferenceInput source="code" label="table.field.loc.code" reference="code" alwaysOn>
+        <AutocompleteInput label="table.field.loc.code" optionText="data" filterToQuery={(val) => ({ data: val })} />
+    </ReferenceInput>,
+    <DateInput label='common.time.after' source="timeStart" />,
+    <DateInput label='common.time.before' source="timeEnd" />,
     <TextInput source="uuid" label="table.field.loc.uuid" />,
     <ReferenceInput source="zoneId" label="table.field.loc.zoneId" reference="zone">
         <AutocompleteInput label="table.field.loc.zoneId" optionText="name" filterToQuery={(val) => ({ name: val })} />
     </ReferenceInput>,
-    <TextInput source="locNo" label="table.field.loc.locNo" alwaysOn />,
     <TextInput source="name" label="table.field.loc.name" />,
-    <ReferenceInput source="code" label="table.field.loc.code" reference="code" alwaysOn>
-        <AutocompleteInput label="table.field.loc.code" optionText="data" filterToQuery={(val) => ({ data: val })} />
-    </ReferenceInput>,
-    <ReferenceInput source="locSts" label="table.field.loc.locSts" reference="locSts" alwaysOn>
-        <AutocompleteInput label="table.field.loc.locSts" optionText="name" filterToQuery={(val) => ({ name: val })} />
-    </ReferenceInput>,
     <NumberInput source="offset" label="table.field.loc.offset" />,
-    <NumberInput source="row" label="table.field.loc.row" alwaysOn />,
-    <NumberInput source="bay" label="table.field.loc.bay" alwaysOn />,
-    <NumberInput source="lev" label="table.field.loc.lev" alwaysOn />,
     <TextInput source="barcode" label="table.field.loc.barcode" />,
     <TextInput source="zpallet" label="table.field.loc.zpallet" />,
     <ReferenceInput source="locType" label="table.field.loc.locType" reference="locType">
@@ -99,6 +99,19 @@
         ]}
     />,
 ]
+
+const LocBulkActionButtons = (props) => {
+    return (
+        <>
+            <BulkUpdateButton
+                {...props}
+                resource="loc"
+            />
+            <BulkDeleteButton mutationMode={OPERATE_MODE} />
+        </>
+    );
+};
+
 
 const LocList = () => {
     const translate = useTranslate();
@@ -137,7 +150,7 @@
             >
                 <StyledDatagrid
                     preferenceKey='loc'
-                    bulkActionButtons={() => <BulkDeleteButton mutationMode={OPERATE_MODE} />}
+                    bulkActionButtons={<LocBulkActionButtons />}
                     rowClick={(id, resource, record) => false}
                     expand={() => <LocPanel />}
                     expandSingle={true}

--
Gitblit v1.9.1