| | |
| | | isRowClick: false, |
| | | areaId: 0, |
| | | productId: 0, |
| | | productCategoryId:0, |
| | | subLocationId: 0, |
| | | currentRowId: 0, |
| | | rowIndex:-1, |
| | |
| | | } else { |
| | | if (this.areaId === 0) { |
| | | this.$message.error("请选择当前产品到达位置") |
| | | } else if (this.productId === 0) { |
| | | this.$message.error("请选择产品") |
| | | } else if (this.productId === 0 && this.productCategoryId==='') { |
| | | this.$message.error("请选择产品或产品类别") |
| | | } else if (this.subLocationId === 0) { |
| | | this.$message.error("请选择存储到子位置") |
| | | } else { |
| | |
| | | id: this.currentRowId, |
| | | areaId: this.areaId, |
| | | locationId: this.subLocationId, |
| | | productCategoryId: this.productCategoryId, |
| | | productId: this.productId |
| | | productCategoryId: this.productCategoryId||'', |
| | | productId: this.productId||'' |
| | | }).then((res) => { |
| | | console.log(res) |
| | | if (res.code === 200) { |
| | |
| | | isSel() { |
| | | for (let i = 0; i < this.tableData.length; i++) { |
| | | if (this.tableData[i].productName.length === 0) { |
| | | this.isNoProduct = false |
| | | this.isNoProduct = true |
| | | break |
| | | } else { |
| | | this.isNoProduct = true |
| | |
| | | this.subLocationId = row.locationId |
| | | this.productCategoryId = row.productCategoryId |
| | | this.productId = row.productId |
| | | if(this.tableList.tableData[rowIndex].productCategory===""){ |
| | | this.tableList.tableColumn[2].productType=false |
| | | }else{ |
| | | this.tableList.tableColumn[2].productType=true |
| | | } |
| | | if(this.tableList.tableData[rowIndex].productName===""||this.tableList.tableData[rowIndex].productName===" "){ |
| | | this.tableList.tableColumn[1].product=false |
| | | this.tableList.tableColumn[2].productType=true |
| | | }else{ |
| | | this.tableList.tableColumn[1].product=true |
| | | this.tableList.tableColumn[2].productType=false |
| | | } |
| | | } |
| | | }, |
| | |
| | | // 选中产品类型方法 |
| | | selProductTypeClick(item) { |
| | | this.RuleType=2 |
| | | console.log(item,"产品类型",this.tableList.tableData[this.rowIndex]) |
| | | // this.tableList.tableColumn[1].product=false |
| | | if(this.currentRowId===0){ |
| | | this.productCategoryId=item.value |
| | | }else{ |
| | | this.tableList.tableColumn[1].product=false |
| | | this.tableList.tableData[this.rowIndex].productName=' ' |
| | | this.productId='' |
| | | this.productCategoryId=this.tableList.tableData[this.rowIndex].productCategoryId |
| | | } |
| | | }, |
| | | // 删除 |
| | | async delClick(scope) { |
| | |
| | | }, |
| | | watch:{ |
| | | rowIndex(newVal){ |
| | | console.log(this.tableList.tableData[newVal].productName.length,"watch") |
| | | if(this.tableList.tableData[newVal].productCategory.length===0){ |
| | | this.tableList.tableColumn[2].productType=false |
| | | }else{ |
| | | this.tableList.tableColumn[2].productType=true |
| | | } |
| | | if(this.tableList.tableData[newVal].productName===" "){ |
| | | this.tableList.tableColumn[1].product=false |
| | | this.tableList.tableColumn[2].productType=true |
| | | }else{ |
| | | this.tableList.tableColumn[1].product=true |
| | | this.tableList.tableColumn[2].productType=false |
| | | } |
| | | } |
| | | } |