zzq
2023-09-27 9276baaf6664e55e217253caca2151a10640764d
src/views/reportForm/locationReport/index.vue
@@ -18,13 +18,10 @@
        :table-list="tableList"
        @selTableCol="selTableCol"
        @tableRowClick="tableRowClick"
        :showSummary="true"
      >
        <template slot="tableButton">
          <el-table-column
            label="操作"
            width="210"
            align="center"
          >
          <el-table-column label="操作" width="210" align="center">
            <template slot-scope="scope">
              <span @click="handleHistoryClick(scope.row)">
                <i class="el-icon-refresh-left"></i>
@@ -70,30 +67,36 @@
    return {
      tableList: {},
      showcol: ["存储类别", "产品类别", "预留数量", "价值"],
      // countcol: [
      //   { label: "在库数量", unit: "" },
      //   { label: "预留数量", unit: "" },
      //   { label: "价值", unit: "¥" },
      // ],
      countcol:["在库数量","预留数量","价值"],
      testArr: [
        {
          product:"HC/销售区/b区",
          category:"丝绸制品/真丝睡袍",
          cost:"800.00",
          totalPrices:"0.00",
          inStore:"0.00",
          availableStore:"0.00",
          inStorage:"0.00",
          toStore:"0.00",
          forecast:"0.00",
          unit:"件"
          product: "HC/销售区/b区",
          category: "丝绸制品/真丝睡袍",
          cost: "800.00",
          totalPrices: "2000.00",
          inStore: "00.00",
          availableStore: "200.00",
          inStorage: "00.00",
          toStore: 65432.0,
          forecast: "0.00",
          unit: "件",
        },
        {
          product:"HC销售区/A区",
          category:"丝绸制品/真丝睡袍",
          cost:"9980.00",
          totalPrices:"0.00",
          inStore:"0.00",
          availableStore:"0.00",
          inStorage:"0.00",
          toStore:"0.00",
          forecast:"0.00",
          unit:"件"
          product: "HC销售区/A区",
          category: "丝绸制品/金丝睡袍",
          cost: "9980.00",
          totalPrices: "00.00",
          inStore: "00.00",
          availableStore: "20.00",
          inStorage: "0.00",
          toStore: 32618.0,
          forecast: "0.00",
          unit: "件",
        },
      ],
      searchOptions: [],
@@ -118,9 +121,10 @@
  methods: {
    setTable() {
      this.tableList = {
        tableInfomation:[],
        tableInfomation: [],
        selectBox: true,
        showcol: this.showcol,
        countcol: this.countcol,
        allcol: [],
        tableColumn: this.setTableColumn(this.showcol),
      };
@@ -132,7 +136,7 @@
        }
      }
      this.tableList.allcol = allcol;
      this.tableList.tableInfomation=this.testArr
      this.tableList.tableInfomation = this.testArr;
    },
    setTableColumn(showcol) {
      let tableColumn = [
@@ -151,40 +155,35 @@
        {
          label: "位置",
          prop: "product",
          isShowColumn: true,
          default: true,
        },
        {
          label: "存储类别",
          prop: "category",
          isShowColumn: true,
          default: false,
          isShowColumn: showcol.includes("存储类别"),
        },
        {
          label: "产品",
          prop: "cost",
          isShowColumn: true,
          default: true,
        },
        {
          label: "产品类别",
          prop: "totalPrices",
          isShowColumn: true,
          default: false,
          isShowColumn: showcol.includes("产品类别"),
        },
        {
          label: "在库数量",
          prop: "inStore",
          isShowColumn: true,
          default: true,
        },
        {
          label: "预留数量",
          prop: "availableStore",
          // isShowColumn: true,
          sortable: true,
          default: false,
          isShowColumn: showcol.includes("预留数量"),
        },
@@ -199,9 +198,6 @@
          prop: "toStore",
          width: 120,
          default: false,
          // status: true,
          // isCallMethod: true,
          // getCallMethod: this.getStatus,
          isShowColumn: showcol.includes("价值"),
        },
      ];
@@ -240,7 +236,7 @@
    // 行点击
    tableRowClick(row) {
      console.log(row);
      this.editConfig.visible = true;
      // this.editConfig.visible = true;
      this.editConfig.title = "查看";
      this.editConfig.infomation = { ...row };
    },
@@ -254,13 +250,9 @@
      return val === 1 ? "草稿" : val === 3 ? "就绪" : "完成";
    },
    // 历史
    handleHistoryClick(){
    },
    handleHistoryClick() {},
    // 补货
    handleAddGoods(){
    }
    handleAddGoods() {},
  },
};
</script>
@@ -271,12 +263,12 @@
  height: 100%;
  background: #e6ecf2;
  padding: 10px;
// .top {
//   margin-bottom: 20px;
//   height: 60px;
//   background: #fff;
//   border-radius: 8px;
// }
  // .top {
  //   margin-bottom: 20px;
  //   height: 60px;
  //   background: #fff;
  //   border-radius: 8px;
  // }
  .list-view {
    height: calc(100% - 150px);
  }