From a2d9fcb259621829bf4ec9680b5dbeac95ab5805 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期四, 15 十月 2026 16:19:54 +0800
Subject: [PATCH] fix(crm): 销售目标达成分析默认查当前季度

---
 src/views/mes/pd/archive/modules/detail.vue |   15 ++++++++++++---
 1 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/src/views/mes/pd/archive/modules/detail.vue b/src/views/mes/pd/archive/modules/detail.vue
index f767001..365fad1 100644
--- a/src/views/mes/pd/archive/modules/detail.vue
+++ b/src/views/mes/pd/archive/modules/detail.vue
@@ -43,6 +43,15 @@
   );
 }
 
+/**
+ * 璧勬枡鏂囦欢鍦板潃锛氬悗绔彧鍥� attachmentList锛堥檮浠朵腑闂磋〃锛夛紝涓氬姟琛ㄦ病鏈� fileUrl 瀛楁锛�
+ * 杩欓噷鍙栫涓�涓檮浠剁殑璁块棶鍦板潃锛屾病鏈夐檮浠跺氨杩斿洖绌轰覆锛堟ā鏉块噷鏄剧ず銆�-銆嶏級銆�
+ */
+function documentFileUrl(record: MesPdArchiveApi.DocumentInfo) {
+  const blob = record.attachmentList?.[0];
+  return blob?.url || blob?.downloadURL || '';
+}
+
 /** 褰掓。鐘舵�佷腑鏂囧悕锛氬瓧鍏� mes_pd_archive_status */
 function archiveStatusText(value?: number) {
   if (value === undefined || value === null || value === '') return '-';
@@ -170,9 +179,9 @@
             >
               <template #bodyCell="{ column, record }">
                 <template v-if="column.key === 'action'">
-                  <template v-if="record.fileUrl">
-                    <a class="mr-2" @click="openPreview(record.fileUrl, record.fileName)">棰勮</a>
-                    <a :href="record.fileUrl" target="_blank">涓嬭浇</a>
+                  <template v-if="documentFileUrl(record)">
+                    <a class="mr-2" @click="openPreview(documentFileUrl(record), record.fileName)">棰勮</a>
+                    <a :href="documentFileUrl(record)" target="_blank">涓嬭浇</a>
                   </template>
                   <span v-else class="text-gray-400">-</span>
                 </template>

--
Gitblit v1.9.3