guoyuji
2025-03-10 46bf33053daa5f2bfe163822ce4f793f669024f8
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)
@@ -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