| | |
| | | const translate = useTranslate(); |
| | | const notify = useNotify(); |
| | | const refresh = useRefresh(); |
| | | const [disabled, setDisabled] = useState(false) |
| | | |
| | | const [createDialog, setCreateDialog] = useState(false); |
| | | |
| | |
| | | }; |
| | | |
| | | const handleSubmit = async () => { |
| | | setDisabled(true) |
| | | if (asnId === 0) { |
| | | const parmas = { |
| | | "orders": formData, |
| | |
| | | notify(res.data.msg); |
| | | } |
| | | } |
| | | |
| | | setDisabled(false) |
| | | |
| | | }; |
| | | |
| | |
| | | </DialogContent> |
| | | <DialogActions sx={{ position: 'sticky', bottom: 0, backgroundColor: 'background.paper', zIndex: 1000 }}> |
| | | <Toolbar sx={{ width: '100%', justifyContent: 'space-between' }} > |
| | | <Button onClick={handleSubmit} variant="contained" startIcon={<SaveIcon />}> |
| | | <Button disabled={disabled} onClick={handleSubmit} variant="contained" startIcon={<SaveIcon />}> |
| | | {translate('toolbar.confirm')} |
| | | </Button> |
| | | </Toolbar> |
| | |
| | | // flex: 1, |
| | | // }, |
| | | { |
| | | field: 'poDetlCode', |
| | | headerName: translate('table.field.asnOrderItem.poDetlCode'), |
| | | field: 'platItemId', |
| | | headerName: translate('table.field.asnOrderItem.platItemId'), |
| | | minWidth: 100, |
| | | flex: 1, |
| | | }, |