From 23a2fda728ade70c01976f9624dd410b103c206f Mon Sep 17 00:00:00 2001
From: yyb <995253665@qq.com>
Date: 星期一, 27 四月 2026 10:58:12 +0800
Subject: [PATCH] 生产订单:注释掉流程路径绑定功能

---
 src/views/productionManagement/productionOrder/New.vue   |   11 ++
 src/views/productionManagement/productionOrder/index.vue |  197 ++++++++++++++++++++++++------------------------
 2 files changed, 107 insertions(+), 101 deletions(-)

diff --git a/src/views/productionManagement/productionOrder/New.vue b/src/views/productionManagement/productionOrder/New.vue
index c9c478b..c6b1a2c 100644
--- a/src/views/productionManagement/productionOrder/New.vue
+++ b/src/views/productionManagement/productionOrder/New.vue
@@ -37,7 +37,7 @@
           <el-input v-model="formState.unit"  disabled />
         </el-form-item>
 
-        <el-form-item label="宸ヨ壓璺嚎">
+        <!-- <el-form-item label="宸ヨ壓璺嚎">
           <el-select v-model="formState.routeId"
                      placeholder="璇烽�夋嫨宸ヨ壓璺嚎"
                      style="width: 100%;"
@@ -47,7 +47,7 @@
                        :label="`${item.processRouteCode || ''}`"
                        :value="item.id" />
           </el-select>
-        </el-form-item>
+        </el-form-item> -->
 
         <el-form-item
             label="闇�姹傛暟閲�"
@@ -97,6 +97,7 @@
 const formState = ref({
   productId: undefined,
   productModelId: undefined,
+  // 宸ヨ壓璺嚎ID锛氶殢浜у搧鍨嬪彿鍒囨崲鑰岄噸缃紝鐢卞伐鑹鸿矾绾夸笅鎷夋鍥炲~
   routeId: undefined,
   productName: "",
   productModelName: "",
@@ -140,14 +141,20 @@
     formState.value.productModelId = product.id;
     formState.value.unit = product.unit;
     showProductSelectDialog.value = false;
+    // 閫変腑浜у搧鍚庯紝鎸変骇鍝佸瀷鍙锋媺鍙栧彲鐢ㄥ伐鑹鸿矾绾垮苟娓呯┖鏃ч�夋嫨
     fetchRouteOptions( product.id);
     // 瑙﹀彂琛ㄥ崟楠岃瘉鏇存柊
     proxy.$refs["formRef"]?.validateField('productModelId');
   }
 };
 
+// 褰撳墠浜у搧鍨嬪彿鍙�夌殑宸ヨ壓璺嚎鍒楄〃锛堜緵 routeId 涓嬫媺妗嗗睍绀猴級
 const routeOptions = ref([]);
+// 宸ヨ壓璺嚎缁戝畾鏌ヨ鐨勫姞杞界姸鎬�
 const bindRouteLoading = ref(false);
+// 鏍规嵁浜у搧鍨嬪彿鍔犺浇宸ヨ壓璺嚎锛�
+// 1) 鍏堟竻绌哄凡閫夊伐鑹鸿矾绾匡紝閬垮厤鍨嬪彿鍒囨崲鍚庢彁浜ゆ棫 routeId
+// 2) 鍐嶆煡璇㈠苟鍥炲~ routeOptions锛屼緵鐢ㄦ埛閫夋嫨
 const fetchRouteOptions = (productModelId) => {
   formState.value.routeId = undefined;
   routeOptions.value = []
diff --git a/src/views/productionManagement/productionOrder/index.vue b/src/views/productionManagement/productionOrder/index.vue
index b722592..9c35bee 100644
--- a/src/views/productionManagement/productionOrder/index.vue
+++ b/src/views/productionManagement/productionOrder/index.vue
@@ -65,7 +65,8 @@
         </template>
       </PIMTable>
     </div>
-    <el-dialog v-model="bindRouteDialogVisible"
+    <!-- 宸ヨ壓璺嚎缁戝畾寮圭獥鏆傛椂娉ㄩ噴 -->
+    <!-- <el-dialog v-model="bindRouteDialogVisible"
                title="缁戝畾宸ヨ壓璺嚎"
                width="500px">
       <el-form label-width="90px">
@@ -89,7 +90,7 @@
           <el-button @click="bindRouteDialogVisible = false">鍙� 娑�</el-button>
         </span>
       </template>
-    </el-dialog>
+    </el-dialog> -->
 
     <new-product-order v-if="isShowNewModal"
                          v-model:visible="isShowNewModal"
@@ -104,11 +105,8 @@
   import { useRouter } from "vue-router";
   import {
     productOrderListPage,
-    listProcessRoute,
-    bindingRoute,
     listProcessBom, delProductOrder,
   } from "@/api/productionManagement/productionOrder.js";
-  import { listMain as getOrderProcessRouteMain } from "@/api/productionManagement/productProcessRoute.js";
   import {fileDel} from "@/api/financialManagement/revenueManagement.js";
   import PIMTable from "@/components/PIMTable/PIMTable.vue";
   const NewProductOrder = defineAsyncComponent(() => import("@/views/productionManagement/productionOrder/New.vue"));
@@ -182,20 +180,20 @@
       formatData: val => (val ? dayjs(val).format("YYYY-MM-DD") : ""),
       width: 120,
     },
-    {
-      dataType: "action",
-      label: "鎿嶄綔",
-      align: "center",
-      fixed: "right",
-      width: 200,
-      operation: [
-        {
-          name: "宸ヨ壓璺嚎",
-          type: "text",
-          clickFun: row => {
-            showRouteItemModal(row);
-          },
-        },
+   // {
+   //   dataType: "action",
+   //   label: "鎿嶄綔",
+   //   align: "center",
+   //   fixed: "right",
+   //   width: 200,
+   //   operation: [
+        // {
+        //   name: "宸ヨ壓璺嚎",
+        //   type: "text",
+        //   clickFun: row => {
+        //     showRouteItemModal(row);
+        //   },
+        // },
         // {
         //   name: "缁戝畾宸ヨ壓璺嚎",
         //   type: "text",
@@ -211,8 +209,8 @@
         //     showProductStructure(row);
         //   },
         // },
-      ],
-    },
+      //],
+    //},
   ]);
   const tableData = ref([]);
   const tableLoading = ref(false);
@@ -268,59 +266,59 @@
     }
   };
 
-  // 缁戝畾宸ヨ壓璺嚎寮规
-  const bindRouteDialogVisible = ref(false);
-  const bindRouteLoading = ref(false);
-  const bindRouteSaving = ref(false);
-  const routeOptions = ref([]);
-  const bindForm = reactive({
-    orderId: null,
-    routeId: null,
-  });
+  // 宸ヨ壓璺嚎缁戝畾鍔熻兘鏆傛椂娉ㄩ噴
+  // const bindRouteDialogVisible = ref(false);
+  // const bindRouteLoading = ref(false);
+  // const bindRouteSaving = ref(false);
+  // const routeOptions = ref([]);
+  // const bindForm = reactive({
+  //   orderId: null,
+  //   routeId: null,
+  // });
 
-  const openBindRouteDialog = async row => {
-    bindForm.orderId = row.id;
-    bindForm.routeId = null;
-    bindRouteDialogVisible.value = true;
-    routeOptions.value = [];
-    if (!row.productModelId) {
-      proxy.$modal.msgWarning("褰撳墠璁㈠崟缂哄皯浜у搧鍨嬪彿锛屾棤娉曟煡璇㈠伐鑹鸿矾绾�");
-      bindRouteDialogVisible.value = false;
-      return;
-    }
-    bindRouteLoading.value = true;
-    try {
-      const res = await listProcessRoute({ productModelId: row.productModelId });
-      routeOptions.value = res.data || [];
-    } catch (e) {
-      console.error("鑾峰彇宸ヨ壓璺嚎鍒楄〃澶辫触锛�", e);
-      proxy.$modal.msgError("鑾峰彇宸ヨ壓璺嚎鍒楄〃澶辫触");
-    } finally {
-      bindRouteLoading.value = false;
-    }
-  };
+  // const openBindRouteDialog = async row => {
+  //   bindForm.orderId = row.id;
+  //   bindForm.routeId = null;
+  //   bindRouteDialogVisible.value = true;
+  //   routeOptions.value = [];
+  //   if (!row.productModelId) {
+  //     proxy.$modal.msgWarning("褰撳墠璁㈠崟缂哄皯浜у搧鍨嬪彿锛屾棤娉曟煡璇㈠伐鑹鸿矾绾�");
+  //     bindRouteDialogVisible.value = false;
+  //     return;
+  //   }
+  //   bindRouteLoading.value = true;
+  //   try {
+  //     const res = await listProcessRoute({ productModelId: row.productModelId });
+  //     routeOptions.value = res.data || [];
+  //   } catch (e) {
+  //     console.error("鑾峰彇宸ヨ壓璺嚎鍒楄〃澶辫触锛�", e);
+  //     proxy.$modal.msgError("鑾峰彇宸ヨ壓璺嚎鍒楄〃澶辫触");
+  //   } finally {
+  //     bindRouteLoading.value = false;
+  //   }
+  // };
 
-  const handleBindRouteConfirm = async () => {
-    if (!bindForm.routeId) {
-      proxy.$modal.msgWarning("璇烽�夋嫨宸ヨ壓璺嚎");
-      return;
-    }
-    bindRouteSaving.value = true;
-    try {
-      await bindingRoute({
-        id: bindForm.orderId,
-        routeId: bindForm.routeId,
-      });
-      proxy.$modal.msgSuccess("缁戝畾鎴愬姛");
-      bindRouteDialogVisible.value = false;
-      getList();
-    } catch (e) {
-      console.error("缁戝畾宸ヨ壓璺嚎澶辫触锛�", e);
-      proxy.$modal.msgError("缁戝畾宸ヨ壓璺嚎澶辫触");
-    } finally {
-      bindRouteSaving.value = false;
-    }
-  };
+  // const handleBindRouteConfirm = async () => {
+  //   if (!bindForm.routeId) {
+  //     proxy.$modal.msgWarning("璇烽�夋嫨宸ヨ壓璺嚎");
+  //     return;
+  //   }
+  //   bindRouteSaving.value = true;
+  //   try {
+  //     await bindingRoute({
+  //       id: bindForm.orderId,
+  //       routeId: bindForm.routeId,
+  //     });
+  //     proxy.$modal.msgSuccess("缁戝畾鎴愬姛");
+  //     bindRouteDialogVisible.value = false;
+  //     getList();
+  //   } catch (e) {
+  //     console.error("缁戝畾宸ヨ壓璺嚎澶辫触锛�", e);
+  //     proxy.$modal.msgError("缁戝畾宸ヨ壓璺嚎澶辫触");
+  //   } finally {
+  //     bindRouteSaving.value = false;
+  //   }
+  // };
 
   // 鏌ヨ鍒楄〃
   /** 鎼滅储鎸夐挳鎿嶄綔 */
@@ -359,33 +357,34 @@
       });
   };
 
-  const showRouteItemModal = async row => {
-    const orderId = row.id;
-    try {
-      const res = await getOrderProcessRouteMain(orderId);
-      const data = res.data || {};
-      if (!data || !data.id) {
-        proxy.$modal.msgWarning("鏈壘鍒板叧鑱旂殑宸ヨ壓璺嚎");
-        return;
-      }
-      router.push({
-        path: "/productionManagement/processRouteItem",
-        query: {
-          id: data.id,
-          processRouteCode: data.processRouteCode || "",
-          productName: data.productName || "",
-          model: data.model || "",
-          bomNo: data.bomNo || "",
-          description: data.description || "",
-          orderId,
-          type: "order",
-        },
-      });
-    } catch (e) {
-      console.error("鑾峰彇宸ヨ壓璺嚎涓讳俊鎭け璐ワ細", e);
-      proxy.$modal.msgError("鑾峰彇宸ヨ壓璺嚎淇℃伅澶辫触");
-    }
-  };
+  // 宸ヨ壓璺嚎璇︽儏鍏ュ彛鏆傛椂娉ㄩ噴
+  // const showRouteItemModal = async row => {
+  //   const orderId = row.id;
+  //   try {
+  //     const res = await getOrderProcessRouteMain(orderId);
+  //     const data = res.data || {};
+  //     if (!data || !data.id) {
+  //       proxy.$modal.msgWarning("鏈壘鍒板叧鑱旂殑宸ヨ壓璺嚎");
+  //       return;
+  //     }
+  //     router.push({
+  //       path: "/productionManagement/processRouteItem",
+  //       query: {
+  //         id: data.id,
+  //         processRouteCode: data.processRouteCode || "",
+  //         productName: data.productName || "",
+  //         model: data.model || "",
+  //         bomNo: data.bomNo || "",
+  //         description: data.description || "",
+  //         orderId,
+  //         type: "order",
+  //       },
+  //     });
+  //   } catch (e) {
+  //     console.error("鑾峰彇宸ヨ壓璺嚎涓讳俊鎭け璐ワ細", e);
+  //     proxy.$modal.msgError("鑾峰彇宸ヨ壓璺嚎淇℃伅澶辫触");
+  //   }
+  // };
 
   const showProductStructure = row => {
     router.push({

--
Gitblit v1.9.3