| | |
| | | import AddIcon from '@mui/icons-material/Add'; |
| | | import request from '@/utils/request'; |
| | | import AsnSelModal from "./AsnSelModal"; |
| | | import InspectModal from "./InspectModal"; |
| | | |
| | | const StyledDatagrid = styled(DatagridConfigurable)(({ theme }) => ({ |
| | | '& .css-1vooibu-MuiSvgIcon-root': { |
| | |
| | | const record = useRecordContext(); |
| | | const notify = useNotify(); |
| | | const refresh = useRefresh(); |
| | | const inspection = () => { |
| | | // requestInspect([record]) |
| | | }; |
| | | |
| | | // const requestInspect = async (rows) => { |
| | | // const { data: { code, data, msg } } = await request.post(`/asnOrder/inspect`, rows); |
| | | |
| | | // if (code === 200) { |
| | | // notify(msg); |
| | | // refresh() |
| | | // } else { |
| | | // notify(msg); |
| | | // } |
| | | // } |
| | | const [createDialog, setCreateDialog] = useState(false); |
| | | |
| | | |
| | | return ( |
| | | <Button onClick={inspection} label={"toolbar.quality"}> |
| | | <ConstructionIcon /> |
| | | </Button> |
| | | <> |
| | | <Button onClick={() => setCreateDialog(true)} label={"toolbar.quality"}> |
| | | <ConstructionIcon /> |
| | | </Button> |
| | | |
| | | <InspectModal |
| | | open={createDialog} |
| | | setOpen={setCreateDialog} |
| | | ispectId={record.id} |
| | | /> |
| | | </> |
| | | ) |
| | | } |
| | | |