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