From e0921e578658cc5181bcb9ff76f61ba47e6f0d76 Mon Sep 17 00:00:00 2001
From: 1 <1@123>
Date: 星期六, 24 一月 2026 08:25:49 +0800
Subject: [PATCH] lsh#

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

diff --git a/rsf-admin/src/page/basicInfo/basStation/CrossZoneAreaField.jsx b/rsf-admin/src/page/basicInfo/basStation/CrossZoneAreaField.jsx
index fc25ff4..97b0746 100644
--- a/rsf-admin/src/page/basicInfo/basStation/CrossZoneAreaField.jsx
+++ b/rsf-admin/src/page/basicInfo/basStation/CrossZoneAreaField.jsx
@@ -1,4 +1,4 @@
-import * as React from 'react';
+import { useState, useRef, useEffect, useMemo, useCallback } from 'react';
 import { Stack, Chip, Dialog, DialogTitle, DialogContent, IconButton, CircularProgress } from '@mui/material';
 import { useTranslate, useRecordContext } from 'react-admin';
 import CloseIcon from '@mui/icons-material/Close';
@@ -7,9 +7,9 @@
 const CrossZoneAreaField = () => {
     const translate = useTranslate();
     const record = useRecordContext();
-    const [open, setOpen] = React.useState(false);
-    const [areaNames, setAreaNames] = React.useState([]);
-    const [loading, setLoading] = React.useState(false);
+    const [open, setOpen] = useState(false);
+    const [areaNames, setAreaNames] = useState([]);
+    const [loading, setLoading] = useState(false);
 
     const handleOpen = () => {
         setOpen(true);
@@ -20,11 +20,11 @@
     };
 
     const fetchAreaNames = async () => {
-        if (!record?.areaIds || record.areaIds.length === 0) return;
-        
+        if (!record?.areas || record.areas.length === 0) return;
+
         setLoading(true);
-        try {            
-            const res = await request.post(`/warehouseAreas/many/${record.areaIds.join(',')}`);
+        try {
+            const res = await request.post(`/warehouseAreas/many/${record.areas.join(',')}`);
             if (res?.data?.code === 200) {
                 setAreaNames(res.data.data || []);
             }
@@ -35,11 +35,11 @@
         }
     };
 
-    React.useEffect(() => {
-        if (record?.areaIds && record.areaIds.length !== 0  && record.areaIds.length > 0) {
+    useEffect(() => {
+        if (record?.areas && record.areas.length !== 0 && record.areas.length > 0) {
             fetchAreaNames();
         }
-    }, [record]);    
+    }, [record]);
 
     if (loading) {
         return <CircularProgress size={20} />;
@@ -47,10 +47,10 @@
 
     return (
         <>
-            <Stack 
-                direction="row" 
-                gap={1} 
-                flexWrap="wrap" 
+            <Stack
+                direction="row"
+                gap={1}
+                flexWrap="wrap"
                 onClick={handleOpen}
                 sx={{ cursor: 'pointer' }}
             >
@@ -67,16 +67,16 @@
                         label={`+${areaNames.length - 1}`}
                     />
                 )}
-                {areaNames.length === 0 && record.areaIds && record.areaIds.length > 0 && (
+                {areaNames.length === 0 && record.areas && record.areas.length > 0 && (
                     <Chip
                         size="small"
-                        label={`${record.areaIds.length} 涓尯鍩焋}
+                        label={`${record.areas.length} 涓尯鍩焋}
                     />
                 )}
             </Stack>
 
-            <Dialog 
-                open={open} 
+            <Dialog
+                open={open}
                 onClose={handleClose}
                 maxWidth="md"
                 fullWidth

--
Gitblit v1.9.1