From ae62ffd41e5ad7074f87b789bcc47b6ea0b1d7f8 Mon Sep 17 00:00:00 2001 From: huangdeliang Date: Fri, 12 Mar 2021 15:05:16 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=8B=96=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- stdiet-ui/src/views/custom/recipesBuild/InfoView/index.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stdiet-ui/src/views/custom/recipesBuild/InfoView/index.vue b/stdiet-ui/src/views/custom/recipesBuild/InfoView/index.vue index ee195cb3c..d33a7e0c8 100644 --- a/stdiet-ui/src/views/custom/recipesBuild/InfoView/index.vue +++ b/stdiet-ui/src/views/custom/recipesBuild/InfoView/index.vue @@ -72,7 +72,7 @@ export default { .content { overflow: auto; - height: calc(100% - 160px); + height: calc(100vh - 192px); } } From ac7ae3314265b55a9e8bc887f2093019024c9975 Mon Sep 17 00:00:00 2001 From: huangdeliang Date: Fri, 12 Mar 2021 18:20:43 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=9C=AA=E5=AE=A1?= =?UTF-8?q?=E6=A0=B8=E7=9A=84=E9=A3=9F=E8=B0=B1=E8=AE=A1=E5=88=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mapper/custom/SysOrderMapper.xml | 2 +- .../mapper/custom/SysRecipesPlanMapper.xml | 1 + .../components/RecipesPlanDrawer/index.vue | 42 ++++++++++-- stdiet-ui/src/store/modules/recipes.js | 65 +++++++++++++++---- .../custom/recipesBuild/InfoView/index.vue | 17 ++--- .../RecipesView/RecipesHeaderCom/index.vue | 17 +++-- .../custom/recipesBuild/VerifyView/index.vue | 55 ++++++++++++++++ .../src/views/custom/recipesBuild/index.vue | 28 ++++++-- 8 files changed, 189 insertions(+), 38 deletions(-) create mode 100644 stdiet-ui/src/views/custom/recipesBuild/VerifyView/index.vue 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 d33a7e0c8..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 @@