From d086af5559dba52095d23e425be87d8f11f24814 Mon Sep 17 00:00:00 2001 From: zjj <3272660260@qq.com> Date: 星期四, 17 七月 2025 16:32:47 +0800 Subject: [PATCH] #菜单、po单 --- rsf-admin/src/page/waitPakin/WaitPakinList.jsx | 39 ++++++++++++++++++++++++++++++++------- 1 files changed, 32 insertions(+), 7 deletions(-) diff --git a/rsf-admin/src/page/waitPakin/WaitPakinList.jsx b/rsf-admin/src/page/waitPakin/WaitPakinList.jsx index 0d519b2..e63471c 100644 --- a/rsf-admin/src/page/waitPakin/WaitPakinList.jsx +++ b/rsf-admin/src/page/waitPakin/WaitPakinList.jsx @@ -58,8 +58,13 @@ width: 90 }, '& .opt': { - width: 180 + width: 210 }, + '& .MuiTableCell-root': { + whiteSpace: 'nowrap', + overflow: 'visible', + textOverflow: 'unset' + } })); const filters = [ @@ -114,9 +119,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 @@ -130,7 +152,7 @@ marginRight: drawerVal ? `${PAGE_DRAWER_WIDTH}px` : 0, }} title={"menu.waitPakin"} - empty={<EmptyData onClick={() => { setCreateDialog(true) }} />} + empty={false} filters={filters} sort={{ field: "create_time", order: "desc" }} actions={( @@ -147,10 +169,10 @@ bulkActionButtons={ <> <CreateTaskButton /> - <BulkDeleteButton mutationMode={OPERATE_MODE} /> + {/* <BulkDeleteButton mutationMode={OPERATE_MODE} /> */} </>} - rowClick='edit' - omit={['id', 'createTime', 'createBy', 'memo']} + rowClick={false} + omit={['id', 'createTime', 'createBy', 'memo','statusBool']} > <NumberField source="id" /> <TextField source="code" label="table.field.waitPakin.code" /> @@ -164,7 +186,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 +209,5 @@ export default WaitPakinList; + + -- Gitblit v1.9.1