From 7d80669e117168e89ed4de23b7a41a52616e8c2d Mon Sep 17 00:00:00 2001
From: skyouc
Date: 星期三, 07 五月 2025 16:00:02 +0800
Subject: [PATCH] ASN单导入优化
---
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