From 2cb2fbb2663d975c3812def5c49c8b7495bfb6aa Mon Sep 17 00:00:00 2001
From: lbq <1065079612@qq.com>
Date: 星期三, 24 十二月 2025 09:58:09 +0800
Subject: [PATCH] 后端接口配合调整
---
rsf-admin/src/page/orders/preparation/MatPreparationPanel.jsx | 89 ++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 89 insertions(+), 0 deletions(-)
diff --git a/rsf-admin/src/page/orders/preparation/MatPreparationPanel.jsx b/rsf-admin/src/page/orders/preparation/MatPreparationPanel.jsx
new file mode 100644
index 0000000..7939c3b
--- /dev/null
+++ b/rsf-admin/src/page/orders/preparation/MatPreparationPanel.jsx
@@ -0,0 +1,89 @@
+import React, { useState, useRef, useEffect, useMemo } from "react";
+import { Box } from '@mui/material';
+import {
+ List,
+ DatagridConfigurable,
+ useRecordContext,
+ useTranslate,
+ TextField,
+ NumberField,
+ DateField,
+ BooleanField,
+ ReferenceField,
+} from 'react-admin';
+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 MatPreparationPanel = () => {
+ const record = useRecordContext();
+ const translate = useTranslate();
+ const [createDialog, setCreateDialog] = useState(false);
+ const [drawerVal, setDrawerVal] = useState(false);
+ return (
+ <>
+ <Box display="flex">
+ <List resource="preparationItem"
+ sx={{
+ flexGrow: 1,
+ transition: (theme) =>
+ theme.transitions.create(['all'], {
+ duration: theme.transitions.duration.enteringScreen,
+ }),
+ marginRight: !!drawerVal ? `${PAGE_DRAWER_WIDTH}px` : 0,
+ }}
+ filter={{ taskId: record.id }}
+ // title={"menu.taskItem"}
+ pagination={false}
+ empty={false}
+ actions={false}
+ >
+ <StyledDatagrid
+ preferenceKey='preparationItem'
+ bulkActionButtons={false}
+ rowClick={false}
+ expandSingle
+ omit={['id', 'taskId', 'createTime', 'createBy$', 'memo', 'taskId', 'orderId', 'orderItemId', 'matnrId']}
+ >
+ <NumberField source="id" />
+ {/* <NumberField source="taskId" label="table.field.taskItem.taskId" /> */}
+ <NumberField source="orderId" label="table.field.preparationItem.orderId" />
+ <NumberField source="orderType$" label="table.field.preparationItem.orderType" />
+ {/* <TextField source="sourceCode" label="table.field.taskItem.sourceCode" /> */}
+ <NumberField source="orderItemId" label="table.field.preparationItem.orderItemId" />
+ <NumberField source="matnrId" label="table.field.preparationItem.matnrId" />
+ <TextField source="maktx" label="table.field.preparationItem.maktx" />
+ <TextField source="matnrCode" label="table.field.preparationItem.matnrCode" />
+ <TextField source="unit" label="table.field.preparationItem.unit" />
+ <NumberField source="anfme" label="table.field.preparationItem.anfme" />
+ <TextField source="batch" label="table.field.preparationItem.batch" />
+ <TextField source="spec" label="table.field.preparationItem.spec" />
+ <TextField source="model" label="table.field.preparationItem.model" />
+ {/* <TextField source="updateBy$" label="common.field.updateBy"/>
+ <TextField source="createBy$" label="common.field.createBy"/>
+ <DateField source="updateTime" label="common.field.updateTime" showTime />
+ <DateField source="createTime" label="common.field.createTime" showTime />
+ <TextField source="memo" label="common.field.memo" sortable={false} /> */}
+ </StyledDatagrid>
+ </List>
+ </Box>
+ </>
+ );
+};
+
+export default MatPreparationPanel;
--
Gitblit v1.9.1