haoxuan
2024-04-17 95ff77e1e2994fe1088c69b326bdd7023c8563dc
src/views/operate/inventoryAdjustment/index.vue
@@ -209,7 +209,8 @@
    // 是否选择产品
    isSel() {
      for (let i = 0; i < this.tableData.length; i++) {
        if (this.tableData[i].productName?.length === 0) {
        // this.tableData[i].productName?.length === 0||!this.tableData[i].productId
        if (!this.tableData[i].productId||!this.tableData[i].isEdit) {
          this.isNoProduct = false
          break
        } else {
@@ -281,8 +282,9 @@
      this.locationId = row.locationId
      this.rowIndex = rowIndex
      this.isSel()
      if (!this.isNoProduct && this.currentRowId === 0) {
        this.$message.error("请完成当前新建或取消新建")
      //!this.isNoProduct && this.currentRowId == 0
      if (!this.isNoProduct) {
        this.$message.error("请完成当前保存或取消保存!")
      } else {
        this.currentRowId = row.id
        this.addTitle = "保存"
@@ -326,7 +328,7 @@
          productId:this.productId
        }).then((res)=>{
          if(res&&res.code===200){
            this.tableData[0].amount=res.data.amount||0
            this.tableData[0].amount=res.data?res.data.amount:0
          }
        })
      }