| | |
| | | |
| | | |
| | | const notify = useNotify(); |
| | | const [disabled, setDisabled] = useState(false) |
| | | |
| | | const [formData, setFormData] = useState({ |
| | | "warehouseId": null, |
| | |
| | | }; |
| | | |
| | | const handleSubmit = async () => { |
| | | setDisabled(true) |
| | | const res = await request.post(`/loc/init`, formData); |
| | | if (res?.data?.code === 200) { |
| | | setOpen(false); |
| | |
| | | } else { |
| | | notify(res.data.msg); |
| | | } |
| | | setDisabled(false) |
| | | } |
| | | |
| | | |
| | |
| | | </DialogContent> |
| | | <DialogActions sx={{ position: 'sticky', bottom: 0, backgroundColor: 'background.paper', zIndex: 1000 }}> |
| | | <Box sx={{ width: '100%', display: 'flex', justifyContent: 'space-between' }}> |
| | | <Button type="submit" variant="contained" startIcon={<SaveIcon />}> |
| | | <Button disabled={disabled} type="submit" variant="contained" startIcon={<SaveIcon />} > |
| | | {translate('toolbar.confirm')} |
| | | </Button> |
| | | </Box> |
| | | |
| | | </DialogActions> |
| | | </Form> |
| | | </Dialog> |