| | |
| | | const notify = useNotify(); |
| | | |
| | | const [formData, setFormData] = useState({ |
| | | "warehouseId": null, |
| | | "areaId": undefined, |
| | | "endBay": undefined, |
| | | "endLev": undefined, |
| | |
| | | <Grid container spacing={2}> |
| | | <Grid item xs={4}> |
| | | <ReferenceInput |
| | | source="warehouseId" |
| | | reference="warehouse" |
| | | > |
| | | <AutocompleteInput |
| | | label="table.field.loc.warehouseId" |
| | | optionText="name" |
| | | onChange={(value) => handleChange(value, 'warehouseId')} |
| | | value={formData.warehouseId} |
| | | validate={[required()]} |
| | | filterToQuery={(val) => ({ name: val })} |
| | | /> |
| | | </ReferenceInput> |
| | | |
| | | </Grid> |
| | | |
| | | <Grid item xs={4}> |
| | | <ReferenceInput |
| | | source="areaId" |
| | | reference="warehouseAreas" |
| | | filter={{ warehouseId: formData.warehouseId }} |
| | | > |
| | | <AutocompleteInput |
| | | label="table.field.loc.areaId" |
| | |
| | | |
| | | </Grid> |
| | | |
| | | <Grid item xs={4}> |
| | | <DictionarySelect |
| | | label={translate("table.field.loc.locType")} |
| | | name="locType" |
| | | value={formData.locType} |
| | | onChange={(e) => handleChange(e.target.value, 'locType')} |
| | | size="small" |
| | | dictTypeCode="sys_width_type" |
| | | /> |
| | | </Grid> |
| | | |
| | | <Grid item xs={4}> |
| | | <ReferenceArrayInput source="typeIds" reference="locType" > |
| | |
| | | <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 />}> |
| | | 确认 |
| | | {translate('toolbar.confirm')} |
| | | </Button> |
| | | </Box> |
| | | </DialogActions> |