From 120df3e19856f9d3e27aec50d399cff72b331079 Mon Sep 17 00:00:00 2001
From: guoyuji <guoyujie@ng.com>
Date: 星期五, 14 二月 2025 08:42:04 +0800
Subject: [PATCH] Merge branch 'master' of http://10.153.19.25:10101/r/ERP_override

---
 north-glass-erp/northglass-erp/src/views/pp/processCard/AddProcessCard.vue |   39 ++++++++++++++++++++++++++-------------
 1 files changed, 26 insertions(+), 13 deletions(-)

diff --git a/north-glass-erp/northglass-erp/src/views/pp/processCard/AddProcessCard.vue b/north-glass-erp/northglass-erp/src/views/pp/processCard/AddProcessCard.vue
index 5e32056..a16a169 100644
--- a/north-glass-erp/northglass-erp/src/views/pp/processCard/AddProcessCard.vue
+++ b/north-glass-erp/northglass-erp/src/views/pp/processCard/AddProcessCard.vue
@@ -606,18 +606,6 @@
 
         } else {
 
-
-          // item.baiscQuantity = item.baiscQuantity * 1 + leftData[leftfilterIndex].quantity * 1
-          // item.computeGrossArea=(item.width*item.height*item.baiscQuantity/1000000).toFixed(2)
-          //item.computeGrossArea=(item.width*item.height*item.baiscQuantity/1000000).toFixed(2)
-          // for (let i = 0; i <checkedList.length ; i++) {
-          //
-          //   if (checkedList[i].orderNumber === item.orderNumber){
-          //     console.log(item.baiscQuantity  +"---"+ checkedList[i].quantity )
-          //     item.baiscQuantity = item.baiscQuantity * 1 + checkedList[i].quantity * 1
-          //   }
-          // }
-
           delete item._X_ROW_KEY
           $grid.insert(item)
 
@@ -649,12 +637,34 @@
       } else {
         // 濡傛灉璇� processId 宸茬粡浣跨敤杩囷紝缁х画浣跨敤宸插垎閰嶇殑缂栧彿
         newProcessId = `${baseProcessId}${(totalUniqueCount + 1).toString().padStart(3, '0')}`;
-        
+
       }
       // 鏇存柊 item.processId
       item.processId = newProcessId;
     });
+    // 鑾峰彇鍓╀綑鏁版嵁,鐢ㄤ簬瀵硅惤鏋堕『搴忛噸鏂拌祴鍊�
+    let remainingData = $gridLeft.getTableData().fullData;
+    // 鎸� processId 鍒嗙粍
+    let groupedData = remainingData.reduce((acc, curr) => {
+      if (!acc[curr.processId]) {
+        acc[curr.processId] = [];
+      }
+      acc[curr.processId].push(curr);
+      return acc;
+    }, {});
 
+    // 鎸� processId 鎺掑簭锛堝�掑簭锛�
+    let sortedProcessIds = Object.keys(groupedData).sort((a, b) => b - a);
+
+    // 鏇存柊姣忎釜鍒嗙粍鐨� landingSequence
+    sortedProcessIds.forEach((processId, index) => {
+      let group = groupedData[processId];
+
+      // 瀵规瘡涓� processId 鍒嗙粍鍐呯殑鏁版嵁锛屼笉鏀瑰彉椤哄簭锛岀洿鎺ヨ祴鐩稿悓鐨� landingSequence
+      group.forEach((item) => {
+        item.landingSequence = sortedProcessIds.length - index; // 鎸夊�掑簭璁剧疆 landingSequence
+      });
+    });
     //娓呴櫎涓よ竟澶嶉�夋
     $gridLeft.clearCheckboxRow()
     $grid.clearCheckboxRow()
@@ -662,10 +672,13 @@
   } catch (e) {
     ElMessage.warning(e.message)
   }
+  //姣忔鐐瑰嚮鎯呭喌杈撳叆妗�
   if (checkedNum.value){
     checkedNum.value =''
   }
 }
+
+
 //鍚戝乏杈硅〃鏍兼坊鍔犳暟鎹�
 const addLeft = () => {
   try {

--
Gitblit v1.8.0