From 845b15a472449bc8f2632ea80f339da15c3b6356 Mon Sep 17 00:00:00 2001
From: spring <2396852758@qq.com>
Date: 星期三, 08 四月 2026 10:54:27 +0800
Subject: [PATCH] fix: 不在销售台账处出库。在发货台账处导入excel,匹配客户进行出库。销售台账处的产品列表需要展示已发货/未发货数量。

---
 src/components/PIMTable/PIMTable.vue |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/components/PIMTable/PIMTable.vue b/src/components/PIMTable/PIMTable.vue
index eb0cf87..8e22459 100644
--- a/src/components/PIMTable/PIMTable.vue
+++ b/src/components/PIMTable/PIMTable.vue
@@ -367,11 +367,11 @@
     return format(val);
   } else return val;
 };
+const validTagTypes = ["primary", "success", "info", "warning", "danger"];
 
 const formatType = (val, format) => {
-  if (typeof format === "function") {
-    return format(val);
-  } else return "";
+  const type = typeof format === "function" ? format(val) : undefined;
+  return validTagTypes.includes(type) ? type : undefined;
 };
 
 const isOperationDisabled = (operation, row) => {

--
Gitblit v1.9.3