From 53eb9e72f7fff791c2d1f7a768441035b57ca7b1 Mon Sep 17 00:00:00 2001 From: skyouc Date: 星期二, 25 三月 2025 11:23:55 +0800 Subject: [PATCH] Merge branch 'front' into devlop --- rsf-admin/src/page/basicInfo/matnr/MatnrList.jsx | 57 ++++++++++++++++++++++++++++++++++++++++++++++++++++++--- 1 files changed, 54 insertions(+), 3 deletions(-) diff --git a/rsf-admin/src/page/basicInfo/matnr/MatnrList.jsx b/rsf-admin/src/page/basicInfo/matnr/MatnrList.jsx index e27b5e6..9bf7cfc 100644 --- a/rsf-admin/src/page/basicInfo/matnr/MatnrList.jsx +++ b/rsf-admin/src/page/basicInfo/matnr/MatnrList.jsx @@ -54,7 +54,10 @@ import PrintIcon from '@mui/icons-material/Print'; import request from '@/utils/request'; import BatchModal from './BatchModal'; +import BatchGropuModal from './BatchGropuModal'; import PrintModal from './PrintModal'; +import LinkIcon from '@mui/icons-material/Link'; +import BindModal from './BindModal'; const StyledDatagrid = styled(DatagridConfigurable)(({ theme }) => ({ '& .css-1vooibu-MuiSvgIcon-root': { @@ -84,10 +87,11 @@ overflow: 'hidden', textOverflow: 'ellipsis', display: 'block', - width: '100px', + width: '200px', }, '& .RaDatagrid-table': { - width: '100%' + width: '100%', + position: 'relative', } })); @@ -205,7 +209,7 @@ <TextField key="memo" source="memo" label="common.field.memo" sortable={false} />, ] const fields = data.map(el => <TextField key={el.fields} source={`extendFields.[${el.fields}]`} label={el.fieldsAlise} />) - const opt = <WrapperField key="opt" cellClassName="opt" label="common.field.opt"> + const opt = <WrapperField key="opt" cellClassName="fixed" className="fixed" label="common.field.opt"> <EditButton sx={{ padding: '1px', fontSize: '.75rem' }} /> <EnableButton /> </WrapperField> @@ -237,7 +241,9 @@ <StyledDatagrid preferenceKey='matnr' bulkActionButtons={<> + <BatchGroupButton /> <BatchButton /> + <BindButton /> <PrintButton /> <BulkDeleteButton mutationMode={OPERATE_MODE} /> </>} @@ -357,6 +363,29 @@ ) } +const BatchGroupButton = () => { + const record = useRecordContext(); + const notify = useNotify(); + const refresh = useRefresh(); + + + const [createDialog, setCreateDialog] = useState(false); + + return ( + <> + <Button onClick={() => setCreateDialog(true)} label={"toolbar.batchMatnrGropu"}> + <EditIcon /> + </Button> + + <BatchGropuModal + open={createDialog} + setOpen={setCreateDialog} + /> + </> + + ) +} + const PrintButton = () => { const record = useRecordContext(); const { resource, selectedIds } = useListContext(); @@ -377,6 +406,28 @@ rows={selectedIds} /> </> + ) +} + +const BindButton = () => { + const record = useRecordContext(); + const notify = useNotify(); + const refresh = useRefresh(); + + + const [createDialog, setCreateDialog] = useState(false); + + return ( + <> + <Button onClick={() => setCreateDialog(true)} label={"toolbar.bindloc"}> + <LinkIcon /> + </Button> + + <BindModal + open={createDialog} + setOpen={setCreateDialog} + /> + </> ) } \ No newline at end of file -- Gitblit v1.9.1