刘磊
2025-08-15 baad30699918c536d0b96e36df70b8f352d520e4
ÏîÄ¿´úÂë/WMS/WIDESEA_WMSClient/src/extension/widesea_wms/stock/Dt_PalletStockInfo.js
@@ -38,12 +38,12 @@
          // var data = {
          //   palletCode: row.palletCode
          // };
          console.log(row.palletCode);
          //console.log(row.palletCode);
          var _this = this;
          this.http
            .post("/api/BoxingInfoDetail/GetBarcodeDetial", row.palletCode, "查询数据中")
            .post("/api/Dt_PalletStockInfoDetail/GetBarcodeDetial", row.palletCode, "查询数据中")
            .then((x) => {
              console.log(x.data);
              //console.log(x.data);
              if (x.status == 1) {
                _this.$refs.gridHeader.materielList = x.data;
              }
@@ -52,17 +52,40 @@
      };
      this.columns.splice(1, 0, options);
      var ManualOutbound = this.buttons.find(x => x.value == "ManualOutBound");
      if (ManualOutbound != null) {
        ManualOutbound.onClick = () => {
          let rows = this.$refs.table.getSelected();
          if (rows.length == 0) {
            return this.$error("请选择数据!");
          } else if (rows.length > 1) {
            return this.$error("只能选择单条数据");
          }
          this.$refs.gridBody.open(rows[0].palletCode);
          console.log(rows);
          let errmsg = "";
          rows.forEach(element => {
            if (element.stockStatus != 2)
              errmsg = "当前选择数据中有不符合出库状态库存!";
            if(element.areaCode != rows[0].areaCode)
              errmsg = "当前选择数据中含有不同库区的数据";
          });
          if (errmsg != "")
            return this.$error(errmsg)
          var barcodeList = rows.map(x =>
            x.palletCode
          );
          if (barcodeList.length == 0)
            return this.$error("请选择要出库的库存数据!");
          // else if (rows.length > 1) {
          //   return this.$error("只能选择单条数据");
          // }
          this.$refs.gridBody.open(barcodeList);
          this.refresh();
        }
      };