| | |
| | | Autocomplete, |
| | | Checkbox, |
| | | Chip, |
| | | Paper, |
| | | } from '@mui/material'; |
| | | import CheckBoxOutlineBlankIcon from '@mui/icons-material/CheckBoxOutlineBlank'; |
| | | import CheckBoxIcon from '@mui/icons-material/CheckBox'; |
| | |
| | | }; |
| | | |
| | | return ( |
| | | <Stack spacing={2}> |
| | | <Stack spacing={3}> |
| | | <Stack direction="row" spacing={1} alignItems="center"> |
| | | <TextField |
| | | label={translate('page.map.area.name', { _: '名称' })} |
| | | size="small" |
| | | fullWidth |
| | | variant="outlined" |
| | | value={name} |
| | | onChange={(e) => setName(e.target.value)} |
| | | /> |
| | | </Stack> |
| | | |
| | | <Box> |
| | | <Box > |
| | | <Typography variant="subtitle2" gutterBottom> |
| | | {translate('page.map.area.agv', { _: '选择AGV小车' })} |
| | | </Typography> |
| | |
| | | <Typography variant="subtitle2" gutterBottom> |
| | | {translate('page.map.area.barcodes', { _: '区域内条码集合' })} |
| | | </Typography> |
| | | <TextField |
| | | placeholder={translate('page.map.area.barcodes.placeholder', { _: '每行一个条码' })} |
| | | fullWidth |
| | | multiline |
| | | minRows={6} |
| | | maxRows={10} |
| | | value={(codeList || []).join('\n')} |
| | | InputProps={{ readOnly: true }} |
| | | /> |
| | | <Paper |
| | | variant="outlined" |
| | | sx={{ |
| | | minHeight: 220, |
| | | maxHeight: 320, |
| | | overflowY: 'auto', |
| | | p: 1, |
| | | display: 'flex', |
| | | flexWrap: 'wrap', |
| | | gap: 0.75, |
| | | }} |
| | | > |
| | | {(codeList || []).length > 0 ? ( |
| | | codeList.map((code) => ( |
| | | <Chip |
| | | key={code} |
| | | label={code} |
| | | size="small" |
| | | sx={{ fontFamily: 'monospace', fontSize: 12 }} |
| | | /> |
| | | )) |
| | | ) : ( |
| | | <Typography variant="body2" color="text.secondary"> |
| | | {translate('page.map.area.barcodes.empty', { _: '暂无条码' })} |
| | | </Typography> |
| | | )} |
| | | </Paper> |
| | | </Box> |
| | | |
| | | <Box display="flex" justifyContent="flex-start"> |