优化耗材绑定添加

This commit is contained in:
duan 2024-07-05 16:42:31 +08:00
parent 8593295e21
commit 065d159b49
1 changed files with 7 additions and 4 deletions

View File

@ -407,14 +407,16 @@ export default {
}, },
// //
tableDatainformationtable(item) { tableDatainformationtable(item) {
this.addSelect.forEach((ele, i) => { this.addSelect.forEach((ele, i) => {
ele.consInfoId = item.id ele.consInfoId = item.id
ele.conName = item.conName ele.conName = item.conName
if (this.ALLisDistribute != null) { if (this.ALLisDistribute != null) {
this.addSelect.forEach((ele, i) => { // this.addSelect.forEach((ele, i) => {
ele.skuList[this.ALLisDistribute].skuId = item.id ele.skuList[this.ALLisDistribute].conInfoId = item.id
ele.skuList[this.ALLisDistribute].conName = item.conName ele.skuList[this.ALLisDistribute].conName = item.conName
}) // })
console.log(ele.skuList[this.ALLisDistribute], "打印");
} }
}) })
// this.ruleForm.skuInfos = item // this.ruleForm.skuInfos = item
@ -491,11 +493,12 @@ export default {
} }
let isgongx = false let isgongx = false
this.addSelect[0].skuList.forEach(ele => { this.addSelect[0].skuList.forEach(ele => {
console.log(ele, "jiancha");
ele.skuId = ele.id ele.skuId = ele.id
ele.conInfoId = consInfoId
// ele.surplusStock = surplusStock // ele.surplusStock = surplusStock
if (isDistribute == 1) { if (isDistribute == 1) {
ele.surplusStock = surplusStock ele.surplusStock = surplusStock
ele.conInfoId = consInfoId
} }
if (!ele.skuId || !ele.surplusStock) { if (!ele.skuId || !ele.surplusStock) {
isgongx = true isgongx = true