zzq
2023-09-27 2e2fe994aa53c7c2f389bc32d0933995389963be
Merge branch 'master' of http://192.168.5.5:10010/r/web/WMS
1个文件已添加
8个文件已修改
1287 ■■■■■ 已修改文件
src/api/data.js 98 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/makepager/CommonFormTableView.vue 151 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/makepager/SearchCommonView.vue 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/router/operate/index.js 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/operate/inventoryAdjustment/index.vue 246 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/operate/inventoryAdjustment/inventoryAdjustmentHistory.vue 167 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/warehouseManage/listingRules/index.vue 235 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/warehouseManage/position/AddDialog.vue 302 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/warehouseManage/position/index.vue 57 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/data.js
@@ -17,61 +17,61 @@
    id: 4
  }
]
// 仓库
// 仓库
// 入向运输
const inboundTransportation=[
const inboundTransportation = [
  {
    name:'直接接收产品(1步收货)',
    id:1,
    disabled:false,
    name: "直接接收产品(1步收货)",
    id: 1,
    disabled: false
  },
  {
    name:'接到产品到收料区,再入库(2步收货)',
    id:2,
    disabled:true,
    name: "接到产品到收料区,再入库(2步收货)",
    id: 2,
    disabled: true
  },
  {
    name:'接收产品到收料区,检验,然后入库(3步收货)',
    id:3,
    disabled:true,
    name: "接收产品到收料区,检验,然后入库(3步收货)",
    id: 3,
    disabled: true
  }
]
// 出库运输
const   outboundTransportation=[
const outboundTransportation = [
  {
    name:'直接出库(1步)',
    id:1,
    disabled:false,
    name: "直接出库(1步)",
    id: 1,
    disabled: false
  },
  {
    name:'送到待出库区,再送货(2步发货)',
    id:2,
    disabled:true,
    name: "送到待出库区,再送货(2步发货)",
    id: 2,
    disabled: true
  },
  {
    name:'包装产品,发送到待出库区,再送货(3步发货)',
    id:3,
    disabled:true,
    name: "包装产品,发送到待出库区,再送货(3步发货)",
    id: 3,
    disabled: true
  }
]
// 业务类型
// 作业类型
const baseOperationType=[
// 作业类型
const baseOperationType = [
  {
    name: "收货",
    name: "入库",
    id: 1
  },
  {
    name: "发货",
    name: "出库",
    id: 2
  },
  {
    name: "内部调拨",
    id: 3
  },
  }
]
//创建欠单
const createBackorder=[
const createBackorder = [
  {
    name: "提问",
    id: 1
@@ -83,10 +83,10 @@
  {
    name: "从不",
    id: 3
  },
  }
]
//保留方式 在预定日期之前=3
const reservationMethod=[
const reservationMethod = [
  {
    name: "确认时",
    id: 1
@@ -96,9 +96,9 @@
    id: 2
  }
]
// 产品类别
// 产品类别
// 强制下架策略
const forceRemovalStrategy=[
const forceRemovalStrategy = [
  {
    name: "First In First Out (FIFO)",
    id: 1
@@ -110,10 +110,10 @@
  {
    name: "Closest Location",
    id: 3
  },
  }
]
//成本方法
const costingMethod=[
const costingMethod = [
  {
    name: "标准价格",
    id: 1
@@ -125,10 +125,10 @@
  {
    name: "平均成本(AVCO)",
    id: 3
  },
  }
]
// 库存计价
const inventoryValuation=[
const inventoryValuation = [
  {
    name: "手动",
    id: 1
@@ -140,7 +140,7 @@
]
// 位置
// 位置类型
const positionType=[
const positionType = [
  {
    name: "供应商位置",
    id: 1
@@ -173,23 +173,23 @@
export const getDataByType = (type) => {
  if (type == "purchaseStatus") {
    return purchaseStatus
  }else if(type=='inboundTransportation'){
  } else if (type == "inboundTransportation") {
    return inboundTransportation
  }else if(type=='outboundTransportation'){
  } else if (type == "outboundTransportation") {
    return outboundTransportation
  }else if(type=='baseOperationType'){
    return baseOperationType;
  }else if(type=='createBackorder'){
    return createBackorder;
  }else if(type=='reservationMethod'){
    return reservationMethod;
  }else if(type=='forceRemovalStrategy'){
  } else if (type == "baseOperationType") {
    return baseOperationType
  } else if (type == "createBackorder") {
    return createBackorder
  } else if (type == "reservationMethod") {
    return reservationMethod
  } else if (type == "forceRemovalStrategy") {
    return forceRemovalStrategy
  }else if(type=='costingMethod'){
  } else if (type == "costingMethod") {
    return costingMethod
  }else if(type=='inventoryValuation'){
  } else if (type == "inventoryValuation") {
    return inventoryValuation
  }else if(type=='positionType'){
    return positionType;
  } else if (type == "positionType") {
    return positionType
  }
}
src/components/makepager/CommonFormTableView.vue
@@ -5,7 +5,11 @@
        :data="tableList.tableData"
        style="width: 100%"
        :header-cell-style="{ background: '#f1f3f8', color: '#000009' }"
        :row-class-name="tableRowClassName"
        @row-click="tableRowClick"
      >
        <el-table-column v-if="tableList.selectBox" type="selection" width="40" align="center"> </el-table-column>
        <el-table-column v-if="tableList.selectIndex" type="index" label="序号" width="50"> </el-table-column>
        <el-table-column
          v-for="(item, i) in tableList.tableColumn"
          :key="i"
@@ -73,7 +77,8 @@
                :prop="'tableData.' + scope.$index + '.' + item.prop"
                :rules="[{ required: item.isRequird ? true : false, message: '输入不能为空' }]"
              >
                <el-date-picker v-model="scope.row[item.prop]" type="date" size="mini" style="width: 110px">
                <span v-if="scope.row.isEdit">{{ scope.row[item.prop] }}</span>
                <el-date-picker v-else v-model="scope.row[item.prop]" type="date" size="mini" style="width: 110px">
                </el-date-picker>
              </el-form-item>
              <el-form-item
@@ -102,7 +107,9 @@
                :prop="'tableData.' + scope.$index + '.' + item.prop"
                :rules="[{ required: item.isRequird ? true : false, message: '输入不能为空' }]"
              >
                <span v-if="scope.row.isEdit">{{ scope.row[item.prop] }}</span>
                <el-input-number
                  v-else
                  v-model="scope.row[item.prop]"
                  placeholder=""
                  :min="0"
@@ -130,6 +137,76 @@
                  </el-select>
                </div>
              </el-form-item>
              <!-- 位置 -->
              <el-form-item v-else-if="item.location" label=" " :prop="'tableData.' + scope.$index + '.' + item.prop">
                <div class="custom-name">
                  <span v-if="scope.row.isEdit">{{ scope.row[item.prop] }}</span>
                  <el-select
                    v-else
                    v-model="scope.row[item.prop]"
                    placeholder="请选择"
                    size="mini"
                    style="width: 80%"
                    @change="selLocationClick"
                  >
                    <el-option v-for="item in selLocationOptions" :key="item.id" :label="item.name" :value="item.name">
                    </el-option>
                  </el-select>
                </div>
              </el-form-item>
              <!-- 产品 -->
              <el-form-item v-else-if="item.product" label=" " :prop="'tableData.' + scope.$index + '.' + item.prop">
                <div class="custom-name">
                  <span v-if="scope.row.isEdit">{{ scope.row[item.prop] }}</span>
                  <el-select
                    v-else
                    v-model="scope.row[item.prop]"
                    placeholder="请选择"
                    size="mini"
                    style="width: 80%"
                    @change="
                      (val) => {
                        selProductClick(val)
                      }
                    "
                  >
                    <el-option
                      v-for="item in productNameOptions"
                      :key="item.id"
                      :label="item.name"
                      :value="{ value: item.id, label: item.name, amount: item.amount, unit: item.unit }"
                    >
                    </el-option>
                  </el-select>
                </div>
              </el-form-item>
              <!-- 用户 -->
              <el-form-item v-else-if="item.user" label=" " :prop="'tableData.' + scope.$index + '.' + item.prop">
                <div class="custom-name">
                  <span>{{ "管理员" }}</span>
                  <!-- <el-select
                    v-else
                    v-model="scope.row[item.prop]"
                    placeholder="请选择"
                    size="mini"
                    style="width: 80%"
                    @change="selCommonClick"
                  >
                    <el-option v-for="item in memberOptions" :key="item.id" :label="item.name" :value="item.name">
                    </el-option>
                  </el-select> -->
                </div>
              </el-form-item>
              <!-- 公司 -->
              <el-form-item v-else-if="item.company" label=" " :prop="'tableData.' + scope.$index + '.' + item.prop">
                <div class="custom-name">
                  <span v-if="scope.row.isEdit">{{ scope.row[item.prop] }}</span>
                  <el-select v-else v-model="scope.row[item.prop]" placeholder="请选择" size="mini" style="width: 80%">
                    <el-option v-for="item in companyOptions" :key="item.id" :label="item.name" :value="item">
                    </el-option>
                  </el-select>
                </div>
              </el-form-item>
              <span v-else>{{ scope.row[item.prop] }}</span>
            </template>
            <span v-else>{{ scope.row[item.prop] }}</span>
@@ -138,7 +215,7 @@
        <slot name="tableButton" />
      </el-table>
    </el-form>
    <div v-if="!detailEnter" style="margin: 10px">
    <div v-if="!detailEnter && !isinventory && !islistingrules" style="margin: 10px">
      <el-button size="small" type="primary" @click="add">添加明细行</el-button>
      <!-- <el-button size="small" type="primary" @click="empty">清空</el-button> -->
    </div>
@@ -154,6 +231,8 @@
<script>
import { getProductList } from "@/api/product/product"
import { getLocationList } from "@/api/warehouseManage/warehouse"
import { getCompanyList } from "@/api/common/other"
// import SelectCommonDialog from "@/views/other/commonDialog/SelectCommonDialog"
export default {
  name: "CommmonFormTableView",
@@ -171,6 +250,8 @@
      type: Object,
      default: () => {
        return {
          selectBox: false,
          selectIndex: false,
          tableData: [], // 接口返回数据
          tableColumn: [
            // table表单
@@ -178,6 +259,14 @@
          ]
        }
      }
    },
    isinventory: {
      type: Boolean,
      default: false
    },
    islistingrules: {
      type: Boolean,
      default: false
    }
  },
  data() {
@@ -192,14 +281,24 @@
      },
      productIndex: 0,
      productNameOptions: [],
      memberOptions: [{ id: 1, name: "管理员" }],
      selOptions: [
        { id: 1, name: "件" },
        { id: 2, name: "打" }
      ]
      ],
      selLocationOptions: [], // 位置
      companyOptions: [] // 公司
    }
  },
  created() {
    this.getProductList()
    if (this.isinventory) {
      this.getLocationList()
    }
    if (this.islistingrules) {
      this.getLocationList()
      this.getCompanyList()
    }
    this.tableList = this.productTableList
  },
  computed: {},
@@ -223,6 +322,28 @@
        }
      })
    },
    // 位置
    async getLocationList() {
      await getLocationList({
        keyword: "",
        page: 1,
        pageSize: 100
      }).then((res) => {
        if (res.code === 200) {
          const list = res.data ? res.data : []
          this.selLocationOptions = list
        }
      })
    },
    // 获取公司列表
    async getCompanyList() {
      await getCompanyList().then((res) => {
        console.log(res)
        if (res.data.code === 200) {
          this.companyOptions = res.data.data
        }
      })
    },
    // 选择产品
    selProductClick(item) {
      this.tableList.tableData.map((ite) => {
@@ -235,7 +356,20 @@
      })
      console.log(this.tableList.tableData)
    },
    // 选择单位
    // 选择位置
    selLocationClick(item) {
      console.log(item)
      console.log(this.tableList.tableData)
      // this.tableList.tableData.map((ite) => {
      //   if (ite.location.label === item.label) {
      //     ite.location = item.label
      //   }
      //   if (ite.subLocation.label === item.label) {
      //     ite.subLocation = item.label
      //   }
      // })
    },
    // 选择单位/用户
    selCommonClick(item) {
      console.log(item)
    },
@@ -320,6 +454,14 @@
        return true
      }
      this.tableList.tableData.splice(scope.$index, 1)
    },
    // 行点击
    tableRowClick(row) {
      this.$emit("tableRowClick", row, row.index)
    },
    // 单选行相关
    tableRowClassName({ row, rowIndex }) {
      row.index = rowIndex
    }
  }
}
@@ -333,6 +475,7 @@
    margin-bottom: 0;
    .custom-name {
      display: flex;
      justify-content: center;
      .common-select-btn {
        margin-left: 5px;
        font-size: 18px;
src/components/makepager/SearchCommonView.vue
@@ -3,9 +3,13 @@
    <div class="search-top">
      <div class="left">
        <el-button v-if="showAdd" type="primary" size="mini" @click="addBtn">{{ addTitle }}</el-button>
        <el-button v-if="showDiscard" size="mini" @click="discardBtn" style="margin-left: 0px">{{ "取消" }}</el-button>
        <div class="download" @click="downloadClick" :style="{ cursor: showDownload ? 'pointer' : 'no-drop' }">
          <img src="@/assets/img/xiazai.png" style="width: 13px" />
        </div>
        <el-button v-if="showApply" type="text" size="mini" @click="addBtn" style="margin-left: 10px">{{
          "应用全部"
        }}</el-button>
        <slot name="leftButton" />
      </div>
      <div v-if="amountView" class="amount">
@@ -79,7 +83,14 @@
      type: Boolean,
      default: true
    },
    showDiscard: {
      default: false
    },
    showDownload: {
      type: Boolean,
      default: false
    },
    showApply: {
      type: Boolean,
      default: false
    },
@@ -188,9 +199,17 @@
    addBtn() {
      this.$emit("addCommonClick")
    },
    // 丢弃
    discardBtn() {
      this.$emit("discardBtnClick")
    },
    // 下载
    downloadClick() {
      this.$emit("downloadClick")
    },
    // 丢弃
    applyBtn() {
      this.$emit("applyBtnClick")
    },
    // 模具-检查配置
    inspectionConfigClick() {
@@ -212,7 +231,7 @@
    align-items: center;
    .left {
      display: flex;
      width: 150px;
      width: 210px;
      margin-left: 20px;
      .download {
        width: 30px;
src/router/operate/index.js
@@ -3,6 +3,8 @@
const allot = (resolve) => require(["@/views/operate/allot/index"], resolve) // 调拨
const scrap = (resolve) => require(["@/views/operate/scrap/index"], resolve) // 报废
const inventoryAdjustment = (resolve) => require(["@/views/operate/inventoryAdjustment/index"], resolve) // 库存调整
const inventoryAdjustmentHistory = (resolve) =>
  require(["@/views/operate/inventoryAdjustment/inventoryAdjustmentHistory"], resolve) // 库存调整历史
const appconfig = [
  {
@@ -28,6 +30,14 @@
    meta: {
      title: "库存调整"
    }
  },
  {
    path: "/operate/inventoryAdjustmentHistory",
    name: "inventoryAdjustmentHistory",
    component: inventoryAdjustmentHistory,
    meta: {
      title: "库存调整 / 历史"
    }
  }
]
src/views/operate/inventoryAdjustment/index.vue
@@ -2,57 +2,90 @@
  <div class="rightContent">
    <div class="top">
      <SearchCommonView
        :add-title="'新建'"
        :placeholder="'请输入单号'"
        :add-title="addTitle"
        :show-discard="showDiscard"
        :show-apply="true"
        :placeholder="'请输入位置/产品'"
        :amount-view="false"
        @addCommonClick="addBtnClick"
        @addCommonClick="addProductClick"
        @searchClick="getList"
        @discardBtnClick="discardBtnClick"
        @applyBtnClick="applyBtnClick"
      />
    </div>
    <div class="list-view">
      <div class="table">
        <TableCommonView
          ref="tableListRef"
          :table-list="tableList"
          :show-checkcol="false"
        <CommonFormTableView
          :isinventory="true"
          :product-table-list="tableList"
          @inputContent="inputContent"
          @tableRowClick="tableRowClick"
        ></TableCommonView>
        >
          <template slot="tableButton">
            <el-table-column label="操作" width="180" fixed="right" align="center">
              <template slot-scope="scope">
                <span @click="handleHistoryClick(scope.row)">
                  <i class="el-icon-refresh-left"></i>
                  <span>历史</span>
                </span>
                <span v-if="scope.row.isSet" @click="handleSetClick(scope)" class="margin_left_5px">
                  <i class="el-icon-setting"></i>
                  <span>设置</span>
                </span>
                <template v-else>
                  <span @click="handleUseClick(scope)" class="margin_left_5px">
                    <i class="el-icon-document"></i>
                    <span>应用</span>
                  </span>
                  <span @click="handleCleanupClick(scope)" class="margin_left_5px">
                    <i class="el-icon-delete"></i>
                    <span>清除</span>
                  </span>
                </template>
              </template>
            </el-table-column>
          </template>
        </CommonFormTableView>
      </div>
      <div class="btn-pager">
        <PagerView class="page" :pager-options="pagerOptions" v-on="pagerEvents" />
      </div>
    </div>
    <!-- 新建/编辑 -->
    <AddDialog
      v-if="editConfig.visible"
      @refresh="refresh"
      :positionList="tableList.tableInfomation"
      :edit-common-config="editConfig"
    />
  </div>
</template>
<script>
import CommonFormTableView from "@/components/makepager/CommonFormTableView"
import pageMixin from "@/components/makepager/pager/mixin/pageMixin"
import { getLocationList } from "@/api/warehouseManage/warehouse"
import AddDialog from "@/views/warehouseManage/position/AddDialog"
import { getDataByType } from "@/api/data"
export default {
  name: "InventoryAdjustment",
  props: {},
  components: { AddDialog },
  components: { CommonFormTableView },
  mixins: [pageMixin],
  computed: {},
  data() {
    return {
      addTitle: "新建",
      showDiscard: false,
      tableList: {},
      tableData: [
        {
          location: "HC/销售区",
          productName: "夏季真丝吊带裙",
          amount: "0.00",
          unit: "件",
          count: "0.00",
          date: "2023-12-31",
          user: "管理员",
          isSet: true,
          isEdit: true
        }
      ],
      searchOptions: [],
      editConfig: {
        visible: false,
        title: "新建",
        infomation: {}
      },
      positionTypeList: getDataByType("positionType")
      countId: 0,
      isNoProduct: true, // 添加明细行时是否有产品未选择
      isRowClick: false
    }
  },
  created() {
@@ -62,55 +95,124 @@
  methods: {
    setTable() {
      this.tableList = {
        tableInfomation: [],
        tableData: this.tableData,
        selectBox: true,
        showcol: this.showcol,
        allcol: [],
        tableColumn: this.setTableColumn(this.showcol)
        tableColumn: [
          { label: "位置", prop: "location", location: true },
          { label: "产品", prop: "productName", product: true },
          { label: "在库数量", prop: "amount" },
          { label: "计量单位", prop: "unit" },
          { label: "计数的数量", prop: "count", inputFloat: true },
          { label: "差异", prop: "difference" },
          { label: "日期", prop: "date", date: true },
          { label: "用户", prop: "user", user: true }
        ]
      }
      let allcol = []
      for (let i = 0; i < this.tableList.tableColumn.length; i++) {
        if (!this.tableList.tableColumn[i].default) {
          const label = this.tableList.tableColumn[i].label
          allcol.push(label)
    },
    // 操作输入
    inputContent(val, prop, row) {
      this.countId = row.countId
      this.tableData.map((item) => {
        if (item.countId === row.countId) {
          item[prop] = val
        }
      })
    },
    // 新增
    addProductClick() {
      console.log(this.tableData)
      this.isSel()
      if (this.isNoProduct && this.addTitle === "新建") {
        this.addTitle = "保存"
        this.showDiscard = true
        this.isRowClick = false
        this.countId++
        this.tableData.push({
          countId: this.countId,
          productId: "",
          amount: 0,
          unit: "",
          productName: "",
          count: "0.00",
          isSet: true,
          isEdit: false
        })
      } else if (this.isNoProduct && this.addTitle === "保存") {
        this.addTitle = "新建"
        this.showDiscard = false
      }
    },
    // 是否选择产品
    isSel() {
      for (let i = 0; i < this.tableData.length; i++) {
        if (this.tableData[i].productName.length === 0) {
          this.isNoProduct = false
          break
        } else {
          this.isNoProduct = true
        }
      }
      this.tableList.allcol = allcol
    },
    setTableColumn(showcol) {
      console.log(showcol)
      let tableColumn = [
        {
          label: "位置",
          prop: "jointName",
          isShowColumn: true,
          default: true
        },
        {
          label: "位置类型",
          prop: "type",
          isShowColumn: true,
          default: true,
          conversion: true,
          getStatus: this.getTypesList
        }
      ]
      return tableColumn
    },
    getTypesList(val) {
      let string = "--"
      if (val) {
        for (let i in this.positionTypeList) {
          if (this.positionTypeList[i].id == val) {
            return this.positionTypeList[i].name
          }
        }
    // 取消
    discardBtnClick() {
      if (this.isRowClick) {
        this.tableData.map((item) => {
          item.isEdit = true
        })
      } else {
        this.tableData.splice(this.tableData.length - 1, 1)
      }
      return string
      this.addTitle = "新建"
      this.showDiscard = false
    },
    selTableCol(val) {
      this.showcol = val
      this.tableList.tableColumn = this.setTableColumn(val)
    // 应用全部
    applyBtnClick() {
      console.log("应用全部")
    },
    // 历史
    handleHistoryClick(row) {
      this.isSel()
      console.log(row)
      if (this.isNoProduct) {
        console.log("历史")
        this.$router.push({
          name: "inventoryAdjustmentHistory",
          params: { id: row.id }
        })
      }
    },
    // 设置
    handleSetClick(scope) {
      this.isSel()
      if (this.isNoProduct) {
        scope.row.isSet = !scope.row.isSet
      }
    },
    // 应用
    handleUseClick(scope) {
      scope.row.isSet = !scope.row.isSet
    },
    // 清除
    handleCleanupClick(scope) {
      scope.row.isSet = !scope.row.isSet
    },
    // 行点击
    tableRowClick(row, rowIndex) {
      console.log(row, rowIndex)
      this.addTitle = "保存"
      this.showDiscard = true
      this.isRowClick = true
      this.isSel()
      if (!this.isNoProduct) {
        this.tableData.splice(this.tableData.length - 1, 1)
      }
      this.tableData.map((item, index) => {
        if (index === rowIndex) {
          item.isEdit = false
        } else {
          item.isEdit = true
        }
      })
    },
    // 请求数据
    async getData() {
@@ -126,23 +228,11 @@
        }
      })
    },
    refresh() {
      this.pagerOptions.currPage = 1
      this.getData()
    },
    // 搜索
    getList(val) {
      this.keyword = val
      this.pagerOptions.currPage = 1
      this.getData()
    },
    // 行点击
    tableRowClick(row) {
      console.log(row)
      this.editConfig.title = "编辑"
      this.editConfig.infomation = { ...row }
      this.editConfig.infomation.parentId = Number(this.editConfig.infomation.parentId)
      this.editConfig.visible = true
    },
    // 新建
    addBtnClick() {
src/views/operate/inventoryAdjustment/inventoryAdjustmentHistory.vue
New file
@@ -0,0 +1,167 @@
<template>
  <div class="rightContent">
    <div class="top">
      <SearchCommonView
        :show-add="false"
        :placeholder="'请输入单号/产品'"
        :amount-view="false"
        @searchClick="getList"
      />
    </div>
    <div class="list-view">
      <div class="table">
        <TableCommonView ref="tableListRef" :table-list="tableList" @selTableCol="selTableCol"></TableCommonView>
      </div>
      <div class="btn-pager">
        <PagerView class="page" :pager-options="pagerOptions" v-on="pagerEvents" />
      </div>
    </div>
  </div>
</template>
<script>
import pageMixin from "@/components/makepager/pager/mixin/pageMixin"
import { getAllList } from "@/api/overview/overview"
export default {
  name: "InventoryAdjustmentHistory",
  props: {},
  components: {},
  mixins: [pageMixin],
  computed: {},
  data() {
    return {
      tableList: {},
      showcol: ["状态"],
      searchOptions: [],
      keyword: ""
    }
  },
  created() {
    this.setTable()
    this.getData()
  },
  methods: {
    setTable() {
      this.tableList = {
        tableInfomation: [],
        selectBox: true,
        showcol: this.showcol,
        allcol: [],
        tableColumn: this.setTableColumn(this.showcol)
      }
      let allcol = []
      for (let i = 0; i < this.tableList.tableColumn.length; i++) {
        if (!this.tableList.tableColumn[i].default) {
          const label = this.tableList.tableColumn[i].label
          allcol.push(label)
        }
      }
      this.tableList.allcol = allcol
    },
    setTableColumn(showcol) {
      let tableColumn = [
        {
          label: "日期",
          prop: "operationDate",
          isShowColumn: true,
          default: true,
          date: true
        },
        {
          label: "单号",
          prop: "number",
          isShowColumn: true,
          default: true
        },
        {
          label: "产品",
          prop: "productName",
          isShowColumn: true,
          default: true
        },
        {
          label: "从",
          prop: "from",
          isShowColumn: true,
          default: true
        },
        {
          label: "至",
          prop: "to",
          isShowColumn: true,
          default: true
        },
        {
          label: "数量",
          prop: "amount",
          isShowColumn: true,
          default: true
        },
        {
          label: "单位",
          prop: "unit",
          isShowColumn: true,
          default: true
        },
        {
          label: "状态",
          prop: "status",
          width: 120,
          isShowColumn: showcol.includes("状态"),
          default: false,
          status: true,
          isCallMethod: true,
          getCallMethod: this.getStatus
        },
        {
          label: "完成者",
          prop: "user",
          isShowColumn: showcol.includes("完成者"),
          default: false
        }
      ]
      return tableColumn
    },
    selTableCol(val) {
      this.showcol = val
      this.tableList.tableColumn = this.setTableColumn(val)
    },
    // 请求数据
    async getData() {
      await getAllList({
        number: this.keyword,
        page: this.pagerOptions.currPage,
        pageSize: this.pagerOptions.pageSize,
        sourceNumber: this.keyword
      }).then((res) => {
        if (res.code === 200) {
          const list = res.data.map((item) => {
            return {
              ...item,
              from: item.fromLocation.name,
              to: item.toLocation.name
            }
          })
          this.tableList.tableInfomation = list || []
          this.pagerOptions.totalCount = res.total
        }
      })
    },
    // 搜索
    getList(val) {
      console.log(val)
      this.keyword = val
      this.pagerOptions.currPage = 1
      this.getData()
    },
    // 状态
    getStatus(val) {
      return val === 1 ? "草稿" : val === 3 ? "就绪" : "完成"
    }
  }
}
</script>
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style lang="scss" scoped></style>
src/views/warehouseManage/listingRules/index.vue
@@ -2,57 +2,74 @@
  <div class="rightContent">
    <div class="top">
      <SearchCommonView
        :add-title="'新建'"
        :placeholder="'请输入单号'"
        :add-title="addTitle"
        :show-discard="showDiscard"
        :placeholder="'请输入位置/产品'"
        :amount-view="false"
        @addCommonClick="addBtnClick"
        @addCommonClick="addProductClick"
        @searchClick="getList"
        @discardBtnClick="discardBtnClick"
        @applyBtnClick="applyBtnClick"
      />
    </div>
    <div class="list-view">
      <div class="table">
        <TableCommonView
          ref="tableListRef"
          :table-list="tableList"
          :show-checkcol="false"
        <CommonFormTableView
          :islistingrules="true"
          :product-table-list="tableList"
          @inputContent="inputContent"
          @tableRowClick="tableRowClick"
        ></TableCommonView>
        >
        </CommonFormTableView>
      </div>
      <div class="btn-pager">
        <PagerView class="page" :pager-options="pagerOptions" v-on="pagerEvents" />
      </div>
    </div>
    <!-- 新建/编辑 -->
    <AddDialog
      v-if="editConfig.visible"
      @refresh="refresh"
      :positionList="tableList.tableInfomation"
      :edit-common-config="editConfig"
    />
  </div>
</template>
<script>
import CommonFormTableView from "@/components/makepager/CommonFormTableView"
import pageMixin from "@/components/makepager/pager/mixin/pageMixin"
import { getLocationList } from "@/api/warehouseManage/warehouse"
import AddDialog from "@/views/warehouseManage/position/AddDialog"
import { getDataByType } from "@/api/data"
export default {
  name: "ListingRules",
  name: "listingRules",
  props: {},
  components: { AddDialog },
  components: { CommonFormTableView },
  mixins: [pageMixin],
  computed: {},
  data() {
    return {
      addTitle: "新建",
      showDiscard: false,
      tableList: {},
      tableData: [
        {
          location: "HC/销售区",
          productName: "夏季真丝吊带裙",
          amount: "0.00",
          unit: "件",
          count: "0.00",
          date: "2023-12-31",
          user: "管理员",
          isSet: true,
          isEdit: true
        },
        {
          location: "HM/销售区",
          productName: "夏季真丝吊带裙",
          productCategory: "",
          subLocation: "A区",
          companyName: "贝思科",
          isSet: true,
          isEdit: true
        }
      ],
      searchOptions: [],
      editConfig: {
        visible: false,
        title: "新建",
        infomation: {}
      },
      positionTypeList: getDataByType("positionType")
      countId: 0,
      isNoProduct: true, // 添加明细行时是否有产品未选择
      isRowClick: false
    }
  },
  created() {
@@ -62,55 +79,131 @@
  methods: {
    setTable() {
      this.tableList = {
        tableInfomation: [],
        tableData: this.tableData,
        selectBox: true,
        showcol: this.showcol,
        allcol: [],
        tableColumn: this.setTableColumn(this.showcol)
        tableColumn: [
          { label: "当产品到达", prop: "location", location: true },
          { label: "产品", prop: "productName", product: true },
          // { label: "产品类别", prop: "productCategory", productCategory: true },
          { label: "存储到子位置", prop: "subLocation", location: true },
          { label: "公司", prop: "companyName", company: true }
        ]
      }
      let allcol = []
      for (let i = 0; i < this.tableList.tableColumn.length; i++) {
        if (!this.tableList.tableColumn[i].default) {
          const label = this.tableList.tableColumn[i].label
          allcol.push(label)
        }
      }
      this.tableList.allcol = allcol
    },
    setTableColumn(showcol) {
      console.log(showcol)
      let tableColumn = [
        {
          label: "位置",
          prop: "jointName",
          isShowColumn: true,
          default: true
        },
        {
          label: "位置类型",
          prop: "type",
          isShowColumn: true,
          default: true,
          conversion: true,
          getStatus: this.getTypesList
    // 操作输入
    inputContent(val, prop, row) {
      this.countId = row.countId
      this.tableData.map((item) => {
        if (item.countId === row.countId) {
          item[prop] = val
        }
      ]
      return tableColumn
      })
    },
    getTypesList(val) {
      let string = "--"
      if (val) {
        for (let i in this.positionTypeList) {
          if (this.positionTypeList[i].id == val) {
            return this.positionTypeList[i].name
    // 新增
    addProductClick() {
      console.log(this.tableData)
      this.isSel()
      if (this.isNoProduct && this.addTitle === "新建") {
        this.addTitle = "保存"
        this.showDiscard = true
        this.isRowClick = false
        this.countId++
        this.tableData.push({
          countId: this.countId,
          productId: "",
          location: 0,
          subLocation: "",
          productName: "",
          companyName: "",
          isSet: true,
          isEdit: false
        })
      } else if (this.isNoProduct && this.addTitle === "保存") {
        this.addTitle = "新建"
        this.showDiscard = false
        this.tableData.map((item) => {
          item.isEdit = true
          console.log(item)
          if (typeof item.location === "object") {
            item.location = item.location.name
          }
          if (typeof item.subLocation === "object") {
            item.location = item.subLocation.name
          }
        })
      }
    },
    // 是否选择产品
    isSel() {
      for (let i = 0; i < this.tableData.length; i++) {
        if (this.tableData[i].productName.length === 0) {
          this.isNoProduct = false
          break
        } else {
          this.isNoProduct = true
        }
      }
      return string
    },
    selTableCol(val) {
      this.showcol = val
      this.tableList.tableColumn = this.setTableColumn(val)
    // 取消
    discardBtnClick() {
      if (this.isRowClick) {
        this.tableData.map((item) => {
          item.isEdit = true
        })
      } else {
        this.tableData.splice(this.tableData.length - 1, 1)
      }
      this.addTitle = "新建"
      this.showDiscard = false
    },
    // 应用全部
    applyBtnClick() {
      console.log("应用全部")
    },
    // 历史
    handleHistoryClick(row) {
      this.isSel()
      console.log(row)
      if (this.isNoProduct) {
        console.log("历史")
        this.$router.push({
          name: "inventoryAdjustmentHistory",
          params: { id: row.id }
        })
      }
    },
    // 设置
    handleSetClick(scope) {
      this.isSel()
      if (this.isNoProduct) {
        scope.row.isSet = !scope.row.isSet
      }
    },
    // 应用
    handleUseClick(scope) {
      scope.row.isSet = !scope.row.isSet
    },
    // 清除
    handleCleanupClick(scope) {
      scope.row.isSet = !scope.row.isSet
    },
    // 行点击
    tableRowClick(row, rowIndex) {
      console.log(row, rowIndex)
      this.addTitle = "保存"
      this.showDiscard = true
      this.isRowClick = true
      this.isSel()
      if (!this.isNoProduct) {
        this.tableData.splice(this.tableData.length - 1, 1)
      }
      this.tableData.map((item, index) => {
        if (index === rowIndex) {
          item.isEdit = false
        } else {
          item.isEdit = true
        }
      })
    },
    // 请求数据
    async getData() {
@@ -126,23 +219,11 @@
        }
      })
    },
    refresh() {
      this.pagerOptions.currPage = 1
      this.getData()
    },
    // 搜索
    getList(val) {
      this.keyword = val
      this.pagerOptions.currPage = 1
      this.getData()
    },
    // 行点击
    tableRowClick(row) {
      console.log(row)
      this.editConfig.title = "编辑"
      this.editConfig.infomation = { ...row }
      this.editConfig.infomation.parentId = Number(this.editConfig.infomation.parentId)
      this.editConfig.visible = true
    },
    // 新建
    addBtnClick() {
src/views/warehouseManage/position/AddDialog.vue
@@ -34,16 +34,15 @@
      >
        <div>
          <!-- <div>aaa</div> -->
          <FormBtnsView :showPosition="true" :showWarehouse=false @productClick="productClick" />
          <FormBtnsView :showPosition="true" :showWarehouse="false" @productClick="productClick" />
        </div>
        <div class="basic-info">
          <div class="basic-info-view">
            <el-row>
              <el-col :span="24" class="line_height_30px">
                <el-form-item label="位置名称" prop="name">
                  <el-input
                  :disabled="!showFooter"
                    :disabled="!showFooter"
                    v-model="editConfig.infomation.name"
                    placeholder="请输入"
                  ></el-input>
@@ -58,12 +57,7 @@
                    style="width: 45%"
                    :disabled="!showFooter"
                  >
                    <el-option
                      v-for="item in positionList"
                      :key="item.id"
                      :label="item.name"
                      :value="item.id"
                    >
                    <el-option v-for="item in positionList" :key="item.id" :label="item.name" :value="item.id">
                    </el-option>
                  </el-select>
                </el-form-item>
@@ -71,94 +65,81 @@
            </el-row>
          </div>
          <div class="bottom">
              <div class="left">
                <div class="second-label">其他信息</div>
                <el-form-item label="位置类型" prop="type">
                  <el-select
                   v-model="editConfig.infomation.type"
                    filterable
                    :disabled="!showFooter"
                    placeholder="请选择"
                    style="width: 100%"
                    no-data-text="暂无数据"
                  >
                    <el-option
                      v-for="item in positionTypeList"
                      :key="item.id"
                      :label="item.name"
                      :value="item.id"
                    >
                    </el-option>
                  </el-select>
                </el-form-item>
                <el-form-item label="是一个报废位置" v-if="editConfig.infomation.type==3||editConfig.infomation.type==5" prop="isScrapLocation">
                  <el-checkbox
            <div class="left">
              <div class="second-label">其他信息</div>
              <el-form-item label="位置类型" prop="type">
                <el-select
                  v-model="editConfig.infomation.type"
                  filterable
                  :disabled="!showFooter"
                  v-model="editConfig.infomation.isScrapLocation"
                  >
                  </el-checkbox>
                </el-form-item>
                <el-form-item label="是一个退回位置" prop="isReturnLocation">
                  <el-checkbox
                  placeholder="请选择"
                  style="width: 100%"
                  no-data-text="暂无数据"
                >
                  <el-option v-for="item in positionTypeList" :key="item.id" :label="item.name" :value="item.id">
                  </el-option>
                </el-select>
              </el-form-item>
              <el-form-item
                label="是一个报废位置"
                v-if="editConfig.infomation.type == 3 || editConfig.infomation.type == 5"
                prop="isScrapLocation"
              >
                <el-checkbox :disabled="!showFooter" v-model="editConfig.infomation.isScrapLocation"> </el-checkbox>
              </el-form-item>
              <el-form-item label="是一个退回位置" prop="isReturnLocation">
                <el-checkbox :disabled="!showFooter" v-model="editConfig.infomation.isReturnLocation"> </el-checkbox>
              </el-form-item>
              <el-form-item label="补充位置" v-if="editConfig.infomation.type == 3" prop="replenishLocation">
                <el-checkbox :disabled="!showFooter" v-model="editConfig.infomation.replenishLocation"> </el-checkbox>
              </el-form-item>
            </div>
            <div class="left" v-if="editConfig.infomation.type == 3 || editConfig.infomation.type == 7">
              <div class="second-label">循环计数</div>
              <el-form-item label="盘点频率(天)" prop="countFrequency">
                <el-input
                  :disabled="!showFooter"
                  v-model="editConfig.infomation.isReturnLocation"
                  >
                  </el-checkbox>
                </el-form-item>
                <el-form-item label="补充位置" v-if="editConfig.infomation.type==3" prop="replenishLocation">
                  <el-checkbox
                  v-model="editConfig.infomation.countFrequency"
                  placeholder="请输入"
                ></el-input>
              </el-form-item>
              <el-form-item label="最近有效盘点" prop="recentlyCount">
                <el-date-picker
                  :disabled="!showFooter"
                  v-model="editConfig.infomation.replenishLocation"
                  >
                  </el-checkbox>
                </el-form-item>
              </div>
              <div class="left" v-if="editConfig.infomation.type==3||editConfig.infomation.type==7">
                <div class="second-label">循环计数</div>
                <el-form-item label="盘点频率(天)" prop="countFrequency">
                  <el-input
                   :disabled="!showFooter"
                    v-model="editConfig.infomation.countFrequency"
                    placeholder="请输入"
                  ></el-input>
                </el-form-item>
                <el-form-item label="最近有效盘点" prop="recentlyCount">
                  <el-date-picker
                   :disabled="!showFooter"
                    v-model="editConfig.infomation.recentlyCount"
                    type="date"
                    placeholder="选择日期"
                    value-format="yyyy-MM-dd"
                  >
                  </el-date-picker>
                </el-form-item>
                <el-form-item label="预计下一次盘点" prop="nextCount">
                  <el-date-picker
                   :disabled="!showFooter"
                    v-model="editConfig.infomation.nextCount"
                    type="date"
                    placeholder="选择日期"
                    value-format="yyyy-MM-dd"
                  >
                  </el-date-picker>
                </el-form-item>
              </div>
                  v-model="editConfig.infomation.recentlyCount"
                  type="date"
                  placeholder="选择日期"
                  value-format="yyyy-MM-dd"
                >
                </el-date-picker>
              </el-form-item>
              <el-form-item label="预计下一次盘点" prop="nextCount">
                <el-date-picker
                  :disabled="!showFooter"
                  v-model="editConfig.infomation.nextCount"
                  type="date"
                  placeholder="选择日期"
                  value-format="yyyy-MM-dd"
                >
                </el-date-picker>
              </el-form-item>
            </div>
          </div>
          <el-form-item label="" prop="notes" label-width="20px">
                  <el-input
                    :disabled="!showFooter"
                      type="textarea"
                      placeholder="外部备注"
                      :autosize="{ minRows: 3, maxRows: 4 }"
                      maxlength="500"
                      clearable
                      v-model="editConfig.infomation.notes"
                  ></el-input>
            <el-input
              :disabled="!showFooter"
              type="textarea"
              placeholder="外部备注"
              :autosize="{ minRows: 3, maxRows: 4 }"
              maxlength="500"
              clearable
              v-model="editConfig.infomation.notes"
            ></el-input>
          </el-form-item>
          <div class="bottom">
            <!-- <div class="left"> -->
                <!-- <div class="second-label">物流</div> -->
                <!-- <el-form-item label="下载策略" prop="desc">
            <!-- <div class="second-label">物流</div> -->
            <!-- <el-form-item label="下载策略" prop="desc">
                  <el-select
                   v-model="editConfig.value1"
                    filterable
@@ -177,7 +158,7 @@
                    </el-option>
                  </el-select>
                </el-form-item> -->
              <!-- </div> -->
            <!-- </div> -->
          </div>
        </div>
      </el-form>
@@ -191,8 +172,8 @@
</template>
<script>
import { addLocation,updateLocation,deleteLocation } from "@/api/warehouseManage/warehouse"
import { getDataByType } from "@/api/data";
import { addLocation, updateLocation, deleteLocation } from "@/api/warehouseManage/warehouse"
import { getDataByType } from "@/api/data"
export default {
  name: "AddScrapDialog",
  props: {
@@ -206,8 +187,8 @@
        }
      }
    },
    positionList:{
      type:[Array]
    positionList: {
      type: [Array]
    }
  },
  components: {},
@@ -218,19 +199,21 @@
      editConfig: this.editCommonConfig,
      rules: {
        name: [{ required: true, message: "请输入", trigger: "change" }],
        countFrequency: [{
        countFrequency: [
          {
            required: false,
            message: "请填写不小于0的数字",
            trigger: "change",
            trigger: "change"
          },
          {
            validator: this.validatorNum,
            trigger: "blur",
          },],
            trigger: "blur"
          }
        ]
      },
      showEdit: false, // 是否显示编辑按钮
      showFooter: false, // 是否显示取消保存
      positionTypeList: getDataByType("positionType"),
      positionTypeList: getDataByType("positionType")
    }
  },
  created() {
@@ -240,23 +223,21 @@
    validatorNum(rule, value, callback) {
      if (value) {
        if (value == undefined || value == null) {
          callback(new Error("请输入有效数字"));
          callback(new Error("请输入有效数字"))
        } else {
          var reg = /^\+?[0-9]\d*$/;
          var reg = /^\+?[0-9]\d*$/
          if (!reg.test(value)) {
            callback(new Error("请填写不小于0的数字"));
            callback(new Error("请填写不小于0的数字"))
          } else {
            callback();
            callback()
          }
        }
      } else {
        callback();
        callback()
      }
    },
    // 路线
    productClick() {
    },
    productClick() {},
    // 设置删除/打印/编辑是否显示
    setBottonView() {
      if (this.editConfig.title === "新建") {
@@ -276,16 +257,16 @@
    },
    // 刪除
    deleteClick() {
      let data = JSON.parse(JSON.stringify(this.editConfig.infomation));
      let data = JSON.parse(JSON.stringify(this.editConfig.infomation))
      deleteLocation({ id: data.id }).then((res) => {
        if (res.code == 200) {
          this.editConfig.visible = false;
          this.$message.success("刪除成功!");
          this.$emit("refresh");
          this.editConfig.visible = false
          this.$message.success("刪除成功!")
          this.$emit("refresh")
        } else {
            this.$message.warning(res.msg?res.msg:"删除失败!")
         }
      });
          this.$message.warning(res.msg ? res.msg : "删除失败!")
        }
      })
    },
    // 编辑
    editClick() {
@@ -293,56 +274,56 @@
      this.showFooter = true
    },
    saveParams() {
      let data =JSON.parse(JSON.stringify(this.editConfig.infomation));
      let data = JSON.parse(JSON.stringify(this.editConfig.infomation))
      let params = {
        name:data.name,
        parentId:data.parentId+'',
        type:data.type,
        isScrapLocation:data.isScrapLocation,
        isReturnLocation:data.isReturnLocation,
        replenishLocation:data.replenishLocation,
        countFrequency:data.countFrequency?Number(data.countFrequency):0,
        recentlyCount:data.recentlyCount,
        nextCount:data.nextCount,
        notes:data.notes,
        name: data.name,
        parentId: data.parentId,
        type: data.type,
        isScrapLocation: data.isScrapLocation,
        isReturnLocation: data.isReturnLocation,
        replenishLocation: data.replenishLocation,
        countFrequency: data.countFrequency ? Number(data.countFrequency) : 0,
        recentlyCount: data.recentlyCount,
        nextCount: data.nextCount,
        notes: data.notes
      }
      if(data.id){
        params.id=data.id
      if (data.id) {
        params.id = data.id
      }
      return params;
      return params
    },
    // 保存
    saveClick(formName) {
      this.$refs[formName].validate((valid) => {
        if (valid) {
          const params = this.saveParams();
            if (this.editConfig.title === "新建") {
              addLocation(params).then((res) => {
                if (res.code == 200) {
                  this.editConfig.visible = false;
                  this.$message.success("添加成功!");
                  this.$emit('refresh')
                } else {
                    this.$message.warning(res.msg?res.msg:"添加失败!")
                }
              });
            } else {
              updateLocation(params).then((res) => {
                if (res.code == 200) {
                  this.editConfig.visible = false;
                  this.$message.success("编辑成功!");
                  this.$emit('refresh')
                } else {
                    this.$message.warning(res.msg?res.msg:"编辑失败!")
                }
              });
            }
        }else {
          console.log("error submit");
          return false;
          const params = this.saveParams()
          if (this.editConfig.title === "新建") {
            addLocation(params).then((res) => {
              if (res.code == 200) {
                this.editConfig.visible = false
                this.$message.success("添加成功!")
                this.$emit("refresh")
              } else {
                this.$message.warning(res.msg ? res.msg : "添加失败!")
              }
            })
          } else {
            updateLocation(params).then((res) => {
              if (res.code == 200) {
                this.editConfig.visible = false
                this.$message.success("编辑成功!")
                this.$emit("refresh")
              } else {
                this.$message.warning(res.msg ? res.msg : "编辑失败!")
              }
            })
          }
        } else {
          console.log("error submit")
          return false
        }
      });
      })
    }
  }
}
@@ -376,29 +357,26 @@
  -webkit-box-shadow: inset 0 0 2px #dee2e6;
  .basic-info-view {
    margin-top: 20px;
    padding:0 20px;
    padding: 0 20px;
  }
  .bottom{
  .bottom {
    display: flex;
    margin-left: 20px;
    .left {
      width: calc(50% - 10px);
      margin-right:20px;
      margin-right: 20px;
    }
    .right {
      width: calc(50% - 10px);
    }
    .second-label {
      border-bottom: 1px solid #d9d9d9;
      margin-bottom: 10px;
    }
    ::v-deep .el-tabs__content{
    ::v-deep .el-tabs__content {
      padding: 0 20px;
    }
  }
}
.purchase-view {
  display: flex;
src/views/warehouseManage/position/index.vue
@@ -23,7 +23,12 @@
      </div>
    </div>
    <!-- 新建/编辑 -->
    <AddDialog v-if="editConfig.visible" @refresh="refresh" :positionList="tableList.tableInfomation" :edit-common-config="editConfig" />
    <AddDialog
      v-if="editConfig.visible"
      @refresh="refresh"
      :positionList="tableList.tableInfomation"
      :edit-common-config="editConfig"
    />
  </div>
</template>
@@ -31,7 +36,7 @@
import pageMixin from "@/components/makepager/pager/mixin/pageMixin"
import { getLocationList } from "@/api/warehouseManage/warehouse"
import AddDialog from "@/views/warehouseManage/position/AddDialog"
import { getDataByType } from "@/api/data";
import { getDataByType } from "@/api/data"
export default {
  name: "WarehouseView",
  props: {},
@@ -47,7 +52,7 @@
        title: "新建",
        infomation: {}
      },
      positionTypeList: getDataByType("positionType"),
      positionTypeList: getDataByType("positionType")
    }
  },
  created() {
@@ -87,21 +92,21 @@
          isShowColumn: true,
          default: true,
          conversion: true,
          getStatus: this.getTypesList,
          getStatus: this.getTypesList
        }
      ]
      return tableColumn
    },
    getTypesList(val){
      let string='--'
      if(val){
    getTypesList(val) {
      let string = "--"
      if (val) {
        for (let i in this.positionTypeList) {
          if (this.positionTypeList[i].id == val) {
            return this.positionTypeList[i].name;
            return this.positionTypeList[i].name
          }
        }
      }
      return string;
      return string
    },
    selTableCol(val) {
      this.showcol = val
@@ -115,20 +120,20 @@
        pageSize: this.pagerOptions.pageSize
      }).then((res) => {
        if (res.code === 200) {
          const list = res.data?res.data:[]
          const list = res.data ? res.data : []
          this.tableList.tableInfomation = list
          this.pagerOptions.totalCount = res.total
        }
      })
    },
    refresh(){
      this.pagerOptions.currPage=1
    refresh() {
      this.pagerOptions.currPage = 1
      this.getData()
    },
    // 搜索
    getList(val) {
      this.keyword=val;
      this.pagerOptions.currPage=1
      this.keyword = val
      this.pagerOptions.currPage = 1
      this.getData()
    },
    // 行点击
@@ -136,22 +141,22 @@
      console.log(row)
      this.editConfig.title = "编辑"
      this.editConfig.infomation = { ...row }
      this.editConfig.infomation.parentId=Number(this.editConfig.infomation.parentId);
      this.editConfig.infomation.parentId = Number(this.editConfig.infomation.parentId)
      this.editConfig.visible = true
    },
    // 新建
    addBtnClick() {
      this.editConfig.infomation={
        name:'',
        parentId:null,
        type:3,
        isScrapLocation:null,
        isReturnLocation:null,
        replenishLocation:null,
        countFrequency:0,
        recentlyCount:'',
        nextCount:'',
        notes:'',
      this.editConfig.infomation = {
        name: "",
        parentId: null,
        type: 3,
        isScrapLocation: null,
        isReturnLocation: null,
        replenishLocation: null,
        countFrequency: 0,
        recentlyCount: "",
        nextCount: "",
        notes: ""
      }
      this.editConfig.visible = true
      this.editConfig.title = "新建"