skyouc
2025-07-24 bfc43ca0e4683c1c0322a6cad5d5be2bc07decc3
rsf-admin/src/page/orders/wave/WavePanel.jsx
@@ -10,9 +10,12 @@
    DateField,
    BooleanField,
    ReferenceField,
    useListContext,
    ListContextProvider,
    useList,
    useGetList,
} from 'react-admin';
import PanelTypography from "../../components/PanelTypography";
import * as Common from '@/utils/common'
import { PAGE_DRAWER_WIDTH, OPERATE_MODE, DEFAULT_PAGE_SIZE } from '@/config/setting';
import { styled } from '@mui/material/styles';
const StyledDatagrid = styled(DatagridConfigurable)(({ theme }) => ({
@@ -35,10 +38,19 @@
    const translate = useTranslate();
    const [createDialog, setCreateDialog] = useState(false);
    const [drawerVal, setDrawerVal] = useState(false);
    const { data, total, isPending, error, refetch, meta } = useGetList('/waveOrderRela', { filter: { waveId: record?.id } });
    const listContext = useList({ data, isPending });
    if (data == null || data == undefined) {
        return
    }
    return (
        <>
            <Box display="flex">
                <List resource="waveOrderRela"
                <ListContextProvider
                    value={listContext}
                    sx={{
                        flexGrow: 1,
                        transition: (theme) =>
@@ -47,7 +59,6 @@
                            }),
                        marginRight: !!drawerVal ? `${PAGE_DRAWER_WIDTH}px` : 0,
                    }}
                    filter={{ waveId: record.id }}
                    pagination={false}
                    empty={false}
                    actions={false}
@@ -71,7 +82,7 @@
                        <TextField source="stockUnit" label="table.field.asnOrderItem.stockUnit" />
                        <TextField source="splrName" label="table.field.asnOrderItem.splrName" />
                    </StyledDatagrid>
                </List>
                </ListContextProvider>
            </Box>
        </>
    );