From 52d78628a70d6aa129f874050b7846d259819554 Mon Sep 17 00:00:00 2001
From: skyouc <958836976@qq.com>
Date: 星期三, 15 十月 2025 08:54:19 +0800
Subject: [PATCH] 物料同步接口优化

---
 rsf-admin/src/page/container/ContainerList.jsx |   39 ++++++++++++++++++++++++++++-----------
 1 files changed, 28 insertions(+), 11 deletions(-)

diff --git a/rsf-admin/src/page/container/ContainerList.jsx b/rsf-admin/src/page/container/ContainerList.jsx
index b2d2d58..7ab91e7 100644
--- a/rsf-admin/src/page/container/ContainerList.jsx
+++ b/rsf-admin/src/page/container/ContainerList.jsx
@@ -31,6 +31,7 @@
     ReferenceArrayInput,
     AutocompleteInput,
     DeleteButton,
+    Button,
 } from 'react-admin';
 import { Box, Typography, Card, Stack } from '@mui/material';
 import { styled } from '@mui/material/styles';
@@ -43,6 +44,7 @@
 import MyField from "../components/MyField";
 import { PAGE_DRAWER_WIDTH, OPERATE_MODE, DEFAULT_PAGE_SIZE } from '@/config/setting';
 import * as Common from '@/utils/common';
+import AllInclusiveIcon from '@mui/icons-material/AllInclusive';
 
 const StyledDatagrid = styled(DatagridConfigurable)(({ theme }) => ({
     '& .css-1vooibu-MuiSvgIcon-root': {
@@ -60,8 +62,6 @@
 
 const filters = [
     <SearchInput source="condition" alwaysOn />,
-    <DateInput label='common.time.after' source="timeStart" alwaysOn />,
-    <DateInput label='common.time.before' source="timeEnd" alwaysOn />,
 
     <TextInput source="code" label="table.field.container.code" />,
     <TextInput source="name" label="table.field.container.name" />,
@@ -79,13 +79,13 @@
     <SelectInput source="flagRycle" label="table.field.container.flagRycle"
         choices={[
             { id: 1, name: '鏄�' },
-            { id:  0, name: '鍚�' },
+            { id: 0, name: '鍚�' },
         ]}
     />,
     <SelectInput source="flagLogic" label="table.field.container.flagLogic"
         choices={[
             { id: 1, name: '鏄�' },
-            { id:  0, name: '鍚�' },
+            { id: 0, name: '鍚�' },
         ]}
     />,
 
@@ -116,7 +116,7 @@
                         theme.transitions.create(['all'], {
                             duration: theme.transitions.duration.enteringScreen,
                         }),
-                    marginRight: !!drawerVal ? `${PAGE_DRAWER_WIDTH}px` : 0,
+                    marginRight: drawerVal ? `${PAGE_DRAWER_WIDTH}px` : 0,
                 }}
                 title={"menu.container"}
                 empty={<EmptyData onClick={() => { setCreateDialog(true) }} />}
@@ -124,6 +124,7 @@
                 sort={{ field: "create_time", order: "desc" }}
                 actions={(
                     <TopToolbar>
+                        <InitButton />
                         <FilterButton />
                         <MyCreateButton onClick={() => { setCreateDialog(true) }} />
                         <SelectColumnsButton preferenceKey='container' />
@@ -136,16 +137,14 @@
                     preferenceKey='container'
                     bulkActionButtons={() => <BulkDeleteButton mutationMode={OPERATE_MODE} />}
                     rowClick={(id, resource, record) => false}
-                    expand={() => <ContainerPanel />}
-                    expandSingle={true}
-                    omit={['id', 'createTime', 'createBy', 'memo']}
+                    omit={['id', 'createTime', 'createBy', 'memo','statusBool','updateBy']}
                 >
                     <NumberField source="id" />
-                    <TextField source="code" label="table.field.container.code" />
+                    {/* <TextField source="code" label="table.field.container.code" /> */}
                     <TextField source="name" label="table.field.container.name" />
-                    <NumberField source="typeId" label="table.field.container.typeId" />
+                    <NumberField source="type" label="table.field.container.typeId" />
                     <NumberField source="used" label="table.field.container.used" />
-                    <NumberField source="lenght" label="table.field.container.lenght" />
+                    <NumberField source="length" label="table.field.container.lenght" />
                     <NumberField source="width" label="table.field.container.width" />
                     <NumberField source="height" label="table.field.container.height" />
                     <NumberField source="rstLen" label="table.field.container.rstLen" />
@@ -187,4 +186,22 @@
     )
 }
 
+//鍒濆鍖栨寜閽�
+const InitButton = ({ setOpen }) => {
+    const close = () => {
+        setOpen(false)
+    }
+    return (
+        <Button
+            label="toolbar.init"
+            variant="outlined"
+            size="medium"
+            onClick={close}
+            startIcon={<AllInclusiveIcon />}
+            sx={{ margin: '3.5em' }} />
+    )
+}
+
+
+
 export default ContainerList;

--
Gitblit v1.9.1