刘磊
2025-08-25 4c308eab6106324bd40e6ad7fd9e769a5cedcedf
ÏîÄ¿´úÂë/WMS/WIDESEA_WMSClient/src/extension/widesea_wms/stock/Dt_PalletStockInfo.js
@@ -23,7 +23,7 @@
      let options = {
        field: 'palletCode',
        title: '托盘码',
        sortable: false,
        sortable: true,
        type: 'text',
        //link:true,
        fixed: true,
@@ -38,20 +38,19 @@
          // var data = {
          //   palletCode: row.palletCode
          // };
          console.log(row.palletCode);
          //console.log(row.palletCode);
          var _this = this;
          this.http
            .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;
              }
            });
        }
      };
      this.columns.splice(1, 0, options);
      //this.columns.splice(1, 0, options);
      var ManualOutbound = this.buttons.find(x => x.value == "ManualOutBound");
      if (ManualOutbound != null) {
@@ -59,14 +58,52 @@
          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();
        }
      };
      this.columns.forEach((column) => {
        if (column.field == 'materielName') {
          column.formatter = (row) => {
            // return '<span style="color: #2d8cf0;">' + row?.locationInfo?.roadwayNo + '</span>'
            return row?.stockInfoDetails[0]?.materielName
          }
        }
        if (column.field == 'quantity') {
          column.formatter = (row) => {
            // return '<span style="color: #2d8cf0;">' + row?.locationInfo?.roadwayNo + '</span>'
            return row?.stockInfoDetails[0]?.quantity
          }
        }
      })
    },
    onInited() {
      //框架初始化配置后