From fbae1fe559066eff0d72182ce78ad86265a446dc Mon Sep 17 00:00:00 2001
From: zjj <3272660260@qq.com>
Date: 星期二, 13 五月 2025 14:24:54 +0800
Subject: [PATCH] #Agv启动入库
---
rsf-admin/src/page/task/TaskList.jsx | 28 ++++++++++++++++------------
1 files changed, 16 insertions(+), 12 deletions(-)
diff --git a/rsf-admin/src/page/task/TaskList.jsx b/rsf-admin/src/page/task/TaskList.jsx
index 087ce49..1b85223 100644
--- a/rsf-admin/src/page/task/TaskList.jsx
+++ b/rsf-admin/src/page/task/TaskList.jsx
@@ -23,7 +23,6 @@
DateInput,
SelectInput,
NumberInput,
-
Button,
} from 'react-admin';
import { Box, Typography, Card, Stack, Drawer } from '@mui/material';
@@ -104,7 +103,7 @@
title={"menu.task"}
empty={false}
filters={filters}
- sort={{ field: "sort", order: "desc" }}
+ sort={{ field: "create_time", order: "desc" }}
actions={(
<TopToolbar>
<FilterButton />
@@ -147,7 +146,7 @@
<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">
+ <WrapperField cellClassName="opt" label="common.field.opt" onClick={(e) => e.stopPropagation()} >
<DoneButton sx={{ padding: '1px', fontSize: '.75rem' }} ></DoneButton>
<CancelButton sx={{ padding: '1px', fontSize: '.75rem' }} mutationMode={OPERATE_MODE} />
<SetTopButton sx={{ padding: '1px', fontSize: '.75rem' }} ></SetTopButton>
@@ -173,7 +172,7 @@
*/
const DoneButton = (props) => {
const record = useRecordContext();
- const notify = useNotify();
+ const notify = useNotify();
const refresh = useRefresh();
const clickComplete = (event) => {
event.stopPropagation();
@@ -207,11 +206,12 @@
const record = useRecordContext();
const notify = useNotify();
const refresh = useRefresh();
- const clickCancel = () => {
+ const clickCancel = (event) => {
+ event.stopPropagation();
cancleTask(record)
};
//鍙栨秷浠诲姟
- const cancleTask = async (row) => {
+ const cancleTask = async (row) => {
console.log(row);
const { data: { code, data, msg } } = await request.post(`/task/remove/` + row.id);
if (code === 200) {
@@ -222,11 +222,14 @@
}
}
return (
- <Button
- onClick={clickCancel}
- label="toolbar.cancel">
- <CancelIcon />
- </Button>
+ record.taskStatus === 1 ?
+ <Button
+ onClick={clickCancel}
+ label="toolbar.cancel">
+ <CancelIcon />
+ </Button>
+ :
+ <></>
)
}
/**
@@ -237,7 +240,8 @@
const record = useRecordContext();
const notify = useNotify();
const refresh = useRefresh();
- const clickTop = () => {
+ const clickTop = (event) => {
+ event.stopPropagation();
topTask(record)
};
//缃《浠诲姟
--
Gitblit v1.9.1