From 183d1e50c7b9a040e39eec36de81e5331aa7b31c Mon Sep 17 00:00:00 2001 From: verou <857149855@qq.com> Date: 星期三, 26 三月 2025 08:58:12 +0800 Subject: [PATCH] Merge branch 'devlop' of http://47.97.1.152:5880/r/wms-master into devlop --- rsf-admin/src/page/basicInfo/matnr/MatnrList.jsx | 138 ++++++++++++++++++++++++++++++++++++++++++++-- 1 files changed, 132 insertions(+), 6 deletions(-) diff --git a/rsf-admin/src/page/basicInfo/matnr/MatnrList.jsx b/rsf-admin/src/page/basicInfo/matnr/MatnrList.jsx index e27b5e6..6bfc5ee 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,12 @@ <StyledDatagrid preferenceKey='matnr' bulkActionButtons={<> - <BatchButton /> + <BatchGroupButton /> + <BatchWarnButton /> + <BatchFlagButton /> + <BatchStatusButton /> + <BatchLevelButton /> + <BindButton /> <PrintButton /> <BulkDeleteButton mutationMode={OPERATE_MODE} /> </>} @@ -334,7 +343,7 @@ ) } -const BatchButton = () => { +const BatchStatusButton = () => { const record = useRecordContext(); const notify = useNotify(); const refresh = useRefresh(); @@ -344,11 +353,106 @@ 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'} + /> + </> + + ) +} + +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} /> @@ -377,6 +481,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