From e9f316e2e217e618ae904c6d40ff51c9d559c958 Mon Sep 17 00:00:00 2001
From: verou <857149855@qq.com>
Date: 星期一, 24 三月 2025 10:23:09 +0800
Subject: [PATCH] merge

---
 rsf-admin/src/page/basicInfo/matnr/MatnrList.jsx |   29 ++++++++++++++++++++++++++++-
 1 files changed, 28 insertions(+), 1 deletions(-)

diff --git a/rsf-admin/src/page/basicInfo/matnr/MatnrList.jsx b/rsf-admin/src/page/basicInfo/matnr/MatnrList.jsx
index 3140810..23079ee 100644
--- a/rsf-admin/src/page/basicInfo/matnr/MatnrList.jsx
+++ b/rsf-admin/src/page/basicInfo/matnr/MatnrList.jsx
@@ -55,6 +55,8 @@
 import request from '@/utils/request';
 import BatchModal from './BatchModal';
 import PrintModal from './PrintModal';
+import LinkIcon from '@mui/icons-material/Link';
+import BindModal from './BindModal';
 
 const StyledDatagrid = styled(DatagridConfigurable)(({ theme }) => ({
     '& .css-1vooibu-MuiSvgIcon-root': {
@@ -156,7 +158,6 @@
 
     const [columns, setColumns] = useState([]);
     const refresh = useRefresh();
-    const { refetch } = useListContext();
 
     useEffect(() => {
         getDynamicFields();
@@ -239,6 +240,7 @@
                     preferenceKey='matnr'
                     bulkActionButtons={<>
                         <BatchButton />
+                        <BindButton />
                         <PrintButton />
                         <BulkDeleteButton mutationMode={OPERATE_MODE} />
                     </>}
@@ -360,6 +362,7 @@
 
 const PrintButton = () => {
     const record = useRecordContext();
+    const { resource, selectedIds } = useListContext();
     const notify = useNotify();
     const refresh = useRefresh();
 
@@ -374,6 +377,30 @@
             <PrintModal
                 open={createDialog}
                 setOpen={setCreateDialog}
+                rows={selectedIds}
+            />
+        </>
+
+    )
+}
+
+const BindButton = () => {
+    const record = useRecordContext();
+    const notify = useNotify();
+    const refresh = useRefresh();
+
+
+    const [createDialog, setCreateDialog] = useState(false);
+
+    return (
+        <>
+            <Button onClick={() => setCreateDialog(true)} label={"toolbar.bindloc"}>
+                <LinkIcon />
+            </Button>
+
+            <BindModal
+                open={createDialog}
+                setOpen={setCreateDialog}
             />
         </>
 

--
Gitblit v1.9.1