From 859b3275b6887b682b40c6ce3cc630b926dde978 Mon Sep 17 00:00:00 2001
From: yaowanxin <3588231647@qq.com>
Date: 星期三, 21 一月 2026 11:01:31 +0800
Subject: [PATCH] 首页-修复发票和回款数据映射错误

---
 src/views/index.vue |   19 ++++++++++---------
 1 files changed, 10 insertions(+), 9 deletions(-)

diff --git a/src/views/index.vue b/src/views/index.vue
index e6b22c5..9a8d411 100644
--- a/src/views/index.vue
+++ b/src/views/index.vue
@@ -473,7 +473,7 @@
 		{
 			name: '寮�绁�',
 			type: 'line',
-			data: receiptAmount,
+			data: invoiceAmount,
 			stack: 'Total',
 			areaStyle: {
 				color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
@@ -502,7 +502,7 @@
 		{
 			name: '鍥炴',
 			type: 'line',
-			data: invoiceAmount,
+			data: receiptAmount,
 			stack: 'Total',
 			lineStyle: {
 				width: 0
@@ -537,13 +537,14 @@
 		const res = await approveAndDeviceTodos()
 		const { approveTodo, deviceRepairTodo } = res.data
 		
-		// 鏄剧ず閫氱煡
-		ElNotification({
-				title: '寰呭姙浜嬮」鎻愰啋',
-				message: `褰撳墠鏈�${approveTodo}鏉″緟瀹℃壒浜嬮」锛�${deviceRepairTodo}鏉″緟缁翠慨浜嬮」`,
-				type: 'warning',
-				duration: 5000
-			})
+		// 褰揳pproveTodo鍜宒eviceRepairTodo鍚�>0鏃舵樉绀洪�氱煡
+    if (approveTodo > 0 || deviceRepairTodo > 0) {
+      ElNotification({
+			title: '寰呭姙浜嬮」鎻愰啋',
+			message: `褰撳墠鏈�${approveTodo}鏉″緟瀹℃壒浜嬮」锛�${deviceRepairTodo}鏉″緟缁翠慨浜嬮」`,
+			type: 'warning',
+			duration: 5000
+		})}
 	} catch (error) {
 		console.error('鑾峰彇鍗忓悓寰呭姙浜嬮」澶辫触:', error)
 	}

--
Gitblit v1.9.3