2022-10-18 19:30:05 +08:00
|
|
|
<template>
|
|
|
|
|
<div>
|
|
|
|
|
<el-card class="box-card" :body-style="{ padding: '20px 20px 0 20px' }">
|
2022-10-19 21:06:09 +08:00
|
|
|
<el-form :inline="true" :model="formSearch" class="demo-form-inline">
|
2022-10-18 19:30:05 +08:00
|
|
|
<el-form-item label="店铺">
|
2022-10-19 21:06:09 +08:00
|
|
|
<el-select v-model="formSearch.store_id" placeholder="全部">
|
|
|
|
|
<el-option v-for="store in stores" :key="store.id" :label="store.name" :value="store.id">
|
|
|
|
|
</el-option>
|
2022-10-18 19:30:05 +08:00
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="团购状态">
|
2022-10-19 21:06:09 +08:00
|
|
|
<el-select v-model="formSearch.status" placeholder="团购状态">
|
|
|
|
|
<el-option label="未开始" value="0"></el-option>
|
2022-10-18 19:30:05 +08:00
|
|
|
<el-option label="跟团中" value="1"></el-option>
|
|
|
|
|
<el-option label="预览中" value="2"></el-option>
|
2022-10-19 21:06:09 +08:00
|
|
|
<el-option label="已结束" value="3"></el-option>
|
2022-10-18 19:30:05 +08:00
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="活动标题">
|
2022-10-19 21:06:09 +08:00
|
|
|
<el-input v-model="formSearch.title" placeholder="活动标题"></el-input>
|
2022-10-18 19:30:05 +08:00
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item>
|
2022-10-19 21:06:09 +08:00
|
|
|
<el-button type="primary" @click="getGroupList();">查询</el-button>
|
|
|
|
|
<el-button type="success" @click="groupSet(0);">新增团购</el-button>
|
2022-10-18 19:30:05 +08:00
|
|
|
</el-form-item>
|
|
|
|
|
</el-form>
|
|
|
|
|
</el-card>
|
|
|
|
|
|
|
|
|
|
<el-card style="margin-top: 10px" class="box-card">
|
|
|
|
|
<el-table v-loading="loading" :data="tableData" border style="width: 100%">
|
2022-10-19 21:06:09 +08:00
|
|
|
<el-table-column prop="shop_name" label="店铺">
|
2022-10-18 19:30:05 +08:00
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column prop="title" label="活动标题">
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column prop="status" label="团购状态">
|
|
|
|
|
</el-table-column>
|
2022-10-19 21:06:09 +08:00
|
|
|
<el-table-column label="开团时间">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<div>{{scope.row.start_time}}</div>
|
|
|
|
|
<div>至</div>
|
|
|
|
|
<div>{{scope.row.end_time}}</div>
|
|
|
|
|
</template>
|
2022-10-18 19:30:05 +08:00
|
|
|
</el-table-column>
|
2022-10-19 21:06:09 +08:00
|
|
|
<el-table-column label="手机查看">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-image style="width: 100px; height: 100px" :src="scope.row.ercode"></el-image>
|
|
|
|
|
</template>
|
2022-10-18 19:30:05 +08:00
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column prop="options" label="操作">
|
|
|
|
|
<template slot-scope="scope">
|
2022-10-19 21:06:09 +08:00
|
|
|
<el-button @click="groupSet(scope.row.id)" type="text" size="small">查看</el-button>
|
|
|
|
|
<el-button @click="groupSet(scope.row.id)" type="text" size="small">编辑</el-button>
|
2022-10-18 19:30:05 +08:00
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
</el-table>
|
|
|
|
|
</el-card>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<script>
|
2022-10-19 21:06:09 +08:00
|
|
|
import { storeList } from "../../api/shop";
|
|
|
|
|
import { groupList } from "../../api/group";
|
2022-10-18 19:30:05 +08:00
|
|
|
export default {
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
2022-10-19 21:06:09 +08:00
|
|
|
formSearch: {
|
|
|
|
|
store_id: "",
|
|
|
|
|
status: "",
|
|
|
|
|
title: "",
|
2022-10-18 19:30:05 +08:00
|
|
|
},
|
2022-10-19 21:06:09 +08:00
|
|
|
stores: [],
|
|
|
|
|
loading: false,
|
|
|
|
|
tableData: [
|
|
|
|
|
{ id: 1, shop_name: "花富贵儿", title: "团购", status: "未开始", start_time: "2022-10-01 00:00:00", end_time: "2022-10-10 00:00:00", ercode: "https://ts1.cn.mm.bing.net/th/id/R-C.8c975bf1ced8f8aac41a73e8691b385c?rik=%2fOWwdmGCNTjfQA&riu=http%3a%2f%2ftupian.qqw21.com%2farticle%2fUploadPic%2f2012-9%2f201291621552596740.jpg&ehk=yDVF7XeRX8kqDF4CTnZ8JRMjF7yk%2f7G4GTzEVSmWlv0%3d&risl=&pid=ImgRaw&r=0" }
|
|
|
|
|
]
|
2022-10-18 19:30:05 +08:00
|
|
|
}
|
|
|
|
|
},
|
2022-10-19 21:06:09 +08:00
|
|
|
mounted() {
|
|
|
|
|
this.getStoreList();
|
|
|
|
|
this.getGroupList();
|
|
|
|
|
},
|
2022-10-18 19:30:05 +08:00
|
|
|
methods: {
|
2022-10-19 21:06:09 +08:00
|
|
|
getStoreList() {
|
|
|
|
|
let page = {
|
|
|
|
|
page: 0,
|
|
|
|
|
per_page: 999,
|
|
|
|
|
};
|
|
|
|
|
storeList(page).then((res) => {
|
|
|
|
|
this.stores = res.data.data;
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
getGroupList() {
|
|
|
|
|
console.log(this.formSearch)
|
|
|
|
|
// groupList(this.formSearch).then((res) => {
|
|
|
|
|
// this.tableData = res.data.data;
|
|
|
|
|
// })
|
|
|
|
|
},
|
|
|
|
|
groupSet(id) {
|
|
|
|
|
this.$router.push({ path: "GROUP_ADD", query: { id: id } });
|
2022-10-18 19:30:05 +08:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</script>
|