| | |
| | | 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(); |
| | |
| | | const { data: { code, data, msg } } = await request.get(`/locAreaMatRela/groups/${record.id}`); |
| | | |
| | | if (code === 200) { |
| | | setMatnrTree(data || []) |
| | | setMatnrTree(haveChildren(data) || []) |
| | | } else { |
| | | notify(msg); |
| | | } |
| | |
| | | const { data: { code, data, msg } } = await request.get(`/locAreaMatRela/locType/${record.id}`); |
| | | |
| | | if (code === 200) { |
| | | setLocTree(data || []) |
| | | setLocTree(haveChildren(data) || []) |
| | | } else { |
| | | notify(msg); |
| | | } |