|  |  |  | 
|---|
|  |  |  | const notify = useNotify(); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | const [formData, setFormData] = useState({ | 
|---|
|  |  |  | areaMatId: null, | 
|---|
|  |  |  | areaId: null, | 
|---|
|  |  |  | locId: null, | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | const reset = () => { | 
|---|
|  |  |  | setFormData({ | 
|---|
|  |  |  | areaMatId: null, | 
|---|
|  |  |  | areaId: null, | 
|---|
|  |  |  | locId: null, | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | 
|---|
|  |  |  | const handleSubmit = async () => { | 
|---|
|  |  |  | const parmas = { | 
|---|
|  |  |  | matnrId: selectedIds, | 
|---|
|  |  |  | areaMatId: formData.areaMatId, | 
|---|
|  |  |  | areaId: formData.areaId, | 
|---|
|  |  |  | locId: formData.locId, | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  | <Grid container spacing={2}> | 
|---|
|  |  |  | <Grid item xs={4}> | 
|---|
|  |  |  | <ReferenceInput | 
|---|
|  |  |  | source="areaMatId" | 
|---|
|  |  |  | reference="locAreaMat" | 
|---|
|  |  |  | > | 
|---|
|  |  |  | <AutocompleteInput | 
|---|
|  |  |  | label="table.field.loc.locAreaId" | 
|---|
|  |  |  | optionText="code" | 
|---|
|  |  |  | onChange={(value) => handleChange(value, 'areaMatId')} | 
|---|
|  |  |  | value={formData.areaMatId} | 
|---|
|  |  |  | validate={required()} | 
|---|
|  |  |  | filterToQuery={(val) => ({ code: val })} | 
|---|
|  |  |  | /> | 
|---|
|  |  |  | </ReferenceInput> | 
|---|
|  |  |  | </Grid> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <Grid item xs={4}> | 
|---|
|  |  |  | <ReferenceInput | 
|---|
|  |  |  | source="areaId" | 
|---|
|  |  |  | reference="warehouseAreas" | 
|---|
|  |  |  | > | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <Grid item xs={4}> | 
|---|
|  |  |  | <ReferenceArrayInput source="locId" reference="loc" > | 
|---|
|  |  |  | <ReferenceArrayInput source="locId" reference="loc" filter={{ areaId: formData.areaId }}> | 
|---|
|  |  |  | <SelectArrayInput | 
|---|
|  |  |  | label="table.field.locAreaMatRela.locId" | 
|---|
|  |  |  | validate={required()} | 
|---|