From ccc5defb8924d04abe55301937d1650a51da593f Mon Sep 17 00:00:00 2001
From: skyouc
Date: 星期三, 26 三月 2025 15:28:39 +0800
Subject: [PATCH] 仓库树状图添加Index属性,适配前端
---
rsf-admin/src/page/basicInfo/loc/LocList.jsx | 85 +++++++++++++++++++++++++++++++++++++++---
1 files changed, 79 insertions(+), 6 deletions(-)
diff --git a/rsf-admin/src/page/basicInfo/loc/LocList.jsx b/rsf-admin/src/page/basicInfo/loc/LocList.jsx
index af7f744..c218a18 100644
--- a/rsf-admin/src/page/basicInfo/loc/LocList.jsx
+++ b/rsf-admin/src/page/basicInfo/loc/LocList.jsx
@@ -85,7 +85,6 @@
source="warehouseId"
label="table.field.loc.warehouseId"
reference="warehouse"
- alwaysOn
>
<AutocompleteInput
label="table.field.loc.warehouseId"
@@ -97,7 +96,6 @@
source="areaId"
label="table.field.loc.areaId"
reference="warehouseAreas"
- alwaysOn
>
<AutocompleteInput
label="table.field.loc.areaId"
@@ -201,7 +199,10 @@
align="left"
bulkActionButtons={
<>
- <BatchButton />
+ <BatchWateButton />
+ <BatchAreasButton />
+ <BatchLocTypeButton />
+ <BatchStatusButton />
<BindButton />
<SubzoneButton />
<BulkDeleteButton />
@@ -298,7 +299,7 @@
)
}
-const BatchButton = () => {
+const BatchWateButton = () => {
const record = useRecordContext();
const notify = useNotify();
const refresh = useRefresh();
@@ -306,16 +307,88 @@
const [createDialog, setCreateDialog] = useState(false);
-
return (
<>
- <Button onClick={() => setCreateDialog(true)} label={"toolbar.batch"}>
+ <Button onClick={() => setCreateDialog(true)} label={"toolbar.batchWarehouse"}>
<EditIcon />
</Button>
<BatchModal
open={createDialog}
setOpen={setCreateDialog}
+ fieldType={'warehouseId'}
+ />
+ </>
+
+ )
+}
+
+const BatchAreasButton = () => {
+ const record = useRecordContext();
+ const notify = useNotify();
+ const refresh = useRefresh();
+
+
+ const [createDialog, setCreateDialog] = useState(false);
+
+ return (
+ <>
+ <Button onClick={() => setCreateDialog(true)} label={"toolbar.batchWarehouseAreas"}>
+ <EditIcon />
+ </Button>
+
+ <BatchModal
+ open={createDialog}
+ setOpen={setCreateDialog}
+ fieldType={'areaId'}
+ />
+ </>
+
+ )
+}
+
+const BatchLocTypeButton = () => {
+ const record = useRecordContext();
+ const notify = useNotify();
+ const refresh = useRefresh();
+
+
+ const [createDialog, setCreateDialog] = useState(false);
+
+ return (
+ <>
+ <Button onClick={() => setCreateDialog(true)} label={"toolbar.batchLocType"}>
+ <EditIcon />
+ </Button>
+
+ <BatchModal
+ open={createDialog}
+ setOpen={setCreateDialog}
+ fieldType={'typeIds'}
+ />
+ </>
+
+ )
+}
+
+const BatchStatusButton = () => {
+ const record = useRecordContext();
+ const notify = useNotify();
+ const refresh = useRefresh();
+
+
+ const [createDialog, setCreateDialog] = useState(false);
+
+ return (
+ <>
+ <Button onClick={() => setCreateDialog(true)} label={"toolbar.batchStatus"}>
+ <EditIcon />
+ </Button>
+
+ <BatchModal
+ open={createDialog}
+ setOpen={setCreateDialog}
+ fieldType={'status'}
/>
</>
--
Gitblit v1.9.1