From 9ea5ff67655241271bdf04bb50ca3a8d60c4e22a Mon Sep 17 00:00:00 2001
From: yuan <123@>
Date: 星期二, 11 八月 2026 15:07:02 +0800
Subject: [PATCH] fix: 用河南鹤壁代码覆盖山西长治

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

diff --git a/src/views/productionManagement/productionOrder/index.vue b/src/views/productionManagement/productionOrder/index.vue
index ba1d155..5c3d4cf 100644
--- a/src/views/productionManagement/productionOrder/index.vue
+++ b/src/views/productionManagement/productionOrder/index.vue
@@ -8,7 +8,7 @@
                     placeholder="璇疯緭鍏�"
                     clearable
                     prefix-icon="Search"
-                    style="width: 160px"
+                    style="width: 160px;"
                     @change="handleQuery" />
         </el-form-item>
         <el-form-item label="浜у搧鍚嶇О:">
@@ -16,7 +16,7 @@
                     placeholder="璇疯緭鍏�"
                     clearable
                     prefix-icon="Search"
-                    style="width: 160px"
+                    style="width: 160px;"
                     @change="handleQuery" />
         </el-form-item>
         <el-form-item label="瑙勬牸:">
@@ -24,13 +24,13 @@
                     placeholder="璇疯緭鍏�"
                     clearable
                     prefix-icon="Search"
-                    style="width: 160px"
+                    style="width: 160px;"
                     @change="handleQuery" />
         </el-form-item>
         <el-form-item label="鐘舵��:">
           <el-select v-model="searchForm.status"
                      placeholder="璇烽�夋嫨"
-                     style="width: 160px"
+                     style="width: 160px;"
                      @change="handleQuery">
             <el-option label="寰呭紑濮�"
                        value="1" />
@@ -38,8 +38,8 @@
                        value="2" />
             <el-option label="宸插畬鎴�"
                        value="3" />
-            <!--            <el-option label="宸插彇娑�"-->
-            <!--                       value="4" />-->
+            <el-option label="宸插彇娑�"
+                       value="4" />
             <el-option label="宸茬粨鏉�"
                        value="5" />
           </el-select>
@@ -67,17 +67,13 @@
                 :tableLoading="tableLoading"
                 :row-class-name="tableRowClassName"
                 :isSelection="true"
-                :selectable="(row) => !row.endOrder"
+                :selectable="row => !row.endOrder"
                 @selection-change="handleSelectionChange"
                 @pagination="pagination">
         <template #completionStatus="{ row }">
           <el-progress :percentage="toProgressPercentage(row?.completionStatus)"
                        :color="progressColor(toProgressPercentage(row?.completionStatus))"
-                       :status="
-              toProgressPercentage(row?.completionStatus) >= 100
-                ? 'success'
-                : ''
-            " />
+                       :status="toProgressPercentage(row?.completionStatus) >= 100 ? 'success' : ''" />
         </template>
         <template #processRouteStatus="{ row }">
           <div v-if="row.processRouteStatus && row.processRouteStatus.length"
@@ -89,14 +85,7 @@
                 <div class="step-circle"
                      :class="{ 'is-completed': item.percentage >= 100 }">
                   <span class="step-percentage"
-                        :style="{
-                      color:
-                        item.percentage >= 70
-                          ? item.percentage >= 100
-                            ? '#67c23a'
-                            : '#f56c6c'
-                          : '#000',
-                    }">{{ item.percentage }}%</span>
+                        :style="{ color: item.percentage >= 70 ? item.percentage >= 100 ? '#67c23a' : '#f56c6c' : '#000' }">{{ item.percentage }}%</span>
                 </div>
                 <div class="step-name">{{ item.name }}</div>
               </div>
@@ -115,7 +104,7 @@
         <el-form-item label="宸ヨ壓璺嚎">
           <el-select v-model="bindForm.routeId"
                      placeholder="璇烽�夋嫨宸ヨ壓璺嚎"
-                     style="width: 100%"
+                     style="width: 100%;"
                      :loading="bindRouteLoading">
             <el-option v-for="item in routeOptions"
                        :key="item.id"
@@ -136,23 +125,18 @@
     <!-- 鏉ユ簮鏁版嵁寮圭獥 -->
     <el-dialog v-model="sourceDataDialogVisible"
                title="鏉ユ簮鏁版嵁"
-               width="1200px"
-               top="5vh"
-               class="source-data-dialog"
-               append-to-body>
+               width="1200px">
       <div v-if="sourceRowData"
            class="applyno-summary1">
         <div class="summary-item">
           <span class="summary-label">浜у搧鍚嶇О锛�</span>
           <span class="summary-value">
-            <el-tag type="primary">{{
-              sourceRowData.productName || "-"
-            }}</el-tag>
+            <el-tag type="primary">{{ sourceRowData.productName || '-' }}</el-tag>
           </span>
         </div>
         <div class="summary-item">
           <span class="summary-label">瑙勬牸锛�</span>
-          <span class="summary-value">{{ sourceRowData.model || "-" }}</span>
+          <span class="summary-value">{{ sourceRowData.model || '-' }}</span>
         </div>
         <div class="summary-item">
           <span class="summary-label">璁㈠崟闇�姹傛暟閲忥細</span>
@@ -168,49 +152,39 @@
               <div class="info-grid">
                 <div class="info-item">
                   <div class="info-label">璁″垝鍙�</div>
-                  <div class="info-value">{{ item.mpsNo || "-" }}</div>
+                  <div class="info-value">{{ item.mpsNo || '-' }}</div>
                 </div>
                 <div class="info-item">
                   <div class="info-label">鏁版嵁鏉ユ簮</div>
                   <div class="info-value">
                     <el-tag :type="item.source === '閿�鍞�' ? 'primary' : 'warning'">
-                      {{ item.source || "鏈煡" }}
+                      {{ item.source || '鏈煡' }}
                     </el-tag>
                   </div>
                 </div>
                 <div class="info-item">
                   <div class="info-label">鍚堝悓鍙�</div>
-                  <div class="info-value">
-                    {{ item.salesContractNo || "-" }}
-                  </div>
+                  <div class="info-value">{{ item.salesContractNo || '-' }}</div>
                 </div>
                 <div class="info-item">
                   <div class="info-label">瀹㈡埛鍚嶇О</div>
-                  <div class="info-value">{{ item.customerName || "-" }}</div>
+                  <div class="info-value">{{ item.customerName || '-' }}</div>
                 </div>
                 <div class="info-item">
                   <div class="info-label">椤圭洰鍚嶇О</div>
-                  <div class="info-value">{{ item.projectName || "-" }}</div>
+                  <div class="info-value">{{ item.projectName || '-' }}</div>
                 </div>
                 <div class="info-item">
                   <div class="info-label">璁″垝闇�姹傛暟閲�</div>
-                  <div class="info-value">
-                    {{ item.qtyRequired || 0 }} {{ item.unit || "" }}
-                  </div>
+                  <div class="info-value">{{ item.qtyRequired || 0 }} {{ item.unit || '' }}</div>
                 </div>
                 <div class="info-item">
                   <div class="info-label">鍗曚綅</div>
-                  <div class="info-value">{{ item.unit || "-" }}</div>
+                  <div class="info-value">{{ item.unit || '-' }}</div>
                 </div>
                 <div class="info-item">
                   <div class="info-label">闇�姹傛棩鏈�</div>
-                  <div class="info-value">
-                    {{
-                      item.requiredDate
-                        ? dayjs(item.requiredDate).format("YYYY-MM-DD")
-                        : "-"
-                    }}
-                  </div>
+                  <div class="info-value">{{ item.requiredDate ? dayjs(item.requiredDate).format('YYYY-MM-DD') : '-' }}</div>
                 </div>
               </div>
             </div>
@@ -220,7 +194,7 @@
     </el-dialog>
     <MaterialLedgerDialog v-model="materialDialogVisible"
                           :order-row="currentMaterialOrder"
-                          @saved="getList" />
+                           />
     <MaterialDetailDialog v-model="materialDetailDialogVisible"
                           :order-row="currentMaterialDetailOrder"
                           @confirmed="getList" />
@@ -261,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";
@@ -404,8 +377,7 @@
         {
           name: "缁戝畾宸ヨ壓璺嚎",
           type: "text",
-          showHide: row =>
-            !row.processRouteCode && !row.endOrder && row.status !== 3,
+          showHide: row => !row.processRouteCode && !row.endOrder,
           clickFun: row => {
             openBindRouteDialog(row, "add");
           },
@@ -413,8 +385,7 @@
         {
           name: "鏇存崲宸ヨ壓璺嚎",
           type: "text",
-          showHide: row =>
-            row.processRouteCode && !row.endOrder && row.status !== 3,
+          showHide: row => row.processRouteCode && !row.endOrder,
           clickFun: row => {
             openBindRouteDialog(row, "change");
           },
@@ -515,7 +486,7 @@
     if (!Number.isFinite(n)) return 0;
     if (n <= 0) return 0;
     if (n >= 100) return 100;
-    return parseFloat(n.toFixed(2));
+    return Math.round(n);
   };
 
   // 30/50/80/100 鍒嗘棰滆壊锛氱孩/姗�/钃�/缁�
@@ -692,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;
       })
@@ -754,7 +699,7 @@
           technologyRoutingId: data.technologyRoutingId,
           orderId,
           type: "order",
-          editable: !row.endOrder && row.status !== 3,
+          editable: !row.endOrder,
         },
       });
     } catch (e) {
@@ -974,19 +919,13 @@
 
   .source-table-container {
     margin-top: 20px;
-    flex: 1;
-    min-height: 0;
-    max-height: 500px;
-    overflow: auto;
   }
 
   .source-data-cards-container {
     display: flex;
     flex-direction: column;
     gap: 16px;
-    flex: 1;
-    min-height: 0;
-    max-height: none;
+    max-height: 500px;
     overflow-y: auto;
     padding: 10px;
     background-color: #f5f7fa;
@@ -1054,22 +993,6 @@
         color: #303133;
         font-weight: 500;
       }
-    }
-  }
-
-  .source-data-dialog {
-    .el-dialog {
-      display: flex;
-      flex-direction: column;
-      max-height: 90vh;
-    }
-
-    .el-dialog__body {
-      flex: 1;
-      min-height: 0;
-      display: flex;
-      flex-direction: column;
-      overflow: hidden;
     }
   }
 </style>

--
Gitblit v1.9.3