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)
@@ -147,10 +148,10 @@
  },
  formConfig: {
    data: {
      shelfThickness: 2000,
      shelfThickness: 800,
      spacerThickness: 0,
      inWeight: 4000,
      inMaxQuantity: 1,
      inMaxQuantity: 20,
      inLenMin:400,
      inLenMax:3500,
      inShortMax:2500,
@@ -164,6 +165,9 @@
        { required: true, message: t('delivery.pleaseEnterANumericalValueGreaterThanOrEqualTo0'),type:'number',pattern:/^[0-9]\d*$/ }
      ],
      inWeight: [
        { required: true, message: t('basicData.msg.greater0'),type:'number',pattern:/^[1-9]\d*$/ }
      ],
      inMaxQuantity: [
        { required: true, message: t('basicData.msg.greater0'),type:'number',pattern:/^[1-9]\d*$/ }
      ]
    },
@@ -792,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
@@ -843,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)
@@ -891,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