优化耗材管理绑定商品页面同商品不同规格绑定耗材时未重置选中耗材

This commit is contained in:
2024-07-23 18:09:43 +08:00
parent 3ae0d7991b
commit c1beec0efc

View File

@@ -778,10 +778,11 @@ export default {
}, },
// 选择耗材 // 选择耗材
selecthaocai(item) { selecthaocai(item) {
console.log(item)
console.log(haocaiSelectedMap)
this.ALLisDistribute = item; this.ALLisDistribute = item;
this.commodityArr.forEach((ele) => { this.commodityArr.forEach((ele) => {
if (ele.id == this.ALLisDistribute.id) { if (ele.id == this.ALLisDistribute.id && ele.skuId==item.skuId) {
console.log(ele.haocais);
ele.haocais.map((v) => { ele.haocais.map((v) => {
if (v.conInfoId) { if (v.conInfoId) {
haocaiSelectedMap[v.conInfoId] = v; haocaiSelectedMap[v.conInfoId] = v;