|
@@ -82,7 +82,7 @@
|
|
|
</el-table>
|
|
|
</el-tab-pane>
|
|
|
|
|
|
- <el-tab-pane label="咖啡" name="3">
|
|
|
+ <el-tab-pane label="威士忌" name="8">
|
|
|
<el-table :data="pageInfo.records" border stripe height="660" style="width: 100%;">
|
|
|
<el-table-column prop="dishesId" label="id" width="100" />
|
|
|
<el-table-column prop="name" label="名称" width="200"/>
|
|
@@ -115,7 +115,7 @@
|
|
|
</el-table>
|
|
|
</el-tab-pane>
|
|
|
|
|
|
- <el-tab-pane label="主食" name="4">
|
|
|
+ <el-tab-pane label="鸡尾酒" name="9">
|
|
|
<el-table :data="pageInfo.records" border stripe height="660" style="width: 100%;">
|
|
|
<el-table-column prop="dishesId" label="id" width="100" />
|
|
|
<el-table-column prop="name" label="名称" width="200"/>
|
|
@@ -181,6 +181,39 @@
|
|
|
</el-table>
|
|
|
</el-tab-pane>
|
|
|
|
|
|
+ <el-tab-pane label="主食" name="4">
|
|
|
+ <el-table :data="pageInfo.records" border stripe height="660" style="width: 100%;">
|
|
|
+ <el-table-column prop="dishesId" label="id" width="100" />
|
|
|
+ <el-table-column prop="name" label="名称" width="200"/>
|
|
|
+ <el-table-column prop="englishName" label="英文名称" width="200"/>
|
|
|
+ <el-table-column label="图片" width="120">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <img :src="scope.row.img" style="width: 80px;">
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="是否主打" width="80">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <div>{{scope.row.featured==1?'是':'否'}}</div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="规格\价格:" width="220" >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <div v-for="item in scope.row.dishesSpecifications" :key="item.specificationId">
|
|
|
+ <label>{{item.name}}-{{item.price}}(原){{item.vipPrice?'-'+item.vipPrice+'(vip)':null}}</label>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="操作" width="120" fixed="right">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-button v-if="scope.row.saleStatus==1" @click="stopSaleSnack(scope.$index, scope.row)" type="primary">停售</el-button>
|
|
|
+ <el-button v-if="scope.row.saleStatus==2" @click="startSaleSnack(scope.$index, scope.row)" type="success">启售</el-button>
|
|
|
+ <el-button @click="edit_snack(scope.$index, scope.row)" style="margin-left:0;margin-top:10px;">修改</el-button>
|
|
|
+ <el-button type="danger" @click="dishesDelete(scope.$index, scope.row.dishesId)" style="margin-left:0;margin-top:10px;">删除</el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </el-tab-pane>
|
|
|
+
|
|
|
</el-tabs>
|
|
|
|
|
|
<el-dialog :visible.sync="dialogVisible_addBeer" title="新增酒品" top="32px">
|
|
@@ -211,7 +244,7 @@
|
|
|
<el-form-item label="" prop="">
|
|
|
<img v-if="beer_params.img" :src="beer_params.img" style="width:100px;height: auto;" alt="">
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="菜品名称:">
|
|
|
+ <el-form-item label="菜品名称:">
|
|
|
<el-input v-model="beer_params.name" placeholder="请填写啤酒名" style="width:200px"/>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="英文名:">
|
|
@@ -260,7 +293,7 @@
|
|
|
<el-form-item label="" prop="">
|
|
|
<img v-if="snack_params.img" :src="snack_params.img" style="width:100px;height: auto;" alt="">
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="菜品名称:">
|
|
|
+ <el-form-item label="菜品名称:">
|
|
|
<el-input v-model="snack_params.name" placeholder="请填写菜品名" style="width:200px"/>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="英文名:">
|
|
@@ -312,7 +345,9 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { beer_list, snack_list, beer_add, snack_add, upload_file, specification_manage_list, beer_update, snack_update, dishes_remove, beer_unbound_menu_list } from '@/api/projection'
|
|
|
+import { beer_list, snack_list, beer_add, snack_add, upload_file,
|
|
|
+ specification_manage_list, beer_update, snack_update, dishes_remove,
|
|
|
+ beer_unbound_menu_list, public_data_dishes_type } from '@/api/projection'
|
|
|
import { deepClone, parseTime } from '@/utils'
|
|
|
import { scrollTo } from '@/utils/scrollTo'
|
|
|
|
|
@@ -349,21 +384,7 @@ export default {
|
|
|
vipPrice: ''
|
|
|
}
|
|
|
],
|
|
|
- classify_list: [
|
|
|
- {
|
|
|
- name: '小吃',
|
|
|
- value: '2'
|
|
|
- },{
|
|
|
- name: '咖啡',
|
|
|
- value: '3'
|
|
|
- },{
|
|
|
- name: '主食',
|
|
|
- value: '4'
|
|
|
- },{
|
|
|
- name: '烘焙',
|
|
|
- value: '5'
|
|
|
- }
|
|
|
- ],
|
|
|
+ classify_list: [],
|
|
|
featured_list: [
|
|
|
{
|
|
|
name: '是',
|
|
@@ -404,6 +425,7 @@ export default {
|
|
|
this.loadDatas();
|
|
|
this.loadSpecification_List();
|
|
|
this.unboundMenuBeer_List();
|
|
|
+ this.get_dishes_type();
|
|
|
},
|
|
|
methods: {
|
|
|
stopSaleSnack(index, row) {
|
|
@@ -504,7 +526,7 @@ export default {
|
|
|
englishName: row.englishName,
|
|
|
featured: row.featured.toString(),
|
|
|
img: row.img,
|
|
|
- type: row.type.toString(),
|
|
|
+ type: row.type,
|
|
|
saleStatus: row.saleStatus.toString(),
|
|
|
specificationIds: '',
|
|
|
prices: '',
|
|
@@ -604,7 +626,7 @@ export default {
|
|
|
this.beer_params.specificationIds = specificationId_array.join(';');
|
|
|
this.beer_params.prices = price_array.join(';');
|
|
|
this.beer_params.vipPrices = vipPrices_array[0] ? vipPrices_array.join(';') : null;
|
|
|
-
|
|
|
+
|
|
|
if(this.edit_status) {
|
|
|
beer_update(this.beer_params).then((res) => {
|
|
|
console.log(res);
|
|
@@ -739,7 +761,7 @@ export default {
|
|
|
this.$message({
|
|
|
type: 'info',
|
|
|
message: '已取消删除'
|
|
|
- });
|
|
|
+ });
|
|
|
});
|
|
|
},
|
|
|
handleClick(tab, event) {
|
|
@@ -758,6 +780,12 @@ export default {
|
|
|
} else if (tab.name === '5') {
|
|
|
this.listQuery.type = '5';
|
|
|
this.loadDatas();
|
|
|
+ } else if (tab.name === '8') {
|
|
|
+ this.listQuery.type = '8';
|
|
|
+ this.loadDatas();
|
|
|
+ } else if (tab.name === '9') {
|
|
|
+ this.listQuery.type = '9';
|
|
|
+ this.loadDatas();
|
|
|
}
|
|
|
},
|
|
|
// 获取规格数据
|
|
@@ -776,6 +804,11 @@ export default {
|
|
|
handleFilter() {
|
|
|
this.loadDatas();
|
|
|
},
|
|
|
+ get_dishes_type() {
|
|
|
+ public_data_dishes_type().then((res) => {
|
|
|
+ this.classify_list = res.data.data;
|
|
|
+ })
|
|
|
+ },
|
|
|
// 获取数据
|
|
|
loadDatas() {
|
|
|
if (this.activeName == '1') {
|