修复食材分量不正确问题

This commit is contained in:
huangdeliang 2021-03-03 14:20:55 +08:00
parent 92081f7035
commit 7e97f8510f
2 changed files with 3 additions and 2 deletions

View File

@ -34,7 +34,7 @@ const oriState = {
const mutations = { const mutations = {
updateRecipesDishesDetail(state, payload) { updateRecipesDishesDetail(state, payload) {
const tarDishes = state.recipesData[payload.num].dishes.find( const tarDishes = state.recipesData[payload.num].dishes.find(
obj => obj.dishesId === payload.dishesId obj => obj.id === payload.id
); );
if (tarDishes) { if (tarDishes) {
const tarIgd = tarDishes.igdList.find(obj => obj.id === payload.igdId); const tarIgd = tarDishes.igdList.find(obj => obj.id === payload.igdId);
@ -305,7 +305,7 @@ const actions = {
// console.log(payload); // console.log(payload);
if (state.recipesId) { if (state.recipesId) {
const tarDishes = state.recipesData[payload.num].dishes.find( const tarDishes = state.recipesData[payload.num].dishes.find(
obj => obj.dishesId === payload.dishesId obj => obj.id === payload.id
); );
if (tarDishes) { if (tarDishes) {
const mTarDishes = JSON.parse(JSON.stringify(tarDishes)); const mTarDishes = JSON.parse(JSON.stringify(tarDishes));

View File

@ -339,6 +339,7 @@ export default {
// console.log({ data, cusWeight, cusUnit }); // console.log({ data, cusWeight, cusUnit });
this.updateDishes({ this.updateDishes({
num: this.num, num: this.num,
id: data.id,
dishesId: data.dishesId, dishesId: data.dishesId,
igdId: data.igdId, igdId: data.igdId,
cusWeight, cusWeight,