From 3b55fed0ba65d887969acbe118c1a868bc3b3ad0 Mon Sep 17 00:00:00 2001
From: zhangwencui <1064582902@qq.com>
Date: 星期三, 07 一月 2026 17:13:46 +0800
Subject: [PATCH] 生产报工加删除按钮

---
 src/views/productionManagement/workOrder/index.vue |   46 +++++++++++++++-------------------------------
 1 files changed, 15 insertions(+), 31 deletions(-)

diff --git a/src/views/productionManagement/workOrder/index.vue b/src/views/productionManagement/workOrder/index.vue
index 33a610b..255e317 100644
--- a/src/views/productionManagement/workOrder/index.vue
+++ b/src/views/productionManagement/workOrder/index.vue
@@ -25,19 +25,6 @@
                 :tableLoading="tableLoading"
                 @pagination="pagination"></PIMTable>
     </div>
-    <el-dialog v-model="qrDialogVisible"
-               title="浜岀淮鐮�"
-               width="300px">
-      <div style="text-align:center;">
-        <img :src="qrCodeUrl"
-             alt="浜岀淮鐮�"
-             style="width:200px;height:200px;" />
-        <div style="margin:10px 0;">
-          <el-button type="primary"
-                     @click="downloadQRCode">涓嬭浇浜岀淮鐮佸浘鐗�</el-button>
-        </div>
-      </div>
-    </el-dialog>
     <el-dialog v-model="editDialogVisible"
                title="缂栬緫鏃堕棿"
                width="500px">
@@ -262,6 +249,7 @@
       width: "200",
       align: "center",
       dataType: "action",
+      fixed: "right",
       operation: [
         {
           name: "缂栬緫",
@@ -286,7 +274,6 @@
   ]);
   const tableData = ref([]);
   const tableLoading = ref(false);
-  const qrDialogVisible = ref(false);
   const qrCodeUrl = ref("");
   const qrRowData = ref(null);
   const editDialogVisible = ref(false);
@@ -299,6 +286,11 @@
     remainingQuantity: 0,
     quantity: 0,
     userName: "",
+    workOrderId: "",
+    reportWork: "",
+    productProcessRouteItemId: "",
+    userId: "",
+    productMainId: null,
   });
   const currentReportRowData = ref(null);
   const page = reactive({
@@ -339,25 +331,13 @@
         tableLoading.value = false;
       });
   };
-  const showQRCode = async row => {
-    // 鐩存帴浣跨敤URL锛屼笉瑕佺敤JSON.stringify鍖呰
-    const qrContent = proxy.javaApi + "/device-info?deviceId=" + row.id;
-    qrCodeUrl.value = await QRCode.toDataURL(qrContent);
-    qrRowData.value = row;
-    qrDialogVisible.value = true;
-  };
-  const downloadQRCode = () => {
-    const link = document.createElement("a");
-    link.href = qrCodeUrl.value;
-    link.download = `浜岀淮鐮乢${qrRowData.value.id}.png`;
-    document.body.appendChild(link);
-    link.click();
-    document.body.removeChild(link);
-  };
 
   const showTransferCard = async row => {
     transferCardRowData.value = row;
-    const qrContent = proxy.javaApi + "/work-order?orderId=" + row.id;
+    const qrContent =
+      proxy.javaApi + "/work-order?orderRow=" + JSON.stringify(row);
+    console.log(qrContent, "qrContent");
+
     transferCardQrUrl.value = await QRCode.toDataURL(qrContent);
     transferCardVisible.value = true;
   };
@@ -388,8 +368,11 @@
   const showReportDialog = row => {
     currentReportRowData.value = row;
     reportForm.remainingQuantity = 1;
-    reportForm.quantity = 0;
+    reportForm.quantity = row.quantity;
     reportForm.productProcessRouteItemId = row.productProcessRouteItemId;
+    reportForm.workOrderId = row.id;
+    reportForm.reportWork = row.reportWork;
+    reportForm.productMainId = row.productMainId;
     // 鑾峰彇褰撳墠鐧诲綍鐢ㄦ埛淇℃伅
 
     reportDialogVisible.value = true;
@@ -408,6 +391,7 @@
       });
       return;
     }
+    // console.log(reportForm);
     addProductMain(reportForm).then(res => {
       if (res.code === 200) {
         proxy.$modal.msgSuccess("鎶ュ伐鎴愬姛");

--
Gitblit v1.9.3