| | |
| | | @tableRowClick="tableRowClick" |
| | | @selLocationClick="selLocationClick" |
| | | @selProductClick="selProductClick" |
| | | @selProductTypeClick="selProductTypeClick" |
| | | > |
| | | <template slot="tableButton"> |
| | | <el-table-column label="操作" width="90" align="center"> |
| | |
| | | areaId: 0, |
| | | productId: 0, |
| | | subLocationId: 0, |
| | | currentRowId: 0 |
| | | currentRowId: 0, |
| | | rowIndex:0 |
| | | } |
| | | }, |
| | | created() { |
| | |
| | | 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 } |
| | | ] |
| | |
| | | }, |
| | | // 新增 |
| | | addProductClick() { |
| | | this.tableList.tableColumn[1].product=true |
| | | this.tableList.tableColumn[2].productType=true |
| | | console.log(this.tableData) |
| | | this.isSel() |
| | | if (this.isNoProduct && this.addTitle === "新建") { |
| | |
| | | }, |
| | | // 取消 |
| | | discardBtnClick() { |
| | | this.tableList.tableColumn[1].product=true |
| | | this.tableList.tableColumn[2].productType=true |
| | | if (this.isRowClick) { |
| | | this.tableData.map((item) => { |
| | | item.isEdit = true |
| | |
| | | }, |
| | | // 行点击 |
| | | 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("请完成当前新建或取消新建") |
| | |
| | | }, |
| | | // 选中产品方法 |
| | | 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) |