| | |
| | | // this.showSummary.show = true |
| | | }, |
| | | // 新增方式修改 |
| | | getSelectArray(val) { |
| | | // if (val.length > 0) { |
| | | // val.map((item, index) => { |
| | | // item.productId = this.tableData.length + index + 1 |
| | | // }) |
| | | // } |
| | | console.log(this.tableData, "ddddaaaqqq") |
| | | getSelectArray(val, index) { |
| | | if (this.tableData.length == 1 && this.tableData[0].number.length == 0) { |
| | | console.log("ssss") |
| | | this.tableData = [] |
| | | } |
| | | this.tableData = this.tableData.concat(val) |
| | | console.log(this.tableData, "55555ddddaaaqqq") |
| | | if (index < this.tableData.length) { |
| | | this.tableData.splice(index, 1) |
| | | val.map((item, ind) => { |
| | | this.tableData.splice(index + ind, 0, item) |
| | | }) |
| | | } else { |
| | | this.tableData = this.tableData.concat(val) |
| | | } |
| | | this.productTableList.tableData = this.tableData |
| | | this.showSummary.show = true |
| | | }, |