|  |  |  | 
|---|
|  |  |  | Select, | 
|---|
|  |  |  | MenuItem | 
|---|
|  |  |  | } from '@mui/material'; | 
|---|
|  |  |  | import { useForm, Controller, useWatch, FormProvider, useFormContext } from "react-hook-form"; | 
|---|
|  |  |  | import DialogCloseButton from "../../components/DialogCloseButton"; | 
|---|
|  |  |  | import StatusSelectInput from "../../components/StatusSelectInput"; | 
|---|
|  |  |  | import ConfirmButton from "../../components/ConfirmButton"; | 
|---|
|  |  |  | import MatnrInfoModal from "./MatnrInfoModal"; | 
|---|
|  |  |  | import { useForm, Controller, useWatch, FormProvider, useFormContext } from "react-hook-form"; | 
|---|
|  |  |  | import SaveIcon from '@mui/icons-material/Save'; | 
|---|
|  |  |  | import request from '@/utils/request'; | 
|---|
|  |  |  | import { Add, Edit, Delete } from '@mui/icons-material'; | 
|---|
|  |  |  | import _, { set } from 'lodash'; | 
|---|
|  |  |  | import { DataGrid, useGridApiRef } from '@mui/x-data-grid'; | 
|---|
|  |  |  | import DictionarySelect from "../../components/DictionarySelect"; | 
|---|
|  |  |  | import { DataGrid, useGridApiRef } from '@mui/x-data-grid'; | 
|---|
|  |  |  | import ConfirmButton from "../../components/ConfirmButton"; | 
|---|
|  |  |  | import { Add, Edit, Delete } from '@mui/icons-material'; | 
|---|
|  |  |  | import DictSelect from "../../components/DictSelect"; | 
|---|
|  |  |  | import SaveIcon from '@mui/icons-material/Save'; | 
|---|
|  |  |  | import MatnrInfoModal from "./MatnrInfoModal"; | 
|---|
|  |  |  | import request from '@/utils/request'; | 
|---|
|  |  |  | import "./asnOrder.css"; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | const SelectMatnrModal = (props) => { | 
|---|
|  |  |  | 
|---|
|  |  |  | if (res?.data?.code === 200) { | 
|---|
|  |  |  | setOpen(false); | 
|---|
|  |  |  | refresh(); | 
|---|
|  |  |  | billReload?.current() | 
|---|
|  |  |  | resetData() | 
|---|
|  |  |  | } else { | 
|---|
|  |  |  | notify(res.data.msg); | 
|---|
|  |  |  | 
|---|
|  |  |  | if (res?.data?.code === 200) { | 
|---|
|  |  |  | setOpen(false); | 
|---|
|  |  |  | refresh(); | 
|---|
|  |  |  | billReload?.current() | 
|---|
|  |  |  | resetData() | 
|---|
|  |  |  | } else { | 
|---|
|  |  |  | notify(res.data.msg); | 
|---|
|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | const requestGetBody = async () => { | 
|---|
|  |  |  | const res = await request.post(`/outStockItem/page`, { asnId }); | 
|---|
|  |  |  | const res = await request.post(`/outStockItem/page`, { orderId: asnId }); | 
|---|
|  |  |  | if (res?.data?.code === 200) { | 
|---|
|  |  |  | setTableData(res.data.data.records) | 
|---|
|  |  |  | } else { | 
|---|
|  |  |  | 
|---|
|  |  |  | headerName: el.fieldsAlise, | 
|---|
|  |  |  | minWidth: 100, | 
|---|
|  |  |  | flex: 1, | 
|---|
|  |  |  | editable: false | 
|---|
|  |  |  | editable: el.unique, | 
|---|
|  |  |  | valueGetter: (value, row) => { | 
|---|
|  |  |  | return row.extendFields?.[el.fields] || ''; | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | })) | 
|---|
|  |  |  | setColumns([...columns, ...cols, action]) | 
|---|
|  |  |  | } else { | 
|---|