Merge branch 'master' of https://gitee.com/darlk/ShengTangManage into xzj
This commit is contained in:
commit
070f36dd7c
@ -13,5 +13,7 @@ public class SysRecipes {
|
|||||||
|
|
||||||
private Long planId;
|
private Long planId;
|
||||||
|
|
||||||
|
private int reviewStatus;
|
||||||
|
|
||||||
private List<SysRecipesDaily> menus;
|
private List<SysRecipesDaily> menus;
|
||||||
}
|
}
|
||||||
|
@ -53,7 +53,7 @@ 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.setReviewStatus(sysRecipes.getReviewStatus());// 设置制作中
|
||||||
sysRecipesPlan.setRecipesId(sysRecipes.getId());
|
sysRecipesPlan.setRecipesId(sysRecipes.getId());
|
||||||
sysRecipesPlanMapper.updateSysRecipesPlan(sysRecipesPlan);
|
sysRecipesPlanMapper.updateSysRecipesPlan(sysRecipesPlan);
|
||||||
}
|
}
|
||||||
|
@ -480,7 +480,7 @@
|
|||||||
|
|
||||||
<!-- 根据客户ID查询该客户下所有订单 -->
|
<!-- 根据客户ID查询该客户下所有订单 -->
|
||||||
<select id="getAllOrderByCusId" parameterType="Long" resultMap="SysOrderResult">
|
<select id="getAllOrderByCusId" parameterType="Long" resultMap="SysOrderResult">
|
||||||
select * from sys_order where del_flag = 0 and cus_id = #{cusId} order by order_id asc
|
select * from sys_order where del_flag = 0 and cus_id = #{cusId} order by order_time asc
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
@ -242,9 +242,9 @@ const actions = {
|
|||||||
if (recipesDataResult.code === 200) {
|
if (recipesDataResult.code === 200) {
|
||||||
const { endNum, startNum, recipesId } = state;
|
const { endNum, startNum, recipesId } = state;
|
||||||
// 计算
|
// 计算
|
||||||
let length = endNum - startNum;
|
const length = endNum - startNum;
|
||||||
recipesData = recipesDataResult.data.reduce((outArr, dayData, idx) => {
|
recipesData = recipesDataResult.data.reduce((outArr, dayData, idx) => {
|
||||||
if (!recipesId || length >= idx) {
|
if (length >= idx) {
|
||||||
outArr.push({
|
outArr.push({
|
||||||
id: dayData.id,
|
id: dayData.id,
|
||||||
numDay: !recipesId ? startNum + idx : dayData.numDay,
|
numDay: !recipesId ? startNum + idx : dayData.numDay,
|
||||||
@ -311,6 +311,7 @@ const actions = {
|
|||||||
const { recipesData, cusId, planId } = state;
|
const { recipesData, cusId, planId } = state;
|
||||||
const params = {
|
const params = {
|
||||||
cusId: payload.cusId !== undefined ? payload.cusId : cusId,
|
cusId: payload.cusId !== undefined ? payload.cusId : cusId,
|
||||||
|
reviewStatus: payload.reviewStatus,
|
||||||
planId: payload.planId || planId,
|
planId: payload.planId || planId,
|
||||||
menus: recipesData.map((menu, idx) => ({
|
menus: recipesData.map((menu, idx) => ({
|
||||||
numDay: menu.numDay,
|
numDay: menu.numDay,
|
||||||
@ -531,7 +532,8 @@ const actions = {
|
|||||||
}).then(() => {
|
}).then(() => {
|
||||||
window.postMessage(
|
window.postMessage(
|
||||||
{
|
{
|
||||||
type: messageTypes.UPDATE_SHORTCUT
|
type: messageTypes.UPDATE_SHORTCUT,
|
||||||
|
setCurrent: true
|
||||||
},
|
},
|
||||||
"*"
|
"*"
|
||||||
);
|
);
|
||||||
|
@ -50,8 +50,13 @@
|
|||||||
/>
|
/>
|
||||||
<!-- 菜品预览 -->
|
<!-- 菜品预览 -->
|
||||||
<el-table border :data="scope.row.data.igdList" v-else size="mini">
|
<el-table border :data="scope.row.data.igdList" v-else size="mini">
|
||||||
<el-table-column align="center" label="食材" prop="name" />
|
<el-table-column
|
||||||
<el-table-column align="center" label="分量估算">
|
align="center"
|
||||||
|
label="食材"
|
||||||
|
prop="name"
|
||||||
|
width="100"
|
||||||
|
/>
|
||||||
|
<el-table-column align="center" label="分量估算" width="100">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span>{{
|
<span>{{
|
||||||
`${cusWeightDict[scope.row.cusWeight]}${
|
`${cusWeightDict[scope.row.cusWeight]}${
|
||||||
@ -60,7 +65,12 @@
|
|||||||
}}</span>
|
}}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column align="center" label="重量(g)" prop="weight" />
|
<el-table-column
|
||||||
|
align="center"
|
||||||
|
label="重量(g)"
|
||||||
|
prop="weight"
|
||||||
|
width="100"
|
||||||
|
/>
|
||||||
</el-table>
|
</el-table>
|
||||||
<el-button type="text" size="mini" slot="reference">预览</el-button>
|
<el-button type="text" size="mini" slot="reference">预览</el-button>
|
||||||
</el-popover>
|
</el-popover>
|
||||||
@ -68,7 +78,11 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" :width="60" align="center">
|
<el-table-column label="操作" :width="60" align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button type="text" size="mini" @click="handleOnDelete(scope.row)">
|
<el-button
|
||||||
|
type="text"
|
||||||
|
size="mini"
|
||||||
|
@click="handleOnDelete(scope.row)"
|
||||||
|
>
|
||||||
删除
|
删除
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
@ -129,18 +143,24 @@ export default {
|
|||||||
messageListener(e) {
|
messageListener(e) {
|
||||||
const { data } = e;
|
const { data } = e;
|
||||||
if (data.type === messageTypes.UPDATE_SHORTCUT) {
|
if (data.type === messageTypes.UPDATE_SHORTCUT) {
|
||||||
this.getList();
|
this.getList(data.setCurrent);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
getList() {
|
getList(setCurrent) {
|
||||||
getShortCut().then((data) => {
|
getShortCut().then((data) => {
|
||||||
this.dataList = data;
|
this.dataList = data;
|
||||||
// console.log(this.dataList);
|
// console.log(this.dataList);
|
||||||
|
if (setCurrent) {
|
||||||
|
this.$refs.shortCutTable.setCurrentRow(data[0]);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
handleOnDelete(data) {
|
handleOnDelete(data) {
|
||||||
removeShortCut(data.id).then((res) => {
|
removeShortCut(data.id).then((res) => {
|
||||||
this.getList();
|
this.getList();
|
||||||
|
if (this.curShortCutObj.id === data.id) {
|
||||||
|
this.setCurShortCutObj({});
|
||||||
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
handleOnCurrentChange(data) {
|
handleOnCurrentChange(data) {
|
||||||
|
@ -39,7 +39,10 @@
|
|||||||
@click="handleOnMenuPasteClick"
|
@click="handleOnMenuPasteClick"
|
||||||
>快捷替换</el-button
|
>快捷替换</el-button
|
||||||
>
|
>
|
||||||
<div v-else-if="curShortCutObj.type" style="margin-top: 8px">
|
<div
|
||||||
|
v-else-if="curShortCutObj && curShortCutObj.type"
|
||||||
|
style="margin-top: 8px"
|
||||||
|
>
|
||||||
<el-button
|
<el-button
|
||||||
icon="el-icon-right"
|
icon="el-icon-right"
|
||||||
size="mini"
|
size="mini"
|
||||||
@ -56,7 +59,8 @@
|
|||||||
@click="handleOnResetCurrentDay"
|
@click="handleOnResetCurrentDay"
|
||||||
slot="reference"
|
slot="reference"
|
||||||
>
|
>
|
||||||
{{ `第${numDay}天` }}
|
<div class="cus_name_hide" :id="`cus_name_${num}`">{{ name }}</div>
|
||||||
|
<div>{{ `第${numDay}天` }}</div>
|
||||||
</div>
|
</div>
|
||||||
</el-popover>
|
</el-popover>
|
||||||
</template>
|
</template>
|
||||||
@ -411,6 +415,13 @@ export default {
|
|||||||
}
|
}
|
||||||
const mData = processMenuData(this.data.dishes);
|
const mData = processMenuData(this.data.dishes);
|
||||||
// console.log(mData);
|
// console.log(mData);
|
||||||
|
// mData.forEach((obj, idx) =>
|
||||||
|
// console.log({
|
||||||
|
// num: this.num,
|
||||||
|
// type: obj.type,
|
||||||
|
// idx: idx + 1,
|
||||||
|
// })
|
||||||
|
// );
|
||||||
|
|
||||||
return mData;
|
return mData;
|
||||||
},
|
},
|
||||||
@ -478,7 +489,9 @@ export default {
|
|||||||
},
|
},
|
||||||
shouldPasteShow(type) {
|
shouldPasteShow(type) {
|
||||||
return (
|
return (
|
||||||
this.curShortCutObj.type && this.curShortCutObj.type.includes(type)
|
this.curShortCutObj &&
|
||||||
|
this.curShortCutObj.type &&
|
||||||
|
this.curShortCutObj.type.includes(type)
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
cellClassName({ row, column, rowIndex, columnIndex }) {
|
cellClassName({ row, column, rowIndex, columnIndex }) {
|
||||||
@ -780,4 +793,8 @@ export default {
|
|||||||
background: #d66969;
|
background: #d66969;
|
||||||
color: blue;
|
color: blue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.cus_name_hide {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -146,6 +146,7 @@ export default {
|
|||||||
},
|
},
|
||||||
handleOnSave() {
|
handleOnSave() {
|
||||||
this.saveRecipes({
|
this.saveRecipes({
|
||||||
|
reviewStatus: 3, // 制作中
|
||||||
callback: (query) => {
|
callback: (query) => {
|
||||||
// console.log(query);
|
// console.log(query);
|
||||||
let path = "/recipes/build/" + query.name + "/" + query.planId;
|
let path = "/recipes/build/" + query.name + "/" + query.planId;
|
||||||
@ -175,6 +176,7 @@ export default {
|
|||||||
this.saveRecipes({
|
this.saveRecipes({
|
||||||
cusId: 0,
|
cusId: 0,
|
||||||
planId,
|
planId,
|
||||||
|
reviewStatus: 2, // 已审核
|
||||||
callback: () => {
|
callback: () => {
|
||||||
this.$message.success(`另存为模板「${form.name}」成功`);
|
this.$message.success(`另存为模板「${form.name}」成功`);
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
@ -227,6 +229,12 @@ export default {
|
|||||||
this.downloading = false;
|
this.downloading = false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Array.from({ length: this.recipesData.length }).forEach((_, idx) => {
|
||||||
|
const tmpElm = document.getElementById(`cus_name_${idx}`);
|
||||||
|
if (tmpElm) {
|
||||||
|
tmpElm.classList = [];
|
||||||
|
}
|
||||||
|
});
|
||||||
recipesDom.style.overflow = "visible";
|
recipesDom.style.overflow = "visible";
|
||||||
html2canvans(recipesDom, {
|
html2canvans(recipesDom, {
|
||||||
scale: 1.5,
|
scale: 1.5,
|
||||||
@ -243,6 +251,13 @@ export default {
|
|||||||
centerContentDom.style.overflow = "auto";
|
centerContentDom.style.overflow = "auto";
|
||||||
recipesDom.style.overflow = "auto";
|
recipesDom.style.overflow = "auto";
|
||||||
|
|
||||||
|
Array.from({ length: this.recipesData.length }).forEach((_, idx) => {
|
||||||
|
const tmpElm = document.getElementById(`cus_name_${idx}`);
|
||||||
|
if (tmpElm) {
|
||||||
|
tmpElm.classList = ["cus_name_hide"];
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
this.downloading = false;
|
this.downloading = false;
|
||||||
this.$message.success("食谱导出成功");
|
this.$message.success("食谱导出成功");
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user