From 29ef7c017c0dbbae7c62933d0fa3220f04cd8f56 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期二, 04 八月 2026 18:00:32 +0800
Subject: [PATCH] 银川 1.归档bug

---
 src/views/mes/pro/task/index.vue |   15 +++++++++++----
 1 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/src/views/mes/pro/task/index.vue b/src/views/mes/pro/task/index.vue
index e4002ea..bd75f40 100644
--- a/src/views/mes/pro/task/index.vue
+++ b/src/views/mes/pro/task/index.vue
@@ -25,7 +25,8 @@
 
 const router = useRouter();
 const ganttTasks = ref<any[]>([]); // 鐢樼壒鍥鹃瑙堟暟鎹�
-const archiveDetailRef = ref<InstanceType<typeof ArchiveDetail>>();
+const archiveVisible = ref(false);
+const archiveProductCode = ref('');
 
 const [ScheduleModal, scheduleModalApi] = useVbenModal({
   connectedComponent: ScheduleForm,
@@ -82,6 +83,12 @@
   } catch {
     message.error('鎺掍骇澶辫触');
   }
+}
+
+/** 鎵撳紑褰掓。璇︽儏 */
+function handleArchive(row: MesProWorkOrderApi.WorkOrder) {
+  archiveProductCode.value = row.productCode || '';
+  archiveVisible.value = true;
 }
 
 /** 鎵撳紑鐢樼壒鍥剧紪杈戦〉闈� */
@@ -169,14 +176,14 @@
               onClick: handleSchedule.bind(null, row),
             },
             {
-              label: '褰掓。',
+              label: '褰掓。璇︽儏',
               type: 'link',
-              onClick: () => archiveDetailRef.value?.open(row.productCode),
+              onClick: handleArchive.bind(null, row),
             },
           ]"
         />
       </template>
     </Grid>
-    <ArchiveDetail ref="archiveDetailRef" />
+    <ArchiveDetail :visible="archiveVisible" :product-code="archiveProductCode" @update:visible="archiveVisible = $event" />
   </Page>
 </template>

--
Gitblit v1.9.3