llj
2025-09-02 0417a22d1987e5722e14e227dcb7db9f9daf8510
华远报表柱状图(鼠标悬停阴影表格)修正
1个文件已修改
34 ■■■■■ 已修改文件
WebTM/views/基础资料/公用基础资料/Gy_BarCodeReport.html 34 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/»ù´¡×ÊÁÏ/¹«Óûù´¡×ÊÁÏ/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: {