From 46bf33053daa5f2bfe163822ce4f793f669024f8 Mon Sep 17 00:00:00 2001
From: guoyuji <guoyujie@ng.com>
Date: 星期一, 10 三月 2025 08:28:13 +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 |   14 ++++++++++++--
 1 files changed, 12 insertions(+), 2 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 48f5c28..b8110eb 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
@@ -73,6 +73,7 @@
 
 const orderId = route.query.orderId
 const productionId = route.query.productionId
+const orderQuantity = route.query.quantity
 
 const orderOtherMoney = ref(null)
 
@@ -795,6 +796,7 @@
             if (item.baiscQuantity === 0) {
               $grid.remove(item)
             }
+            $gridLeft.reloadData([...$gridLeft.getTableData().fullData])
             //delete item._X_ROW_KEY
           } else {
             item.quantity = checkedNum.value
@@ -846,9 +848,8 @@
       checkedList.forEach((item) => {
         item.processId = checkedListLeft[0].processId
         item.landingSequence = checkedListLeft[0].landingSequence
-        item.quantity = checkedListLeft[0].baiscQuantity
+        item.quantity = item.baiscQuantity
         item.computeGrossArea = (item.computeGrossArea - checkedListLeft[0].width * checkedListLeft[0].height * checkedListLeft[0].baiscQuantity / 1000000).toFixed(2)
-
         delete item._X_ROW_KEY
       })
       $gridLeft.insertAt(checkedList)
@@ -894,6 +895,15 @@
               gridLeftOptions.toolbarConfig.buttons[0].disabled=false
               return;
             }
+
+            // 璁$畻 $table 閲� quantity 瀛楁鐨勬�诲拰
+            let totalQuantity = selectRecords.reduce((sum, record) => sum + (Number(record.quantity) || 0), 0);
+            // 瀵规瘮鍏ㄥ眬鍙橀噺 orderQuantity
+            if (totalQuantity !== orderQuantity*1) {
+              ElMessage.warning(`鎵�閫夋暟鎹殑鏁伴噺鎬诲拰 (${totalQuantity}) 涓庤鍗曟暟閲� (${orderQuantity}) 涓嶅尮閰嶏紝璇锋鏌ュ悗閲嶈瘯锛乣);
+              gridLeftOptions.toolbarConfig.buttons[0].disabled = false;
+              return;
+            }
             // if (leftData.length!=selectRecords.length){
             //   ElMessage.warning('璇峰嬀閫夋墍鏈夋暟鎹繘琛屼繚瀛�')
             //   gridLeftOptions.toolbarConfig.buttons[0].disabled=false

--
Gitblit v1.8.0