修复菜品修改问题
This commit is contained in:
parent
afb7465281
commit
1775b657a7
@ -21,8 +21,6 @@ public class SysDishesIngredient extends SysIngredient {
|
|||||||
|
|
||||||
private Long cusUnit;
|
private Long cusUnit;
|
||||||
|
|
||||||
// private BigDecimal cusWeight;
|
|
||||||
|
|
||||||
private Integer cusWeight;
|
private Integer cusWeight;
|
||||||
|
|
||||||
private BigDecimal weight;
|
private BigDecimal weight;
|
||||||
|
@ -36,6 +36,9 @@
|
|||||||
<result property="area" column="area"/>
|
<result property="area" column="area"/>
|
||||||
<result property="rec" column="rec"/>
|
<result property="rec" column="rec"/>
|
||||||
<result property="notRec" column="not_rec"/>
|
<result property="notRec" column="not_rec"/>
|
||||||
|
<result property="cusWeight" column="cus_weight" />
|
||||||
|
<result property="cusUnit" column="cus_unit" />
|
||||||
|
<result property="weight" column="weight" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<select id="selectSysRecipesByRecipesId" parameterType="Long" resultMap="SysRecipesResult">
|
<select id="selectSysRecipesByRecipesId" parameterType="Long" resultMap="SysRecipesResult">
|
||||||
|
8
stdiet-ui/src/api/custom/recipes.js
Normal file
8
stdiet-ui/src/api/custom/recipes.js
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
import request from "@/utils/request";
|
||||||
|
|
||||||
|
export function getRecipes(id) {
|
||||||
|
return request({
|
||||||
|
url: "/recipes/" + id,
|
||||||
|
method: "get"
|
||||||
|
});
|
||||||
|
}
|
@ -413,7 +413,7 @@ export default {
|
|||||||
});
|
});
|
||||||
this.getDicts("cus_account").then((response) => {
|
this.getDicts("cus_account").then((response) => {
|
||||||
this.accountIdOptions = response.data;
|
this.accountIdOptions = response.data;
|
||||||
console.log(response.data);
|
// console.log(response.data);
|
||||||
this.accountIdOptions.splice(0, 0, {
|
this.accountIdOptions.splice(0, 0, {
|
||||||
dictLabel: "无",
|
dictLabel: "无",
|
||||||
dictValue: "0",
|
dictValue: "0",
|
||||||
@ -559,7 +559,7 @@ export default {
|
|||||||
accountId,
|
accountId,
|
||||||
...obj,
|
...obj,
|
||||||
};
|
};
|
||||||
console.log(this.form);
|
// console.log(this.form);
|
||||||
this.resetForm("form");
|
this.resetForm("form");
|
||||||
},
|
},
|
||||||
handleOnClosed() {
|
handleOnClosed() {
|
||||||
@ -600,7 +600,7 @@ export default {
|
|||||||
watch: {
|
watch: {
|
||||||
// 监听收款账号的变化
|
// 监听收款账号的变化
|
||||||
"form.accountId": function (newVal, oldVal) {
|
"form.accountId": function (newVal, oldVal) {
|
||||||
console.log("updte");
|
// console.log("updte");
|
||||||
this.initPlanningAndOperation();
|
this.initPlanningAndOperation();
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -162,10 +162,10 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
changeShowModule(){
|
changeShowModule(){
|
||||||
console.log("---------------");
|
// console.log("---------------");
|
||||||
for(var i = 0; i < this.stepArray.length; i++){
|
for(var i = 0; i < this.stepArray.length; i++){
|
||||||
let flag = this.showModuleArray.find((opt) => opt === i);
|
let flag = this.showModuleArray.find((opt) => opt === i);
|
||||||
console.log(flag != null && flag != undefined);
|
// console.log(flag != null && flag != undefined);
|
||||||
this.$set(this.stepArray, i, (flag != null && flag != undefined));
|
this.$set(this.stepArray, i, (flag != null && flag != undefined));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
87
stdiet-ui/src/components/RecipesCom/index.vue
Normal file
87
stdiet-ui/src/components/RecipesCom/index.vue
Normal file
@ -0,0 +1,87 @@
|
|||||||
|
<template>
|
||||||
|
<div class="main">
|
||||||
|
<div class="aspect">指标</div>
|
||||||
|
<div class="recipes">
|
||||||
|
<el-table :data="mData" border :span-method="spanMethod" size="mini">
|
||||||
|
<el-table-column :label="`${name}第${num}天`"></el-table-column>
|
||||||
|
<el-table-column label="菜品" prop="name"></el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: "RecipesCom",
|
||||||
|
props: {
|
||||||
|
data: {
|
||||||
|
type: Array,
|
||||||
|
default: [],
|
||||||
|
required: true,
|
||||||
|
},
|
||||||
|
name: {
|
||||||
|
type: String,
|
||||||
|
default: "",
|
||||||
|
},
|
||||||
|
num: {
|
||||||
|
type: Number,
|
||||||
|
default: 0,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
components: {},
|
||||||
|
mounted() {
|
||||||
|
// console.log(this.data);
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {};
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
mData() {
|
||||||
|
if (!this.data.dishes) {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
|
||||||
|
const mData = this.data.dishes.reduce((arr, cur) => {
|
||||||
|
if (cur.id > 0) {
|
||||||
|
cur.igdList.forEach((igd) => {
|
||||||
|
if (igd.id > 0) {
|
||||||
|
const tarDetail = cur.detail.find((det) => det.id == igd.id);
|
||||||
|
arr.push({
|
||||||
|
id: cur.id,
|
||||||
|
name: cur.name,
|
||||||
|
type: cur.type,
|
||||||
|
isMain: cur.isMain,
|
||||||
|
methods: cur.methods,
|
||||||
|
igdId: igd.id,
|
||||||
|
igdName: igd.name,
|
||||||
|
proteinRatio: igd.proteinRatio,
|
||||||
|
fatRatio: igd.fatRatio,
|
||||||
|
carbonRatio: igd.carbonRatio,
|
||||||
|
rec: igd.rec,
|
||||||
|
notRec: igd.notRec,
|
||||||
|
weight: tarDetail ? tarDetail.weight : igd.weight,
|
||||||
|
cusWeight: tarDetail ? tarDetail.cus_weight : igd.cusWeight,
|
||||||
|
cusUnit: tarDetail ? tarDetail.cus_unit : igd.cusUnit,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
return arr;
|
||||||
|
}, []);
|
||||||
|
// console.log(mData);
|
||||||
|
return mData;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
spanMethod({ row, column, rowIndex, columnIndex }) {},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<style rel="stylesheet/scss" lang="scss">
|
||||||
|
.main {
|
||||||
|
.aspect {
|
||||||
|
}
|
||||||
|
|
||||||
|
.recipies {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
@ -1,25 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div class="main">
|
|
||||||
<div class="aspect">指标</div>
|
|
||||||
<div class="recipes">食谱</div>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
<script>
|
|
||||||
export default {
|
|
||||||
name: "RecipesView",
|
|
||||||
components: {},
|
|
||||||
data() {
|
|
||||||
return {};
|
|
||||||
},
|
|
||||||
methods: {},
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
<style rel="stylesheet/scss" lang="scss">
|
|
||||||
.main {
|
|
||||||
.aspect {
|
|
||||||
}
|
|
||||||
|
|
||||||
.recipies {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
@ -35,7 +35,7 @@ export default {
|
|||||||
if (typeof val !== 'string') return
|
if (typeof val !== 'string') return
|
||||||
const themeCluster = this.getThemeCluster(val.replace('#', ''))
|
const themeCluster = this.getThemeCluster(val.replace('#', ''))
|
||||||
const originalCluster = this.getThemeCluster(oldVal.replace('#', ''))
|
const originalCluster = this.getThemeCluster(oldVal.replace('#', ''))
|
||||||
console.log(themeCluster, originalCluster)
|
// console.log(themeCluster, originalCluster)
|
||||||
|
|
||||||
const $message = this.$message({
|
const $message = this.$message({
|
||||||
message: ' Compiling the theme',
|
message: ' Compiling the theme',
|
||||||
|
@ -2,10 +2,12 @@ import { getOrder } from "@/api/custom/order";
|
|||||||
import { getCustomerPhysicalSignsByCusId } from "@/api/custom/customer";
|
import { getCustomerPhysicalSignsByCusId } from "@/api/custom/customer";
|
||||||
import { dealHealthy } from "@/utils/healthyData";
|
import { dealHealthy } from "@/utils/healthyData";
|
||||||
import { getRecipesPlan } from "@/api/custom/recipesPlan";
|
import { getRecipesPlan } from "@/api/custom/recipesPlan";
|
||||||
|
import { getRecipes } from "@/api/custom/recipes";
|
||||||
|
|
||||||
const oriState = {
|
const oriState = {
|
||||||
healthyData: {},
|
healthyData: {},
|
||||||
healthyDataType: 0
|
healthyDataType: 0,
|
||||||
|
recipesData: []
|
||||||
};
|
};
|
||||||
|
|
||||||
const mutations = {
|
const mutations = {
|
||||||
@ -13,8 +15,11 @@ const mutations = {
|
|||||||
state.healthyDataType = payload.healthyDataType;
|
state.healthyDataType = payload.healthyDataType;
|
||||||
state.healthyData = payload.healthyData;
|
state.healthyData = payload.healthyData;
|
||||||
},
|
},
|
||||||
|
setRecipesData(state, payload) {
|
||||||
|
state.recipesData = payload.recipesData;
|
||||||
|
},
|
||||||
clean(state) {
|
clean(state) {
|
||||||
console.log("clean");
|
// console.log("clean");
|
||||||
Object.keys(oriState).forEach(key => {
|
Object.keys(oriState).forEach(key => {
|
||||||
state[key] = oriState[key];
|
state[key] = oriState[key];
|
||||||
});
|
});
|
||||||
@ -28,14 +33,30 @@ const actions = {
|
|||||||
throw new Error("未找到用户id");
|
throw new Error("未找到用户id");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 健康数据
|
||||||
const healthyDataResult = await getCustomerPhysicalSignsByCusId(
|
const healthyDataResult = await getCustomerPhysicalSignsByCusId(
|
||||||
orderResult.data.cusId
|
orderResult.data.cusId
|
||||||
);
|
);
|
||||||
// 设置健康数据
|
if (healthyDataResult.code === 200) {
|
||||||
commit("setHealtyData", {
|
commit("setHealtyData", {
|
||||||
healthyDataType: healthyDataResult.data.type,
|
healthyDataType: healthyDataResult.data.type,
|
||||||
healthyData: dealHealthy(healthyDataResult.data.customerHealthy)
|
healthyData: dealHealthy(healthyDataResult.data.customerHealthy)
|
||||||
});
|
});
|
||||||
|
} else {
|
||||||
|
throw new Error(healthyDataResult.msg);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 食谱数据
|
||||||
|
if (payload.recipesId) {
|
||||||
|
const recipesDataResult = await getRecipes(payload.recipesId);
|
||||||
|
if (recipesDataResult.code === 200) {
|
||||||
|
commit("setRecipesData", {
|
||||||
|
recipesData: recipesDataResult.data
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
throw new Error(recipesDataResult.msg);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -550,7 +550,9 @@ export function dealHealthy(customerHealthy) {
|
|||||||
customerHealthy.getupTime += "点";
|
customerHealthy.getupTime += "点";
|
||||||
}
|
}
|
||||||
if (customerHealthy.hasOwnProperty("signList")) {
|
if (customerHealthy.hasOwnProperty("signList")) {
|
||||||
customerHealthy.signStr = customerHealthy.signList.join(",");
|
customerHealthy.signStr = customerHealthy.signList
|
||||||
|
.map(obj => obj.name)
|
||||||
|
.join(",");
|
||||||
}
|
}
|
||||||
|
|
||||||
return customerHealthy;
|
return customerHealthy;
|
||||||
|
@ -463,7 +463,7 @@ export default {
|
|||||||
handleFileSuccess(response, file, fileList) {
|
handleFileSuccess(response, file, fileList) {
|
||||||
if (response != null && response.code === 200) {
|
if (response != null && response.code === 200) {
|
||||||
this.form.imgUrl = response.fileName;
|
this.form.imgUrl = response.fileName;
|
||||||
console.log(response);
|
// console.log(response);
|
||||||
} else {
|
} else {
|
||||||
this.fail();
|
this.fail();
|
||||||
this.$message.error(response.msg);
|
this.$message.error(response.msg);
|
||||||
|
@ -166,7 +166,7 @@
|
|||||||
getList() {
|
getList() {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
const dateRange = [dayjs(this.month).startOf('month').format('YYYY-MM-DD'), dayjs(this.month).endOf('month').format('YYYY-MM-DD')];
|
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 => {
|
detailCommision(this.addDateRange(this.queryParams, dateRange)).then(response => {
|
||||||
this.commisionList = response.rows;
|
this.commisionList = response.rows;
|
||||||
this.total = response.total;
|
this.total = response.total;
|
||||||
|
@ -215,7 +215,7 @@
|
|||||||
getList() {
|
getList() {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
const dateRange = [dayjs(this.month).startOf('month').format('YYYY-MM-DD'), dayjs(this.month).endOf('month').format('YYYY-MM-DD')];
|
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 => {
|
detailDayCommision(this.addDateRange(this.queryParams, dateRange)).then(response => {
|
||||||
this.commisionList = response.rows;
|
this.commisionList = response.rows;
|
||||||
this.total = response.total;
|
this.total = response.total;
|
||||||
|
@ -482,13 +482,13 @@ export default {
|
|||||||
this.$refs["cusContractDrawerRef"].showDrawer(row);
|
this.$refs["cusContractDrawerRef"].showDrawer(row);
|
||||||
},
|
},
|
||||||
handleOnBodySignClick(row) {
|
handleOnBodySignClick(row) {
|
||||||
console.log(row);
|
// console.log(row);
|
||||||
},
|
},
|
||||||
handleOnHealthSignClick(row) {
|
handleOnHealthSignClick(row) {
|
||||||
this.$refs["physicalSignsDialogRef"].showDialog(row);
|
this.$refs["physicalSignsDialogRef"].showDialog(row);
|
||||||
},
|
},
|
||||||
handleOnMenuClick(row) {
|
handleOnMenuClick(row) {
|
||||||
console.log(row);
|
// console.log(row);
|
||||||
},
|
},
|
||||||
// 取消按钮
|
// 取消按钮
|
||||||
cancel() {
|
cancel() {
|
||||||
|
@ -169,12 +169,12 @@
|
|||||||
<div class="drawer_content">
|
<div class="drawer_content">
|
||||||
<el-row class="content_detail">
|
<el-row class="content_detail">
|
||||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
<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-form-item label="菜品名称" prop="name">
|
||||||
<el-input v-model="form.name" placeholder="请输入菜品名称" />
|
<el-input v-model="form.name" placeholder="请输入菜品名称" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="菜品类型" prop="type">
|
<el-form-item label="菜品类型" prop="type">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="form.type"
|
v-model="form.type"
|
||||||
@ -190,7 +190,7 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="是否主食" prop="type">
|
<el-form-item label="是否主食" prop="type">
|
||||||
<el-radio-group v-model="form.isMain">
|
<el-radio-group v-model="form.isMain">
|
||||||
<el-radio :label="0">是</el-radio>
|
<el-radio :label="0">是</el-radio>
|
||||||
@ -198,7 +198,7 @@
|
|||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col span="24">
|
<el-col :span="24">
|
||||||
<el-form-item label="食材" prop="ingIds">
|
<el-form-item label="食材" prop="ingIds">
|
||||||
<el-transfer
|
<el-transfer
|
||||||
style="text-align: left; display: inline-block"
|
style="text-align: left; display: inline-block"
|
||||||
@ -237,7 +237,7 @@
|
|||||||
</el-transfer>
|
</el-transfer>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col span="24">
|
<el-col :span="24">
|
||||||
<el-form-item label="分量" prop="weight">
|
<el-form-item label="分量" prop="weight">
|
||||||
<el-table
|
<el-table
|
||||||
:data="selTableData"
|
:data="selTableData"
|
||||||
@ -286,7 +286,7 @@
|
|||||||
controls-position="right"
|
controls-position="right"
|
||||||
@change="handleInputChange"
|
@change="handleInputChange"
|
||||||
:min="0"
|
:min="0"
|
||||||
step="50"
|
:step="50"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@ -301,7 +301,7 @@
|
|||||||
</el-table>
|
</el-table>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col span="24">
|
<el-col :span="24">
|
||||||
<el-form-item label="推荐人群">
|
<el-form-item label="推荐人群">
|
||||||
<el-tag
|
<el-tag
|
||||||
style="margin-right: 4px"
|
style="margin-right: 4px"
|
||||||
@ -313,7 +313,7 @@
|
|||||||
</el-tag>
|
</el-tag>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col span="24">
|
<el-col :span="24">
|
||||||
<el-form-item label="忌口人群">
|
<el-form-item label="忌口人群">
|
||||||
<el-tag
|
<el-tag
|
||||||
style="margin-right: 4px"
|
style="margin-right: 4px"
|
||||||
@ -325,7 +325,7 @@
|
|||||||
</el-tag>
|
</el-tag>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col span="24">
|
<el-col :span="24">
|
||||||
<el-form-item label="审核状态" prop="reviewStatus">
|
<el-form-item label="审核状态" prop="reviewStatus">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="form.reviewStatus"
|
v-model="form.reviewStatus"
|
||||||
@ -341,7 +341,7 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col span="24">
|
<el-col :span="24">
|
||||||
<el-form-item label="做法" prop="methods">
|
<el-form-item label="做法" prop="methods">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="form.methods"
|
v-model="form.methods"
|
||||||
@ -485,7 +485,7 @@ export default {
|
|||||||
notRecTags,
|
notRecTags,
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
console.log(this.dishesList);
|
// console.log(this.dishesList);
|
||||||
this.total = response.total;
|
this.total = response.total;
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
});
|
});
|
||||||
@ -614,10 +614,15 @@ export default {
|
|||||||
submitForm() {
|
submitForm() {
|
||||||
this.$refs["form"].validate((valid) => {
|
this.$refs["form"].validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.form.igdList = this.selTableData;
|
if (!this.selTableData.length) {
|
||||||
this.form.type = this.form.type.join(",");
|
this.$message.error("食材不能为空");
|
||||||
if (this.form.id != null) {
|
return;
|
||||||
updateDishes(this.form).then((response) => {
|
}
|
||||||
|
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) {
|
if (response.code === 200) {
|
||||||
this.msgSuccess("修改成功");
|
this.msgSuccess("修改成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
@ -625,7 +630,7 @@ export default {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
addDishes(this.form).then((response) => {
|
addDishes(data).then((response) => {
|
||||||
if (response.code === 200) {
|
if (response.code === 200) {
|
||||||
this.msgSuccess("新增成功");
|
this.msgSuccess("新增成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
@ -727,7 +732,7 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
handleInputChange(val) {
|
handleInputChange(val) {
|
||||||
console.log({ val, table: this.selTableData });
|
// console.log({ val, table: this.selTableData });
|
||||||
},
|
},
|
||||||
getSummaries(param) {
|
getSummaries(param) {
|
||||||
const { columns, data } = param;
|
const { columns, data } = param;
|
||||||
@ -755,13 +760,12 @@ export default {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
<style rel="stylesheet/scss" lang="scss">
|
||||||
<style >
|
#el-drawer__title {
|
||||||
/**
|
& > span:focus {
|
||||||
/deep/ :focus {
|
|
||||||
outline: 0;
|
outline: 0;
|
||||||
}
|
}
|
||||||
*/
|
}
|
||||||
|
|
||||||
.el-transfer-panel__filter {
|
.el-transfer-panel__filter {
|
||||||
margin: 2px;
|
margin: 2px;
|
||||||
@ -769,66 +773,68 @@ export default {
|
|||||||
|
|
||||||
.cus-unit {
|
.cus-unit {
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
}
|
.el-input-number--mini {
|
||||||
|
|
||||||
.cus-unit .el-input-number--mini {
|
|
||||||
width: 38px;
|
width: 38px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.cus-unit .el-input-number .el-input-number__decrease {
|
.el-input-number {
|
||||||
|
.el-input-number__decrease {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
.el-input-number__increase {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.cus-unit .el-input-number .el-input-number__increase {
|
.el-input {
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.cus-unit .el-input-number .el-input {
|
|
||||||
width: 38px;
|
width: 38px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.cus-unit .el-input-number .el-input .el-input__inner {
|
.el-input .el-input__inner {
|
||||||
padding: 0;
|
padding: 0;
|
||||||
border-radius: 0;
|
border-radius: 0;
|
||||||
border: unset;
|
border: unset;
|
||||||
border-bottom: 1px solid #dcdfe6;
|
border-bottom: 1px solid #dcdfe6;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.cus-unit .el-select .el-input__suffix {
|
.el-select {
|
||||||
|
.el-input__suffix {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.cus-unit .el-select .el-input__inner {
|
.el-input__inner {
|
||||||
padding: 0 4px;
|
padding: 0 4px;
|
||||||
/* border: unset; */
|
/* border: unset; */
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.weight {
|
.weight {
|
||||||
width: 70px;
|
width: 70px;
|
||||||
}
|
|
||||||
|
|
||||||
.weight .el-input .el-input__inner {
|
.el-input .el-input__inner {
|
||||||
padding: 0 32px 0 4px;
|
padding: 0 32px 0 4px;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.drawer_content {
|
.drawer_content {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
}
|
|
||||||
|
|
||||||
.drawer_content .content_detail {
|
.content_detail {
|
||||||
flex: 1 1 0;
|
flex: 1 1 0;
|
||||||
padding: 12px;
|
padding: 12px;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.drawer_content .dialog-footer {
|
.dialog-footer {
|
||||||
flex: 0 0 45px;
|
flex: 0 0 45px;
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: flex-end;
|
justify-content: flex-end;
|
||||||
padding: 0 12px;
|
padding: 0 12px;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -703,7 +703,7 @@
|
|||||||
detailHealthy.condiment += detailHealthy.otherCondiment ? (","+detailHealthy.otherCondiment) : "";
|
detailHealthy.condiment += detailHealthy.otherCondiment ? (","+detailHealthy.otherCondiment) : "";
|
||||||
//烹饪
|
//烹饪
|
||||||
let cookingStyleRate = "";
|
let cookingStyleRate = "";
|
||||||
console.log(detailHealthy.cookingStyleRate);
|
// console.log(detailHealthy.cookingStyleRate);
|
||||||
if(detailHealthy.cookingStyleRate != null){
|
if(detailHealthy.cookingStyleRate != null){
|
||||||
detailHealthy.cookingStyleRate.split(",").forEach(function(item, index){
|
detailHealthy.cookingStyleRate.split(",").forEach(function(item, index){
|
||||||
cookingStyleRate += (cookingStyleRate != "" ? "," : "") + (healthyData["cookingStyleRateArray"][index])+item +"次";
|
cookingStyleRate += (cookingStyleRate != "" ? "," : "") + (healthyData["cookingStyleRateArray"][index])+item +"次";
|
||||||
|
@ -365,7 +365,7 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
onSubmit() {
|
onSubmit() {
|
||||||
console.log("submit!");
|
// console.log("submit!");
|
||||||
},
|
},
|
||||||
/** 查询体征列表 */
|
/** 查询体征列表 */
|
||||||
getPhysicalSignsList() {
|
getPhysicalSignsList() {
|
||||||
@ -402,7 +402,7 @@ export default {
|
|||||||
cusMessage.connectTime = cusMessage.connectTime.substring(0, 2);
|
cusMessage.connectTime = cusMessage.connectTime.substring(0, 2);
|
||||||
addCustomer(cusMessage).then((response) => {
|
addCustomer(cusMessage).then((response) => {
|
||||||
if (response.code === 200) {
|
if (response.code === 200) {
|
||||||
console.log("成功");
|
// console.log("成功");
|
||||||
this.$notify({
|
this.$notify({
|
||||||
title: "提交成功",
|
title: "提交成功",
|
||||||
message: "",
|
message: "",
|
||||||
@ -439,7 +439,7 @@ export default {
|
|||||||
},
|
},
|
||||||
beforeCreate() {
|
beforeCreate() {
|
||||||
document.title = this.$route.meta.title;
|
document.title = this.$route.meta.title;
|
||||||
console.log(this.$route.meta.title);
|
// console.log(this.$route.meta.title);
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
@ -705,10 +705,10 @@ export default {
|
|||||||
.catch(function () {});
|
.catch(function () {});
|
||||||
},
|
},
|
||||||
handleStatusClick(data) {
|
handleStatusClick(data) {
|
||||||
console.log(data);
|
// console.log(data);
|
||||||
},
|
},
|
||||||
orderPauseManage(order) {
|
orderPauseManage(order) {
|
||||||
console.log(order.orderId);
|
// console.log(order.orderId);
|
||||||
this.pauseTitle = order.customer;
|
this.pauseTitle = order.customer;
|
||||||
this.orderPauseId = order.orderId;
|
this.orderPauseId = order.orderId;
|
||||||
this.openPause = true;
|
this.openPause = true;
|
||||||
|
@ -316,7 +316,7 @@
|
|||||||
/** 搜索按钮操作 */
|
/** 搜索按钮操作 */
|
||||||
handleQuery() {
|
handleQuery() {
|
||||||
this.queryParams.pageNum = 1;
|
this.queryParams.pageNum = 1;
|
||||||
console.log(this.queryParams.pauseStartDate);
|
// console.log(this.queryParams.pauseStartDate);
|
||||||
//this.getList();
|
//this.getList();
|
||||||
},
|
},
|
||||||
/** 重置按钮操作 */
|
/** 重置按钮操作 */
|
||||||
@ -356,7 +356,7 @@
|
|||||||
if (valid) {
|
if (valid) {
|
||||||
this.form.pauseStartDate = dayjs(this.dateScope[0]).format("YYYY-MM-DD");
|
this.form.pauseStartDate = dayjs(this.dateScope[0]).format("YYYY-MM-DD");
|
||||||
this.form.pauseEndDate = dayjs(this.dateScope[1]).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) {
|
if (this.form.id != null) {
|
||||||
updatePause(this.form).then(response => {
|
updatePause(this.form).then(response => {
|
||||||
if (response.code === 200) {
|
if (response.code === 200) {
|
||||||
|
@ -64,10 +64,8 @@ export default {
|
|||||||
[{ title: "减脂反弹", value: "rebound" }],
|
[{ title: "减脂反弹", value: "rebound" }],
|
||||||
[{ title: "意识到生活习惯是减脂关键", value: "crux" }],
|
[{ title: "意识到生活习惯是减脂关键", value: "crux" }],
|
||||||
[{ title: "减脂遇到的困难", value: "difficulty" }],
|
[{ title: "减脂遇到的困难", value: "difficulty" }],
|
||||||
[
|
[{ title: "湿气数据", value: "moistureDate" }],
|
||||||
{ title: "湿气数据", value: "moistureDate" },
|
[{ title: "气血数据", value: "bloodData" }],
|
||||||
{ title: "气血数据", value: "bloodData" },
|
|
||||||
],
|
|
||||||
[{ title: "病史", value: "signStr" }],
|
[{ title: "病史", value: "signStr" }],
|
||||||
[{ title: "忌口或过敏源", value: "dishesIngredientId" }],
|
[{ title: "忌口或过敏源", value: "dishesIngredientId" }],
|
||||||
[{ title: "方便沟通时间", value: "connectTime" }],
|
[{ 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 {
|
.value {
|
||||||
/* color: #696969; */
|
/* color: #696969; */
|
||||||
flex: 1;
|
flex: 1 1 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -1,7 +1,9 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<div class="left">left</div>
|
<div class="left">
|
||||||
|
<RecipesView :data="recipesData" />
|
||||||
|
</div>
|
||||||
<div class="right">
|
<div class="right">
|
||||||
<HealthyView :data="healthyData" v-if="healthyDataType === 0" />
|
<HealthyView :data="healthyData" v-if="healthyDataType === 0" />
|
||||||
<BodySignView :data="healthyData" v-else />
|
<BodySignView :data="healthyData" v-else />
|
||||||
@ -18,6 +20,7 @@ const { mapActions, mapState, mapMutations } = createNamespacedHelpers(
|
|||||||
|
|
||||||
import HealthyView from "./HealthyView";
|
import HealthyView from "./HealthyView";
|
||||||
import BodySignView from "./BodySignView";
|
import BodySignView from "./BodySignView";
|
||||||
|
import RecipesView from "./RecipesView";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "BuildRecipies",
|
name: "BuildRecipies",
|
||||||
@ -26,11 +29,11 @@ export default {
|
|||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
//
|
//
|
||||||
console.log({
|
// console.log({
|
||||||
cusId: this.cusId,
|
// cusId: this.cusId,
|
||||||
recipesId: this.recipesId,
|
// recipesId: this.recipesId,
|
||||||
});
|
// });
|
||||||
this.init({ cusId: this.cusId }).catch((err) => {
|
this.init({ cusId: this.cusId, recipesId: this.recipesId }).catch((err) => {
|
||||||
this.$message.error(err.message);
|
this.$message.error(err.message);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@ -41,12 +44,14 @@ export default {
|
|||||||
components: {
|
components: {
|
||||||
HealthyView,
|
HealthyView,
|
||||||
BodySignView,
|
BodySignView,
|
||||||
|
RecipesView,
|
||||||
},
|
},
|
||||||
props: ["planId", "cusId", "recipesId"],
|
props: ["planId", "cusId", "recipesId"],
|
||||||
computed: {
|
computed: {
|
||||||
...mapState({
|
...mapState({
|
||||||
healthyData: (state) => state.healthyData,
|
healthyData: (state) => state.healthyData,
|
||||||
healthyDataType: (state) => state.healthyDataType,
|
healthyDataType: (state) => state.healthyDataType,
|
||||||
|
recipesData: (state) => state.recipesData,
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
@ -612,7 +612,7 @@ export default {
|
|||||||
}
|
}
|
||||||
// test
|
// test
|
||||||
// params.recipesId = "61";
|
// params.recipesId = "61";
|
||||||
path += '/61';
|
path += '/73';
|
||||||
// this.$router.push({
|
// this.$router.push({
|
||||||
// name: "build",
|
// name: "build",
|
||||||
// params,
|
// params,
|
||||||
|
@ -266,7 +266,7 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
fail(){
|
fail(){
|
||||||
console.log("定时--------");
|
// console.log("定时--------");
|
||||||
this.submitFlag = false;
|
this.submitFlag = false;
|
||||||
},
|
},
|
||||||
nextStep(step){
|
nextStep(step){
|
||||||
|
@ -452,7 +452,7 @@
|
|||||||
submitForm() {
|
submitForm() {
|
||||||
this.$refs["form"].validate(valid => {
|
this.$refs["form"].validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
console.log(this.form)
|
// console.log(this.form)
|
||||||
if (this.form.id != null) {
|
if (this.form.id != null) {
|
||||||
updateWxUserLog(this.form).then(response => {
|
updateWxUserLog(this.form).then(response => {
|
||||||
if (response.code === 200) {
|
if (response.code === 200) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user