From 687fc1ffe4ba1ed43318e1b70a11b3e40146aa13 Mon Sep 17 00:00:00 2001
From: yuan <123@>
Date: 星期六, 13 六月 2026 20:12:00 +0800
Subject: [PATCH] fix: 优化生产订单查询

---
 src/views/productionManagement/productionOrder/index.vue |   31 ++-----------------------------
 1 files changed, 2 insertions(+), 29 deletions(-)

diff --git a/src/views/productionManagement/productionOrder/index.vue b/src/views/productionManagement/productionOrder/index.vue
index 315a45d..5c3d4cf 100644
--- a/src/views/productionManagement/productionOrder/index.vue
+++ b/src/views/productionManagement/productionOrder/index.vue
@@ -235,7 +235,6 @@
     getProductOrderSource,
     updateProductOrder,
   } from "@/api/productionManagement/productionOrder.js";
-  import { productWorkOrderPage } from "@/api/productionManagement/workOrder.js";
   import { listMain as getOrderProcessRouteMain } from "@/api/productionManagement/productProcessRoute.js";
   import MaterialLedgerDialog from "@/views/productionManagement/productionOrder/components/MaterialLedgerDialog.vue";
   import MaterialDetailDialog from "@/views/productionManagement/productionOrder/components/MaterialDetailDialog.vue";
@@ -664,37 +663,11 @@
   };
   const getList = () => {
     tableLoading.value = true;
-    // 鏋勯�犱竴涓柊鐨勫璞★紝涓嶅寘鍚玡ntryDate瀛楁
     const params = { ...searchForm.value, ...page };
     params.entryDate = undefined;
     productOrderListPage(params)
-      .then(async res => {
-        const records = res.data.records || [];
-        // 涓烘瘡涓鍗曟煡璇㈠搴旂殑宸ュ簭杩涘害鏁版嵁
-        const processPromises = records.map(async item => {
-          if (item.npsNo) {
-            try {
-              const workOrderRes = await productWorkOrderPage({
-                npsNo: item.npsNo,
-                size: 100,
-              });
-              const workOrders = workOrderRes.data.records || [];
-              // 鎸夌収宸ュ簭椤哄簭鎺掑簭锛堝鏋滄湁椤哄簭瀛楁锛屽亣璁句负 orderNum 鎴栨寜杩斿洖椤哄簭锛�
-              // 杞崲涓� processRouteStatus 鏍煎紡
-              const processRouteStatus = workOrders.map(wo => ({
-                name: wo.operationName || "鏈煡宸ュ簭",
-                percentage: wo.completionStatus > 100 ? 100 : wo.completionStatus,
-              }));
-              return { ...item, processRouteStatus };
-            } catch (error) {
-              console.error(`鑾峰彇宸ュ崟 ${item.npsNo} 杩涘害澶辫触:`, error);
-              return { ...item, processRouteStatus: [] };
-            }
-          }
-          return { ...item, processRouteStatus: [] };
-        });
-
-        tableData.value = await Promise.all(processPromises);
+      .then(res => {
+        tableData.value = res.data.records || [];
         page.total = res.data.total;
         tableLoading.value = false;
       })

--
Gitblit v1.9.3