From 31dda75430ca0d281d0b19ffb5bdb0d291fe797c Mon Sep 17 00:00:00 2001
From: yyb <995253665@qq.com>
Date: 星期四, 02 四月 2026 17:05:26 +0800
Subject: [PATCH] 产品维护页面新增字段单位
---
src/views/customerService/feedbackRegistration/index.vue | 14 +++++++++-----
1 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/src/views/customerService/feedbackRegistration/index.vue b/src/views/customerService/feedbackRegistration/index.vue
index 3a2d362..e307dda 100644
--- a/src/views/customerService/feedbackRegistration/index.vue
+++ b/src/views/customerService/feedbackRegistration/index.vue
@@ -404,15 +404,19 @@
});
};
+const getStatsCountByStatus = (list, status) => {
+ if (!Array.isArray(list)) return 0;
+ return list.find((item) => item?.status === status)?.count || 0;
+};
+
// 鑾峰彇缁熻鏁版嵁骞跺埛鏂伴《閮ㄥ崱鐗�
const getSalesLedgerDetails = () => {
getSalesLedgerDetail({}).then((res) => {
if (res.code === 200) {
- statsList.value[0].count = res.data.filter((item) => item.status === 3)[0].count;
- statsList.value[1].count = res.data.filter((item) => item.status === 2)[0].count;
- statsList.value[2].count = res.data.filter((item) => item.status === 1)[0].count;
-
- // });
+ const statsData = Array.isArray(res.data) ? res.data : [];
+ statsList.value[0].count = getStatsCountByStatus(statsData, 3);
+ statsList.value[1].count = getStatsCountByStatus(statsData, 2);
+ statsList.value[2].count = getStatsCountByStatus(statsData, 1);
}
});
}
--
Gitblit v1.9.3