| | |
| | | handleSelectClient(item, prop, row) { |
| | | this.tableList.tableData.map((ite) => { |
| | | if (ite.name === item.name) { |
| | | ite.ID = row.ID |
| | | ite.id = row.id |
| | | ite.amount = item.amount || 1 |
| | | ite.number = item.number |
| | | ite.purchasePrice = item.purchasePrice |
| | |
| | | } |
| | | }) |
| | | if (this.detailEnter) { |
| | | this.setEditName(item, row.ID) |
| | | this.setEditName(item, row.id) |
| | | } |
| | | this.$emit("handleProduct",item) |
| | | this.$emit("handleProduct",item,row) |
| | | }, |
| | | setEditName(item, ID) { |
| | | setEditName(item, id) { |
| | | let selRow = { |
| | | ID: ID, |
| | | id: id, |
| | | deliveryTime: item.deliveryTime, |
| | | maximumStock: item.maximumStock, |
| | | minimumStock: item.minimumStock, |
| | |
| | | console.log(this.tableList.tableData) |
| | | if (this.detailEnter) { |
| | | this.tableList.tableData.map((ite) => { |
| | | ite.ID |
| | | ite.id |
| | | ite.name = item.name |
| | | ite.amount = item.amount || 1 |
| | | ite.number = item.number |
| | |
| | | ite.deliveryTime = item.deliveryTime |
| | | ite.shippingDuration = item.shippingDuration |
| | | }) |
| | | this.setEditName(item, this.tableList.tableData[0].ID) |
| | | this.setEditName(item, this.tableList.tableData[0].id) |
| | | } else { |
| | | this.tableList.tableData.map((ite, index) => { |
| | | if (index === this.productIndex) { |
| | | ite.name = item.name |
| | | ite.productId = item.ID |
| | | ite.productId = item.id |
| | | ite.productIndex = this.productIndex+1 |
| | | ite.amount = item.amount || 1 |
| | | ite.number = item.number |
| | | ite.purchasePrice = item.purchasePrice |
| | |
| | | this.$forceUpdate() |
| | | } |
| | | }) |
| | | |
| | | console.log(this.tableList.tableData, "=====chanp") |
| | | } |
| | | }, |