songshankun
2023-10-18 dfcf1c54fe3cbfcd237f2baab8b4997225a232d3
src/views/reportForm/locationReport/index.vue
@@ -5,8 +5,8 @@
      <div>
        <SearchCommonView
          :add-title="'新建'"
          :showAdd="true"
          :placeholder="'请输入参考'"
          :showAdd="false"
          :placeholder="''"
          :amount-view="false"
          @addCommonClick="addBtnClick"
          @searchClick="getList"
@@ -21,6 +21,7 @@
          :table-list="tableList"
          @selTableCol="selTableCol"
          @tableRowClick="tableRowClick"
          :showSummary="true"
        >
          <template slot="tableButton">
            <el-table-column label="操作" width="210" align="center">
@@ -48,9 +49,9 @@
</template>
<script>
import pageMixin from "@/components/makepager/pager/mixin/pageMixin";
import { getLocationData } from "@/api/locationApi/locationApi";
import AddOverviewDialog from "@/views/overview/AddOverviewDialog";
import pageMixin from "@/components/makepager/pager/mixin/pageMixin"
import { getLocationData } from "@/api/locationApi/locationApi"
import AddOverviewDialog from "@/views/overview/AddOverviewDialog"
export default {
  name: "InventoryReport",
@@ -107,8 +108,8 @@
      },
      productId: this.$route.params.id,
      productName: this.$route.params.name,
      metaTitle: this.$route.meta.title,
    };
      metaTitle: this.$route.meta.title
    }
  },
  created() {
    this.setTable()
@@ -118,7 +119,8 @@
    setTable() {
      this.tableList = {
        tableInfomation: [],
        selectBox: true,
        selectBox: false,
        selectIndex: true,
        showcol: this.showcol,
        countcol: this.countcol,
        allcol: [],
@@ -165,21 +167,21 @@
          prop: "amount",
          isShowColumn: true,
          default: true,
          unit: "",
          unit: ""
        },
        {
          label: "预留数量",
          prop: "availableStore",
          isShowColumn: true,
          default: true,
          unit: "",
          unit: ""
        },
        {
          label: "单位",
          prop: "unit",
          width: 120,
          default: false,
          isShowColumn: showcol.includes("价值")
          isShowColumn: showcol.includes("单位")
        },
        {
          label: "价值",
@@ -187,10 +189,10 @@
          width: 120,
          default: false,
          isShowColumn: showcol.includes("价值"),
          unit: "¥",
        },
      ];
      return tableColumn;
          unit: "¥"
        }
      ]
      return tableColumn
    },
    selTableCol(val) {
      this.showcol = val
@@ -203,9 +205,9 @@
        pageSize: this.pagerOptions.pageSize
      }).then((res) => {
        if (res.code === 200) {
          const list = res.data;
          this.tableList.tableInfomation = list || [];
          this.pagerOptions.totalCount = res.total;
          const list = res.data
          this.tableList.tableInfomation = list || []
          this.pagerOptions.totalCount = res.total
        }
      })
    },
@@ -223,9 +225,9 @@
    },
    // 新建
    addBtnClick() {
      this.editConfig.visible = true;
      this.editConfig.title = "新建";
      this.getData();
      this.editConfig.visible = true
      this.editConfig.title = "新建"
      this.getData()
    },
    // 状态
    getStatus(val) {
@@ -236,28 +238,10 @@
      this.$router.push({
        name: "inboundOutboundDetail",
        params: {
          name: this.metaTitle,
          pageName:"报表",
          product: {
            page: this.pagerOptions.currPage,
            pageSize: this.pagerOptions.pageSize,
            produceId: row.produceId,
            productName: row.productName,
            unit: row.unit,
          },
          paramsKey: {
            amount: "amount",
            productName:"productName",
            status: "status",
            contactedName: "contactedName",
            date: "date",
            fromLocation: "fromLocation",
            number: "number",
            toLocation: "toLocation",
            unit: "unit",
          },
        },
      });
          id: row.produceId,
          name: "报表"
        }
      })
    },
    // 补货
    handleAddGoods() {}