From 6faab23aa66f4c29f9f83458d2d899341f5725b0 Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期五, 08 十一月 2024 14:26:40 +0800
Subject: [PATCH] #

---
 zy-acs-flow/src/page/components/BulkUpdateButton.jsx |   43 +++----------------------------------------
 1 files changed, 3 insertions(+), 40 deletions(-)

diff --git a/zy-acs-flow/src/page/loc/BulkUpdateButton.jsx b/zy-acs-flow/src/page/components/BulkUpdateButton.jsx
similarity index 62%
rename from zy-acs-flow/src/page/loc/BulkUpdateButton.jsx
rename to zy-acs-flow/src/page/components/BulkUpdateButton.jsx
index 572f8ee..eeeccbb 100644
--- a/zy-acs-flow/src/page/loc/BulkUpdateButton.jsx
+++ b/zy-acs-flow/src/page/components/BulkUpdateButton.jsx
@@ -16,11 +16,10 @@
 } from 'react-admin';
 import { Dialog, DialogActions, DialogContent, DialogTitle, Grid, Stack, Divider } from '@mui/material';
 import UpdateIcon from '@mui/icons-material/Update';
-import MemoInput from "../components/MemoInput";
 import ContentSave from '@mui/icons-material/Save';
 import CloseIcon from '@mui/icons-material/Close';
 
-const BulkUpdateButton = ({ label = 'ra.action.update' }) => {
+const BulkUpdateButton = ({ label = 'ra.action.update', children }) => {
     const [open, setOpen] = useState(false);
 
     const refresh = useRefresh();
@@ -36,7 +35,7 @@
     const [updateMany, { loading }] = useUpdateMany();
 
     const handleSubmit = (data) => {
-        delete filteredData['memoWrap'];
+        delete data['memoWrap'];
         const filteredData = Object.fromEntries(
             Object.entries(data).filter(([key, value]) => value !== null && value !== undefined)
         );
@@ -71,43 +70,7 @@
                 <Form onSubmit={handleSubmit}>
                     <DialogTitle>{translate('ra.action.update')}</DialogTitle>
                     <DialogContent>
-                        <Grid container rowSpacing={2} columnSpacing={2}>
-                            <Grid item xs={6} display="flex" gap={1}>
-                                <ReferenceInput
-                                    source="code"
-                                    reference="code"
-                                >
-                                    <AutocompleteInput
-                                        label="table.field.loc.code"
-                                        optionText="data"
-                                        filterToQuery={(val) => ({ data: val })}
-                                    />
-                                </ReferenceInput>
-                            </Grid>
-                            <Grid item xs={6} display="flex" gap={1}>
-                                <ReferenceInput
-                                    source="locSts"
-                                    reference="locSts"
-                                >
-                                    <AutocompleteInput
-                                        label="table.field.loc.locSts"
-                                        optionText="name"
-                                        filterToQuery={(val) => ({ name: val })}
-                                    />
-                                </ReferenceInput>
-                            </Grid>
-                            <Grid item xs={6} display="flex" gap={1}>
-                                <NumberInput
-                                    label="table.field.loc.offset"
-                                    source="offset"
-                                />
-                            </Grid>
-                            <Grid item xs={12} display="flex" gap={1}>
-                                <Stack direction="column" spacing={1} width={'100%'}>
-                                    <MemoInput />
-                                </Stack>
-                            </Grid>
-                        </Grid>
+                        {children}
                     </DialogContent>
                     <Divider sx={{ mb: 1 }} />
                     <DialogActions sx={{ mb: 1 }}>

--
Gitblit v1.9.1