From 18cee3f153e61fb04b17701d63fbd51a9276122a Mon Sep 17 00:00:00 2001 From: skyouc Date: 星期五, 09 五月 2025 19:04:01 +0800 Subject: [PATCH] 新增收货单打印预览界面 --- rsf-admin/src/page/waitPakin/WaitPakinList.jsx | 30 +++++++++++++++++++++++++----- 1 files changed, 25 insertions(+), 5 deletions(-) diff --git a/rsf-admin/src/page/waitPakin/WaitPakinList.jsx b/rsf-admin/src/page/waitPakin/WaitPakinList.jsx index 362885e..82dfe95 100644 --- a/rsf-admin/src/page/waitPakin/WaitPakinList.jsx +++ b/rsf-admin/src/page/waitPakin/WaitPakinList.jsx @@ -58,7 +58,7 @@ width: 90 }, '& .opt': { - width: 180 + width: 210 }, })); @@ -93,7 +93,7 @@ const [drawerVal, setDrawerVal] = useState(false); const CreateTaskButton = () => { - const record = useRecordContext(); + const record = useRecordContext(); const notify = useNotify(); const refresh = useRefresh(); const { selectedIds, onUnselectItems, data } = useListContext(); @@ -114,9 +114,26 @@ ) } - const BulkActionButtons = () => { + const CreateTaskRowButton = () => { + const record = useRecordContext(); + const refresh = useRefresh(); + const createTask = (event) => { + event.stopPropagation(); + setSiteDialog(true) + setSource([record]) + refresh() + } + + return ( + <> + <Button onClick={(event) => createTask(event)} label={"toolbar.createTask"}> + <AddIcon /> + </Button> + </> + ) } + return ( <Box display="flex"> <List @@ -147,7 +164,7 @@ bulkActionButtons={ <> <CreateTaskButton /> - <BulkDeleteButton mutationMode={OPERATE_MODE} /> + {/* <BulkDeleteButton mutationMode={OPERATE_MODE} /> */} </>} rowClick='edit' omit={['id', 'createTime', 'createBy', 'memo']} @@ -164,7 +181,8 @@ <TextField source="memo" label="common.field.memo" sortable={false} /> <WrapperField cellClassName="opt" label="common.field.opt"> <EditButton label="toolbar.detail" sx={{ padding: '1px', fontSize: '.75rem' }} /> - {/* <DeleteButton sx={{ padding: '1px', fontSize: '.75rem' }} mutationMode={OPERATE_MODE} /> */} + <CreateTaskRowButton /> + <DeleteButton sx={{ padding: '1px', fontSize: '.75rem' }} mutationMode={OPERATE_MODE} /> </WrapperField> </StyledDatagrid> </List> @@ -186,3 +204,5 @@ export default WaitPakinList; + + -- Gitblit v1.9.1