zhou zhou
昨天 4a620b306e2e0ff208dbea260f998ffce8d08e39
rsf-admin/src/page/basStationArea/BasStationAreaCreate.jsx
@@ -17,6 +17,7 @@
    useNotify,
    Form,
    useCreateController,
    SelectArrayInput,
} from 'react-admin';
import {
    Dialog,
@@ -30,6 +31,8 @@
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;
@@ -84,13 +87,7 @@
                        </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"
@@ -99,74 +96,23 @@
                                    />
                                </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}>
@@ -177,11 +123,21 @@
                                    />
                                </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}>