| | |
| | | |
| | | const CompanysEdit = () => { |
| | | const translate = useTranslate(); |
| | | const dicts = JSON.parse(localStorage.getItem('sys_dicts'))?.filter(dict => (dict.dictTypeCode == 'sys_companys_type')) || []; |
| | | |
| | | return ( |
| | | <Edit |
| | |
| | | mutationMode={EDIT_MODE} |
| | | actions={<CustomerTopToolBar />} |
| | | aside={<EditBaseAside />} |
| | | title={"menu.companys"} |
| | | > |
| | | <SimpleForm |
| | | shouldUnregister |
| | |
| | | <Typography variant="h6" gutterBottom> |
| | | {translate('common.edit.title.main')} |
| | | </Typography> |
| | | <Stack direction='row' gap={2}> |
| | | {/* <Stack direction='row' gap={2}> |
| | | <TextInput |
| | | label="table.field.companys.code" |
| | | source="code" |
| | | parse={v => v} |
| | | autoFocus |
| | | /> |
| | | </Stack> |
| | | </Stack> */} |
| | | <Stack direction='row' gap={2}> |
| | | <TextInput |
| | | label="table.field.companys.name" |
| | |
| | | /> |
| | | </Stack> |
| | | <Stack direction='row' gap={2}> |
| | | <TextInput |
| | | <AutocompleteInput |
| | | choices={dicts} |
| | | optionText="label" |
| | | label="table.field.companys.type" |
| | | source="type" |
| | | optionValue="value" |
| | | parse={v => v} |
| | | validate={required()} |
| | | /> |
| | | validate={[required()]} /> |
| | | </Stack> |
| | | <Stack direction='row' gap={2}> |
| | | <TextInput |