| | |
| | | // 是否选择产品 |
| | | 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 { |
| | |
| | | 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 = "保存" |
| | |
| | | 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 |
| | | } |
| | | }) |
| | | } |