|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | const ContainerEdit = () => { | 
|---|
|  |  |  | const translate = useTranslate(); | 
|---|
|  |  |  | const dicts = JSON.parse(localStorage.getItem('sys_dicts'))?.filter(dict => (dict.dictTypeCode == 'sys_container_type')) || []; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | return ( | 
|---|
|  |  |  | <Edit | 
|---|
|  |  |  | 
|---|
|  |  |  | mutationMode={EDIT_MODE} | 
|---|
|  |  |  | actions={<CustomerTopToolBar />} | 
|---|
|  |  |  | aside={<EditBaseAside />} | 
|---|
|  |  |  | title={"menu.container"} | 
|---|
|  |  |  | > | 
|---|
|  |  |  | <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.container.code" | 
|---|
|  |  |  | source="code" | 
|---|
|  |  |  | 
|---|
|  |  |  | autoFocus | 
|---|
|  |  |  | validate={required()} | 
|---|
|  |  |  | /> | 
|---|
|  |  |  | </Stack> | 
|---|
|  |  |  | </Stack> */} | 
|---|
|  |  |  | <Stack direction='row' gap={2}> | 
|---|
|  |  |  | <TextInput | 
|---|
|  |  |  | label="table.field.container.name" | 
|---|
|  |  |  | 
|---|
|  |  |  | /> | 
|---|
|  |  |  | </Stack> | 
|---|
|  |  |  | <Stack direction='row' gap={2}> | 
|---|
|  |  |  | <NumberInput | 
|---|
|  |  |  | <AutocompleteInput | 
|---|
|  |  |  | choices={dicts} | 
|---|
|  |  |  | optionText="label" | 
|---|
|  |  |  | label="table.field.container.typeId" | 
|---|
|  |  |  | source="typeId" | 
|---|
|  |  |  | /> | 
|---|
|  |  |  | source="type" | 
|---|
|  |  |  | optionValue="value" | 
|---|
|  |  |  | parse={v => v} | 
|---|
|  |  |  | validate={[required()]} /> | 
|---|
|  |  |  | </Stack> | 
|---|
|  |  |  | <Stack direction='row' gap={2}> | 
|---|
|  |  |  | <NumberInput | 
|---|
|  |  |  | 
|---|
|  |  |  | <Stack direction='row' gap={2}> | 
|---|
|  |  |  | <NumberInput | 
|---|
|  |  |  | label="table.field.container.lenght" | 
|---|
|  |  |  | source="lenght" | 
|---|
|  |  |  | source="length" | 
|---|
|  |  |  | /> | 
|---|
|  |  |  | </Stack> | 
|---|
|  |  |  | <Stack direction='row' gap={2}> | 
|---|
|  |  |  | 
|---|
|  |  |  | /> | 
|---|
|  |  |  | </Stack> | 
|---|
|  |  |  | <Stack direction='row' gap={2}> | 
|---|
|  |  |  | <NumberInput | 
|---|
|  |  |  | label="table.field.container.panrentId" | 
|---|
|  |  |  | <ReferenceInput | 
|---|
|  |  |  | source="panrentId" | 
|---|
|  |  |  | /> | 
|---|
|  |  |  | reference="container" | 
|---|
|  |  |  | > | 
|---|
|  |  |  | <AutocompleteInput | 
|---|
|  |  |  | label="table.field.container.panrentId" | 
|---|
|  |  |  | optionText="name" | 
|---|
|  |  |  | filterToQuery={(val) => ({ name: val })} | 
|---|
|  |  |  | /> | 
|---|
|  |  |  | </ReferenceInput> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | </Stack> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <Stack direction='row' gap={2}> | 
|---|
|  |  |  | <DateInput | 
|---|
|  |  |  | label="table.field.container.vaildTime" | 
|---|
|  |  |  | 
|---|
|  |  |  | source="flagRycle" | 
|---|
|  |  |  | choices={[ | 
|---|
|  |  |  | { id: 1, name: '是' }, | 
|---|
|  |  |  | { id:  0, name: '否' }, | 
|---|
|  |  |  | { id: 0, name: '否' }, | 
|---|
|  |  |  | ]} | 
|---|
|  |  |  | validate={required()} | 
|---|
|  |  |  | /> | 
|---|
|  |  |  | 
|---|
|  |  |  | source="flagLogic" | 
|---|
|  |  |  | choices={[ | 
|---|
|  |  |  | { id: 1, name: '是' }, | 
|---|
|  |  |  | { id:  0, name: '否' }, | 
|---|
|  |  |  | { id: 0, name: '否' }, | 
|---|
|  |  |  | ]} | 
|---|
|  |  |  | validate={required()} | 
|---|
|  |  |  | /> | 
|---|
|  |  |  | </Stack> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | </Grid> | 
|---|
|  |  |  | <Grid item xs={12} md={4}> | 
|---|
|  |  |  | {/* <Grid item xs={12} md={4}> | 
|---|
|  |  |  | <Typography variant="h6" gutterBottom> | 
|---|
|  |  |  | {translate('common.edit.title.common')} | 
|---|
|  |  |  | </Typography> | 
|---|
|  |  |  | <StatusSelectInput /> | 
|---|
|  |  |  | <Box mt="2em" /> | 
|---|
|  |  |  | <MemoInput /> | 
|---|
|  |  |  | </Grid> | 
|---|
|  |  |  | </Grid> */} | 
|---|
|  |  |  | </Grid> | 
|---|
|  |  |  | </SimpleForm> | 
|---|
|  |  |  | </Edit > | 
|---|