菜品原料克数限制
This commit is contained in:
parent
b18c592947
commit
96f40250f6
|
|
@ -1661,6 +1661,7 @@
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}else{
|
}else{
|
||||||
|
//littleWeight largeWeight baseForm.littleWeight baseForm.largeWeight
|
||||||
param.littlePrice = Number(param.littlePrice)*100;
|
param.littlePrice = Number(param.littlePrice)*100;
|
||||||
param.largePrice = Number(param.largePrice)*100;
|
param.largePrice = Number(param.largePrice)*100;
|
||||||
param.littleMaterialCost = Number(param.littleMaterialCost)*100;
|
param.littleMaterialCost = Number(param.littleMaterialCost)*100;
|
||||||
|
|
@ -1682,7 +1683,16 @@
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
// console.log(param.materialList)
|
let sumWeight = 0
|
||||||
|
param.materialList.forEach(item=>{
|
||||||
|
sumWeight = item.weight+sumWeight;
|
||||||
|
})
|
||||||
|
if(sumWeight>param.weight){
|
||||||
|
this.btnLoading=false
|
||||||
|
sumWeight=0
|
||||||
|
this.$modal.msgError("组成成分总克数不可大于菜品份量");
|
||||||
|
return false
|
||||||
|
}
|
||||||
if (this.title === "新增") {
|
if (this.title === "新增") {
|
||||||
addMenuDishesApi(param).then(response => {
|
addMenuDishesApi(param).then(response => {
|
||||||
this.openDish = false;
|
this.openDish = false;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue