From 18b35f1400df83e20a870dbfd7e97ae9ca277cbd Mon Sep 17 00:00:00 2001
From: skyouc
Date: 星期二, 13 五月 2025 14:49:38 +0800
Subject: [PATCH] Merge branch 'devlop' of http://47.97.1.152:5880/r/wms-master into devlop

---
 rsf-admin/src/page/basicInfo/basStation/BasStationCreate.jsx |  101 +++++++++++++++++++++++++++++++-------------------
 1 files changed, 63 insertions(+), 38 deletions(-)

diff --git a/rsf-admin/src/page/basicInfo/basStation/BasStationCreate.jsx b/rsf-admin/src/page/basicInfo/basStation/BasStationCreate.jsx
index 5d82fd9..b6d60a2 100644
--- a/rsf-admin/src/page/basicInfo/basStation/BasStationCreate.jsx
+++ b/rsf-admin/src/page/basicInfo/basStation/BasStationCreate.jsx
@@ -17,6 +17,7 @@
     useNotify,
     Form,
     useCreateController,
+    SelectArrayInput,
 } from 'react-admin';
 import {
     Dialog,
@@ -30,6 +31,7 @@
 import DialogCloseButton from "../../components/DialogCloseButton";
 import StatusSelectInput from "../../components/StatusSelectInput";
 import MemoInput from "../../components/MemoInput";
+import DictionarySelect from "../../components/DictionarySelect";
 
 const BasStationCreate = (props) => {
     const { open, setOpen } = props;
@@ -90,82 +92,105 @@
                                         source="stationName"
                                         parse={v => v}
                                         autoFocus
+                                        validate={[required()]}
                                     />
                                 </Grid>
                                 <Grid item xs={6} display="flex" gap={1}>
-                                    <NumberInput
+                                    <SelectInput
                                         label="table.field.basStation.inAble"
                                         source="inAble"
+                                        choices={[
+                                            { id: 0, name: '鍚�' },
+                                            { id: 1, name: '鏄�' },
+                                        ]}
+                                        validate={[required()]}
                                     />
                                 </Grid>
                                 <Grid item xs={6} display="flex" gap={1}>
-                                    <NumberInput
+                                    <SelectInput
                                         label="table.field.basStation.outAble"
                                         source="outAble"
+                                        choices={[
+                                            { id: 0, name: '鍚�' },
+                                            { id: 1, name: '鏄�' },
+                                        ]}
+                                        validate={[required()]}
                                     />
                                 </Grid>
                                 <Grid item xs={6} display="flex" gap={1}>
-                                    <TextInput
-                                        label="table.field.basStation.useStatus"
-                                        source="useStatus"
-                                        parse={v => v}
+                                    <DictionarySelect
+                                        label={translate("table.field.basStation.useStatus")}
+                                        name="useStatus"
+                                        size="small"
+                                        validate={[required()]}
+                                        dictTypeCode="sys_sta_use_stas"
                                     />
                                 </Grid>
                                 <Grid item xs={6} display="flex" gap={1}>
-                                    <NumberInput
-                                        label="table.field.basStation.area"
-                                        source="area"
-                                    />
+                                    <ReferenceInput source="area" reference="warehouseAreas">
+                                        <SelectInput
+                                            label="table.field.basStation.area"
+                                            optionText="name"
+                                            optionValue="id"
+                                            fullWidth
+                                            validate={[required()]}
+                                        />
+                                    </ReferenceInput>
                                 </Grid>
                                 <Grid item xs={6} display="flex" gap={1}>
-                                    <NumberInput
+                                    <SelectInput
                                         label="table.field.basStation.isCrossZone"
                                         source="isCrossZone"
+                                        choices={[
+                                            { id: 0, name: '鍚�' },
+                                            { id: 1, name: '鏄�' },
+                                        ]}
+                                        validate={[required()]}
                                     />
                                 </Grid>
                                 <Grid item xs={6} display="flex" gap={1}>
-                                    <TextInput
-                                        label="table.field.basStation.crossZoneArea"
-                                        source="crossZoneArea"
-                                        parse={v => v}
-                                    />
+                                    <ReferenceArrayInput source="areaIds" reference="warehouseAreas">
+                                        <SelectArrayInput
+                                            label="table.field.basStation.crossZoneArea"
+                                            optionText="name"
+                                            optionValue="id"
+                                            fullWidth
+                                            validate={[required()]}
+                                        />
+                                    </ReferenceArrayInput>
                                 </Grid>
                                 <Grid item xs={6} display="flex" gap={1}>
-                                    <NumberInput
+                                    <SelectInput
                                         label="table.field.basStation.isWcs"
                                         source="isWcs"
+                                        choices={[
+                                            { id: 0, name: '鍚�' },
+                                            { id: 1, name: '鏄�' },
+                                        ]}
+                                        validate={[required()]}
                                     />
                                 </Grid>
                                 <Grid item xs={6} display="flex" gap={1}>
-                                    <TextInput
-                                        label="table.field.basStation.wcsData"
-                                        source="wcsData"
-                                        parse={v => v}
+                                    <DictionarySelect
+                                        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}>
-                                    <NumberInput
-                                        label="table.field.basStation.containerType"
-                                        source="containerType"
-                                    />
-                                </Grid>
-                                <Grid item xs={6} display="flex" gap={1}>
-                                    <TextInput
-                                        label="table.field.basStation.barcode"
-                                        source="barcode"
-                                        parse={v => v}
-                                    />
-                                </Grid>
-                                <Grid item xs={6} display="flex" gap={1}>
-                                    <NumberInput
+                                    <SelectInput
                                         label="table.field.basStation.autoTransfer"
                                         source="autoTransfer"
+                                        choices={[
+                                            { id: 0, name: '鍚�' },
+                                            { id: 1, name: '鏄�' },
+                                        ]}
+                                        validate={[required()]}
                                     />
                                 </Grid>
 
-                                <Grid item xs={6} display="flex" gap={1}>
-                                    <StatusSelectInput />
-                                </Grid>
                                 <Grid item xs={12} display="flex" gap={1}>
                                     <Stack direction="column" spacing={1} width={'100%'}>
                                         <MemoInput />

--
Gitblit v1.9.1