| | |
| | | handleSelectionChange(e) { |
| | | let arr = [] |
| | | e.forEach(item => { |
| | | arr.push({ goodsId: item.id, price: item.purchasePrice }) |
| | | arr.push({ id: item.id }) |
| | | }) |
| | | // e.forEach(item => { |
| | | // arr.push({ goodsId: item.id, price: item.purchasePrice }) |
| | | // }) |
| | | this.form.goodsParamList = arr |
| | | console.log(arr) |
| | | }, |
| | |
| | | this.$message.warning({ message: '请先勾选商品' }) |
| | | return |
| | | } |
| | | let goodsParamList = [] |
| | | this.form.goodsParamList.forEach(item => { |
| | | this.tableData.forEach(child => { |
| | | if (item.id === child.id) { |
| | | goodsParamList.push({ goodsId: child.id, price: child.purchasePrice }) |
| | | } |
| | | }) |
| | | }) |
| | | // 调用新建接口 |
| | | this.isWorking = true |
| | | createPlat({ |
| | | categoryId: this.form.categoryId1, |
| | | goodsParamList: this.form.goodsParamList, |
| | | goodsParamList, |
| | | rate: this.form.rate, |
| | | type: this.form.type |
| | | }).then(res => { |