From 5cfebd7e46c0c53f79b5fb4a917e926194ab4398 Mon Sep 17 00:00:00 2001
From: 张诺 <zhang_12370@163.com>
Date: 星期五, 24 四月 2026 14:19:14 +0800
Subject: [PATCH] feat(生产订单): 完善绑定工艺路线弹窗功能及文件预览组件

---
 src/views/productionManagement/productionOrder/index.vue |   28 ++++++++++++++++++----------
 1 files changed, 18 insertions(+), 10 deletions(-)

diff --git a/src/views/productionManagement/productionOrder/index.vue b/src/views/productionManagement/productionOrder/index.vue
index 15e7cba..d2cf5f1 100644
--- a/src/views/productionManagement/productionOrder/index.vue
+++ b/src/views/productionManagement/productionOrder/index.vue
@@ -110,7 +110,13 @@
 
   const handleBindRouteSubmit =async (data)=>{
     const res = await saveProductionProductInput(data)
-    console.log(res)
+    if(res.code === 200){
+      proxy.$modal.msgSuccess("缁戝畾鎴愬姛");
+      bindRouteDialogVisible.value = false
+      handleQuery()
+    }else{
+      proxy.$modal.msgError(res.msg || "缁戝畾澶辫触")
+    }
 
   }
 
@@ -279,18 +285,20 @@
   const openBindRouteDialog = async (row,type) => {
     bindForm.orderId = row.id;
     bindForm.routeId = null;
-    bindRouteDialogVisible.value = true;
     routeOptions.value = [];
     bindRouteLoading.value = true;
-    if(type === "view") {
-      bindDialogType.value = "view"
-      let res = await viewGetByProductWordId(row.id)
-      console.log(res)
-    }
-    BindRouteDialogRef.value?.getProductOrder()
-
     try {
-      rowData.value = row;
+      BindRouteDialogRef.value?.resetForm?.()
+      if (type === "view") {
+        bindDialogType.value = "detail"
+        const res = await viewGetByProductWordId(row.id)
+        rowData.value = res?.data || res
+      } else {
+        bindDialogType.value = "add"
+        rowData.value = row
+        rowData.value.finishedSize = row.specificationModel
+      }
+      bindRouteDialogVisible.value = true;
     } catch (e) {
       console.error("鑾峰彇宸ヨ壓璺嚎鍒楄〃澶辫触锛�", e);
       proxy.$modal.msgError("鑾峰彇宸ヨ壓璺嚎鍒楄〃澶辫触");

--
Gitblit v1.9.3