From 7354151f37391cc27462bc9d787c79f624f6e50e Mon Sep 17 00:00:00 2001
From: 647556386 <647556386@qq.com>
Date: 星期五, 09 一月 2026 11:41:09 +0800
Subject: [PATCH] 盘点,单位转换优化

---
 项目代码/WIDESEA_WMSClient/src/views/Home.vue |   27 ++++++++++++++++++++-------
 1 files changed, 20 insertions(+), 7 deletions(-)

diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/views/Home.vue" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/views/Home.vue"
index 5f50fb5..1afb2bd 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/views/Home.vue"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/views/Home.vue"
@@ -363,7 +363,6 @@
 
 // 鍒濆鍖栬繎7鏃ュ嚭鍏ュ簱瓒嬪娍鍥撅紙鍏宠仈鍚庣鏁版嵁锛�
 const initStockTrend = () => {
-  debugger
   if (!stockTrendRef.value) return;
 
   if (stockTrendChart) {
@@ -374,6 +373,12 @@
   // 浼樺厛浣跨敤鍚庣鏁版嵁
   const trendData = bigscreendata.value.dailyInOutBoundList;
   console.log('鍑哄叆搴撹秼鍔挎暟鎹�', trendData);
+
+  // 璁$畻鏁版嵁涓殑鏈�澶у�硷紝鐢ㄤ簬璁剧疆Y杞磋寖鍥�
+  const maxInbound = Math.max(...trendData.map(item => item.dailyInboundQuantity || 0));
+  const maxOutbound = Math.max(...trendData.map(item => item.dailyOutboundQuantity || 0));
+  const maxValue = Math.max(maxInbound, maxOutbound);
+  console.log('鏈�澶у�艰绠楃粨鏋�:', { maxInbound, maxOutbound, maxValue });
 
   const option = {
     tooltip: {
@@ -400,23 +405,31 @@
     },
     yAxis: {
       type: 'value',
-      name: '鏁伴噺锛堝崈浠讹級',
-      max: 25
+      name: '鏁伴噺',
+      min: 0,
+      // 鏍规嵁鏁版嵁鍔ㄦ�佽缃渶澶у�硷紝鐣欏嚭涓�浜涚┖闂�
+      max: maxValue > 0 ? Math.ceil(maxValue * 1.2) : 10
     },
     series: [
       {
         name: '鍏ュ簱閲�',
         type: 'bar',
         barWidth: '30%',
-        data: trendData.map(item => item.inNum),
-        itemStyle: { color: '#52c41a' }
+        data: trendData.map(item => item.dailyInboundQuantity),
+        itemStyle: { 
+          color: '#52c41a',
+          borderRadius: [4, 4, 0, 0]
+        }
       },
       {
         name: '鍑哄簱閲�',
         type: 'bar',
         barWidth: '30%',
-        data: trendData.map(item => item.outNum),
-        itemStyle: { color: '#1890ff' }
+        data: trendData.map(item => item.dailyOutboundQuantity),
+        itemStyle: { 
+          color: '#1890ff',
+          borderRadius: [4, 4, 0, 0]
+        }
       }
     ]
   };

--
Gitblit v1.9.3