skyouc
2025-07-01 e59dc198187db08cf208ba5e23deb722b13d8f3a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
import React, { useState, useRef, useEffect, useMemo } from "react";
import { Box, Card, CardContent, Grid, Typography, Tooltip } from '@mui/material';
import {
    List,
    DatagridConfigurable,
    useRecordContext,
    useTranslate,
    TextField,
    NumberField,
    DateField,
    BooleanField,
    ReferenceField,
} from 'react-admin';
import PanelTypography from "../../components/PanelTypography";
import * as Common from '@/utils/common'
import { styled } from '@mui/material/styles';
 
const StyledDatagrid = styled(DatagridConfigurable)(({ theme }) => ({
    '& .css-1vooibu-MuiSvgIcon-root': {
        height: '.9em'
    },
    '& .RaDatagrid-row': {
        cursor: 'auto'
    },
    '& .column-name': {
    },
    '& .opt': {
        width: 200
    },
}));
 
const WavePanel = () => {
    const record = useRecordContext();
    if (!record) return null;
    const translate = useTranslate();
    const [createDialog, setCreateDialog] = useState(false);
    const [drawerVal, setDrawerVal] = useState(false);
    return (
        <>
            <Box display="flex">
                <List resource="waveOrderRela"
                    sx={{
                        flexGrow: 1,
                        transition: (theme) =>
                            theme.transitions.create(['all'], {
                                duration: theme.transitions.duration.enteringScreen,
                            }),
                        marginRight: !!drawerVal ? `${PAGE_DRAWER_WIDTH}px` : 0,
                    }}
                    filter={{ waveId: record.id }}
                    pagination={false}
                    empty={false}
                    actions={false}
                >
                    <StyledDatagrid
                        preferenceKey='waveOrderRela'
                        bulkActionButtons={false}
                        rowClick={false}
                        expandSingle
                        omit={['id', 'createTime', 'createBy', 'memo', 'taskId', 'orderId', 'orderItemId', 'matnrId']}
                    >
                        <NumberField source="id" />,
                        <TextField source="asnCode" label="table.field.asnOrderItem.asnCode" />
                        <TextField source="matnrCode" label="table.field.asnOrderItem.matnrCode" />
                        <TextField source="maktx" label="table.field.asnOrderItem.maktx" />
                        <TextField source="splrBatch" label="table.field.asnOrderItem.splrBatch" />
                        <TextField source="platOrderCode" label="table.field.asnOrderItem.platOrderCode" />
                        <TextField source="spec" label="table.field.asnOrderItem.spec" />
                        <TextField source="model" label="table.field.asnOrderItem.model" />
                        <NumberField source="anfme" label="table.field.asnOrderItem.anfme" />
                        <TextField source="stockUnit" label="table.field.asnOrderItem.stockUnit" />
                        <TextField source="splrName" label="table.field.asnOrderItem.splrName" />
                    </StyledDatagrid>
                </List>
            </Box>
        </>
    );
};
 
export default WavePanel;