|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | const LocCreate = (props) => { | 
|---|
|  |  |  | const { open, setOpen } = props; | 
|---|
|  |  |  | const dicts = JSON.parse(localStorage.getItem('sys_dicts'))?.filter(dict => (dict.dictTypeCode == 'sys_loc_type')) || []; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | const translate = useTranslate(); | 
|---|
|  |  |  | const notify = useNotify(); | 
|---|
|  |  |  | 
|---|
|  |  |  | /> | 
|---|
|  |  |  | </Grid> | 
|---|
|  |  |  | <Grid item xs={6} display="flex" gap={1}> | 
|---|
|  |  |  | <ReferenceInput | 
|---|
|  |  |  | {/* <ReferenceInput | 
|---|
|  |  |  | source="type" | 
|---|
|  |  |  | reference="dictData" | 
|---|
|  |  |  | filter={{ dictTypeCode: 'sys_loc_type' }} | 
|---|
|  |  |  | 
|---|
|  |  |  | parse={v => v} | 
|---|
|  |  |  | validate={[required()]} | 
|---|
|  |  |  | /> | 
|---|
|  |  |  | </ReferenceInput> | 
|---|
|  |  |  | </ReferenceInput> */} | 
|---|
|  |  |  | <AutocompleteInput | 
|---|
|  |  |  | choices={dicts} | 
|---|
|  |  |  | source="type" | 
|---|
|  |  |  | optionText="label" | 
|---|
|  |  |  | label="table.field.loc.type" | 
|---|
|  |  |  | optionValue="value" | 
|---|
|  |  |  | parse={v => v} | 
|---|
|  |  |  | validate={[required()]} | 
|---|
|  |  |  | /> | 
|---|
|  |  |  | </Grid> | 
|---|
|  |  |  | {/* <Grid item xs={6} display="flex" gap={1}> | 
|---|
|  |  |  | <TextInput | 
|---|