diff --git a/stdiet-custom/src/main/resources/mapper/custom/SysOrderMapper.xml b/stdiet-custom/src/main/resources/mapper/custom/SysOrderMapper.xml index fb2eb4aff..e365e6860 100644 --- a/stdiet-custom/src/main/resources/mapper/custom/SysOrderMapper.xml +++ b/stdiet-custom/src/main/resources/mapper/custom/SysOrderMapper.xml @@ -141,7 +141,7 @@ and (sc.name like concat('%',#{customer},'%') or sc.phone like concat('%',#{customer},'%')) and cus_id = #{cusId} - and phone = #{phone} + and sc.phone = #{phone} and status = #{status} and pay_type_id = #{payTypeId} and pre_sale_id = #{preSaleId} diff --git a/stdiet-custom/src/main/resources/mapper/custom/SysRecipesPlanMapper.xml b/stdiet-custom/src/main/resources/mapper/custom/SysRecipesPlanMapper.xml index 2eb7a5cd1..39de38c7b 100644 --- a/stdiet-custom/src/main/resources/mapper/custom/SysRecipesPlanMapper.xml +++ b/stdiet-custom/src/main/resources/mapper/custom/SysRecipesPlanMapper.xml @@ -118,6 +118,7 @@ order_id = #{orderId}, cus_id = #{cusId}, out_id = #{outId}, + recipes_id = #{recipesId}, start_date = #{startDate}, end_date = #{endDate}, start_num_day = #{startNumDay}, diff --git a/stdiet-ui/src/components/RecipesPlanDrawer/index.vue b/stdiet-ui/src/components/RecipesPlanDrawer/index.vue index cec0839d7..2953e26dd 100644 --- a/stdiet-ui/src/components/RecipesPlanDrawer/index.vue +++ b/stdiet-ui/src/components/RecipesPlanDrawer/index.vue @@ -90,7 +90,7 @@ {{ `${scope.row.startDate} 至 ${scope.row.endDate}` }} - + @@ -134,8 +141,8 @@ @@ -145,7 +152,7 @@ diff --git a/stdiet-ui/src/store/modules/recipes.js b/stdiet-ui/src/store/modules/recipes.js index 19aa4b735..8c8ab2448 100644 --- a/stdiet-ui/src/store/modules/recipes.js +++ b/stdiet-ui/src/store/modules/recipes.js @@ -34,8 +34,9 @@ const oriState = { copyData: undefined, canCopyMenuTypes: [], fontSize: parseInt(localStorage.getItem("fontSize")) || 12, - dishBigClassOptions:[], - dishSmallClassOptions:[], + dishBigClassOptions: [], + dishSmallClassOptions: [], + leftShow: false }; const mutations = { @@ -99,6 +100,9 @@ const mutations = { state[key] = payload[key]; }); }, + toggleLeftShow(state, payload) { + state.leftShow = !state.leftShow; + }, setDate(state, payload) { state.startDate = payload.startDate; state.endDate = payload.endDate; @@ -141,10 +145,10 @@ const actions = { getDicts("cus_dishes_type").then(response => { commit("updateStateData", { typeOptions: response.data }); }); - getDicts("dish_class_big").then((response) => { + getDicts("dish_class_big").then(response => { commit("updateStateData", { dishBigClassOptions: response.data }); }); - getDicts("dish_class_small").then((response) => { + getDicts("dish_class_small").then(response => { commit("updateStateData", { dishSmallClassOptions: response.data }); }); @@ -467,16 +471,16 @@ const getters = { const dishClass = []; state.dishBigClassOptions.forEach((item, index) => { dishClass.push({ - 'value': parseInt(item.dictValue), - 'label': item.dictLabel, - 'children': [] + value: parseInt(item.dictValue), + label: item.dictLabel, + children: [] }); - if(index == state.dishBigClassOptions.length - 1){ + if (index == state.dishBigClassOptions.length - 1) { state.dishSmallClassOptions.forEach((smallClass, i) => { - if(smallClass.remark){ - dishClass[parseInt(smallClass.remark-1)].children.push({ - 'value': parseInt(smallClass.dictValue), - 'label': smallClass.dictLabel + if (smallClass.remark) { + dishClass[parseInt(smallClass.remark - 1)].children.push({ + value: parseInt(smallClass.dictValue), + label: smallClass.dictLabel }); } }); @@ -520,6 +524,40 @@ const getters = { // console.log(nutriData); return nutriData; }, + verifyNotRecData: state => + state.recipesData.reduce((arr, cur, dayIdx) => { + cur.dishes.forEach(dObj => { + dObj.igdList.forEach(iObj => { + (iObj.notRec || "").split(",").forEach(nRec => { + if (nRec) { + let tarObj = arr.find(obj => obj.name === nRec); + if (tarObj) { + tarObj.data.push({ + igdId: iObj.id, + num: dayIdx, + dishesId: dObj.dishesId, + id: dObj.id + }); + } else { + tarObj = { + name: nRec, + data: [ + { + igdId: iObj.id, + num: dayIdx, + dishesId: dObj.dishesId, + id: dObj.id + } + ] + }; + arr.push(tarObj); + } + } + }); + }); + }); + return arr; + }, []), cusUnitDict: state => state.cusUnitOptions.reduce((obj, cur) => { obj[cur.dictValue] = cur.dictLabel; @@ -544,8 +582,7 @@ const getters = { state.dishSmallClassOptions.reduce((obj, cur) => { obj[cur.dictValue] = cur.dictLabel; return obj; - }, {}), - + }, {}) }; export default { diff --git a/stdiet-ui/src/views/custom/recipesBuild/InfoView/index.vue b/stdiet-ui/src/views/custom/recipesBuild/InfoView/index.vue index ee195cb3c..80f9ef9f2 100644 --- a/stdiet-ui/src/views/custom/recipesBuild/InfoView/index.vue +++ b/stdiet-ui/src/views/custom/recipesBuild/InfoView/index.vue @@ -1,6 +1,6 @@ @@ -168,7 +171,9 @@ export default { padding-bottom: 8px; .collapse_btn { - + font-size: 18px; + padding: 4px; + cursor: pointer; } } diff --git a/stdiet-ui/src/views/custom/recipesBuild/VerifyView/index.vue b/stdiet-ui/src/views/custom/recipesBuild/VerifyView/index.vue new file mode 100644 index 000000000..0c8cb7eb6 --- /dev/null +++ b/stdiet-ui/src/views/custom/recipesBuild/VerifyView/index.vue @@ -0,0 +1,55 @@ + + + diff --git a/stdiet-ui/src/views/custom/recipesBuild/index.vue b/stdiet-ui/src/views/custom/recipesBuild/index.vue index 8c2e15df0..81680c96e 100644 --- a/stdiet-ui/src/views/custom/recipesBuild/index.vue +++ b/stdiet-ui/src/views/custom/recipesBuild/index.vue @@ -1,6 +1,13 @@