From 19cb529599890f0102e8771e7550a74baf4d13d5 Mon Sep 17 00:00:00 2001 From: Default User Date: Tue, 10 Feb 2026 11:44:40 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96SupplierReview=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E5=92=8CManagement=E5=9B=BE=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Management.html | 14 ++++++++++++-- SupplierReview.html | 44 +++++++++++++++++++++++++++++++------------- 2 files changed, 43 insertions(+), 15 deletions(-) diff --git a/Management.html b/Management.html index 2bd2e19..1c7ec44 100644 --- a/Management.html +++ b/Management.html @@ -1514,8 +1514,18 @@ }, // 动态计算Y轴最大值,为顶部数字留出空间 max: function(context) { - const max = Math.max(...context.chart.data.datasets[0].data); - return max + 2; // 增加Y轴最大高度,为数值标签留出更多空间 + // 获取数据集中的最大值 + const data = context.chart.data.datasets[0].data; + let max = 0; + for (let i = 0; i < data.length; i++) { + if (data[i] > max) { + max = data[i]; + } + } + // 确保最大值至少为0 + max = Math.max(max, 0); + // 增加10个单位的空间 + return max + 10; } }, x: { diff --git a/SupplierReview.html b/SupplierReview.html index b9ce908..54e26f8 100644 --- a/SupplierReview.html +++ b/SupplierReview.html @@ -1653,11 +1653,8 @@
- - - - - + +
@@ -2002,6 +1999,13 @@ } } } + // 跟进按钮 + if (e.target.classList.contains('btn-default') && e.target.closest('.action-buttons')) { + const id = e.target.getAttribute('data-id'); + if (id && e.target.textContent.trim() === '跟进') { + showFollowupModal(id); + } + } }); } @@ -2440,37 +2444,37 @@
${canReview ? ` - - - ` : canTerminate ? ` - -
审核时间:${formatTime(auditTime)}
` : canCooperate ? ` - -
审核时间:${formatTime(auditTime)}
` : ` -
@@ -2567,6 +2571,20 @@ // 显示供应商通过确认弹窗 function showSupplierApproveModal(supplierId) { currentSupplierId = supplierId; + + // 检查供应商是否有跟进信息 + const supplyItem = document.querySelector(`.supply-item[data-id="${supplierId}"]`); + if (supplyItem) { + const hasFollowup = supplyItem.querySelector('.supply-followup') !== null; + + // 如果没有跟进信息,提示用户需要先跟进并直接弹出跟进弹窗 + if (!hasFollowup) { + alert('该供应商尚未跟进,需要先添加跟进信息才能通过!'); + showFollowupModal(supplierId); + return; + } + } + approveModalEl.style.display = 'flex'; }