From 20ae0edc104dc621fb3322aaf219143378920269 Mon Sep 17 00:00:00 2001 From: verou <857149855@qq.com> Date: 星期六, 22 三月 2025 15:14:36 +0800 Subject: [PATCH] feat:库位绑定物料 --- rsf-admin/src/page/basicInfo/locType/LocTypeList.jsx | 33 ++++++++++++++++++++++++++++++++- 1 files changed, 32 insertions(+), 1 deletions(-) diff --git a/rsf-admin/src/page/basicInfo/locType/LocTypeList.jsx b/rsf-admin/src/page/basicInfo/locType/LocTypeList.jsx index 45a4e4d..58ad20e 100644 --- a/rsf-admin/src/page/basicInfo/locType/LocTypeList.jsx +++ b/rsf-admin/src/page/basicInfo/locType/LocTypeList.jsx @@ -31,6 +31,9 @@ ReferenceArrayInput, AutocompleteInput, DeleteButton, + useRefresh, + Button, + useList } from 'react-admin'; import { Box, Typography, Card, Stack } from '@mui/material'; import { styled } from '@mui/material/styles'; @@ -42,6 +45,8 @@ import PageDrawer from "../../components/PageDrawer"; import { PAGE_DRAWER_WIDTH, OPERATE_MODE, DEFAULT_PAGE_SIZE } from '@/config/setting'; import * as Common from '@/utils/common'; +import MatnrModal from "./MatnrModal"; +import LinkIcon from '@mui/icons-material/Link'; const StyledDatagrid = styled(DatagridConfigurable)(({ theme }) => ({ '& .css-1vooibu-MuiSvgIcon-root': { @@ -109,7 +114,10 @@ > <StyledDatagrid preferenceKey='locType' - bulkActionButtons={() => <BulkDeleteButton mutationMode={OPERATE_MODE} />} + bulkActionButtons={<> + <MatnrButton /> + <BulkDeleteButton /> + </>} rowClick={(id, resource, record) => false} omit={['id', 'createTime', 'createBy', 'memo']} > @@ -150,3 +158,26 @@ } export default LocTypeList; + +const MatnrButton = () => { + const record = useRecordContext(); + const notify = useNotify(); + const refresh = useRefresh(); + + + const [createDialog, setCreateDialog] = useState(false); + + return ( + <> + <Button onClick={() => setCreateDialog(true)} label={"toolbar.bindmatnr"}> + <LinkIcon /> + </Button> + + <MatnrModal + open={createDialog} + setOpen={setCreateDialog} + /> + </> + + ) +} -- Gitblit v1.9.1