食谱制作菜品选择增加食材条件筛选

This commit is contained in:
huangdeliang 2021-04-27 17:18:54 +08:00
parent 75e226d13b
commit 484fe1cdeb
4 changed files with 23 additions and 9 deletions
stdiet-custom/src/main
java/com/stdiet/custom/domain
resources/mapper/custom
stdiet-ui/src/views/custom/recipesBuild/RecipesView/RecipesCom/AddDishesDrawer

@ -95,4 +95,6 @@ public class SysDishes {
private String physical;
private String igdName;
}

@ -53,6 +53,9 @@
<if test="physical != null and physical != ''">
and id in(SELECT DISTINCT(dishes_id) FROM sys_dishes_rec WHERE physical_signs_id = #{physical})
</if>
<if test="igdName != null and igdName != ''">
and id in(SELECT DISTINCT(dishes_id) FROM sys_dishes_ingredient WHERE name like concat('%', #{igdName}, '%'))
</if>
<if test="bigClass != null">and big_class = #{bigClass}</if>
<if test="smallClass != null">and small_class = #{smallClass}</if>
<if test="reviewStatus != null and type != ''">and review_status = #{reviewStatus}</if>

@ -8,7 +8,7 @@
label-width="68px"
@submit.native.prevent
>
<el-col :span="6">
<el-col :span="5">
<el-form-item label="菜品名称" prop="name">
<el-input
v-model="queryParams.name"
@ -19,7 +19,18 @@
/>
</el-form-item>
</el-col>
<el-col :span="6">
<el-col :span="5">
<el-form-item label="包含食材" prop="physical">
<el-input
v-model="queryParams.igdName"
placeholder="请输入食材名称"
clearable
size="mini"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item label="菜品种类" prop="dishClass">
<el-cascader
filterable
@ -33,7 +44,7 @@
></el-cascader>
</el-form-item>
</el-col>
<el-col :span="6">
<el-col :span="4">
<el-form-item label="菜品类型" prop="type">
<el-select
:disabled="lockType"
@ -52,7 +63,7 @@
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-col :span="5">
<el-form-item label="推荐体征" prop="physical">
<el-cascader
:disabled="lockType"
@ -92,10 +103,7 @@
<el-table-column label="菜品名称" align="center" prop="name" />
<el-table-column label="菜品种类" align="center" prop="bigClass">
<template slot-scope="scope">
<AutoHideMessage
:data="dishClassFormat(scope.row)"
:maxLength="10"
/>
<AutoHideMessage :data="dishClassFormat(scope.row)" :maxLength="10" />
</template>
</el-table-column>
<el-table-column label="菜品类型" align="center" prop="type">
@ -232,6 +240,7 @@ export default {
pageSize: 10,
name: null,
type: null,
igdName: null,
reviewStatus: "yes",
};
this.dishesList = [];

@ -7,7 +7,7 @@
:wrapperClosable="false"
class="add_dishes_drawer_wrapper"
direction="ltr"
size="40%"
size="45%"
>
<div class="content_wrapper">
<div class="content_detail">