From 777b31903904801e81bbf89b6eddb3d2f0feed87 Mon Sep 17 00:00:00 2001
From: skyouc
Date: 星期四, 27 三月 2025 09:17:44 +0800
Subject: [PATCH] Merge branch 'devlop' of http://47.97.1.152:5880/r/wms-master into devlop
---
rsf-admin/src/page/basicInfo/matnr/MatnrList.jsx | 31 +++++++++++++++++++++++++++----
1 files changed, 27 insertions(+), 4 deletions(-)
diff --git a/rsf-admin/src/page/basicInfo/matnr/MatnrList.jsx b/rsf-admin/src/page/basicInfo/matnr/MatnrList.jsx
index 6bfc5ee..99edfb3 100644
--- a/rsf-admin/src/page/basicInfo/matnr/MatnrList.jsx
+++ b/rsf-admin/src/page/basicInfo/matnr/MatnrList.jsx
@@ -196,7 +196,7 @@
<NumberField key="stagn" source="stagn" label="table.field.matnr.stagn" />,
<NumberField key="valid" source="valid" label="table.field.matnr.valid" />,
<NumberField key="validWarn" source="validWarn" label="table.field.matnr.validWarn" />,
- <NumberField key="flagCheck" source="flagCheck" label="table.field.matnr.flagCheck" />,
+ <BooleanField key="flagCheck" source="flagCheck" label="table.field.matnr.flagCheck" sortable={false} />,
<ReferenceField key="updateBy" source="updateBy" label="common.field.updateBy" reference="user" link={false} sortable={false}>
<TextField source="nickname" />
</ReferenceField>,
@@ -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