From 765e72ab71b29c3d23300cd5ac624827f26eab64 Mon Sep 17 00:00:00 2001
From: skyouc
Date: 星期一, 07 四月 2025 17:39:24 +0800
Subject: [PATCH] 组拖源修改
---
rsf-admin/src/page/basicInfo/matnr/MatnrList.jsx | 29 ++++++++++++++++++++++++++---
1 files changed, 26 insertions(+), 3 deletions(-)
diff --git a/rsf-admin/src/page/basicInfo/matnr/MatnrList.jsx b/rsf-admin/src/page/basicInfo/matnr/MatnrList.jsx
index 2a7d658..99edfb3 100644
--- a/rsf-admin/src/page/basicInfo/matnr/MatnrList.jsx
+++ b/rsf-admin/src/page/basicInfo/matnr/MatnrList.jsx
@@ -211,7 +211,7 @@
const fields = data.map(el => <TextField key={el.fields} source={`extendFields.[${el.fields}]`} label={el.fieldsAlise} />)
const opt = <WrapperField key="opt" cellClassName="fixed" className="fixed" label="common.field.opt">
<EditButton sx={{ padding: '1px', fontSize: '.75rem' }} />
- <EnableButton />
+ <PrintButton />
</WrapperField>
setColumns([...arr, ...fields, opt]);
@@ -247,7 +247,7 @@
<BatchStatusButton />
<BatchLevelButton />
<BindButton />
- <PrintButton />
+ <BatchPrintButton />
<BulkDeleteButton mutationMode={OPERATE_MODE} />
</>}
rowClick={(id, resource, record) => false}
@@ -461,7 +461,7 @@
)
}
-const PrintButton = () => {
+const BatchPrintButton = () => {
const record = useRecordContext();
const { resource, selectedIds } = useListContext();
const notify = useNotify();
@@ -484,6 +484,29 @@
)
}
+const PrintButton = () => {
+ const record = useRecordContext();
+
+ const notify = useNotify();
+ const refresh = useRefresh();
+
+ const [createDialog, setCreateDialog] = useState(false);
+
+ return (
+ <>
+ <Button color="secondary" onClick={() => setCreateDialog(true)} label={"toolbar.print"}>
+ <PrintIcon />
+ </Button>
+
+ <PrintModal
+ open={createDialog}
+ setOpen={setCreateDialog}
+ rows={[record.id]}
+ />
+ </>
+ )
+}
+
const BindButton = () => {
const record = useRecordContext();
const notify = useNotify();
--
Gitblit v1.9.1