修复食谱采购统计问题

This commit is contained in:
huangdeliang
2021-03-26 14:16:08 +08:00
parent ceb0c6e6b1
commit 86bb66a757
3 changed files with 17 additions and 12 deletions

View File

@ -5,7 +5,8 @@ const oriState = {
cusUnitDict: {},
cusWeightDict: {},
menuTypeDict: {},
idgTypeDict: {}
idgTypeDict: {},
igdUnitDict: {}
};
const mutations = {
@ -55,6 +56,13 @@ const actions = {
}, {});
commit("updateStateData", { idgTypeDict });
});
getDicts("sys_ingredient_unit").then(response => {
const igdUnitDict = response.data.reduce((obj, cur) => {
obj[cur.dictLabel] = cur.dictValue;
return obj;
}, {});
commit("updateStateData", { igdUnitDict });
});
},
async fetchFullRecipes({ commit, dispatch }, payload) {
return new Promise((res, rej) => {