src/views/overview/OverviewListView.vue
@@ -1,12 +1,17 @@
<template>
  <div class="rightContent">
    <div class="label-fixed-element">
      <span>{{ params.name }}</span>
    </div>
    <div class="top">
      <SearchCommonView
        :add-title="'新建'"
        :placeholder="'请输入单号/来源单据'"
        :amount-view="false"
        :search-task-map="searchTaskMap"
        @addCommonClick="addBtnClick"
        @searchClick="getList"
        @delSelectClick="delSelectClick"
      />
    </div>
    <div class="list-view">
@@ -37,7 +42,7 @@
      v-if="editConfig.visible"
      :work-type="workType"
      :edit-common-config="editConfig"
      :add-name="this.$route.params.name"
      :add-name="addName"
      :display-edit="displayEdit"
    />
  </div>
@@ -58,7 +63,7 @@
  data() {
    return {
      tableList: {},
      showcol: ["从", "至", "联系人", "日期", "来源单据", "状态"],
      showcol: ["仓库位置", "调出位置", "调入位置", "联系人", "日期", "来源单据", "状态"],
      searchOptions: [],
      commonDetail: {
        visible: false,
@@ -73,10 +78,16 @@
      workType: this.$route.params.workType,
      keyword: "",
      params: {},
      displayEdit: false
      displayEdit: false,
      formLabel: "",
      toLabel: "",
      addName: "",
      searchTaskMap: []
    }
  },
  created() {
    console.log(this.workType)
    this.setFormToLabel()
    this.setTable()
    var paramsData = sessionStorage.getItem("paramsData")
    let params = {}
@@ -87,6 +98,8 @@
      sessionStorage.setItem("paramsData", JSON.stringify(params))
    }
    this.params = params
    this.searchTaskMap =
      this.params.status > 0 ? [{ id: this.params.id, title: this.getStatus(this.params.status) }] : []
    this.getData()
    // console.log(this.$route.params.workType)
  },
@@ -95,6 +108,18 @@
    sessionStorage.removeItem("paramsData")
  },
  methods: {
    setFormToLabel() {
      if (this.workType === 1) {
        this.formLabel = "供应商位置"
        this.toLabel = "仓库位置"
      } else if (this.workType === 2) {
        this.formLabel = "仓库位置"
        this.toLabel = "客户位置"
      } else {
        this.formLabel = "调出位置"
        this.toLabel = "调入位置"
      }
    },
    setTable() {
      this.tableList = {
        tableInfomation: [],
@@ -122,15 +147,15 @@
          default: true
        },
        {
          label: "从",
          label: this.formLabel,
          prop: "from",
          isShowColumn: showcol.includes("从"),
          isShowColumn: showcol.includes(this.formLabel),
          default: false
        },
        {
          label: "至",
          label: this.toLabel,
          prop: "to",
          isShowColumn: showcol.includes("至"),
          isShowColumn: showcol.includes(this.toLabel),
          default: false
        },
        {
@@ -211,7 +236,8 @@
        number: this.keyword,
        operationTypeId: this.params.id,
        page: this.pagerOptions.currPage,
        pageSize: this.pagerOptions.pageSize
        pageSize: this.pagerOptions.pageSize,
        status: this.params.status
      }).then((res) => {
        console.log(res.data)
        if (res.code === 200) {
@@ -239,23 +265,45 @@
      console.log(row)
      this.editConfig.visible = true
      this.editConfig.title = val
      this.editConfig.operationTypeId = this.$route.params.id
      this.editConfig.operationTypeId = this.params.id
      this.editConfig.infomation = { ...row }
    },
    // 新建
    addBtnClick() {
      this.editConfig.visible = true
      this.editConfig.title = "新建"
      this.editConfig.operationTypeId = this.$route.params.id
      this.addName = this.params.name
      console.log(this.params, "ss刷新")
      this.editConfig.operationTypeId = this.params.id
      this.editConfig.code = this.params.code
      this.editConfig.infomation = {}
      this.editConfig.visible = true
    },
    // 状态
    getStatus(val) {
      return val === 1 ? "草稿" : val === 3 ? "就绪" : "完成"
      return val === 1 ? "草稿" : val === 3 ? "就绪" : val === 4 ? "完成" : ""
    },
    // 删除搜索状态
    delSelectClick() {
      this.params.status = 0
      this.getData()
    }
  }
}
</script>
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style lang="scss" scoped></style>
<style lang="scss" scoped>
.label-fixed-element {
  background: #e6ecf2;
  position: fixed;
  font-size: 14px;
  width: calc(100% - 530px);
  height: 45px;
  line-height: 45px;
  font-size: 18px;
  font-weight: 700;
  color: #171718;
  margin-top: -60px;
  margin-left: -5px;
}
</style>