修复菜品修改问题
This commit is contained in:
@ -463,7 +463,7 @@ export default {
|
||||
handleFileSuccess(response, file, fileList) {
|
||||
if (response != null && response.code === 200) {
|
||||
this.form.imgUrl = response.fileName;
|
||||
console.log(response);
|
||||
// console.log(response);
|
||||
} else {
|
||||
this.fail();
|
||||
this.$message.error(response.msg);
|
||||
|
@ -166,7 +166,7 @@
|
||||
getList() {
|
||||
this.loading = true;
|
||||
const dateRange = [dayjs(this.month).startOf('month').format('YYYY-MM-DD'), dayjs(this.month).endOf('month').format('YYYY-MM-DD')];
|
||||
console.log(dateRange)
|
||||
// console.log(dateRange)
|
||||
detailCommision(this.addDateRange(this.queryParams, dateRange)).then(response => {
|
||||
this.commisionList = response.rows;
|
||||
this.total = response.total;
|
||||
|
@ -215,7 +215,7 @@
|
||||
getList() {
|
||||
this.loading = true;
|
||||
const dateRange = [dayjs(this.month).startOf('month').format('YYYY-MM-DD'), dayjs(this.month).endOf('month').format('YYYY-MM-DD')];
|
||||
console.log(dateRange)
|
||||
// console.log(dateRange)
|
||||
detailDayCommision(this.addDateRange(this.queryParams, dateRange)).then(response => {
|
||||
this.commisionList = response.rows;
|
||||
this.total = response.total;
|
||||
|
@ -482,13 +482,13 @@ export default {
|
||||
this.$refs["cusContractDrawerRef"].showDrawer(row);
|
||||
},
|
||||
handleOnBodySignClick(row) {
|
||||
console.log(row);
|
||||
// console.log(row);
|
||||
},
|
||||
handleOnHealthSignClick(row) {
|
||||
this.$refs["physicalSignsDialogRef"].showDialog(row);
|
||||
},
|
||||
handleOnMenuClick(row) {
|
||||
console.log(row);
|
||||
// console.log(row);
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
|
@ -169,12 +169,12 @@
|
||||
<div class="drawer_content">
|
||||
<el-row class="content_detail">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-col span="24">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="菜品名称" prop="name">
|
||||
<el-input v-model="form.name" placeholder="请输入菜品名称" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col span="12">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="菜品类型" prop="type">
|
||||
<el-select
|
||||
v-model="form.type"
|
||||
@ -190,7 +190,7 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col span="12">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="是否主食" prop="type">
|
||||
<el-radio-group v-model="form.isMain">
|
||||
<el-radio :label="0">是</el-radio>
|
||||
@ -198,7 +198,7 @@
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col span="24">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="食材" prop="ingIds">
|
||||
<el-transfer
|
||||
style="text-align: left; display: inline-block"
|
||||
@ -237,7 +237,7 @@
|
||||
</el-transfer>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col span="24">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="分量" prop="weight">
|
||||
<el-table
|
||||
:data="selTableData"
|
||||
@ -259,7 +259,7 @@
|
||||
:min="0.5"
|
||||
/> -->
|
||||
<el-select size="mini" v-model="scope.row.cusWeight">
|
||||
<el-option
|
||||
<el-option
|
||||
v-for="dict in cusWeightOptions"
|
||||
:key="dict.dictValue"
|
||||
:label="dict.dictLabel"
|
||||
@ -286,7 +286,7 @@
|
||||
controls-position="right"
|
||||
@change="handleInputChange"
|
||||
:min="0"
|
||||
step="50"
|
||||
:step="50"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@ -301,7 +301,7 @@
|
||||
</el-table>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col span="24">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="推荐人群">
|
||||
<el-tag
|
||||
style="margin-right: 4px"
|
||||
@ -313,7 +313,7 @@
|
||||
</el-tag>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col span="24">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="忌口人群">
|
||||
<el-tag
|
||||
style="margin-right: 4px"
|
||||
@ -325,7 +325,7 @@
|
||||
</el-tag>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col span="24">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="审核状态" prop="reviewStatus">
|
||||
<el-select
|
||||
v-model="form.reviewStatus"
|
||||
@ -341,7 +341,7 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col span="24">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="做法" prop="methods">
|
||||
<el-input
|
||||
v-model="form.methods"
|
||||
@ -448,7 +448,7 @@ export default {
|
||||
this.getDicts("cus_cus_unit").then((response) => {
|
||||
this.cusUnitOptions = response.data;
|
||||
});
|
||||
this.getDicts("cus_cus_weight").then((response) => {
|
||||
this.getDicts("cus_cus_weight").then((response) => {
|
||||
this.cusWeightOptions = response.data;
|
||||
});
|
||||
this.getDicts("cus_review_status").then((response) => {
|
||||
@ -485,7 +485,7 @@ export default {
|
||||
notRecTags,
|
||||
};
|
||||
});
|
||||
console.log(this.dishesList);
|
||||
// console.log(this.dishesList);
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
@ -614,10 +614,15 @@ export default {
|
||||
submitForm() {
|
||||
this.$refs["form"].validate((valid) => {
|
||||
if (valid) {
|
||||
this.form.igdList = this.selTableData;
|
||||
this.form.type = this.form.type.join(",");
|
||||
if (this.form.id != null) {
|
||||
updateDishes(this.form).then((response) => {
|
||||
if (!this.selTableData.length) {
|
||||
this.$message.error("食材不能为空");
|
||||
return;
|
||||
}
|
||||
const data = JSON.parse(JSON.stringify(this.form));
|
||||
data.igdList = this.selTableData;
|
||||
data.type = data.type.join(",");
|
||||
if (data.id != null) {
|
||||
updateDishes(data).then((response) => {
|
||||
if (response.code === 200) {
|
||||
this.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
@ -625,7 +630,7 @@ export default {
|
||||
}
|
||||
});
|
||||
} else {
|
||||
addDishes(this.form).then((response) => {
|
||||
addDishes(data).then((response) => {
|
||||
if (response.code === 200) {
|
||||
this.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
@ -727,7 +732,7 @@ export default {
|
||||
});
|
||||
},
|
||||
handleInputChange(val) {
|
||||
console.log({ val, table: this.selTableData });
|
||||
// console.log({ val, table: this.selTableData });
|
||||
},
|
||||
getSummaries(param) {
|
||||
const { columns, data } = param;
|
||||
@ -755,13 +760,12 @@ export default {
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style >
|
||||
/**
|
||||
/deep/ :focus {
|
||||
outline: 0;
|
||||
}
|
||||
*/
|
||||
<style rel="stylesheet/scss" lang="scss">
|
||||
#el-drawer__title {
|
||||
& > span:focus {
|
||||
outline: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.el-transfer-panel__filter {
|
||||
margin: 2px;
|
||||
@ -769,66 +773,68 @@ export default {
|
||||
|
||||
.cus-unit {
|
||||
display: inline-flex;
|
||||
}
|
||||
.el-input-number--mini {
|
||||
width: 38px;
|
||||
}
|
||||
|
||||
.cus-unit .el-input-number--mini {
|
||||
width: 38px;
|
||||
}
|
||||
.el-input-number {
|
||||
.el-input-number__decrease {
|
||||
display: none;
|
||||
}
|
||||
.el-input-number__increase {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.cus-unit .el-input-number .el-input-number__decrease {
|
||||
display: none;
|
||||
}
|
||||
.el-input {
|
||||
width: 38px;
|
||||
}
|
||||
|
||||
.cus-unit .el-input-number .el-input-number__increase {
|
||||
display: none;
|
||||
}
|
||||
.el-input .el-input__inner {
|
||||
padding: 0;
|
||||
border-radius: 0;
|
||||
border: unset;
|
||||
border-bottom: 1px solid #dcdfe6;
|
||||
}
|
||||
}
|
||||
|
||||
.cus-unit .el-input-number .el-input {
|
||||
width: 38px;
|
||||
}
|
||||
.el-select {
|
||||
.el-input__suffix {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.cus-unit .el-input-number .el-input .el-input__inner {
|
||||
padding: 0;
|
||||
border-radius: 0;
|
||||
border: unset;
|
||||
border-bottom: 1px solid #dcdfe6;
|
||||
}
|
||||
|
||||
.cus-unit .el-select .el-input__suffix {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.cus-unit .el-select .el-input__inner {
|
||||
padding: 0 4px;
|
||||
/* border: unset; */
|
||||
text-align: center;
|
||||
.el-input__inner {
|
||||
padding: 0 4px;
|
||||
/* border: unset; */
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.weight {
|
||||
width: 70px;
|
||||
}
|
||||
|
||||
.weight .el-input .el-input__inner {
|
||||
padding: 0 32px 0 4px;
|
||||
.el-input .el-input__inner {
|
||||
padding: 0 32px 0 4px;
|
||||
}
|
||||
}
|
||||
|
||||
.drawer_content {
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.drawer_content .content_detail {
|
||||
flex: 1 1 0;
|
||||
padding: 12px;
|
||||
overflow: auto;
|
||||
}
|
||||
.content_detail {
|
||||
flex: 1 1 0;
|
||||
padding: 12px;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.drawer_content .dialog-footer {
|
||||
flex: 0 0 45px;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
padding: 0 12px;
|
||||
.dialog-footer {
|
||||
flex: 0 0 45px;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
padding: 0 12px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
@ -703,7 +703,7 @@
|
||||
detailHealthy.condiment += detailHealthy.otherCondiment ? (","+detailHealthy.otherCondiment) : "";
|
||||
//烹饪
|
||||
let cookingStyleRate = "";
|
||||
console.log(detailHealthy.cookingStyleRate);
|
||||
// console.log(detailHealthy.cookingStyleRate);
|
||||
if(detailHealthy.cookingStyleRate != null){
|
||||
detailHealthy.cookingStyleRate.split(",").forEach(function(item, index){
|
||||
cookingStyleRate += (cookingStyleRate != "" ? "," : "") + (healthyData["cookingStyleRateArray"][index])+item +"次";
|
||||
|
@ -365,7 +365,7 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
onSubmit() {
|
||||
console.log("submit!");
|
||||
// console.log("submit!");
|
||||
},
|
||||
/** 查询体征列表 */
|
||||
getPhysicalSignsList() {
|
||||
@ -402,7 +402,7 @@ export default {
|
||||
cusMessage.connectTime = cusMessage.connectTime.substring(0, 2);
|
||||
addCustomer(cusMessage).then((response) => {
|
||||
if (response.code === 200) {
|
||||
console.log("成功");
|
||||
// console.log("成功");
|
||||
this.$notify({
|
||||
title: "提交成功",
|
||||
message: "",
|
||||
@ -439,7 +439,7 @@ export default {
|
||||
},
|
||||
beforeCreate() {
|
||||
document.title = this.$route.meta.title;
|
||||
console.log(this.$route.meta.title);
|
||||
// console.log(this.$route.meta.title);
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
@ -705,10 +705,10 @@ export default {
|
||||
.catch(function () {});
|
||||
},
|
||||
handleStatusClick(data) {
|
||||
console.log(data);
|
||||
// console.log(data);
|
||||
},
|
||||
orderPauseManage(order) {
|
||||
console.log(order.orderId);
|
||||
// console.log(order.orderId);
|
||||
this.pauseTitle = order.customer;
|
||||
this.orderPauseId = order.orderId;
|
||||
this.openPause = true;
|
||||
|
@ -316,7 +316,7 @@
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
console.log(this.queryParams.pauseStartDate);
|
||||
// console.log(this.queryParams.pauseStartDate);
|
||||
//this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
@ -356,7 +356,7 @@
|
||||
if (valid) {
|
||||
this.form.pauseStartDate = dayjs(this.dateScope[0]).format("YYYY-MM-DD");
|
||||
this.form.pauseEndDate = dayjs(this.dateScope[1]).format("YYYY-MM-DD");
|
||||
console.log(this.form.pauseStartDate + "-" + this.form.pauseEndDate);
|
||||
// console.log(this.form.pauseStartDate + "-" + this.form.pauseEndDate);
|
||||
if (this.form.id != null) {
|
||||
updatePause(this.form).then(response => {
|
||||
if (response.code === 200) {
|
||||
|
@ -64,10 +64,8 @@ export default {
|
||||
[{ title: "减脂反弹", value: "rebound" }],
|
||||
[{ title: "意识到生活习惯是减脂关键", value: "crux" }],
|
||||
[{ title: "减脂遇到的困难", value: "difficulty" }],
|
||||
[
|
||||
{ title: "湿气数据", value: "moistureDate" },
|
||||
{ title: "气血数据", value: "bloodData" },
|
||||
],
|
||||
[{ title: "湿气数据", value: "moistureDate" }],
|
||||
[{ title: "气血数据", value: "bloodData" }],
|
||||
[{ title: "病史", value: "signStr" }],
|
||||
[{ title: "忌口或过敏源", value: "dishesIngredientId" }],
|
||||
[{ title: "方便沟通时间", value: "connectTime" }],
|
||||
|
17
stdiet-ui/src/views/custom/recipesBuild/RecipesView.vue
Normal file
17
stdiet-ui/src/views/custom/recipesBuild/RecipesView.vue
Normal file
@ -0,0 +1,17 @@
|
||||
<template>
|
||||
<div>
|
||||
<RecipesCom v-for="item in data" :key="item.id" :data="item" />
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import RecipesCom from "@/components/RecipesCom";
|
||||
export default {
|
||||
name: "RecipesView",
|
||||
components: {
|
||||
RecipesCom,
|
||||
},
|
||||
props: ["data"],
|
||||
};
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss">
|
||||
</style>
|
@ -46,7 +46,7 @@ export default {
|
||||
|
||||
.value {
|
||||
/* color: #696969; */
|
||||
flex: 1;
|
||||
flex: 1 1 0;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
@ -1,7 +1,9 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<div class="content">
|
||||
<div class="left">left</div>
|
||||
<div class="left">
|
||||
<RecipesView :data="recipesData" />
|
||||
</div>
|
||||
<div class="right">
|
||||
<HealthyView :data="healthyData" v-if="healthyDataType === 0" />
|
||||
<BodySignView :data="healthyData" v-else />
|
||||
@ -18,6 +20,7 @@ const { mapActions, mapState, mapMutations } = createNamespacedHelpers(
|
||||
|
||||
import HealthyView from "./HealthyView";
|
||||
import BodySignView from "./BodySignView";
|
||||
import RecipesView from "./RecipesView";
|
||||
|
||||
export default {
|
||||
name: "BuildRecipies",
|
||||
@ -26,11 +29,11 @@ export default {
|
||||
},
|
||||
mounted() {
|
||||
//
|
||||
console.log({
|
||||
cusId: this.cusId,
|
||||
recipesId: this.recipesId,
|
||||
});
|
||||
this.init({ cusId: this.cusId }).catch((err) => {
|
||||
// console.log({
|
||||
// cusId: this.cusId,
|
||||
// recipesId: this.recipesId,
|
||||
// });
|
||||
this.init({ cusId: this.cusId, recipesId: this.recipesId }).catch((err) => {
|
||||
this.$message.error(err.message);
|
||||
});
|
||||
},
|
||||
@ -41,12 +44,14 @@ export default {
|
||||
components: {
|
||||
HealthyView,
|
||||
BodySignView,
|
||||
RecipesView,
|
||||
},
|
||||
props: ["planId", "cusId", "recipesId"],
|
||||
computed: {
|
||||
...mapState({
|
||||
healthyData: (state) => state.healthyData,
|
||||
healthyDataType: (state) => state.healthyDataType,
|
||||
recipesData: (state) => state.recipesData,
|
||||
}),
|
||||
},
|
||||
methods: {
|
||||
|
@ -612,7 +612,7 @@ export default {
|
||||
}
|
||||
// test
|
||||
// params.recipesId = "61";
|
||||
path += '/61';
|
||||
path += '/73';
|
||||
// this.$router.push({
|
||||
// name: "build",
|
||||
// params,
|
||||
|
@ -266,7 +266,7 @@ export default {
|
||||
});
|
||||
},
|
||||
fail(){
|
||||
console.log("定时--------");
|
||||
// console.log("定时--------");
|
||||
this.submitFlag = false;
|
||||
},
|
||||
nextStep(step){
|
||||
|
@ -452,7 +452,7 @@
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
console.log(this.form)
|
||||
// console.log(this.form)
|
||||
if (this.form.id != null) {
|
||||
updateWxUserLog(this.form).then(response => {
|
||||
if (response.code === 200) {
|
||||
|
Reference in New Issue
Block a user