修复菜谱截取功能
This commit is contained in:
parent
13f25e4f02
commit
f2946fea59
@ -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,
|
||||||
@ -531,7 +531,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"
|
||||||
@ -411,6 +414,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 +488,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 }) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user