|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | const translate = useTranslate(); | 
|---|
|  |  |  | const notify = useNotify(); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | const dicts = JSON.parse(localStorage.getItem('sys_dicts'))?.filter(dict => (dict.dictTypeCode == 'sys_container_type')) || []; | 
|---|
|  |  |  | const handleClose = (event, reason) => { | 
|---|
|  |  |  | if (reason !== "backdropClick") { | 
|---|
|  |  |  | setOpen(false); | 
|---|
|  |  |  | 
|---|
|  |  |  | </DialogTitle> | 
|---|
|  |  |  | <DialogContent sx={{ mt: 2 }}> | 
|---|
|  |  |  | <Grid container rowSpacing={2} columnSpacing={2}> | 
|---|
|  |  |  | <Grid item xs={6} display="flex" gap={1}> | 
|---|
|  |  |  | {/* <Grid item xs={6} display="flex" gap={1}> | 
|---|
|  |  |  | <TextInput | 
|---|
|  |  |  | label="table.field.container.code" | 
|---|
|  |  |  | source="code" | 
|---|
|  |  |  | 
|---|
|  |  |  | autoFocus | 
|---|
|  |  |  | validate={required()} | 
|---|
|  |  |  | /> | 
|---|
|  |  |  | </Grid> | 
|---|
|  |  |  | </Grid> */} | 
|---|
|  |  |  | <Grid item xs={6} display="flex" gap={1}> | 
|---|
|  |  |  | <TextInput | 
|---|
|  |  |  | label="table.field.container.name" | 
|---|
|  |  |  | 
|---|
|  |  |  | /> | 
|---|
|  |  |  | </Grid> | 
|---|
|  |  |  | <Grid item xs={6} display="flex" gap={1}> | 
|---|
|  |  |  | <NumberInput | 
|---|
|  |  |  | <AutocompleteInput | 
|---|
|  |  |  | choices={dicts} | 
|---|
|  |  |  | optionText="label" | 
|---|
|  |  |  | label="table.field.container.typeId" | 
|---|
|  |  |  | source="typeId" | 
|---|
|  |  |  | /> | 
|---|
|  |  |  | source="type" | 
|---|
|  |  |  | optionValue="value" | 
|---|
|  |  |  | parse={v => v} | 
|---|
|  |  |  | validate={[required()]} /> | 
|---|
|  |  |  | </Grid> | 
|---|
|  |  |  | <Grid item xs={6} display="flex" gap={1}> | 
|---|
|  |  |  | <NumberInput | 
|---|
|  |  |  | 
|---|
|  |  |  | <Grid item xs={6} display="flex" gap={1}> | 
|---|
|  |  |  | <NumberInput | 
|---|
|  |  |  | label="table.field.container.lenght" | 
|---|
|  |  |  | source="lenght" | 
|---|
|  |  |  | source="length" | 
|---|
|  |  |  | /> | 
|---|
|  |  |  | </Grid> | 
|---|
|  |  |  | <Grid item xs={6} display="flex" gap={1}> | 
|---|
|  |  |  | 
|---|
|  |  |  | /> | 
|---|
|  |  |  | </Grid> | 
|---|
|  |  |  | <Grid item xs={6} display="flex" gap={1}> | 
|---|
|  |  |  | <NumberInput | 
|---|
|  |  |  | label="table.field.container.panrentId" | 
|---|
|  |  |  | <ReferenceInput | 
|---|
|  |  |  | source="panrentId" | 
|---|
|  |  |  | /> | 
|---|
|  |  |  | reference="container" | 
|---|
|  |  |  | > | 
|---|
|  |  |  | <AutocompleteInput | 
|---|
|  |  |  | label="table.field.container.panrentId" | 
|---|
|  |  |  | optionText="name" | 
|---|
|  |  |  | filterToQuery={(val) => ({ name: val })} | 
|---|
|  |  |  | /> | 
|---|
|  |  |  | </ReferenceInput> | 
|---|
|  |  |  | </Grid> | 
|---|
|  |  |  | <Grid item xs={6} display="flex" gap={1}> | 
|---|
|  |  |  | <DateInput | 
|---|
|  |  |  | 
|---|
|  |  |  | source="flagRycle" | 
|---|
|  |  |  | choices={[ | 
|---|
|  |  |  | { id: 1, name: '是' }, | 
|---|
|  |  |  | { id:  0, name: '否' }, | 
|---|
|  |  |  | { id: 0, name: '否' }, | 
|---|
|  |  |  | ]} | 
|---|
|  |  |  | /> | 
|---|
|  |  |  | </Grid> | 
|---|
|  |  |  | 
|---|
|  |  |  | source="flagLogic" | 
|---|
|  |  |  | choices={[ | 
|---|
|  |  |  | { id: 1, name: '是' }, | 
|---|
|  |  |  | { id:  0, name: '否' }, | 
|---|
|  |  |  | { id: 0, name: '否' }, | 
|---|
|  |  |  | ]} | 
|---|
|  |  |  | /> | 
|---|
|  |  |  | </Grid> | 
|---|