From e4e3f752792527c5c22df131c8dffa4733c98057 Mon Sep 17 00:00:00 2001
From: skyouc
Date: 星期四, 05 六月 2025 15:05:11 +0800
Subject: [PATCH] 任务列表优化 DO单功能优化 出库单功能优化

---
 rsf-admin/src/page/orders/outStock/OutOrderModal.jsx |   87 ++++++++++++++++++++++++++++---------------
 1 files changed, 56 insertions(+), 31 deletions(-)

diff --git a/rsf-admin/src/page/orders/outStock/OutOrderModal.jsx b/rsf-admin/src/page/orders/outStock/OutOrderModal.jsx
index 5bc8cc3..c3b530c 100644
--- a/rsf-admin/src/page/orders/outStock/OutOrderModal.jsx
+++ b/rsf-admin/src/page/orders/outStock/OutOrderModal.jsx
@@ -1,4 +1,4 @@
-import { Dialog, DialogActions, DialogContent, DialogTitle, Box } from "@mui/material";
+import { Dialog, DialogActions, DialogContent, DialogTitle, Box, LinearProgress } from "@mui/material";
 import React, { useState, useRef, useEffect, useMemo } from "react";
 import {
     List,
@@ -33,6 +33,7 @@
     ReferenceArrayInput,
     AutocompleteInput,
     DeleteButton,
+    SimpleForm,
     Form,
     SaveButton,
     useRefresh,
@@ -41,7 +42,7 @@
 import DialogCloseButton from "../../components/DialogCloseButton";
 import { styled } from '@mui/material/styles';
 import { PAGE_DRAWER_WIDTH, OPERATE_MODE, DEFAULT_PAGE_SIZE } from '@/config/setting';
-import { Grid, Stack, width } from "@mui/system";
+import { Grid, margin, Stack, width } from "@mui/system";
 import request from '@/utils/request';
 import SaveIcon from '@mui/icons-material/Save';
 import debounce from "lodash/debounce";
@@ -58,6 +59,17 @@
         width: 90
     },
 }));
+
+const StyledForm = styled(Form)(({ theme }) => ({
+    width: '100%',
+    marginBottom: '45px',
+
+    '& .MuiGrid-root': {
+        margin: '0 10px'
+    }
+}));
+
+
 const filters = [
     <SearchInput source="condition" alwaysOn />,
     <DateInput label='common.time.after' source="timeStart" />,
@@ -85,6 +97,7 @@
     const [drawerVal, setDrawerVal] = useState(false);
     const refresh = useRefresh();
 
+
     const handleClose = (event, reason) => {
         if (reason !== "backdropClick") {
             setOpen(false);
@@ -94,20 +107,22 @@
         const { filterValues, setFilters, refetch } = useListContext('deliveryItem');
         const [formValues, setFormValues] = useState(filterValues);
         const handleChange = (event) => {
-            if (event.target == undefined || event.target == null) {return}
+            if (event.target == undefined || event.target == null) { return }
             setFormValues(formValues => ({
                 ...formValues,
-              [event.target.name]: event.target.value
+                [event.target.name]: event.target.value
             }));
         };
+
+        
 
         const handleSubmit = (event) => {
             setParams(formValues)
         };
 
         return (
-            <Form>
-                <Grid container rowSpacing={2} columnSpacing={2} >
+            <StyledForm>
+                <Grid container rowSpacing={3} columnSpacing={3} >
                     <Stack>
                         <TextInput
                             source="condition"
@@ -158,7 +173,7 @@
                         <SaveButton onClick={handleSubmit} label={"toolbar.query"} />
                     </Toolbar>
                 </DialogActions>
-            </Form>
+            </StyledForm>
         );
     };
     return (
@@ -206,30 +221,40 @@
                             )}
                             perPage={DEFAULT_PAGE_SIZE}
                         >
-                            <StyledDatagrid
-                                sx={{ height: '400' }}
-                                preferenceKey='deliveryItem'
-                                bulkActionButtons={<AddOutStockButton setOpen={setOpen} />}
-                                rowClick={(id, resource, record) => false}
-                                expand={false}
-                                expandSingle={true}
-                                omit={['id', 'createTime', 'createBy', 'memo', 'workQty', 'startTime', 'endTime', 'updateBy', 'createTime']}
-                            >
-                                <NumberField source="id" />
-                                <TextField source="deliveryCode" label="table.field.deliveryItem.deliveryCode" />
-                                <TextField source="matnrCode" label="table.field.deliveryItem.matnrCode" />
-                                <TextField source="matnrName" label="table.field.deliveryItem.matnrName" />
-                                <TextField source="unit" label="table.field.deliveryItem.unit" />
-                                <NumberField source="anfme" label="table.field.deliveryItem.anfme" />
-                                <TextField source="splrName" label="table.field.deliveryItem.splrName" />
-                                <TextField source="splrBatch" label="table.field.deliveryItem.splrBatch" />
-                                <TextField source="updateBy$" label="common.field.updateBy" />
-                                <DateField source="updateTime" label="common.field.updateTime" showTime />
-                                <TextField source="createBy$" label="common.field.createBy" />
-                                <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} />
-                            </StyledDatagrid>
+                            <Box sx={{ position: 'relative', minHeight: "60vh", }}>
+                                <LinearProgress
+                                    sx={{
+                                        height: "2px",
+                                        position: 'absolute',
+                                        top: 0,
+                                        left: 0,
+                                        right: 0,
+                                    }}
+                                />
+                                <StyledDatagrid
+                                    preferenceKey='deliveryItem'
+                                    bulkActionButtons={<AddOutStockButton setOpen={setOpen} />}
+                                    rowClick={(id, resource, record) => false}
+                                    expand={false}
+                                    expandSingle={true}
+                                    omit={['id', 'createTime', 'createBy', 'memo', 'workQty', 'startTime', 'endTime', 'updateBy', 'createTime']}
+                                >
+                                    <NumberField source="id" />
+                                    <TextField source="deliveryCode" label="table.field.deliveryItem.deliveryCode" />
+                                    <TextField source="matnrCode" label="table.field.deliveryItem.matnrCode" />
+                                    <TextField source="matnrName" label="table.field.deliveryItem.matnrName" />
+                                    <TextField source="unit" label="table.field.deliveryItem.unit" />
+                                    <NumberField source="anfme" label="table.field.deliveryItem.anfme" />
+                                    <TextField source="splrName" label="table.field.deliveryItem.splrName" />
+                                    <TextField source="splrBatch" label="table.field.deliveryItem.splrBatch" />
+                                    <TextField source="updateBy$" label="common.field.updateBy" />
+                                    <DateField source="updateTime" label="common.field.updateTime" showTime />
+                                    <TextField source="createBy$" label="common.field.createBy" />
+                                    <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} />
+                                </StyledDatagrid>
+                            </Box>
                         </List>
                     </Grid>
                 </DialogContent>

--
Gitblit v1.9.1