更新耗材

This commit is contained in:
2024-07-20 17:35:55 +08:00
parent 97685234d4
commit bb2e166af2
2 changed files with 19 additions and 2 deletions

View File

@@ -616,7 +616,8 @@ export default {
this.informationdialogshow = false;
},
haocaiConfirm() {
if(JSON.stringify(haocaiSelectedMap)!=='{}' ){
let hasEmpty=JSON.stringify(haocaiSelectedMap)=='{}'
if(!hasEmpty){
this.commodityArr.forEach((ele) => {
if (ele.skuId == this.ALLisDistribute.skuId) {
ele.haocais = [];
@@ -634,6 +635,13 @@ export default {
}
}
});
}else{
//当选中耗材为空,重置耗材
this.commodityArr.forEach((ele) => {
if (ele.skuId == this.ALLisDistribute.skuId) {
ele.haocais = [{...haocaisBasic}];
}
});
}
this.informationdialogshow = false;