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/loc/LocList.jsx | 86 +++++++++++++++++++++++++++++++++++++++--- 1 files changed, 79 insertions(+), 7 deletions(-) diff --git a/rsf-admin/src/page/basicInfo/loc/LocList.jsx b/rsf-admin/src/page/basicInfo/loc/LocList.jsx index af7f744..9af0d60 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" @@ -194,14 +192,16 @@ </TopToolbar> )} perPage={DEFAULT_PAGE_SIZE} - aside={<LocListAside />} > <StyledDatagrid preferenceKey='loc' align="left" bulkActionButtons={ <> - <BatchButton /> + <BatchWateButton /> + <BatchAreasButton /> + <BatchLocTypeButton /> + <BatchStatusButton /> <BindButton /> <SubzoneButton /> <BulkDeleteButton /> @@ -298,7 +298,7 @@ ) } -const BatchButton = () => { +const BatchWateButton = () => { const record = useRecordContext(); const notify = useNotify(); const refresh = useRefresh(); @@ -306,16 +306,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