wangxinhui
5 天以前 9ec715d2deb18a269dd49c48da91a36632d08c81
´úÂë¹ÜÀí/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"
@@ -227,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: [
        [
@@ -271,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 = {