| | |
| | | const InitModal = ({ open, setOpen }) => { |
| | | const refresh = useRefresh(); |
| | | const translate = useTranslate(); |
| | | |
| | | const {filterValues} = useListContext(); // 获取列表上下文 |
| | | |
| | | |
| | | const notify = useNotify(); |
| | | const [disabled, setDisabled] = useState(false) |
| | | |
| | | const [formData, setFormData] = useState({ |
| | | "warehouseId": null, |
| | | "areaId": undefined, |
| | | "warehouseId": filterValues.warehouseId, |
| | | "areaId": filterValues.areaId, |
| | | "endBay": undefined, |
| | | "endLev": undefined, |
| | | "endRow": undefined, |
| | |
| | | |
| | | return ( |
| | | <Dialog open={open} maxWidth="md" fullWidth> |
| | | <Form onSubmit={handleSubmit}> |
| | | <Form onSubmit={handleSubmit} defaultValues={filterValues}> |
| | | <DialogCloseButton onClose={handleClose} /> |
| | | <DialogTitle>{translate('toolbar.locInit')}</DialogTitle> |
| | | <DialogContent sx={{ mt: 2 }}> |
| | |
| | | reference="warehouse" |
| | | > |
| | | <AutocompleteInput |
| | | debounce |
| | | label="table.field.loc.warehouseId" |
| | | optionText="name" |
| | | onChange={(value) => handleChange(value, 'warehouseId')} |
| | |
| | | |
| | | <Grid item xs={4}> |
| | | <ReferenceArrayInput source="typeIds" reference="locType" > |
| | | <SelectArrayInput label="table.field.loc.type" onChange={(e) => handleChange(e.target.value, 'typeIds')} validate={[required()]} /> |
| | | <SelectArrayInput label="table.field.loc.type" validate={[required()]} onChange={(e) => handleChange(e.target.value, 'typeIds')} /> |
| | | </ReferenceArrayInput> |
| | | {/* <ReferenceArrayInput source="typeIds" reference="dictData" filter={{}}> |
| | | <SelectArrayInput label="table.field.loc.type" onChange={(e) => handleChange(e.target.value, 'typeIds')} validate={[required()]} /> |
| | | </ReferenceArrayInput> */} |
| | | </Grid> |
| | | |
| | | <Grid item xs={4}> |