commit
25fc8a4ed8
@ -74,7 +74,9 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
handleOnHide() {
|
handleOnHide() {
|
||||||
this.$emit("onConfirm", { remark: this.nData });
|
if (this.nData !== null && this.nData !== undefined) {
|
||||||
|
this.$emit("onConfirm", { remark: this.nData });
|
||||||
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
@ -4,7 +4,6 @@
|
|||||||
:title="title"
|
:title="title"
|
||||||
width="80%"
|
width="80%"
|
||||||
top="30%"
|
top="30%"
|
||||||
:close-on-click-modal="false"
|
|
||||||
class="dishes_detail_dialog_wrapper"
|
class="dishes_detail_dialog_wrapper"
|
||||||
>
|
>
|
||||||
<section class="section_zone">
|
<section class="section_zone">
|
||||||
|
@ -18,25 +18,54 @@
|
|||||||
<el-card v-for="obj in menus" :key="obj.type" style="margin-top: 12px">
|
<el-card v-for="obj in menus" :key="obj.type" style="margin-top: 12px">
|
||||||
<div slot="header">
|
<div slot="header">
|
||||||
<div class="header_style">
|
<div class="header_style">
|
||||||
<span>{{ obj.typeName }}</span>
|
<span style="font-weight: bold">{{ obj.typeName }}</span>
|
||||||
<span class="time">{{ menuTypeTimeDict[obj.type] }}</span>
|
<span class="time">{{ menuTypeTimeDict[obj.type] }}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div v-for="mObj in obj.values" :key="mObj.id">
|
<div v-for="mObj in obj.values" :key="mObj.id">
|
||||||
<div class="dishes_item">
|
<div class="dishes_item">
|
||||||
<div
|
<div
|
||||||
v-if="!mObj.methods && !mObj.remark && !mObj.igdList"
|
v-if="mObj.igdList.length === 1"
|
||||||
class="simple_dishes"
|
class="simple_dishes"
|
||||||
|
@click="handleOnDetailClick(mObj)"
|
||||||
>
|
>
|
||||||
<span>{{ mObj.name }}</span>
|
<span>
|
||||||
|
<span>
|
||||||
|
{{ mObj.igdList[0].name }}
|
||||||
|
</span>
|
||||||
|
<em
|
||||||
|
v-if="mObj.remark || mObj.methods"
|
||||||
|
class="el-icon-collection-tag"
|
||||||
|
style="color: #1890ff; margin-left: 8px"
|
||||||
|
/>
|
||||||
|
</span>
|
||||||
<span class="weight_style">
|
<span class="weight_style">
|
||||||
<span style="margin-right: 20px">{{ mObj.cusStr }}</span>
|
<span style="margin-right: 20px">{{
|
||||||
<span>{{ mObj.weight }}克</span>
|
mObj.igdList[0].cusStr
|
||||||
|
}}</span>
|
||||||
|
<span>{{ mObj.igdList[0].weight }}克</span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div v-else class="complex_dishes" @click="handleOnDetailClick(mObj)">
|
<div v-else style="padding: 8px 0" @click="handleOnDetailClick(mObj)">
|
||||||
<span>{{ mObj.name }}</span>
|
<span>
|
||||||
<em class="el-icon-arrow-right" />
|
<span style="color: #1890ff">{{ mObj.name }}</span>
|
||||||
|
<em
|
||||||
|
class="el-icon-collection-tag"
|
||||||
|
style="color: #1890ff; margin-left: 8px"
|
||||||
|
/>
|
||||||
|
</span>
|
||||||
|
<div
|
||||||
|
class="simple_dishes"
|
||||||
|
style="margin-left: 16px; height: 30px"
|
||||||
|
v-for="igd in mObj.igdList"
|
||||||
|
:key="igd.id"
|
||||||
|
>
|
||||||
|
<span>{{ igd.name }} </span>
|
||||||
|
<span class="weight_style">
|
||||||
|
<span style="margin-right: 20px">{{ igd.cusStr }}</span>
|
||||||
|
<span>{{ igd.weight }}克</span>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -82,24 +111,24 @@ export default {
|
|||||||
if (!obj[cur.type]) {
|
if (!obj[cur.type]) {
|
||||||
obj[cur.type] = [];
|
obj[cur.type] = [];
|
||||||
}
|
}
|
||||||
let tarMenu = cur;
|
// let tarMenu = cur;
|
||||||
if (
|
// if (
|
||||||
!tarMenu.methods &&
|
// !tarMenu.methods &&
|
||||||
!tarMenu.remark &&
|
// !tarMenu.remark &&
|
||||||
tarMenu.igdList.length === 1
|
// tarMenu.igdList.length === 1
|
||||||
) {
|
// ) {
|
||||||
tarMenu = tarMenu.igdList[0];
|
// tarMenu = tarMenu.igdList[0];
|
||||||
tarMenu.cusStr = `${this.cusWeightDict[tarMenu.cusWeight] || ""}${
|
// tarMenu.cusStr = `${this.cusWeightDict[tarMenu.cusWeight] || ""}${
|
||||||
this.cusUnitDict[tarMenu.cusUnit] || ""
|
// this.cusUnitDict[tarMenu.cusUnit] || ""
|
||||||
|
// }`;
|
||||||
|
// } else {
|
||||||
|
cur.igdList.forEach((igd) => {
|
||||||
|
igd.cusStr = `${this.cusWeightDict[igd.cusWeight] || ""}${
|
||||||
|
this.cusUnitDict[igd.cusUnit] || ""
|
||||||
}`;
|
}`;
|
||||||
} else {
|
});
|
||||||
tarMenu.igdList.forEach((igd) => {
|
// }
|
||||||
igd.cusStr = `${this.cusWeightDict[igd.cusWeight] || ""}${
|
obj[cur.type].push(cur);
|
||||||
this.cusUnitDict[igd.cusUnit] || ""
|
|
||||||
}`;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
obj[cur.type].push(tarMenu);
|
|
||||||
return obj;
|
return obj;
|
||||||
}, {});
|
}, {});
|
||||||
const mMenus = Object.keys(mData).map((type) => ({
|
const mMenus = Object.keys(mData).map((type) => ({
|
||||||
@ -107,14 +136,16 @@ export default {
|
|||||||
typeName: this.menuTypeDict[type],
|
typeName: this.menuTypeDict[type],
|
||||||
values: mData[type],
|
values: mData[type],
|
||||||
}));
|
}));
|
||||||
// console.log(mMenus);
|
console.log(mMenus);
|
||||||
return mMenus;
|
return mMenus;
|
||||||
},
|
},
|
||||||
...mapState(["cusUnitDict", "cusWeightDict", "menuTypeDict"]),
|
...mapState(["cusUnitDict", "cusWeightDict", "menuTypeDict"]),
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
handleOnDetailClick(data) {
|
handleOnDetailClick(data) {
|
||||||
this.$refs["detailDialogRef"].showDialog(data);
|
if (data.remark || data.methods) {
|
||||||
|
this.$refs["detailDialogRef"].showDialog(data);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
handleOnShoppingPlanClick() {
|
handleOnShoppingPlanClick() {
|
||||||
this.$refs["shoppingPlanRef"].showDrawer({
|
this.$refs["shoppingPlanRef"].showDrawer({
|
||||||
@ -167,7 +198,6 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.dishes_item {
|
.dishes_item {
|
||||||
height: 38px;
|
|
||||||
padding: 0 8px;
|
padding: 0 8px;
|
||||||
border-bottom: 1px solid #dfe6ec;
|
border-bottom: 1px solid #dfe6ec;
|
||||||
|
|
||||||
@ -178,12 +208,13 @@ export default {
|
|||||||
|
|
||||||
.simple_dishes {
|
.simple_dishes {
|
||||||
display: flex;
|
display: flex;
|
||||||
height: 100%;
|
height: 38px;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
|
|
||||||
.weight_style {
|
.weight_style {
|
||||||
width: 40%;
|
width: 40%;
|
||||||
|
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
@ -191,10 +222,9 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.complex_dishes {
|
.complex_dishes {
|
||||||
display: flex;
|
// display: flex;
|
||||||
height: 100%;
|
// align-items: center;
|
||||||
align-items: center;
|
// justify-content: space-between;
|
||||||
justify-content: space-between;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -7,7 +7,6 @@
|
|||||||
class="icon_btn"
|
class="icon_btn"
|
||||||
@click="handleOnPlanClick"
|
@click="handleOnPlanClick"
|
||||||
/>
|
/>
|
||||||
<!-- <img :src="logo" style="width: auto; height: 32px" alt="logo" /> -->
|
|
||||||
<span>{{ curDate }}</span>
|
<span>{{ curDate }}</span>
|
||||||
<el-button
|
<el-button
|
||||||
icon="el-icon-user"
|
icon="el-icon-user"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user