From 676e73b8780c6cb49596865de81e6d806544ef10 Mon Sep 17 00:00:00 2001
From: 张诺 <zhang_12370@163.com>
Date: 星期四, 09 四月 2026 13:29:28 +0800
Subject: [PATCH] fix: 阳光印刷:添加附件功能,新增时可以上传附件、审核时要求可以预览附件.公司电话为必填项,改为选填 fix:调整供应商管理表单验证及优化知识库文件处理 - 将供应商管理中的公司电话字段改为非必填 - 移除销售报价中未使用的 delLedgerFile 导入 - 优化知识库文件上传组件,添加文件操作按钮和预览功能 - 修复知识库编辑时文件列表显示异常问题 - 统一文件下载和预览的处理逻辑

---
 src/views/collaborativeApproval/noticeManagement/index.vue |   46 +++++++++++++++++++---------------------------
 1 files changed, 19 insertions(+), 27 deletions(-)

diff --git a/src/views/collaborativeApproval/noticeManagement/index.vue b/src/views/collaborativeApproval/noticeManagement/index.vue
index 6b0ea98..0957882 100644
--- a/src/views/collaborativeApproval/noticeManagement/index.vue
+++ b/src/views/collaborativeApproval/noticeManagement/index.vue
@@ -617,34 +617,23 @@
   };
   
   if (row.id) {
-    // 缂栬緫妯″紡 - 鍏堝垹闄ゅ啀娣诲姞锛堝洜涓哄彧鏈� add 鍜� del 鎺ュ彛锛�
-    delNoticeType(row.id).then(res => {
-      if (res.code === 200) {
-        addNoticeType(data).then(addRes => {
-          if (addRes.code === 200) {
-            ElMessage.success('缂栬緫鎴愬姛');
-            row.editing = false;
-            delete row.originalNoticeType;
-            fetchNoticeTypeList().then(() => {
-              // 濡傛灉褰撳墠閫変腑鐨勭被鍨嬭缂栬緫锛岄渶瑕侀噸鏂拌幏鍙栨暟鎹�
-              if (activeNoticeTypeTab.value === String(row.id)) {
-                fetchNoticesByType(addRes.data?.id || row.id);
-              }
-            });
-          }
-        });
-      }
-    });
-  } else {
-    // 鏂板妯″紡
-    addNoticeType(data).then(res => {
-      if (res.code === 200) {
-        ElMessage.success('鏂板鎴愬姛');
-        row.editing = false;
-        fetchNoticeTypeList();
-      }
-    });
+    // 缂栬緫妯″紡 - 浼犲叆id
+    data.id = row.id;
   }
+  
+  addNoticeType(data).then(res => {
+    if (res.code === 200) {
+      ElMessage.success(row.id ? '缂栬緫鎴愬姛' : '鏂板鎴愬姛');
+      row.editing = false;
+      delete row.originalNoticeType;
+      fetchNoticeTypeList().then(() => {
+        // 濡傛灉褰撳墠閫変腑鐨勭被鍨嬭缂栬緫锛岄渶瑕侀噸鏂拌幏鍙栨暟鎹�
+        if (row.id && activeNoticeTypeTab.value === String(row.id)) {
+          fetchNoticesByType(res.data?.id || row.id);
+        }
+      });
+    }
+  });
 };
 
 const handleDeleteNoticeType = (row) => {
@@ -855,6 +844,9 @@
   color: #606266;
   line-height: 1.6;
   font-size: 14px;
+  word-break: break-all;
+  white-space: pre-wrap;
+  overflow-wrap: break-word;
 }
 
 .card-footer {

--
Gitblit v1.9.3