From 4a620b306e2e0ff208dbea260f998ffce8d08e39 Mon Sep 17 00:00:00 2001
From: zhou zhou <3272660260@qq.com>
Date: 星期五, 06 三月 2026 15:46:05 +0800
Subject: [PATCH] #站点区域

---
 rsf-admin/src/page/basStationArea/BasStationAreaEdit.jsx |  120 ++++++++++++++++-------------------------------------------
 1 files changed, 33 insertions(+), 87 deletions(-)

diff --git a/rsf-admin/src/page/basStationArea/BasStationAreaEdit.jsx b/rsf-admin/src/page/basStationArea/BasStationAreaEdit.jsx
index 7eaff13..36d4940 100644
--- a/rsf-admin/src/page/basStationArea/BasStationAreaEdit.jsx
+++ b/rsf-admin/src/page/basStationArea/BasStationAreaEdit.jsx
@@ -18,7 +18,7 @@
     NumberField,
     required,
     useRecordContext,
-    DeleteButton,
+    DeleteButton, SelectArrayInput,
 } from 'react-admin';
 import { useWatch, useFormContext } from "react-hook-form";
 import { Stack, Grid, Box, Typography } from '@mui/material';
@@ -28,6 +28,8 @@
 import CustomerTopToolBar from "../components/EditTopToolBar";
 import MemoInput from "../components/MemoInput";
 import StatusSelectInput from "../components/StatusSelectInput";
+import DictionarySelect from "../components/DictionarySelect";
+import DictionaryArraySelect from "../components/DictionaryArraySelect";
 
 const FormToolbar = () => {
     const { getValues } = useFormContext();
@@ -64,13 +66,6 @@
                             {translate('common.edit.title.main')}
                         </Typography>
                         <Stack direction='row' gap={2}>
-                            <NumberInput
-                                label="table.field.basStationArea.type"
-                                source="type"
-                                autoFocus
-                            />
-                        </Stack>
-                        <Stack direction='row' gap={2}>
                             <TextInput
                                 label="table.field.basStationArea.stationAreaName"
                                 source="stationAreaName"
@@ -78,74 +73,23 @@
                             />
                         </Stack>
                         <Stack direction='row' gap={2}>
-                            <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>
                         </Stack>
                         <Stack direction='row' gap={2}>
-                            <NumberInput
-                                label="table.field.basStationArea.outAble"
-                                source="outAble"
-                            />
-                        </Stack>
-                        <Stack direction='row' gap={2}>
-                            <TextInput
-                                label="table.field.basStationArea.useStatus"
-                                source="useStatus"
-                                parse={v => v}
-                            />
-                        </Stack>
-                        <Stack direction='row' gap={2}>
-                            <NumberInput
-                                label="table.field.basStationArea.area"
-                                source="area"
-                            />
-                        </Stack>
-                        <Stack direction='row' gap={2}>
-                            <NumberInput
-                                label="table.field.basStationArea.isCrossZone"
-                                source="isCrossZone"
-                            />
-                        </Stack>
-                        <Stack direction='row' gap={2}>
-                            <TextInput
-                                label="table.field.basStationArea.crossZoneArea"
-                                source="crossZoneArea"
-                                parse={v => v}
-                            />
-                        </Stack>
-                        <Stack direction='row' gap={2}>
-                            <NumberInput
-                                label="table.field.basStationArea.isWcs"
-                                source="isWcs"
-                            />
-                        </Stack>
-                        <Stack direction='row' gap={2}>
-                            <TextInput
-                                label="table.field.basStationArea.wcsData"
-                                source="wcsData"
-                                parse={v => v}
-                            />
-                        </Stack>
-                        <Stack direction='row' gap={2}>
-                            <TextInput
-                                label="table.field.basStationArea.containerType"
-                                source="containerType"
-                                parse={v => v}
-                            />
-                        </Stack>
-                        <Stack direction='row' gap={2}>
-                            <TextInput
-                                label="table.field.basStationArea.barcode"
-                                source="barcode"
-                                parse={v => v}
-                            />
-                        </Stack>
-                        <Stack direction='row' gap={2}>
-                            <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"
                             />
                         </Stack>
                         <Stack direction='row' gap={2}>
@@ -156,21 +100,23 @@
                             />
                         </Stack>
                         <Stack direction='row' gap={2}>
-                            <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={[required()]}
+                                // validate={(value) => {
+                                //     if (value && value.length > 1) {
+                                //         return '鍙兘閫夋嫨涓�涓ā鏉�';
+                                //     }
+                                //     return undefined;
+                                // }}
+                                />
+                            </ReferenceArrayInput>
                         </Stack>
 
-                    </Grid>
-                    <Grid item xs={12} md={4}>
-                        <Typography variant="h6" gutterBottom>
-                            {translate('common.edit.title.common')}
-                        </Typography>
-                        <StatusSelectInput />
-                        <Box mt="2em" />
-                        <MemoInput />
                     </Grid>
                 </Grid>
             </SimpleForm>

--
Gitblit v1.9.1