| | |
| | | useNotify, |
| | | Form, |
| | | useCreateController, |
| | | SelectArrayInput, |
| | | } from 'react-admin'; |
| | | import { |
| | | Dialog, |
| | |
| | | import DialogCloseButton from "../components/DialogCloseButton"; |
| | | import StatusSelectInput from "../components/StatusSelectInput"; |
| | | import MemoInput from "../components/MemoInput"; |
| | | import DictionarySelect from "../components/DictionarySelect"; |
| | | import DictionaryArraySelect from "../components/DictionaryArraySelect"; |
| | | |
| | | const BasStationAreaCreate = (props) => { |
| | | const { open, setOpen } = props; |
| | |
| | | </DialogTitle> |
| | | <DialogContent sx={{ mt: 2 }}> |
| | | <Grid container rowSpacing={2} columnSpacing={2}> |
| | | <Grid item xs={6} display="flex" gap={1}> |
| | | <NumberInput |
| | | label="table.field.basStationArea.type" |
| | | source="type" |
| | | autoFocus |
| | | /> |
| | | </Grid> |
| | | |
| | | <Grid item xs={6} display="flex" gap={1}> |
| | | <TextInput |
| | | label="table.field.basStationArea.stationAreaName" |
| | |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6} display="flex" gap={1}> |
| | | <NumberInput |
| | | label="table.field.basStationArea.inAble" |
| | | source="inAble" |
| | | /> |
| | | <ReferenceInput source="area" reference="warehouseAreas" sort={{ field: 'sort', order: 'ASC' }}> |
| | | <SelectInput |
| | | label="table.field.basStation.area" |
| | | optionText="name" |
| | | optionValue="id" |
| | | fullWidth |
| | | validate={[required()]} |
| | | /> |
| | | </ReferenceInput> |
| | | </Grid> |
| | | <Grid item xs={6} display="flex" gap={1}> |
| | | <NumberInput |
| | | label="table.field.basStationArea.outAble" |
| | | source="outAble" |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6} display="flex" gap={1}> |
| | | <TextInput |
| | | label="table.field.basStationArea.useStatus" |
| | | source="useStatus" |
| | | parse={v => v} |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6} display="flex" gap={1}> |
| | | <NumberInput |
| | | label="table.field.basStationArea.area" |
| | | source="area" |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6} display="flex" gap={1}> |
| | | <NumberInput |
| | | label="table.field.basStationArea.isCrossZone" |
| | | source="isCrossZone" |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6} display="flex" gap={1}> |
| | | <TextInput |
| | | label="table.field.basStationArea.crossZoneArea" |
| | | source="crossZoneArea" |
| | | parse={v => v} |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6} display="flex" gap={1}> |
| | | <NumberInput |
| | | label="table.field.basStationArea.isWcs" |
| | | source="isWcs" |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6} display="flex" gap={1}> |
| | | <TextInput |
| | | label="table.field.basStationArea.wcsData" |
| | | source="wcsData" |
| | | parse={v => v} |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6} display="flex" gap={1}> |
| | | <TextInput |
| | | label="table.field.basStationArea.containerType" |
| | | source="containerType" |
| | | parse={v => v} |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6} display="flex" gap={1}> |
| | | <TextInput |
| | | label="table.field.basStationArea.barcode" |
| | | source="barcode" |
| | | parse={v => v} |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6} display="flex" gap={1}> |
| | | <NumberInput |
| | | label="table.field.basStationArea.autoTransfer" |
| | | source="autoTransfer" |
| | | <DictionaryArraySelect |
| | | label={translate("table.field.basStation.containerType")} |
| | | name="containerTypes" |
| | | size="small" |
| | | validate={[required()]} |
| | | dictTypeCode="sys_container_type" |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6} display="flex" gap={1}> |
| | |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6} display="flex" gap={1}> |
| | | <TextInput |
| | | label="table.field.basStationArea.stationAlias" |
| | | source="stationAlias" |
| | | parse={v => v} |
| | | /> |
| | | |
| | | <ReferenceArrayInput source="stationAlias" reference="basStation"> |
| | | <SelectArrayInput |
| | | label="table.field.basStationArea.stationAlias" |
| | | optionText="stationName" |
| | | optionValue="id" |
| | | fullWidth |
| | | // validate={(value) => { |
| | | // if (value && value.length > 1) { |
| | | // return '只能选择一个模板'; |
| | | // } |
| | | // return undefined; |
| | | // }} |
| | | /> |
| | | </ReferenceArrayInput> |
| | | </Grid> |
| | | |
| | | <Grid item xs={6} display="flex" gap={1}> |