From 0417a22d1987e5722e14e227dcb7db9f9daf8510 Mon Sep 17 00:00:00 2001
From: llj <132905093+newwwwwwtree@users.noreply.github.com>
Date: 星期二, 02 九月 2025 14:18:18 +0800
Subject: [PATCH] 华远报表柱状图(鼠标悬停阴影表格)修正

---
 WebTM/views/基础资料/公用基础资料/Gy_BarCodeReport.html |   34 ++++++++++++++++++++++++++++++++++
 1 files changed, 34 insertions(+), 0 deletions(-)

diff --git "a/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\205\254\347\224\250\345\237\272\347\241\200\350\265\204\346\226\231/Gy_BarCodeReport.html" "b/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\205\254\347\224\250\345\237\272\347\241\200\350\265\204\346\226\231/Gy_BarCodeReport.html"
index 703ed32..65a135b 100644
--- "a/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\205\254\347\224\250\345\237\272\347\241\200\350\265\204\346\226\231/Gy_BarCodeReport.html"
+++ "b/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\205\254\347\224\250\345\237\272\347\241\200\350\265\204\346\226\231/Gy_BarCodeReport.html"
@@ -804,6 +804,14 @@
                 //#endregion
 
                 //鏌辩姸鍥剧粦瀹氭暟鎹�
+                var MaterialMap = {};
+                option.data.forEach(function (item) {
+                    var batchNo = item['lot鎵规鍙�'] || item['HBatchNo'];
+                    var materialNo = item['鏂欏彿'];
+                    if (batchNo && materialNo) {
+                        MaterialMap[batchNo] = materialNo;
+                    }
+                });
                 // 1. 鎸夋壒娆″彿鍒嗙粍鑱氬悎
                 var batchMap = {};
                 option.data.forEach(function (item) {
@@ -870,6 +878,32 @@
                         trigger: 'axis',
                         axisPointer: {
                             type: 'shadow'
+                        },
+                        formatter: function (params) {
+                            var batchNo = params[0].name;
+                            var materialNo = MaterialMap[batchNo] || '鏈煡鏂欏彿';
+                            var result = '<div style="font-weight:bold; margin-bottom:8px; color:#2c3e50; font-size:15px;">鎵规鍙�: ' + batchNo + '</div>';
+                            result += '<div style="font-weight:bold; margin-bottom:15px; color:#6a11cb; font-size:15px; border-bottom:1px solid #eee; padding-bottom:10px;">鏂欏彿: ' + materialNo + '</div>';
+
+                            params.forEach(function (item) {
+                                var color = item.color;
+                                var value = item.value;
+
+                                if (item.seriesName === '涓嶈壇鐜�') {
+                                    result += '<div style="display:flex; align-items:center; margin:8px 0;">';
+                                    result += '<span style="display:inline-block; width:14px; height:14px; border-radius:2px; background:' + color + '; margin-right:10px;"></span>';
+                                    result += '<span style="color:#555; width:70px;">' + item.seriesName + ': </span>';
+                                    result += '<span style="font-weight:bold; color:#e04b45; margin-left:5px; font-size:15px;">' + value + '%</span>';
+                                    result += '</div>';
+                                } else {
+                                    result += '<div style="display:flex; align-items:center; margin:8px 0;">';
+                                    result += '<span style="display:inline-block; width:14px; height:14px; border-radius:2px; background:' + color + '; margin-right:10px;"></span>';
+                                    result += '<span style="color:#555; width:70px;">' + item.seriesName + ': </span>';
+                                    result += '<span style="font-weight:bold; color:#2c3e50; margin-left:5px; font-size:15px;">' + value + '</span>';
+                                    result += '</div>';
+                                }
+                            });
+                            return result;
                         }
                     },
                     legend: {

--
Gitblit v1.9.1