From 4f9902403a176d8e97def29caaf525dde3585393 Mon Sep 17 00:00:00 2001
From: skyouc
Date: 星期三, 23 七月 2025 12:43:49 +0800
Subject: [PATCH] 盘点差异单功能优化
---
rsf-admin/src/page/task/TaskList.jsx | 43 +++++++++++++++++++------------------------
1 files changed, 19 insertions(+), 24 deletions(-)
diff --git a/rsf-admin/src/page/task/TaskList.jsx b/rsf-admin/src/page/task/TaskList.jsx
index 52dd7e2..4fa167a 100644
--- a/rsf-admin/src/page/task/TaskList.jsx
+++ b/rsf-admin/src/page/task/TaskList.jsx
@@ -54,6 +54,12 @@
'& .opt': {
width: 248
},
+ '& .MuiTableCell-root': {
+ whiteSpace: 'nowrap',
+ overflow: 'visible',
+ textOverflow: 'unset'
+ }
+
}));
@@ -103,8 +109,6 @@
/>,
]
-
-
return (
<Box display="flex">
<List
@@ -131,17 +135,11 @@
>
<StyledDatagrid
preferenceKey='task'
- bulkActionButtons={false
- // <>
- // <BulkResortButton />
- // <BulkCancelButton />
- // <BulkDeleteButton mutationMode={OPERATE_MODE} />
- // </>
- }
+ bulkActionButtons={false}
rowClick={false}
expand={<TaskPanel />}
expandSingle={true}
- omit={['id', 'createTime', 'createBy', 'memo', 'robotCode', 'exceStatus', 'expDesc', 'expCode', 'status']}
+ omit={['id', 'createTime', 'createBy$', 'memo', 'robotCode', 'exceStatus', 'expDesc', 'expCode', 'status','warehType$']}
>
<NumberField source="id" />
<TextField source="taskCode" label="table.field.task.taskCode" />
@@ -162,7 +160,6 @@
<TextField source="createBy$" label="common.field.createBy" />
<DateField source="updateTime" label="common.field.updateTime" showTime />
<DateField source="createTime" label="common.field.createTime" showTime />
- {/* <BooleanField source="statusBool" label="common.field.status" sortable={false} /> */}
<TextField source="memo" label="common.field.memo" sortable={false} />
<WrapperField cellClassName="opt" label="common.field.opt" onClick={(e) => e.stopPropagation()} >
<EditButton label="toolbar.detail" />
@@ -255,7 +252,7 @@
}
}
return (
- ((record?.taskStatus < 98) || (record?.taskType >= 101 && record?.taskStatus < 198)) || (record?.taskType == 11 && record?.taskStatus == 101) ? (<ConfirmButton label={"toolbar.complete"} color="secondary" startIcon={<TaskAltIcon />} onConfirm={clickComplete} />) : (<></>)
+ ((record?.taskStatus < 98) || (record?.taskType >= 101 && record?.taskStatus < 198)) || (record?.taskType == 11 && record?.taskStatus == 101) ? (<ConfirmButton label={"toolbar.complete"} color="secondary" startIcon={<TaskAltIcon />} onConfirm={clickComplete} />) : (<></>)
)
}
@@ -267,13 +264,11 @@
const record = useRecordContext();
const notify = useNotify();
const refresh = useRefresh();
- const clickCancel = (event) => {
- event.stopPropagation();
+ const clickCancel = () => {
cancleTask(record)
};
//鍙栨秷浠诲姟
const cancleTask = async (row) => {
- console.log(row);
const { data: { code, data, msg } } = await request.post(`/task/remove/` + row.id);
if (code === 200) {
notify(msg);
@@ -283,12 +278,12 @@
}
}
return (
- (record.taskStatus == 1 || record.taskStatus == 101) && (record.taskType == 1 || record.taskType == 101 || record.taskType == 10 || record.taskType == 103 || record.taskType == 11) ?
- <Button
- onClick={clickCancel}
- label="toolbar.cancel">
- <CancelIcon />
- </Button>
+ (record.taskStatus == 1 || record.taskStatus == 101) && (record.taskType == 1 || record.taskType == 101 || record.taskType == 10 || record.taskType == 107 || record.taskType == 103 || record.taskType == 11) ?
+ <ConfirmButton
+ onConfirm={clickCancel}
+ startIcon={<CancelIcon />}
+ label={"toolbar.cancel"}>
+ </ConfirmButton>
:
<></>
)
@@ -313,7 +308,7 @@
refresh();
} else {
notify(msg);
- }
+ }
}
return (
(record.taskStatus == 1 || record.taskStatus == 101) && (record.taskType == 1 || record.taskType == 101 || record.taskType == 10 || record.taskType == 103 || record.taskType == 11) ?
@@ -322,8 +317,8 @@
label="toolbar.top">
<AlignVerticalTopIcon />
</Button>
- :
- <></>
+ :
+ <></>
)
}
--
Gitblit v1.9.1