1
647556386
2026-01-23 a48dec1aaf88e1ba79cb521ae277c3b3d5ff3d84
ÏîÄ¿´úÂë/WIDESEA_WMSClient/src/extension/outbound/extend/outOrderDetail.vue
@@ -439,21 +439,31 @@
      console.log(requestParams);
      this.$refs.DirectOutbound.open(requestParams);
    },
    outboundbatch() {
      if (this.selection.length === 0) {
        return this.$message.error("请选择单据明细");
      }
      const keys = this.selection.map((item) => item.id);
    // è®¡ç®—所有选中明细的可出库数量总和
    let totalOutboundQuantity = 0;
    this.selection.forEach(item => {
      // ç±»åž‹è½¬æ¢+容错,避免非数字值导致计算错误
      const orderQty = Number(item.orderQuantity) || 0;
      const lockQty = Number(item.lockQuantity) || 0;
      totalOutboundQuantity += (orderQty - lockQty);
    });
      const requestParams = {
        detailIds: keys,
        outboundQuantity:
          this.selection[0].orderQuantity - this.selection[0].lockQuantity,
      outboundQuantity: totalOutboundQuantity,
        operator: "",
        orderNo: this.row.orderNo,
        isBatch: this.isBatch,
      };
      console.log(requestParams);
    console.log("分批出库参数:", requestParams);
      this.$refs.DirectOutbound.open(requestParams);
    },
    setCurrent(row) {