From fabc045268d2fe29ca8b0f25093b9429d5818d22 Mon Sep 17 00:00:00 2001
From: skyouc
Date: 星期三, 25 六月 2025 19:23:43 +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..f8213de 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
},
}));
@@ -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,9 +164,9 @@
bulkActionButtons={
<>
<CreateTaskButton />
- <BulkDeleteButton mutationMode={OPERATE_MODE} />
+ {/* <BulkDeleteButton mutationMode={OPERATE_MODE} /> */}
</>}
- rowClick='edit'
+ rowClick={false}
omit={['id', 'createTime', 'createBy', 'memo']}
>
<NumberField source="id" />
@@ -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