From a0131b5ef8895b07bac97c74601cad11e291887a Mon Sep 17 00:00:00 2001
From: yyb <995253665@qq.com>
Date: 星期三, 25 三月 2026 14:00:03 +0800
Subject: [PATCH] 销售看板

---
 src/views/productionManagement/productionReporting/reportingDialog.vue |   25 +++++++++++++++----------
 1 files changed, 15 insertions(+), 10 deletions(-)

diff --git a/src/views/productionManagement/productionReporting/reportingDialog.vue b/src/views/productionManagement/productionReporting/reportingDialog.vue
index 7e079d9..9d49874 100644
--- a/src/views/productionManagement/productionReporting/reportingDialog.vue
+++ b/src/views/productionManagement/productionReporting/reportingDialog.vue
@@ -305,10 +305,10 @@
                                     :label="`${item.productName} ${item.model}`"
                                     class="form-item">
                         <div class="consumable-input-group">
-                          <el-input-number v-model="getProcessInfo(parseInt(activeProcessId)).consumables[item.bomId]"
+                          <el-input-number v-model="getProcessInfo(parseInt(activeProcessId)).consumables[item.productModelId]"
                                            :min="0"
-                                           :model-value="getConsumableValue(parseInt(activeProcessId), item.bomId)"
-                                           @change="val => getProcessInfo(parseInt(activeProcessId)).consumables[item.bomId] = val"
+                                           :model-value="getConsumableValue(parseInt(activeProcessId), item.productModelId)"
+                                           @change="val => getProcessInfo(parseInt(activeProcessId)).consumables[item.productModelId] = val"
                                            class="consumable-input" />
                           <span class="consumable-unit">{{ item.unit }}</span>
                         </div>
@@ -812,12 +812,12 @@
   };
 
   // 鑾峰彇娑堣�楀搧鏁伴噺锛岄粯璁や负0
-  const getConsumableValue = (processId, bomId) => {
+  const getConsumableValue = (processId, productModelId) => {
     const processInfo = getProcessInfo(processId);
-    if (!processInfo.consumables[bomId]) {
-      processInfo.consumables[bomId] = 0;
+    if (!processInfo.consumables[productModelId]) {
+      processInfo.consumables[productModelId] = 0;
     }
-    return processInfo.consumables[bomId];
+    return processInfo.consumables[productModelId];
   };
 
   // 澶勭悊鏂囦欢棰勮
@@ -980,10 +980,15 @@
             if (editProcess.productionProductRouteItemParamDtoList) {
               editProcess.productionProductRouteItemParamDtoList.forEach(
                 param => {
+                  // console.log(form.processStructures[processId], "========");
                   if (param.bomId) {
                     // 浣跨敤bomId浣滀负key锛屽洜涓篻etProcessStructures杩斿洖鐨刬tem.id鏄痓omId
-                    processInfo.consumables[param.bomId] =
-                      param.productValue || 0;
+                    form.processStructures[processId].forEach(item => {
+                      if (item.productModelId == param.productId) {
+                        processInfo.consumables[param.productId] =
+                          param.productValue || 0;
+                      }
+                    });
                   }
                 }
               );
@@ -1091,7 +1096,7 @@
             structures.forEach(structure => {
               const consumableValue = getConsumableValue(
                 process.processId,
-                structure.bomId
+                structure.productModelId
               );
               if (consumableValue > 0) {
                 productionProductRouteItemParamDtoList.push({

--
Gitblit v1.9.3