| | |
| | | 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; |
| | |
| | | <CreateBase |
| | | record={{}} |
| | | transform={(data) => { |
| | | return data; |
| | | return { |
| | | ...data, |
| | | containerTypes: Array.isArray(data.containerTypes) ? data.containerTypes.map(Number) : data.containerTypes |
| | | }; |
| | | }} |
| | | mutationOptions={{ onSuccess: handleSuccess, onError: handleError }} |
| | | > |
| | |
| | | </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" |
| | | /> |
| | | <ReferenceArrayInput source="crossZoneArea" reference="warehouseAreas" sort={{ field: 'sort', order: 'ASC' }}> |
| | | <SelectArrayInput |
| | | label="table.field.basStation.crossZoneArea" |
| | | optionText="name" |
| | | optionValue="id" |
| | | fullWidth |
| | | /> |
| | | </ReferenceArrayInput> |
| | | </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="containerType" |
| | | 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 |
| | | /> |
| | | </ReferenceArrayInput> |
| | | </Grid> |
| | | |
| | | <Grid item xs={6} display="flex" gap={1}> |