From 91af68093dc3a35e6fc4e584348e61076a6bcdb3 Mon Sep 17 00:00:00 2001
From: chen.lin <1442464845@qq.com>
Date: 星期五, 06 三月 2026 17:12:57 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/devlop-phyz' into devlop-phyz

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

diff --git a/rsf-admin/src/page/basStationArea/BasStationAreaEdit.jsx b/rsf-admin/src/page/basStationArea/BasStationAreaEdit.jsx
index 7eaff13..5e57d64 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();
@@ -49,6 +51,12 @@
             mutationMode={EDIT_MODE}
             actions={<CustomerTopToolBar />}
             aside={<EditBaseAside />}
+            transform={(data) => {
+                return {
+                    ...data,
+                    containerTypes: Array.isArray(data.containerTypes) ? data.containerTypes.map(Number) : data.containerTypes
+                };
+            }}
         >
             <SimpleForm
                 shouldUnregister
@@ -64,13 +72,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 +79,22 @@
                             />
                         </Stack>
                         <Stack direction='row' gap={2}>
-                            <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>
                         </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="containerType"
+                                size="small"
+                                validate={[required()]}
+                                dictTypeCode="sys_container_type"
                             />
                         </Stack>
                         <Stack direction='row' gap={2}>
@@ -156,21 +105,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