完善修改逻辑

This commit is contained in:
huangdeliang 2021-01-16 18:01:23 +08:00
parent d05d067eaf
commit 4a9374641e
4 changed files with 67 additions and 4 deletions

View File

@ -32,6 +32,16 @@ public class SysDishes extends BaseEntity
@Excel(name = "做法")
private String methods;
private String reviewStatus;
public void setReviewStatus(String reviewStatus) {
this.reviewStatus = reviewStatus;
}
public String getReviewStatus() {
return reviewStatus;
}
private List<SysDishesIngredient> igdList;
public void setId(Long id)

View File

@ -23,6 +23,18 @@ public class SysDishesIngredient extends SysIngredient {
private BigDecimal weight;
private String remark;
@Override
public void setRemark(String remark) {
this.remark = remark;
}
@Override
public String getRemark() {
return remark;
}
public Long getIngredientId() {
return ingredientId;
}

View File

@ -9,6 +9,7 @@
<result property="name" column="name" />
<result property="type" column="type" />
<result property="methods" column="methods" />
<result property="reviewStatus" column="review_status" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
@ -31,7 +32,7 @@
</resultMap>
<sql id="selectSysDishesVo">
select id, name, type, methods, create_by, create_time, update_by, update_time from sys_dishes
select id, name, type, methods, create_by, create_time, update_by, update_time, review_status from sys_dishes
</sql>
<select id="selectSysDishesList" parameterType="SysDishes" resultMap="SysDishesResult">
@ -39,6 +40,7 @@
<where>
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
<if test="type != null and type != ''"> and type = #{type}</if>
<if test="reviewStatus != null and type != ''"> and review_status = #{reviewStatus}</if>
</where>
</select>
@ -86,6 +88,7 @@
<if test="type != null">type,</if>
<if test="methods != null">methods,</if>
<if test="createBy != null">create_by,</if>
<if test="reviewStatus != null">review_status</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
@ -95,6 +98,7 @@
<if test="type != null">#{type},</if>
<if test="methods != null">#{methods},</if>
<if test="createBy != null">#{createBy},</if>
<if test="reviewStatus != null">#{reviewStatus}</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
@ -108,6 +112,7 @@
<if test="type != null">type = #{type},</if>
<if test="methods != null">methods = #{methods},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="reviewStatus != null">review_status = #{reviewStatus},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
@ -138,9 +143,9 @@
</delete>
<insert id="bashInsertDishesIngredent">
insert into sys_dishes_ingredient(dishes_id, ingredient_id, ingredient_weight, cus_unit, cus_weight) values
insert into sys_dishes_ingredient(dishes_id, ingredient_id, ingredient_weight, cus_unit, cus_weight, remark) values
<foreach collection="list" separator="," item="item" index="index">
(#{item.dishesId}, #{item.ingredientId}, #{item.weight}, #{item.cusUnit}, #{item.cusWeight})
(#{item.dishesId}, #{item.ingredientId}, #{item.weight}, #{item.cusUnit}, #{item.cusWeight}, #{item.remark})
</foreach>
</insert>

View File

@ -20,6 +20,20 @@
/>
</el-select>
</el-form-item>
<el-form-item label="审核状态" prop="reviewStatus">
<el-select
v-model="queryParams.reviewStatus"
placeholder="请选择审核状态"
clearable
>
<el-option
v-for="dict in reviewStatusOptions"
:key="dict.dictValue"
:label="dict.dictLabel"
:value="dict.dictValue"
/>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
@ -49,7 +63,6 @@
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="dishesList" @selection-change="handleSelectionChange">
<el-table-column label="审核状态" align="center" width="80">
<template slot-scope="scope">
@ -245,6 +258,20 @@
{{notRec}}
</el-tag>
</el-form-item>
<el-form-item label="审核状态" prop="reviewStatus">
<el-select
v-model="form.reviewStatus"
placeholder="请选择审核状态"
clearable
>
<el-option
v-for="dict in reviewStatusOptions"
:key="dict.dictValue"
:label="dict.dictLabel"
:value="dict.dictValue"
/>
</el-select>
</el-form-item>
<el-form-item label="做法" prop="methods">
<el-input v-model="form.methods" type="textarea" placeholder="请输入内容" rows="4"/>
</el-form-item>
@ -284,6 +311,8 @@
total: 0,
//
dishesList: [],
//
reviewStatusOptions: [],
//
title: "",
//
@ -333,6 +362,9 @@
this.getDicts("cus_cus_unit").then(response => {
this.cusUnitOptions = response.data;
});
this.getDicts("cus_review_status").then((response) => {
this.reviewStatusOptions = response.data;
});
},
methods: {
/** 查询菜品列表 */
@ -375,6 +407,10 @@
cusUnitFormat(row, column) {
return this.selectDictLabel(this.cusUnitOptions, row.type);
},
//
reviewStatusFormat(row, column) {
return this.selectDictLabel(this.reviewStatusOptions, row.area);
},
//
cancel() {
this.open = false;