From da15785661f7832cdcb78fb6504752c0cb385e63 Mon Sep 17 00:00:00 2001
From: chen.lin <1442464845@qq.com>
Date: 星期三, 11 二月 2026 09:59:13 +0800
Subject: [PATCH] 入库数量变更

---
 rsf-admin/src/layout/TabsBar.jsx |   60 ++++++++++++++++++++++++++++++++++++++++--------------------
 1 files changed, 40 insertions(+), 20 deletions(-)

diff --git a/rsf-admin/src/layout/TabsBar.jsx b/rsf-admin/src/layout/TabsBar.jsx
index cf1d663..3043ade 100644
--- a/rsf-admin/src/layout/TabsBar.jsx
+++ b/rsf-admin/src/layout/TabsBar.jsx
@@ -405,24 +405,24 @@
     };
 
     // 鍒ゆ柇鎸囧畾鏍囩椤垫槸鍚﹀彲浠ュ叧闂乏渚ф爣绛�
-    // const canCloseLeftForTab = (tabPath) => {
-    //     const tabIndex = tabs.findIndex(tab => tab.path === tabPath);
-    //     if (tabIndex <= 0) {
-    //         return false; // 娌℃湁宸︿晶鏍囩鎴栬繖鏄涓�涓爣绛�
-    //     }
-    //     // 妫�鏌ュ乏渚ф槸鍚︽湁鍙叧闂殑鏍囩锛堟帓闄ashboard锛�
-    //     return tabs.slice(0, tabIndex).some(tab => tab.closable);
-    // };
+    const canCloseLeftForTab = (tabPath) => {
+        const tabIndex = tabs.findIndex(tab => tab.path === tabPath || isSameResource(tab.path, tabPath));
+        if (tabIndex <= 0) {
+            return false; // 娌℃湁宸︿晶鏍囩鎴栬繖鏄涓�涓爣绛�
+        }
+        // 妫�鏌ュ乏渚ф槸鍚︽湁鍙叧闂殑鏍囩锛堟帓闄ashboard锛�
+        return tabs.slice(0, tabIndex).some(tab => tab.closable);
+    };
 
     // 鍒ゆ柇鎸囧畾鏍囩椤垫槸鍚﹀彲浠ュ叧闂彸渚ф爣绛�
-    // const canCloseRightForTab = (tabPath) => {
-    //     const tabIndex = tabs.findIndex(tab => tab.path === tabPath);
-    //     if (tabIndex < 0 || tabIndex >= tabs.length - 1) {
-    //         return false; // 娌℃湁鍙充晶鏍囩鎴栬繖鏄渶鍚庝竴涓爣绛�
-    //     }
-    //     // 妫�鏌ュ彸渚ф槸鍚︽湁鍙叧闂殑鏍囩
-    //     return tabs.slice(tabIndex + 1).some(tab => tab.closable);
-    // };
+    const canCloseRightForTab = (tabPath) => {
+        const tabIndex = tabs.findIndex(tab => tab.path === tabPath || isSameResource(tab.path, tabPath));
+        if (tabIndex < 0 || tabIndex >= tabs.length - 1) {
+            return false; // 娌℃湁鍙充晶鏍囩鎴栬繖鏄渶鍚庝竴涓爣绛�
+        }
+        // 妫�鏌ュ彸渚ф槸鍚︽湁鍙叧闂殑鏍囩
+        return tabs.slice(tabIndex + 1).some(tab => tab.closable);
+    };
 
     return (
         <Box
@@ -481,16 +481,18 @@
                                                 display: 'inline-flex',
                                                 alignItems: 'center',
                                                 justifyContent: 'center',
-                                                p: 0.25,
+                                                p: 0.35,
                                                 ml: 0.5,
                                                 borderRadius: '50%',
                                                 cursor: 'pointer',
+                                                color: 'inherit',
                                                 '&:hover': {
                                                     backgroundColor: 'rgba(0, 0, 0, 0.1)',
+                                                    color: '#d32f2f',
                                                 },
                                             }}
                                         >
-                                            <CloseIcon sx={{ fontSize: 14 }} />
+                                            <CloseIcon sx={{ fontSize: 16 }} />
                                         </Box>
                                     </Tooltip>
                                 )}
@@ -562,6 +564,7 @@
                     sx: { py: 0 },
                 }}
             >
+                {/* 鍏抽棴褰撳墠鏍囩
                 {contextMenuTab && contextMenuTab.closable && (
                     <MenuItem
                         onClick={handleCloseCurrentTab}
@@ -575,13 +578,30 @@
                         {t('ra.action.close', '鍏抽棴褰撳墠鏍囩')}
                     </MenuItem>
                 )}
+                */}
                 {contextMenuTab && canCloseLeftForTab(contextMenuTab.path) && (
-                    <MenuItem onClick={handleCloseLeftTabs}>
+                    <MenuItem
+                        onClick={handleCloseLeftTabs}
+                        sx={{
+                            fontSize: '0.8125rem',
+                            py: 0.75,
+                            px: 1.5,
+                            minHeight: 'auto',
+                        }}
+                    >
                         {t('ra.action.closeLeft', '鍏抽棴宸︿晶鏍囩')}
                     </MenuItem>
                 )}
                 {contextMenuTab && canCloseRightForTab(contextMenuTab.path) && (
-                    <MenuItem onClick={handleCloseRightTabs}>
+                    <MenuItem
+                        onClick={handleCloseRightTabs}
+                        sx={{
+                            fontSize: '0.8125rem',
+                            py: 0.75,
+                            px: 1.5,
+                            minHeight: 'auto',
+                        }}
+                    >
                         {t('ra.action.closeRight', '鍏抽棴鍙充晶鏍囩')}
                     </MenuItem>
                 )}

--
Gitblit v1.9.1