Merge branch 'master' of https://gitee.com/darlk/ShengTangManage into xzj
This commit is contained in:
commit
579a8b31ab
@ -54,8 +54,8 @@ public class SysRecipesServiceImpl implements ISysRecipesService {
|
|||||||
// 更新食谱计划
|
// 更新食谱计划
|
||||||
SysRecipesPlan sysRecipesPlan = new SysRecipesPlan();
|
SysRecipesPlan sysRecipesPlan = new SysRecipesPlan();
|
||||||
sysRecipesPlan.setId(sysRecipes.getPlanId());
|
sysRecipesPlan.setId(sysRecipes.getPlanId());
|
||||||
|
sysRecipesPlan.setReviewStatus(3);// 设置制作中
|
||||||
sysRecipesPlan.setRecipesId(sysRecipes.getId());
|
sysRecipesPlan.setRecipesId(sysRecipes.getId());
|
||||||
sysRecipesPlan.setReviewStatus(1);
|
|
||||||
sysRecipesPlanMapper.updateSysRecipesPlan(sysRecipesPlan);
|
sysRecipesPlanMapper.updateSysRecipesPlan(sysRecipesPlan);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -31,7 +31,7 @@
|
|||||||
left join sys_user su_nutritionist on su_nutritionist.user_id = srt.nutritionist_id and su_nutritionist.del_flag = 0
|
left join sys_user su_nutritionist on su_nutritionist.user_id = srt.nutritionist_id and su_nutritionist.del_flag = 0
|
||||||
left join sys_user su_nutritionist_assis on su_nutritionist_assis.user_id = srt.nutri_assis_id and su_nutritionist_assis.del_flag = 0
|
left join sys_user su_nutritionist_assis on su_nutritionist_assis.user_id = srt.nutri_assis_id and su_nutritionist_assis.del_flag = 0
|
||||||
where srt.del_flag = 0
|
where srt.del_flag = 0
|
||||||
<if test="name != null and name != ''">and srt.name like concat('%', #{name}, '%')</if>
|
<if test="name != null and name != ''">and srt.name like concat('%', #{name}, '%') or srt.remark like concat('%', #{name}, '%')</if>
|
||||||
<if test="nutriAssisId != null ">and srt.nutri_assis_id = #{nutriAssisId}</if>
|
<if test="nutriAssisId != null ">and srt.nutri_assis_id = #{nutriAssisId}</if>
|
||||||
<if test="nutritionistId != null ">and srt.nutritionist_id = #{nutritionistId}</if>
|
<if test="nutritionistId != null ">and srt.nutritionist_id = #{nutritionistId}</if>
|
||||||
<if test="reviewStatus != null ">and srp.review_status = #{reviewStatus}</if>
|
<if test="reviewStatus != null ">and srp.review_status = #{reviewStatus}</if>
|
||||||
|
@ -104,8 +104,9 @@ export default {
|
|||||||
[{ title: "方便沟通时间", value: "connectTime" }],
|
[{ title: "方便沟通时间", value: "connectTime" }],
|
||||||
];
|
];
|
||||||
if (this.dev) {
|
if (this.dev) {
|
||||||
basicInfo.splice(3, 0, [{ title: "基础代谢BMR", value: "basicBMR" }]);
|
basicInfo.splice(3, 0, [{ title: "蛋白范围", value: "recProtein" }]);
|
||||||
basicInfo.splice(4, 0, [
|
basicInfo.splice(4, 0, [{ title: "基础代谢BMR", value: "basicBMR" }]);
|
||||||
|
basicInfo.splice(5, 0, [
|
||||||
{ title: "不运动总热量", value: "notSportHeat" },
|
{ title: "不运动总热量", value: "notSportHeat" },
|
||||||
]);
|
]);
|
||||||
basicInfo.splice(basicInfo.length, 0, [
|
basicInfo.splice(basicInfo.length, 0, [
|
||||||
|
@ -90,11 +90,12 @@ export default {
|
|||||||
[{ title: "地域", value: "position" }],
|
[{ title: "地域", value: "position" }],
|
||||||
];
|
];
|
||||||
if (this.dev) {
|
if (this.dev) {
|
||||||
basicInfo.splice(3, 0, [{ title: "基础代谢BMR", value: "basicBMR" }]);
|
basicInfo.splice(3, 0, [{ title: "推荐蛋白范围", value: "recProtein" }]);
|
||||||
basicInfo.splice(4, 0, [
|
basicInfo.splice(4, 0, [{ title: "基础代谢BMR", value: "basicBMR" }]);
|
||||||
|
basicInfo.splice(5, 0, [
|
||||||
{ title: "不运动总热量", value: "notSportHeat" },
|
{ title: "不运动总热量", value: "notSportHeat" },
|
||||||
]);
|
]);
|
||||||
basicInfo.splice(6, 0, [{ title: "备注", value: "remark" }]);
|
basicInfo.splice(basicInfo.length, 0, [{ title: "备注", value: "remark" }]);
|
||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
@ -60,24 +60,9 @@
|
|||||||
<el-table :data="planList" v-loading="planLoading" height="80%">
|
<el-table :data="planList" v-loading="planLoading" height="80%">
|
||||||
<el-table-column label="审核状态" align="center" width="80">
|
<el-table-column label="审核状态" align="center" width="80">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-tag
|
<el-tag :type="getReviewType(scope.row.reviewStatus)">
|
||||||
:type="
|
{{ getReviewStatusName(scope.row.reviewStatus) }}
|
||||||
scope.row.reviewStatus === 0
|
</el-tag>
|
||||||
? 'info'
|
|
||||||
: scope.row.reviewStatus === 2
|
|
||||||
? 'success'
|
|
||||||
: 'danger'
|
|
||||||
"
|
|
||||||
>{{
|
|
||||||
`${
|
|
||||||
scope.row.reviewStatus === 0
|
|
||||||
? "未制作"
|
|
||||||
: scope.row.reviewStatus === 2
|
|
||||||
? "已审核"
|
|
||||||
: "未审核"
|
|
||||||
}`
|
|
||||||
}}</el-tag
|
|
||||||
>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="计划" align="center">
|
<el-table-column label="计划" align="center">
|
||||||
@ -226,6 +211,32 @@ export default {
|
|||||||
};
|
};
|
||||||
this.resetForm("form");
|
this.resetForm("form");
|
||||||
},
|
},
|
||||||
|
getReviewStatusName(status) {
|
||||||
|
switch (status) {
|
||||||
|
case 1:
|
||||||
|
return "未审核";
|
||||||
|
case 2:
|
||||||
|
return "已审核";
|
||||||
|
case 3:
|
||||||
|
return "制作中";
|
||||||
|
case 0:
|
||||||
|
default:
|
||||||
|
return "未制作";
|
||||||
|
}
|
||||||
|
},
|
||||||
|
getReviewType(status) {
|
||||||
|
switch (status) {
|
||||||
|
case 1:
|
||||||
|
return "danger";
|
||||||
|
case 2:
|
||||||
|
return "success";
|
||||||
|
case 3:
|
||||||
|
return "";
|
||||||
|
case 0:
|
||||||
|
default:
|
||||||
|
return "info";
|
||||||
|
}
|
||||||
|
},
|
||||||
handleOnClosed() {
|
handleOnClosed() {
|
||||||
this.data = undefined;
|
this.data = undefined;
|
||||||
this.cusOutId = "";
|
this.cusOutId = "";
|
||||||
|
@ -132,6 +132,7 @@ const actions = {
|
|||||||
recipesId,
|
recipesId,
|
||||||
reviewStatus,
|
reviewStatus,
|
||||||
temId: payload.temId,
|
temId: payload.temId,
|
||||||
|
name: payload.name,
|
||||||
planId: payload.planId,
|
planId: payload.planId,
|
||||||
startNum: startNumDay,
|
startNum: startNumDay,
|
||||||
endNum: endNumDay
|
endNum: endNumDay
|
||||||
@ -302,7 +303,7 @@ const actions = {
|
|||||||
const recipesId = result.data;
|
const recipesId = result.data;
|
||||||
if (!payload.planId) {
|
if (!payload.planId) {
|
||||||
// 非保存模板
|
// 非保存模板
|
||||||
commit("updateStateData", { recipesId });
|
commit("updateStateData", { recipesId, reviewStatus: 3 });
|
||||||
dispatch("getRecipesInfo", { recipesId });
|
dispatch("getRecipesInfo", { recipesId });
|
||||||
}
|
}
|
||||||
payload.callback &&
|
payload.callback &&
|
||||||
|
@ -200,7 +200,7 @@ export const familyIllnessHistoryArray = [
|
|||||||
{ name: "冠心病", value: "3" },
|
{ name: "冠心病", value: "3" },
|
||||||
{ name: "外周血管病", value: "4" },
|
{ name: "外周血管病", value: "4" },
|
||||||
{ name: "心力衰竭", value: "5" },
|
{ name: "心力衰竭", value: "5" },
|
||||||
{ name: "冠心病", value: "6" },
|
{ name: "糖尿病", value: "6" },
|
||||||
{ name: "肥胖症", value: "7" },
|
{ name: "肥胖症", value: "7" },
|
||||||
{ name: "慢性肾脏疾病", value: "8" },
|
{ name: "慢性肾脏疾病", value: "8" },
|
||||||
{ name: "骨质疏松", value: "9" },
|
{ name: "骨质疏松", value: "9" },
|
||||||
@ -482,6 +482,10 @@ export function dealHealthy(customerHealthy) {
|
|||||||
customerHealthy.notSportHeat = (customerHealthy.basicBMR * 1.3).toFixed(1);
|
customerHealthy.notSportHeat = (customerHealthy.basicBMR * 1.3).toFixed(1);
|
||||||
customerHealthy.basicBMR += "千卡";
|
customerHealthy.basicBMR += "千卡";
|
||||||
customerHealthy.notSportHeat += "千卡";
|
customerHealthy.notSportHeat += "千卡";
|
||||||
|
const lowRecProtein = customerHealthy.tall - 105;
|
||||||
|
customerHealthy.recProtein = `${(lowRecProtein * 0.8).toFixed(1)} - ${(
|
||||||
|
lowRecProtein * 1.5
|
||||||
|
).toFixed(1)}`;
|
||||||
|
|
||||||
needAttrName.forEach(name => {
|
needAttrName.forEach(name => {
|
||||||
if (customerHealthy.hasOwnProperty(name)) {
|
if (customerHealthy.hasOwnProperty(name)) {
|
||||||
@ -538,6 +542,68 @@ export function dealHealthy(customerHealthy) {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (customerHealthy.hasOwnProperty("physicalSignsId")) {
|
||||||
|
const signs = customerHealthy.otherPhysicalSigns
|
||||||
|
? [customerHealthy.otherPhysicalSigns]
|
||||||
|
: [];
|
||||||
|
customerHealthy.signList.forEach(obj => {
|
||||||
|
signs.push(obj.name);
|
||||||
|
});
|
||||||
|
customerHealthy.physicalSigns = signs.join(",");
|
||||||
|
}
|
||||||
|
if (customerHealthy.hasOwnProperty("otherLongEatDrugClassify")) {
|
||||||
|
customerHealthy.longEatDrugClassify += customerHealthy.otherLongEatDrugClassify
|
||||||
|
? `,${customerHealthy.otherLongEatDrugClassify}`
|
||||||
|
: "";
|
||||||
|
}
|
||||||
|
if (customerHealthy.hasOwnProperty("washVegetablesStyle")) {
|
||||||
|
customerHealthy.washVegetablesStyle += customerHealthy.otherWashVegetablesStyle
|
||||||
|
? `,${customerHealthy.otherWashVegetablesStyle}`
|
||||||
|
: "";
|
||||||
|
}
|
||||||
|
if (customerHealthy.hasOwnProperty("snacks")) {
|
||||||
|
customerHealthy.snacks += customerHealthy.otherSnacks
|
||||||
|
? `,${customerHealthy.otherSnacks}`
|
||||||
|
: "";
|
||||||
|
}
|
||||||
|
if (customerHealthy.hasOwnProperty("healthProductsWeekRate")) {
|
||||||
|
customerHealthy.healthProductsWeekRate =
|
||||||
|
customerHealthy.healthProductsDayRate +
|
||||||
|
"次/天," +
|
||||||
|
customerHealthy.healthProductsWeekRate +
|
||||||
|
"次/周";
|
||||||
|
}
|
||||||
|
if (customerHealthy.hasOwnProperty("drinkWineClassify")) {
|
||||||
|
customerHealthy.drinkWineClassify += customerHealthy.otherWineClassify
|
||||||
|
? `,${customerHealthy.otherWineClassify}`
|
||||||
|
: "";
|
||||||
|
}
|
||||||
|
if (customerHealthy.hasOwnProperty("otherMotionClassify")) {
|
||||||
|
let motionStr = customerHealthy.aerobicMotionClassify
|
||||||
|
? `,${customerHealthy.aerobicMotionClassify}`
|
||||||
|
: "";
|
||||||
|
motionStr += customerHealthy.anaerobicMotionClassify
|
||||||
|
? `,${customerHealthy.anaerobicMotionClassify}`
|
||||||
|
: "";
|
||||||
|
motionStr += customerHealthy.anaerobicAerobicMotionClassify
|
||||||
|
? `,${customerHealthy.anaerobicAerobicMotionClassify}`
|
||||||
|
: "";
|
||||||
|
motionStr += customerHealthy.otherMotionClassify
|
||||||
|
? `,${customerHealthy.otherMotionClassify}`
|
||||||
|
: "";
|
||||||
|
customerHealthy.motion = motionStr;
|
||||||
|
}
|
||||||
|
if (customerHealthy.hasOwnProperty("motionField")) {
|
||||||
|
customerHealthy.motionField += customerHealthy.otherMotionField
|
||||||
|
? `,${customerHealthy.otherMotionField}`
|
||||||
|
: "";
|
||||||
|
}
|
||||||
|
if (customerHealthy.hasOwnProperty("defecationNum")) {
|
||||||
|
customerHealthy.defecationNum += "次/天";
|
||||||
|
}
|
||||||
|
if (customerHealthy.hasOwnProperty("motionDuration")) {
|
||||||
|
customerHealthy.motionDuration += "分钟";
|
||||||
|
}
|
||||||
if (customerHealthy.hasOwnProperty("tall")) {
|
if (customerHealthy.hasOwnProperty("tall")) {
|
||||||
customerHealthy.tall += "cm";
|
customerHealthy.tall += "cm";
|
||||||
}
|
}
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
:step="5"
|
:step="5"
|
||||||
:value="value"
|
:value="value"
|
||||||
@blur="handleOnBlur"
|
@blur="handleOnBlur"
|
||||||
@keydown.enter="handleEnterClick"
|
@keydown.enter.native="handleEnterClick"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -37,37 +37,43 @@
|
|||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</span>
|
</span>
|
||||||
<el-button size="mini" v-if="!recipesId" @click="handleOnBack"
|
<el-button size="mini" v-if="!recipesId" @click="handleOnBack">
|
||||||
>返回</el-button
|
返回
|
||||||
>
|
</el-button>
|
||||||
<el-popover
|
<el-popover
|
||||||
placement="bottom"
|
placement="bottom"
|
||||||
trigger="click"
|
trigger="click"
|
||||||
title="修改审核状态"
|
title="修改食谱状态"
|
||||||
style="margin-right: 12px"
|
style="margin-right: 12px"
|
||||||
v-hasPermi="['recipes:plan:review']"
|
|
||||||
>
|
>
|
||||||
<div>
|
<div>
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
type="success"
|
type="success"
|
||||||
|
v-hasPermi="['recipes:plan:review']"
|
||||||
@click="hanldeOnReveiwChange(2)"
|
@click="hanldeOnReveiwChange(2)"
|
||||||
>审核通过</el-button
|
>已审核</el-button
|
||||||
>
|
>
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
type="danger"
|
type="danger"
|
||||||
@click="hanldeOnReveiwChange(1)"
|
@click="hanldeOnReveiwChange(1)"
|
||||||
>未审核通过</el-button
|
>未审核</el-button
|
||||||
|
>
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="primary"
|
||||||
|
@click="hanldeOnReveiwChange(3)"
|
||||||
|
>制作中</el-button
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
<el-button
|
<el-button
|
||||||
slot="reference"
|
slot="reference"
|
||||||
size="mini"
|
size="mini"
|
||||||
v-if="reviewStatus"
|
v-if="!!recipesId"
|
||||||
:type="reviewStatus === 1 ? 'danger' : 'success'"
|
:type="getReviewType(reviewStatus)"
|
||||||
>
|
>
|
||||||
{{ reviewStatus === 1 ? "未审核" : "已审核" }}
|
{{ getReviewStatusName(reviewStatus) }}
|
||||||
</el-button>
|
</el-button>
|
||||||
</el-popover>
|
</el-popover>
|
||||||
<el-button
|
<el-button
|
||||||
@ -122,8 +128,12 @@ export default {
|
|||||||
this.saveRecipes({
|
this.saveRecipes({
|
||||||
callback: (query) => {
|
callback: (query) => {
|
||||||
// console.log(query);
|
// console.log(query);
|
||||||
|
let path = "/recipes/build/" + query.name + "/" + query.planId;
|
||||||
|
if (this.$route.query.temId) {
|
||||||
|
path += "?temId=" + this.$route.query.temId;
|
||||||
|
}
|
||||||
this.$router.replace({
|
this.$router.replace({
|
||||||
path: "/recipes/build/" + query.name + "/" + query.planId,
|
path,
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
@ -157,6 +167,32 @@ export default {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
getReviewStatusName(status) {
|
||||||
|
switch (status) {
|
||||||
|
case 1:
|
||||||
|
return "未审核";
|
||||||
|
case 2:
|
||||||
|
return "已审核";
|
||||||
|
case 3:
|
||||||
|
return "制作中";
|
||||||
|
case 0:
|
||||||
|
default:
|
||||||
|
return "未制作";
|
||||||
|
}
|
||||||
|
},
|
||||||
|
getReviewType(status) {
|
||||||
|
switch (status) {
|
||||||
|
case 1:
|
||||||
|
return "danger";
|
||||||
|
case 2:
|
||||||
|
return "success";
|
||||||
|
case 3:
|
||||||
|
return "primary";
|
||||||
|
case 0:
|
||||||
|
default:
|
||||||
|
return "info";
|
||||||
|
}
|
||||||
|
},
|
||||||
...mapActions(["saveRecipes", "updateReviewStatus"]),
|
...mapActions(["saveRecipes", "updateReviewStatus"]),
|
||||||
...mapMutations(["updateStateData", "updateFontSize", "toggleLeftShow"]),
|
...mapMutations(["updateStateData", "updateFontSize", "toggleLeftShow"]),
|
||||||
},
|
},
|
||||||
|
@ -7,11 +7,11 @@
|
|||||||
<div class="content">
|
<div class="content">
|
||||||
<!-- 筛选 -->
|
<!-- 筛选 -->
|
||||||
<el-form :model="queryParams" ref="queryForm" :inline="true">
|
<el-form :model="queryParams" ref="queryForm" :inline="true">
|
||||||
<el-form-item label="模板名称" prop="name">
|
<el-form-item label="搜索内容" prop="name">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="queryParams.name"
|
v-model="queryParams.name"
|
||||||
placeholder="请输入模板名称"
|
placeholder="请输入模板名称或备注"
|
||||||
@keydown.enter="handleQuery"
|
@keyup.enter.native="handleQuery"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="营养师" prop="nutritionistId">
|
<el-form-item label="营养师" prop="nutritionistId">
|
||||||
|
@ -3,10 +3,12 @@
|
|||||||
<div>忌口</div>
|
<div>忌口</div>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<span
|
<span
|
||||||
class="item"
|
:class="`item ${
|
||||||
|
selectedNotRec.includes(item.name) ? 'selected_item' : ''
|
||||||
|
} `"
|
||||||
v-for="item in verifyNotRecData"
|
v-for="item in verifyNotRecData"
|
||||||
:key="item.name"
|
:key="item.name"
|
||||||
@click="handleOnClick(item.data)"
|
@click="handleOnClick(item)"
|
||||||
>{{ item.name }}</span
|
>{{ item.name }}</span
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
@ -18,14 +20,38 @@ const { mapActions, mapState, mapGetters } = createNamespacedHelpers("recipes");
|
|||||||
export default {
|
export default {
|
||||||
name: "VerifyView",
|
name: "VerifyView",
|
||||||
data() {
|
data() {
|
||||||
return {};
|
return {
|
||||||
|
selectedNotRec: [],
|
||||||
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapGetters(["verifyNotRecData"]),
|
...mapGetters(["verifyNotRecData"]),
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
handleOnClick(data) {
|
handleOnClick(data) {
|
||||||
console.log({ data, verifyNotRecData: this.verifyNotRecData });
|
if (this.selectedNotRec.some((str) => data.name === str)) {
|
||||||
|
this.selectedNotRec = this.selectedNotRec.filter(
|
||||||
|
(str) => str !== data.name
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
this.selectedNotRec.push(data.name);
|
||||||
|
this.selectedNotRec = JSON.parse(JSON.stringify(this.selectedNotRec));
|
||||||
|
}
|
||||||
|
|
||||||
|
const notRecIgds = this.selectedNotRec.reduce((arr, cur) => {
|
||||||
|
this.verifyNotRecData[cur].data.forEach((obj) => {
|
||||||
|
if (!arr.includes(obj.igdId)) {
|
||||||
|
arr.push(obj.igdId);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return arr;
|
||||||
|
}, []);
|
||||||
|
|
||||||
|
console.log({
|
||||||
|
data,
|
||||||
|
notRecIgds,
|
||||||
|
verifyNotRecData: this.verifyNotRecData,
|
||||||
|
});
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
@ -44,12 +70,21 @@ export default {
|
|||||||
border: 1px solid #8c8c8c;
|
border: 1px solid #8c8c8c;
|
||||||
padding: 3px 8px;
|
padding: 3px 8px;
|
||||||
word-break: normal;
|
word-break: normal;
|
||||||
|
transition: all 0.3s;
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
color: #d96969;
|
color: white;
|
||||||
|
background: #d96969;
|
||||||
border-color: #d96969;
|
border-color: #d96969;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.selected_item {
|
||||||
|
color: white;
|
||||||
|
background: #d96969;
|
||||||
|
border-color: #d96969;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -108,24 +108,9 @@
|
|||||||
<el-table v-loading="loading" :data="recipesPlanList">
|
<el-table v-loading="loading" :data="recipesPlanList">
|
||||||
<el-table-column label="审核状态" align="center" width="100">
|
<el-table-column label="审核状态" align="center" width="100">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-tag
|
<el-tag :type="getReviewType(scope.row.reviewStatus)">
|
||||||
:type="
|
{{ getReviewStatusName(scope.row.reviewStatus) }}
|
||||||
!scope.row.reviewStatus
|
</el-tag>
|
||||||
? 'info'
|
|
||||||
: scope.row.reviewStatus === 1
|
|
||||||
? 'danger'
|
|
||||||
: 'success'
|
|
||||||
"
|
|
||||||
>{{
|
|
||||||
`${
|
|
||||||
!scope.row.reviewStatus
|
|
||||||
? "未制作"
|
|
||||||
: scope.row.reviewStatus == 1
|
|
||||||
? "未审核"
|
|
||||||
: "已审核"
|
|
||||||
}`
|
|
||||||
}}</el-tag
|
|
||||||
>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="客户姓名" align="center" prop="customer" />
|
<el-table-column label="客户姓名" align="center" prop="customer" />
|
||||||
@ -338,6 +323,32 @@ export default {
|
|||||||
};
|
};
|
||||||
this.resetForm("form");
|
this.resetForm("form");
|
||||||
},
|
},
|
||||||
|
getReviewStatusName(status) {
|
||||||
|
switch (status) {
|
||||||
|
case 1:
|
||||||
|
return "未审核";
|
||||||
|
case 2:
|
||||||
|
return "已审核";
|
||||||
|
case 3:
|
||||||
|
return "制作中";
|
||||||
|
case 0:
|
||||||
|
default:
|
||||||
|
return "未制作";
|
||||||
|
}
|
||||||
|
},
|
||||||
|
getReviewType(status) {
|
||||||
|
switch (status) {
|
||||||
|
case 1:
|
||||||
|
return "danger";
|
||||||
|
case 2:
|
||||||
|
return "success";
|
||||||
|
case 3:
|
||||||
|
return "";
|
||||||
|
case 0:
|
||||||
|
default:
|
||||||
|
return "info";
|
||||||
|
}
|
||||||
|
},
|
||||||
/** 搜索按钮操作 */
|
/** 搜索按钮操作 */
|
||||||
handleQuery() {
|
handleQuery() {
|
||||||
this.queryParams.pageNum = 1;
|
this.queryParams.pageNum = 1;
|
||||||
|
@ -6,8 +6,12 @@
|
|||||||
:inline="true"
|
:inline="true"
|
||||||
v-show="showSearch"
|
v-show="showSearch"
|
||||||
>
|
>
|
||||||
<el-form-item label="模板名称" prop="name">
|
<el-form-item label="搜索内容" prop="name">
|
||||||
<el-input v-model="queryParams.name" placeholder="请输入模板名称" />
|
<el-input
|
||||||
|
v-model="queryParams.name"
|
||||||
|
placeholder="请输入模板名称或备注"
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="营养师" prop="nutritionistId">
|
<el-form-item label="营养师" prop="nutritionistId">
|
||||||
<el-select
|
<el-select
|
||||||
@ -87,24 +91,9 @@
|
|||||||
<el-table v-loading="loading" :data="recipesTemplateList">
|
<el-table v-loading="loading" :data="recipesTemplateList">
|
||||||
<el-table-column label="审核状态" align="center" width="120">
|
<el-table-column label="审核状态" align="center" width="120">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-tag
|
<el-tag :type="getReviewType(scope.row.reviewStatus)">
|
||||||
:type="
|
{{ getReviewStatusName(scope.row.reviewStatus) }}
|
||||||
!scope.row.reviewStatus
|
</el-tag>
|
||||||
? 'info'
|
|
||||||
: scope.row.reviewStatus === 1
|
|
||||||
? 'danger'
|
|
||||||
: 'success'
|
|
||||||
"
|
|
||||||
>{{
|
|
||||||
`${
|
|
||||||
!scope.row.reviewStatus
|
|
||||||
? "未制作"
|
|
||||||
: scope.row.reviewStatus == 1
|
|
||||||
? "未审核"
|
|
||||||
: "已审核"
|
|
||||||
}`
|
|
||||||
}}</el-tag
|
|
||||||
>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
@ -299,6 +288,32 @@ export default {
|
|||||||
this.resetForm("queryForm");
|
this.resetForm("queryForm");
|
||||||
this.handleQuery();
|
this.handleQuery();
|
||||||
},
|
},
|
||||||
|
getReviewStatusName(status) {
|
||||||
|
switch (status) {
|
||||||
|
case 1:
|
||||||
|
return "未审核";
|
||||||
|
case 2:
|
||||||
|
return "已审核";
|
||||||
|
case 3:
|
||||||
|
return "制作中";
|
||||||
|
case 0:
|
||||||
|
default:
|
||||||
|
return "未制作";
|
||||||
|
}
|
||||||
|
},
|
||||||
|
getReviewType(status) {
|
||||||
|
switch (status) {
|
||||||
|
case 1:
|
||||||
|
return "danger";
|
||||||
|
case 2:
|
||||||
|
return "success";
|
||||||
|
case 3:
|
||||||
|
return "";
|
||||||
|
case 0:
|
||||||
|
default:
|
||||||
|
return "info";
|
||||||
|
}
|
||||||
|
},
|
||||||
/** 导出按钮操作 */
|
/** 导出按钮操作 */
|
||||||
handleExport() {
|
handleExport() {
|
||||||
const queryParams = this.queryParams;
|
const queryParams = this.queryParams;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user