src/views/productManage/reorderRules/index.vue
@@ -81,7 +81,7 @@
      reorderId: 0,
      queryProductId: null,
      searchTaskMap: [],
      currentRowId:-1
      currentRowId: -1
    }
  },
  created() {
@@ -103,7 +103,7 @@
        selectBox: false,
        selectIndex: true,
        tableColumn: [
          { label: "产品", prop: "productName", product: true,width:"150px" },
          { label: "产品", prop: "productName", product: true, width: "150px" },
          { label: "位置", prop: "locationName", defaultLocation: true },
          { label: "在库数量", prop: "amount" },
          { label: "预测数量", prop: "prediction" },
@@ -135,7 +135,7 @@
            }
            return {
              ...item,
              productName:item.product.name,
              productName: item.product.name,
              locationName: item.location.name,
              isSet: false,
              isEdit: true,
@@ -215,17 +215,18 @@
        this.showDiscard = false
        let requestUrl = this.currentRowId === 0 ? addReorderRule : updateReorderRule
        let params = this.saveParams()
        requestUrl(params).then((res) => {
          if (res.code === 200) {
            let tipStr = this.currentRowId === 0 ? "添加成功" : "修改成功"
            this.$message.success(tipStr)
        requestUrl(params)
          .then((res) => {
            if (res.code === 200) {
              let tipStr = this.currentRowId === 0 ? "添加成功" : "修改成功"
              this.$message.success(tipStr)
              this.getData()
            }
          })
          .catch((err) => {
            this.getData()
          }
        })
        .catch((err) => {
          this.getData()
          console.log(err)
        })
            console.log(err)
          })
      }
    },
    saveParams() {
@@ -281,7 +282,7 @@
      if (!this.isNoProduct && this.currentRowId === 0) {
        this.$message.error("请完成当前新建或取消新建")
      } else {
        this.currentRowId = row.id||0
        this.currentRowId = row.id || 0
        this.addTitle = "保存"
        this.showDiscard = true
        this.isRowClick = true
@@ -318,11 +319,11 @@
      this.locationId = item?.value ?? item?.id
    },
    // 选中产品方法
    selProductClick(value,item){
      if(value==="product"){
      this.productId=item.id
      this.unit=item.unit
      }
    selProductClick(item) {
      this.productId = item.productId
      this.unit = item.unit
      this.amount = item.amount
      this.prediction = item.prediction
    },
    // 选中路线方法
    selRouteClick(item, prop) {