From 1cf342fa23a6c34bd9dd1ff4e416cd255c044fdd Mon Sep 17 00:00:00 2001
From: yyb <995253665@qq.com>
Date: 星期四, 02 四月 2026 11:41:17 +0800
Subject: [PATCH] Merge branch 'dev_银川_中盛建材' of http://114.132.189.42:9002/r/product-inventory-management into dev_银川_中盛建材

---
 src/views/productionManagement/processRoute/processRouteItem/index.vue |   48 ++++++++++++++++++++++++++++++++++++++++++------
 1 files changed, 42 insertions(+), 6 deletions(-)

diff --git a/src/views/productionManagement/processRoute/processRouteItem/index.vue b/src/views/productionManagement/processRoute/processRouteItem/index.vue
index 1d76eba..99eaad2 100644
--- a/src/views/productionManagement/processRoute/processRouteItem/index.vue
+++ b/src/views/productionManagement/processRoute/processRouteItem/index.vue
@@ -47,13 +47,15 @@
          class="section-header">
       <div class="section-title">宸ヨ壓璺嚎椤圭洰鍒楄〃</div>
       <div class="section-actions">
-        <div class="sort-tip">鎷栨嫿琛ㄦ牸鎺掑簭</div>
+        <div v-if="!routeInfo.status"
+             class="sort-tip">鎷栨嫿琛ㄦ牸鎺掑簭</div>
         <el-button icon="Grid"
                    @click="toggleView"
                    style="margin-right: 10px;">
           鍗$墖瑙嗗浘
         </el-button>
-        <el-button type="primary"
+        <el-button v-if="!routeInfo.status"
+                   type="primary"
                    @click="handleAdd">鏂板</el-button>
       </div>
     </div>
@@ -97,6 +99,7 @@
         </template>
       </el-table-column>
       <el-table-column label="鎿嶄綔"
+                       v-if="!routeInfo.status"
                        align="center"
                        fixed="right"
                        width="150">
@@ -119,13 +122,15 @@
       <div class="section-header">
         <div class="section-title">宸ヨ壓璺嚎椤圭洰鍒楄〃</div>
         <div class="section-actions">
-          <div class="sort-tip">闀挎寜鎷栨嫿鍗$墖鎺掑簭</div>
+          <div v-if="!routeInfo.status"
+               class="sort-tip">闀挎寜鎷栨嫿鍗$墖鎺掑簭</div>
           <el-button icon="Menu"
                      @click="toggleView"
                      style="margin-right: 10px;">
             琛ㄦ牸瑙嗗浘
           </el-button>
           <el-button type="primary"
+                     v-if="!routeInfo.status"
                      @click="handleAdd">鏂板</el-button>
         </div>
       </div>
@@ -150,6 +155,7 @@
               <el-button type="primary"
                          link
                          size="small"
+                         v-if="!routeInfo.status"
                          @click="handleEdit(item)"
                          :disabled="item.isComplete">缂栬緫</el-button>
               <el-button type="info"
@@ -159,6 +165,7 @@
               <el-button type="danger"
                          link
                          size="small"
+                         v-if="!routeInfo.status"
                          @click="handleDelete(item)"
                          :disabled="item.isComplete">鍒犻櫎</el-button>
             </div>
@@ -170,7 +177,7 @@
       <div class="section-header">
         <div class="section-title">BOM</div>
         <div class="section-actions"
-             v-if="pageType === 'order'">
+             v-if="pageType === 'order' && !routeInfo.status">
           <el-button type="primary"
                      @click="toggleBomEdit">
             {{ bomDataValue.isEdit ? '鍙栨秷' : '缂栬緫' }}
@@ -260,6 +267,21 @@
                                   :disabled="!bomDataValue.isEdit" />
                       </el-form-item>
                       <span v-else>{{ row.unit }}</span>
+                    </template>
+                  </el-table-column>
+                  <el-table-column prop="unitPrice"
+                                   label="鍗曚环">
+                    <template #default="{ row }">
+                      <el-form-item v-if="bomDataValue.isEdit"
+                                    style="margin: 0">
+                        <el-input-number v-model="row.unitPrice"
+                                         :min="0"
+                                         :step="1"
+                                         controls-position="right"
+                                         style="width: 100%"
+                                         :disabled="!bomDataValue.isEdit" />
+                      </el-form-item>
+                      <span v-else>{{ row.unitPrice }}</span>
                     </template>
                   </el-table-column>
                   <el-table-column label="鎿嶄綔"
@@ -361,7 +383,7 @@
     <ProcessParamListDialog v-model="showParamListDialog"
                             :title="`${currentProcess ? getProcessName(currentProcess.processId) : ''} - 鍙傛暟鍒楄〃`"
                             :route-id="routeId"
-                            :editable="editable"
+                            :editable="editable && !routeInfo.status"
                             :order-id="orderId"
                             :process="currentProcess"
                             :page-type="pageType"
@@ -507,7 +529,7 @@
 
   // 鑾峰彇宸ュ簭鍒楄〃
   const getProcessList = () => {
-    processList({})
+    processList({ dateType: 1 })
       .then(res => {
         processOptions.value = res.data || [];
       })
@@ -526,6 +548,7 @@
       dictLabel: route.query.dictLabel || "",
       bomId: route.query.bomId || null,
       description: route.query.description || "",
+      status: !(route.query.status == 1 || route.query.status === "false"),
     };
     if (pageType.value === "order") {
       queryList2(route.query.orderId)
@@ -777,6 +800,7 @@
         processId: "",
         processName: "",
         unitQuantity: 0,
+        unitPrice: 0,
         unit: "",
         children: [],
         tempId: new Date().getTime(),
@@ -805,6 +829,7 @@
             processId: "",
             processName: "",
             unitQuantity: 0,
+            unitPrice: 0,
             unit: "",
             children: [],
             tempId: new Date().getTime(),
@@ -911,6 +936,15 @@
           ElMessage.error("璇峰~鍐欏崟浣嶄骇鍑烘墍闇�鏁伴噺");
           return false;
         }
+        // 鏍¢獙鍗曚环鏄惁蹇呭~
+        if (
+          item.unitPrice === undefined ||
+          item.unitPrice === null ||
+          item.unitPrice === 0
+        ) {
+          ElMessage.error("璇峰~鍐欏崟浠�");
+          return false;
+        }
         // 閫掑綊鏍¢獙瀛愰」
         if (item.children && item.children.length > 0) {
           if (!validateBomData(item.children)) {
@@ -940,6 +974,7 @@
         productModelId: item.productModelId || null,
         processId: item.processId || null,
         unitQuantity: item.unitQuantity || 0,
+        unitPrice: item.unitPrice || 0,
         demandedQuantity: item.demandedQuantity || null,
         unit: item.unit || "",
         tempId: item.tempId || new Date().getTime(),
@@ -991,6 +1026,7 @@
 
   // 鍒濆鍖栨嫋鎷芥帓搴�
   const initSortable = () => {
+    if (routeInfo.value.status) return;
     destroySortable();
 
     if (viewMode.value === "table") {

--
Gitblit v1.9.3