DESKTOP-LMJ82IJ\Eno
2025-04-13 cc2984eeb289b54cfa193dde558417c46f309e8f
rsf-admin/src/page/basicInfo/locAreaMat/LocAreaMatPanel.jsx
@@ -15,6 +15,8 @@
import ConfirmModal from "@/page/components/ConfirmModal";
import { DataGrid } from '@mui/x-data-grid';
import request from '@/utils/request';
import { haveChildren } from '@/utils/common';
const LocAreaMatPanel = () => {
    const record = useRecordContext();
@@ -59,6 +61,8 @@
    }
    const [parmas, setParmas] = useState({
        current: 1,
        pageSize: 99,
        areaMatId: record.id,
        locTypeId: '',
        groupId: '',
@@ -92,7 +96,7 @@
        const { data: { code, data, msg } } = await request.get(`/locAreaMatRela/groups/${record.id}`);
        if (code === 200) {
            setMatnrTree(data || [])
            setMatnrTree(haveChildren(data) || [])
        } else {
            notify(msg);
        }
@@ -102,7 +106,7 @@
        const { data: { code, data, msg } } = await request.get(`/locAreaMatRela/locType/${record.id}`);
        if (code === 200) {
            setLocTree(data || [])
            setLocTree(haveChildren(data) || [])
        } else {
            notify(msg);
        }
@@ -131,7 +135,14 @@
                    disableColumnMenu={true}
                    disableColumnSorting
                    disableMultipleColumnsSorting
                    columnBufferPx={100}
                    initialState={{
                        pagination: {
                            paginationModel: {
                                pageSize: 10,
                            },
                        },
                    }}
                    pageSizeOptions={[10]}
                />
            </Grid>
        </Grid>
@@ -235,6 +246,7 @@
    const handleNodeSelect = (event, nodeId) => {
        event.stopPropagation();
        parmas.groupId = nodeId;
        parmas.locTypeId = '';
        setParmas(parmas)
        reload()
    };
@@ -371,6 +383,7 @@
    const handleNodeSelect = (event, nodeId) => {
        event.stopPropagation();
        parmas.locTypeId = nodeId;
        parmas.groupId = '';
        setParmas(parmas)
        reload()
    };