1
wankeda
3 天以前 a3014a01e07619105d597d0c51cf195217b0806f
WMS/WIDESEA_WMSClient/src/extension/outbound/extend/outOrderDetail.vue
@@ -14,13 +14,13 @@
              <span>已选中 {{ selection.length }} 项</span>
            </el-col>
            <el-col :span="8">
              <el-link
              <!-- <el-link
                type="primary"
                size="small"
                style="float: right; height: 20px"
                @click="lockstocks"
                >锁定库存</el-link
              >
              > -->
              <el-link
                type="primary"
                size="small"
@@ -43,6 +43,8 @@
        <el-table
          ref="singleTable"
          :data="tableData"
          :summary-method="getSummaries"
          show-summary
          style="width: 100%; height: 100%"
          highlight-current-row
          @current-change="handleCurrentChange"
@@ -165,11 +167,17 @@
          width: 90,
        },
        {
          prop: "unit",
          title: "单位",
          type: "string",
          width: 90,
        },
        {
          prop: "orderDetailStatus",
          title: "订单明细状态",
          type: "tag",
          width: 180,
          bindKey:"orderDetailStatusEnum"
          bindKey: "orderDetailStatusEnum",
        },
        {
          prop: "assignStock",
@@ -221,11 +229,11 @@
        Foots: "",
        total: 0,
        // 2020.08.29增加自定义分页条大小
        sizes: [30, 60, 100, 120],
        size: 30, // 默认分页大小
        sizes: [60, 100, 120],
        size: 60, // 默认分页大小
        Wheres: [],
        page: 1,
        rows: 30,
        rows: 60,
      },
      searchFormOptions: [
        [
@@ -265,6 +273,34 @@
      this.getDictionaryData();
      this.getData();
    },
    getSummaries(param) {
      const { columns, data } = param
      const sums = []
      columns.forEach((column, index) => {
        if (index === 0) {
          sums[index] = '合计'
          return
        }
        // 仅对数值列求和
        // 仅对某一列求和
        if (column.property === 'lockQuantity' || column.property === 'overOutQuantity' || column.property === 'orderQuantity') {
          const values = data.map(item => Number(item[column.property]))
        console.log(values);
        if (!values.every(value => isNaN(value))) {
          sums[index] = values.reduce((prev, curr) => {
            return prev + (isNaN(curr) ? 0 : curr)
          }, 0)
        } else {
          sums[index] = '-'
        }
        }
      })
      return sums
    },
    getData() {
      var wheres = [{ name: "orderId", value: this.row.id }];
      var param = {
@@ -284,6 +320,7 @@
      if (column.prop == "assignStock") {
        this.$refs.child.open(row);
      } else {
        //点击打开出库详情
        this.$refs.selectedStock.open(row);
      }
    },
@@ -308,9 +345,9 @@
        return this.$message.error("请选择单据明细");
      }
      var keys = this.selection.map((item) => item.id); // 获取选中行的id
console.log(keys);
      this.http
        .post("api/Task/GenerateOutboundTasks", keys, "数据处理中")
        .post("api/Task/WMSGenerateOutboundTask", keys, "数据处理中")
        .then((x) => {
          if (!x.status) return this.$message.error(x.message);
          this.$message.success("操作成功");
@@ -331,7 +368,8 @@
        if (
          row.orderDetailStatus !== 0 &&
          row.orderDetailStatus !== 60 &&
          row.orderDetailStatus !== 70
          row.orderDetailStatus !== 70 &&
          row.orderDetailStatus !== 80
        ) {
          return true;
        } else {
@@ -375,6 +413,7 @@
        var item = this.dictionaryList.find((x) => x.dicNo == column.bindKey);
        if (item) {
          var dicItem = item.data.find((x) => x.key == row[column.prop]);
          console.log(dicItem);
          if (dicItem) {
            return dicItem.value;
          } else {
@@ -398,9 +437,11 @@
.text-button:hover {
  background-color: #f0f9eb !important;
}
.el-table .warning-row {
  background: oldlace;
}
.box-table .el-table tbody tr:hover > td {
  background-color: #d8e0d4 !important;
  /* color: #ffffff; */