zuozhengqing
2023-10-28 4b4438e7231bff0f260b0c17761072503e2af7b1
src/views/warehouseManage/listingRules/index.vue
@@ -21,6 +21,7 @@
          @tableRowClick="tableRowClick"
          @selLocationClick="selLocationClick"
          @selProductClick="selProductClick"
          @selProductTypeClick="selProductTypeClick"
        >
          <template slot="tableButton">
            <el-table-column label="操作" width="90" align="center">
@@ -89,7 +90,8 @@
      areaId: 0,
      productId: 0,
      subLocationId: 0,
      currentRowId: 0
      currentRowId: 0,
      rowIndex:0
    }
  },
  created() {
@@ -105,7 +107,7 @@
        tableColumn: [
          { label: "当产品到达", prop: "areaName", location: true },
          { label: "产品", prop: "productName", product: true },
          { label: "产品类别", prop: "productCategory" },
          { label: "产品类别", prop: "productCategory",productType: true },
          { label: "存储到子位置", prop: "subLocation", location: true }
          // { label: "公司", prop: "companyName", company: true }
        ]
@@ -147,6 +149,8 @@
    },
    // 新增
    addProductClick() {
      this.tableList.tableColumn[1].product=true
      this.tableList.tableColumn[2].productType=true
      console.log(this.tableData)
      this.isSel()
      if (this.isNoProduct && this.addTitle === "新建") {
@@ -222,6 +226,8 @@
    },
    // 取消
    discardBtnClick() {
      this.tableList.tableColumn[1].product=true
      this.tableList.tableColumn[2].productType=true
      if (this.isRowClick) {
        this.tableData.map((item) => {
          item.isEdit = true
@@ -265,7 +271,10 @@
    },
    // 行点击
    tableRowClick(row, rowIndex) {
      console.log("11111")
      // this.tableList.tableColumn[1].product=true
      // this.tableList.tableColumn[2].productType=true
      this.rowIndex=rowIndex
      console.log("11111",row,rowIndex)
      this.isSel()
      if (!this.isNoProduct && this.currentRowId === 0) {
        this.$message.error("请完成当前新建或取消新建")
@@ -324,10 +333,16 @@
    },
    // 选中产品方法
    selProductClick(item) {
      console.log(item)
      this.tableList.tableColumn[2].productType=false
      this.productId = item.value
      this.productCategoryId = item.categoryId
    },
    // 选中产品类型方法
    selProductTypeClick(item) {
      console.log(item,"产品类型",this.tableList.tableData[this.rowIndex])
      this.tableList.tableColumn[1].product=false
      this.tableList.tableData[this.rowIndex].productName='--'
    },
    // 删除
    async delClick(scope) {
      console.log(scope)