From 2b35183407eb7b1b1524f7b101f1098d9caea042 Mon Sep 17 00:00:00 2001 From: verou <857149855@qq.com> Date: 星期三, 02 四月 2025 15:13:24 +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 | 29 ++++++++++++++++++++++++++--- 1 files changed, 26 insertions(+), 3 deletions(-) diff --git a/rsf-admin/src/page/basicInfo/matnr/MatnrList.jsx b/rsf-admin/src/page/basicInfo/matnr/MatnrList.jsx index 2a7d658..99edfb3 100644 --- a/rsf-admin/src/page/basicInfo/matnr/MatnrList.jsx +++ b/rsf-admin/src/page/basicInfo/matnr/MatnrList.jsx @@ -211,7 +211,7 @@ const fields = data.map(el => <TextField key={el.fields} source={`extendFields.[${el.fields}]`} label={el.fieldsAlise} />) const opt = <WrapperField key="opt" cellClassName="fixed" className="fixed" label="common.field.opt"> <EditButton sx={{ padding: '1px', fontSize: '.75rem' }} /> - <EnableButton /> + <PrintButton /> </WrapperField> setColumns([...arr, ...fields, opt]); @@ -247,7 +247,7 @@ <BatchStatusButton /> <BatchLevelButton /> <BindButton /> - <PrintButton /> + <BatchPrintButton /> <BulkDeleteButton mutationMode={OPERATE_MODE} /> </>} rowClick={(id, resource, record) => false} @@ -461,7 +461,7 @@ ) } -const PrintButton = () => { +const BatchPrintButton = () => { const record = useRecordContext(); const { resource, selectedIds } = useListContext(); const notify = useNotify(); @@ -484,6 +484,29 @@ ) } +const PrintButton = () => { + const record = useRecordContext(); + + const notify = useNotify(); + const refresh = useRefresh(); + + const [createDialog, setCreateDialog] = useState(false); + + return ( + <> + <Button color="secondary" onClick={() => setCreateDialog(true)} label={"toolbar.print"}> + <PrintIcon /> + </Button> + + <PrintModal + open={createDialog} + setOpen={setCreateDialog} + rows={[record.id]} + /> + </> + ) +} + const BindButton = () => { const record = useRecordContext(); const notify = useNotify(); -- Gitblit v1.9.1