From 6793162873940b6a34040ab815d6fa2eebfda402 Mon Sep 17 00:00:00 2001
From: verou <857149855@qq.com>
Date: 星期三, 26 三月 2025 10:36:31 +0800
Subject: [PATCH] fix:库位批量操作
---
rsf-admin/src/page/basicInfo/matnr/MatnrList.jsx | 83 +++++++++++++++++++++++++++++++++++++++--
1 files changed, 79 insertions(+), 4 deletions(-)
diff --git a/rsf-admin/src/page/basicInfo/matnr/MatnrList.jsx b/rsf-admin/src/page/basicInfo/matnr/MatnrList.jsx
index 9bf7cfc..2a7d658 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>,
@@ -242,7 +242,10 @@
preferenceKey='matnr'
bulkActionButtons={<>
<BatchGroupButton />
- <BatchButton />
+ <BatchWarnButton />
+ <BatchFlagButton />
+ <BatchStatusButton />
+ <BatchLevelButton />
<BindButton />
<PrintButton />
<BulkDeleteButton mutationMode={OPERATE_MODE} />
@@ -340,7 +343,7 @@
)
}
-const BatchButton = () => {
+const BatchStatusButton = () => {
const record = useRecordContext();
const notify = useNotify();
const refresh = useRefresh();
@@ -350,13 +353,85 @@
return (
<>
- <Button onClick={() => setCreateDialog(true)} label={"toolbar.batch"}>
+ <Button onClick={() => setCreateDialog(true)} label={"toolbar.batchStatus"}>
<EditIcon />
</Button>
<BatchModal
open={createDialog}
setOpen={setCreateDialog}
+ fieldType={'status'}
+ />
+ </>
+
+ )
+}
+const BatchLevelButton = () => {
+ const record = useRecordContext();
+ const notify = useNotify();
+ const refresh = useRefresh();
+
+
+ const [createDialog, setCreateDialog] = useState(false);
+
+ return (
+ <>
+ <Button onClick={() => setCreateDialog(true)} label={"toolbar.batchStockLevel"}>
+ <EditIcon />
+ </Button>
+
+ <BatchModal
+ open={createDialog}
+ setOpen={setCreateDialog}
+ fieldType={'stockLevel'}
+ />
+ </>
+
+ )
+}
+
+const BatchWarnButton = () => {
+ const record = useRecordContext();
+ const notify = useNotify();
+ const refresh = useRefresh();
+
+
+ const [createDialog, setCreateDialog] = useState(false);
+
+ return (
+ <>
+ <Button onClick={() => setCreateDialog(true)} label={"toolbar.batchValidWarn"}>
+ <EditIcon />
+ </Button>
+
+ <BatchModal
+ open={createDialog}
+ setOpen={setCreateDialog}
+ fieldType={'validWarn'}
+ />
+ </>
+
+ )
+}
+
+const BatchFlagButton = () => {
+ const record = useRecordContext();
+ const notify = useNotify();
+ const refresh = useRefresh();
+
+
+ const [createDialog, setCreateDialog] = useState(false);
+
+ return (
+ <>
+ <Button onClick={() => setCreateDialog(true)} label={"toolbar.batchFlagCheck"}>
+ <EditIcon />
+ </Button>
+
+ <BatchModal
+ open={createDialog}
+ setOpen={setCreateDialog}
+ fieldType={'flagCheck'}
/>
</>
--
Gitblit v1.9.1