From 915aa93d7a0cc8e5cc3eacfe05a81025780fccf5 Mon Sep 17 00:00:00 2001
From: spring <2396852758@qq.com>
Date: 星期五, 23 一月 2026 16:37:13 +0800
Subject: [PATCH] fix: 完成工单上传附件功能

---
 src/views/productionManagement/workOrder/index.vue |   21 +++++++++++++++++++++
 1 files changed, 21 insertions(+), 0 deletions(-)

diff --git a/src/views/productionManagement/workOrder/index.vue b/src/views/productionManagement/workOrder/index.vue
index f5d2bc1..3ca6206 100644
--- a/src/views/productionManagement/workOrder/index.vue
+++ b/src/views/productionManagement/workOrder/index.vue
@@ -180,6 +180,13 @@
                     style="width: 300px"
                     placeholder="璇疯緭鍏ユ湰娆$敓浜ф暟閲�" />
         </el-form-item>
+        <el-form-item label="鎶ュ簾鏁伴噺">
+          <el-input v-model.number="reportForm.scrapQty"
+                    type="number"
+                    min="1"
+                    style="width: 300px"
+                    placeholder="璇疯緭鍏ユ姤搴熸暟閲�" />
+        </el-form-item>
         <el-form-item label="鐝粍淇℃伅">
           <el-select v-model="reportForm.userId"
                      style="width: 300px"
@@ -202,6 +209,7 @@
         </span>
       </template>
     </el-dialog>
+    <FilesDia ref="workOrderFilesRef" />
   </div>
 </template>
 
@@ -217,6 +225,7 @@
   import { getUserProfile, userListNoPageByTenantId } from "@/api/system/user.js";
   import QRCode from "qrcode";
   import { getCurrentInstance, reactive, toRefs } from "vue";
+  import FilesDia from "./components/filesDia.vue";
   const { proxy } = getCurrentInstance();
 
   const tableColumn = ref([
@@ -304,6 +313,12 @@
           },
         },
         {
+          name: "闄勪欢",
+          clickFun: row => {
+            openWorkOrderFiles(row);
+          },
+        },
+        {
           name: "鎶ュ伐",
           clickFun: row => {
             showReportDialog(row);
@@ -323,6 +338,7 @@
   const transferCardQrUrl = ref("");
   const transferCardRowData = ref(null);
   const reportDialogVisible = ref(false);
+  const workOrderFilesRef = ref(null);
   const userOptions = ref([]);
   const reportForm = reactive({
     planQuantity: 0,
@@ -427,6 +443,7 @@
     reportForm.workOrderId = row.id;
     reportForm.reportWork = row.reportWork;
     reportForm.productMainId = row.productMainId;
+    reportForm.scrapQty = row.scrapQty;
     // 鑾峰彇褰撳墠鐧诲綍鐢ㄦ埛淇℃伅锛岃缃负榛樿閫変腑
     getUserProfile()
       .then(res => {
@@ -442,6 +459,10 @@
     reportDialogVisible.value = true;
   };
 
+  const openWorkOrderFiles = row => {
+    workOrderFilesRef.value?.openDialog(row);
+  };
+
   const handleReport = () => {
     if (reportForm.planQuantity <= 0) {
       ElMessageBox.alert("寰呯敓浜ф暟閲忎负0锛屾棤娉曟姤宸�", "鎻愮ず", {

--
Gitblit v1.9.3