From 85c15b5db4db8c3ed0277ec290c8a37da9ea8fb8 Mon Sep 17 00:00:00 2001
From: skyouc
Date: 星期二, 08 四月 2025 10:05:20 +0800
Subject: [PATCH] 添加关闭收货单接口
---
rsf-admin/src/page/task/TaskPanel.jsx | 90 +++++++++++++++++++++++++++++++++++++++-----
1 files changed, 79 insertions(+), 11 deletions(-)
diff --git a/rsf-admin/src/page/task/TaskPanel.jsx b/rsf-admin/src/page/task/TaskPanel.jsx
index 853c1a3..dd7db7f 100644
--- a/rsf-admin/src/page/task/TaskPanel.jsx
+++ b/rsf-admin/src/page/task/TaskPanel.jsx
@@ -1,16 +1,89 @@
import React, { useState, useRef, useEffect, useMemo } from "react";
import { Box, Card, CardContent, Grid, Typography, Tooltip } from '@mui/material';
import {
- useTranslate,
+ List,
+ DatagridConfigurable,
+ SearchInput,
+ TopToolbar,
+ SelectColumnsButton,
+ EditButton,
+ FilterButton,
+ CreateButton,
+ ExportButton,
+ BulkDeleteButton,
+ WrapperField,
useRecordContext,
+ useTranslate,
+ useNotify,
+ useListContext,
+ FunctionField,
+ TextField,
+ NumberField,
+ DateField,
+ BooleanField,
+ ReferenceField,
+ TextInput,
+ DateTimeInput,
+ DateInput,
+ SelectInput,
+ NumberInput,
+ ReferenceInput,
+ ReferenceArrayInput,
+ AutocompleteInput,
+ DeleteButton,
} from 'react-admin';
-import PanelTypography from "../components/PanelTypography";
-import * as Common from '@/utils/common'
+import { styled } from '@mui/material/styles';
+import PageDrawer from "../components/PageDrawer";
+import { PAGE_DRAWER_WIDTH, OPERATE_MODE, DEFAULT_PAGE_SIZE } from '@/config/setting';
+import * as Common from '@/utils/common';
+
+const StyledDatagrid = styled(DatagridConfigurable)(({ theme }) => ({
+ '& .css-1vooibu-MuiSvgIcon-root': {
+ height: '.9em'
+ },
+ '& .RaDatagrid-row': {
+ cursor: 'auto'
+ },
+ '& .column-name': {
+ },
+ '& .opt': {
+ width: 200
+ },
+}));
+
+const filters = [
+ <SearchInput source="condition" alwaysOn />,
+ <DateInput label='common.time.after' source="timeStart" />,
+ <DateInput label='common.time.before' source="timeEnd" />,
+ <NumberInput source="taskId" label="table.field.taskItem.taskId" />,
+ <NumberInput source="orderId" label="table.field.taskItem.orderId" />,
+ <NumberInput source="orderType" label="table.field.taskItem.orderType" />,
+ <NumberInput source="orderItemId" label="table.field.taskItem.orderItemId" />,
+ <NumberInput source="matnrId" label="table.field.taskItem.matnrId" />,
+ <TextInput source="maktx" label="table.field.taskItem.maktx" />,
+ <TextInput source="matnrCode" label="table.field.taskItem.matnrCode" />,
+ <TextInput source="unit" label="table.field.taskItem.unit" />,
+ <NumberInput source="anfme" label="table.field.taskItem.anfme" />,
+ <TextInput source="batch" label="table.field.taskItem.batch" />,
+ <TextInput source="spec" label="table.field.taskItem.spec" />,
+ <TextInput source="model" label="table.field.taskItem.model" />,
+ <TextInput label="common.field.memo" source="memo" />,
+ <SelectInput
+ label="common.field.status"
+ source="status"
+ choices={[
+ { id: '1', name: 'common.enums.statusTrue' },
+ { id: '0', name: 'common.enums.statusFalse' },
+ ]}
+ resettable
+ />,
+]
const TaskPanel = () => {
- const record = useRecordContext();
- if (!record) return null;
const translate = useTranslate();
+ const [createDialog, setCreateDialog] = useState(false);
+ const [drawerVal, setDrawerVal] = useState(false);
+
return (
<>
<Box display="flex">
@@ -30,18 +103,14 @@
actions={(
<TopToolbar>
<FilterButton />
- {/* <MyCreateButton onClick={() => { setCreateDialog(true) }} /> */}
- <SelectColumnsButton preferenceKey='taskItem' />
- {/* <MyExportButton /> */}
</TopToolbar>
)}
perPage={DEFAULT_PAGE_SIZE}
>
<StyledDatagrid
preferenceKey='taskItem'
- // bulkActionButtons={() => <BulkDeleteButton mutationMode={OPERATE_MODE} />}
+ bulkActionButtons={false}
rowClick={(id, resource, record) => false}
- // expand={() => <TaskItemPanel />}
expandSingle={true}
omit={['id', 'createTime', 'createBy', 'memo', 'taskId', 'orderId', 'orderItemId', 'matnrId']}
>
@@ -58,7 +127,6 @@
<TextField source="batch" label="table.field.taskItem.batch" />
<TextField source="spec" label="table.field.taskItem.spec" />
<TextField source="model" label="table.field.taskItem.model" />
-
<ReferenceField source="updateBy" label="common.field.updateBy" reference="user" link={false} sortable={false}>
<TextField source="nickname" />
</ReferenceField>
--
Gitblit v1.9.1