From 79a53d2f9a9a1fab7a1d889c27b8d2e2f6db0fe2 Mon Sep 17 00:00:00 2001
From: spring <2396852758@qq.com>
Date: 星期五, 03 四月 2026 10:37:01 +0800
Subject: [PATCH] fix: 出厂检修改

---
 src/views/qualityManagement/finalInspection/index.vue |   50 +++++++++++++++++++++++++++++++++++++++++++++++---
 1 files changed, 47 insertions(+), 3 deletions(-)

diff --git a/src/views/qualityManagement/finalInspection/index.vue b/src/views/qualityManagement/finalInspection/index.vue
index d2cf3b7..a9ecdfb 100644
--- a/src/views/qualityManagement/finalInspection/index.vue
+++ b/src/views/qualityManagement/finalInspection/index.vue
@@ -68,6 +68,7 @@
 import {ElMessageBox} from "element-plus";
 import {
 	downloadQualityInspect,
+	downloadOutReport,
 	qualityInspectDel,
 	qualityInspectListPage, qualityInspectUpdate,
 	submitQualityInspect
@@ -125,6 +126,10 @@
     prop: "model",
   },
   {
+    label: "UID鐮�",
+    prop: "uidNo",
+  },
+  {
     label: "鍗曚綅",
     prop: "unit",
   },
@@ -168,7 +173,7 @@
     label: "鎿嶄綔",
     align: "center",
     fixed: "right",
-    width: 280,
+    width: 340,
     operation: [
       {
         name: "缂栬緫",
@@ -186,6 +191,20 @@
 					return false;
 				}
       },
+      /*{
+        name: "濉啓妫�楠岃褰�",
+        type: "text",
+        clickFun: (row) => {
+          openInspectionForm("edit", row);
+        },
+				disabled: (row) => {
+					if (row.inspectState == 1) return true;
+					if (row.checkName) {
+						return row.checkName !== userStore.nickName;
+					}
+					return false;
+				}
+      },*/
       {
         name: "闄勪欢",
         type: "text",
@@ -228,6 +247,13 @@
 				type: "text",
 				clickFun: (row) => {
 					downLoadFile(row);
+				},
+			},
+			{
+				name: "鎶ュ憡",
+				type: "text",
+				clickFun: (row) => {
+					downloadReport(row);
 				},
 			},
     ],
@@ -390,13 +416,31 @@
 			type: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
 		})
 		const downloadUrl = window.URL.createObjectURL(blob)
-		
+
 		const link = document.createElement('a')
 		link.href = downloadUrl
 		link.download = '鍘熸潗鏂欐楠屾姤鍛�.docx'
 		document.body.appendChild(link)
 		link.click()
-		
+
+		document.body.removeChild(link)
+		window.URL.revokeObjectURL(downloadUrl)
+	})
+};
+
+const downloadReport = (row) => {
+	downloadOutReport({ id: row.id }).then((blobData) => {
+		const blob = new Blob([blobData], {
+			type: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
+		})
+		const downloadUrl = window.URL.createObjectURL(blob)
+
+		const link = document.createElement('a')
+		link.href = downloadUrl
+		link.download = '鍑哄簱妫�楠屾姤鍛�.docx'
+		document.body.appendChild(link)
+		link.click()
+
 		document.body.removeChild(link)
 		window.URL.revokeObjectURL(downloadUrl)
 	})

--
Gitblit v1.9.3