yangfeng
2023-11-03 27876781629d64545777c069ed60717b34f46b2c
库存预览跳转带出单据的状态及仓库位置列表默认展示内部位置
4个文件已修改
123 ■■■■■ 已修改文件
src/components/makepager/SearchCommonView.vue 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/operate/orderPoint/index.vue 48 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/overview/OverviewListView.vue 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/warehouseManage/position/index.vue 45 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/makepager/SearchCommonView.vue
@@ -54,7 +54,7 @@
            <template v-if="selectArr?.length > 0" slot="prepend">
              <div style="display: flex">
                <div v-for="(val, i) in selectArr" :key="i" class="pre-views">
                  <span style="margin-left: 5px">{{ val.title }}</span>
                  <span style="margin-left: 5px">{{ val?.title ?? val }}</span>
                  <i @click="delSelectClick(val)" class="el-icon-close" style="margint: 0 5px"></i>
                </div>
              </div>
@@ -80,7 +80,7 @@
            trigger="click"
            :hide-on-click="false"
            placement="bottom"
            @command="switchStatusKeywords($event, selList)"
            @command="switchKeywords($event, selList)"
          >
            <div class="common yes-cursor">
              <img src="@/assets/img/shaixuan.png" style="width: 10px" />
@@ -90,7 +90,7 @@
              <el-dropdown-item
                v-for="(item, key) in screenArray"
                :key="key"
                :command="{ command: item.title, ...item }"
                :command="item.title"
                :class="{ selected: status == item.title }"
              >
                <div class="dropdown-view">
@@ -256,6 +256,9 @@
    }
  },
  mounted() {
    this.searchTaskMap.forEach((ele) => {
      this.selList.push(ele.title)
    })
    this.selectArr = this.searchTaskMap
  },
  methods: {
@@ -287,8 +290,8 @@
    inspectionConfigClick() {
      this.$emit("inspectionConfigClick")
    },
    switchStatusKeywords(command, item) {
      console.log("index", command)
    switchKeywords(command, item) {
      console.log("index", command, item)
      this.status = command
      const oldValue = item
      console.log(oldValue)
@@ -301,6 +304,7 @@
      } else {
        oldValue.push(command)
      }
      this.$emit("switchKeywords", item)
    },
    // 删除筛选内容
    delSelectClick(item) {
@@ -427,7 +431,7 @@
  }
}
.selected {
  color: #409eff;
  color: #606266;
}
.dropdown-view {
  position: relative;
src/views/operate/orderPoint/index.vue
@@ -8,10 +8,13 @@
        :placeholder="'请输入位置/产品'"
        :amount-view="false"
        :search-task-map="searchTaskMap"
        :show-sreen="false"
        :screen-array="screenArray"
        @addCommonClick="addProductClick"
        @searchClick="getList"
        @discardBtnClick="discardBtnClick"
        @delSelectClick="delSelectClick"
        @switchKeywords="switchKeywords"
      />
    </div>
    <div class="content_wrap">
@@ -83,41 +86,6 @@
  data() {
    return {
      datas: [],
      // datas: [{
      //     label: '一级 1',
      //     children: [{
      //       label: '二级 1-1',
      //       children: [{
      //         label: '三级 1-1-1'
      //       }]
      //     }]
      //   }, {
      //     label: '一级 2',
      //     children: [{
      //       label: '二级 2-1',
      //       children: [{
      //         label: '三级 2-1-1'
      //       }]
      //     }, {
      //       label: '二级 2-2',
      //       children: [{
      //         label: '三级 2-2-1'
      //       }]
      //     }]
      //   }, {
      //     label: '一级 3',
      //     children: [{
      //       label: '二级 3-1',
      //       children: [{
      //         label: '三级 3-1-1'
      //       }]
      //     }, {
      //       label: '二级 3-2',
      //       children: [{
      //         label: '三级 3-2-1'
      //       }]
      //     }]
      // }],
      defaultProps: {
        children: "children",
        label: "jointName"
@@ -140,12 +108,13 @@
      unit: "",
      reorderId: 0,
      searchTaskMap: [],
      type: "bh"
      type: "bh",
      screenArray: [{ id: "0", type: "bh", title: "重新订购" }]
    }
  },
  created() {
    this.setTable()
    this.searchTaskMap = [{ type: this.type, title: "重新订购" }]
    this.searchTaskMap = [{ id: "0", type: this.type, title: "重新订购" }]
    this.getData()
    this.getLocationList()
  },
@@ -411,6 +380,11 @@
    delSelectClick() {
      this.type = ""
      this.getData()
    },
    switchKeywords(item) {
      console.log(item, "switchKeywords")
      this.type = item?.length > 0 ? "bh" : ""
      this.getData()
    }
  }
}
src/views/overview/OverviewListView.vue
@@ -8,8 +8,10 @@
        :add-title="'新建'"
        :placeholder="'请输入单号/来源单据'"
        :amount-view="false"
        :search-task-map="searchTaskMap"
        @addCommonClick="addBtnClick"
        @searchClick="getList"
        @delSelectClick="delSelectClick"
      />
    </div>
    <div class="list-view">
@@ -79,7 +81,8 @@
      displayEdit: false,
      formLabel: "",
      toLabel: "",
      addName: ""
      addName: "",
      searchTaskMap: []
    }
  },
  created() {
@@ -95,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)
  },
@@ -275,7 +280,12 @@
    },
    // 状态
    getStatus(val) {
      return val === 1 ? "草稿" : val === 3 ? "就绪" : "完成"
      return val === 1 ? "草稿" : val === 3 ? "就绪" : val === 4 ? "完成" : ""
    },
    // 删除搜索状态
    delSelectClick() {
      this.params.status = 0
      this.getData()
    }
  }
}
src/views/warehouseManage/position/index.vue
@@ -5,36 +5,24 @@
        :add-title="'新建'"
        :placeholder="'请输入单号'"
        :amount-view="false"
        :search-task-map="searchTaskMap"
        @addCommonClick="addBtnClick"
        @searchClick="getList"
        @delSelectClick="delSelectClick"
      />
    </div>
    <div class="list-view">
      <div class="table">
        <TableCommonView
          ref="tableListRef"
          :table-list="tableList"
          :show-checkcol="false"
        >
        <template slot="tableButton">
        <TableCommonView ref="tableListRef" :table-list="tableList" :show-checkcol="false">
          <template slot="tableButton">
            <el-table-column label="操作" width="120" fixed="right">
              <template slot-scope="scope">
                <el-button
                  @click="tableRowClick(scope.row,'edit')"
                  type="text"
                  size="small"
                  >编辑</el-button
                >
                <el-button
                  type="text"
                  size="small"
                  @click="tableRowClick(scope.row,'look')"
                  >查看</el-button
                >
                <el-button @click="tableRowClick(scope.row, 'edit')" type="text" size="small">编辑</el-button>
                <el-button type="text" size="small" @click="tableRowClick(scope.row, 'look')">查看</el-button>
              </template>
            </el-table-column>
          </template>
      </TableCommonView>
        </TableCommonView>
      </div>
      <div class="btn-pager">
        <PagerView class="page" :pager-options="pagerOptions" v-on="pagerEvents" />
@@ -70,11 +58,14 @@
        title: "新建",
        infomation: {}
      },
      positionTypeList: getDataByType("positionType")
      positionTypeList: getDataByType("positionType"),
      searchTaskMap: [],
      type: 3
    }
  },
  created() {
    this.setTable()
    this.searchTaskMap = [{ id: "3", title: "内部位置" }]
    this.getData()
  },
  methods: {
@@ -134,6 +125,7 @@
    // 请求数据
    async getData() {
      await getLocationList({
        type: this.type,
        keyword: this.keyword,
        page: this.pagerOptions.currPage,
        pageSize: this.pagerOptions.pageSize
@@ -156,10 +148,12 @@
      this.getData()
    },
    // 行点击
    tableRowClick(row,val) {
      this.editConfig.title =  val=='look'?'查看':"编辑"
    tableRowClick(row, val) {
      this.editConfig.title = val == "look" ? "查看" : "编辑"
      this.editConfig.infomation = { ...row }
      this.editConfig.infomation.parentId = this.editConfig.infomation.parentId?Number(this.editConfig.infomation.parentId):null
      this.editConfig.infomation.parentId = this.editConfig.infomation.parentId
        ? Number(this.editConfig.infomation.parentId)
        : null
      this.editConfig.visible = true
    },
    // 新建
@@ -178,6 +172,11 @@
      }
      this.editConfig.visible = true
      this.editConfig.title = "新建"
    },
    // 删除位置
    delSelectClick() {
      this.type = 0
      this.getData()
    }
  }
}