feat:桌台统计增加分店条件
This commit is contained in:
parent
2b09e4df2c
commit
448261e7b2
|
|
@ -6,7 +6,7 @@
|
|||
</el-tabs> -->
|
||||
<div class="head-container">
|
||||
<el-form :model="query" inline label-position="left">
|
||||
<div class="u-flex gap-10">
|
||||
<div class="u-flex gap-10" style="flex-wrap: wrap;">
|
||||
<el-radio-group v-model="timeValue" @change="timeChange">
|
||||
<el-radio-button value="">全部</el-radio-button>
|
||||
<el-radio-button value="0">今天</el-radio-button>
|
||||
|
|
@ -27,6 +27,11 @@
|
|||
value-format="YYYY-MM-DD"
|
||||
></el-date-picker>
|
||||
</div>
|
||||
<div>
|
||||
<el-select v-model="shopId" placeholder="选择分店" style="width: 200px; margin-right: 10px">
|
||||
<el-option v-for="item in branchList" :key="item.shopId" :label="item.shopName" :value="item.shopId" />
|
||||
</el-select>
|
||||
</div>
|
||||
<div>
|
||||
<el-button type="primary" @click="getTableData">查询</el-button>
|
||||
<el-button @click="resetHandle">重置</el-button>
|
||||
|
|
@ -100,6 +105,7 @@
|
|||
|
||||
<script>
|
||||
import tableSummaryApi from "@/api/order/table-summary";
|
||||
import ShopApi from "@/api/account/shop";
|
||||
import dayjs from "dayjs";
|
||||
import { downloadFile } from "@/utils/index";
|
||||
|
||||
|
|
@ -125,6 +131,8 @@ export default {
|
|||
downloadLoading: false,
|
||||
payCountList: "",
|
||||
payCountTotal: 0,
|
||||
shopId: null,
|
||||
branchList: [],
|
||||
};
|
||||
},
|
||||
filters: {
|
||||
|
|
@ -135,8 +143,16 @@ export default {
|
|||
mounted() {
|
||||
this.resetQuery = { ...this.query };
|
||||
this.getTableData();
|
||||
this.geiShopList();
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
* 获取分店列表
|
||||
*/
|
||||
async geiShopList() {
|
||||
let res = await ShopApi.getBranchList()
|
||||
this.branchList = res;
|
||||
},
|
||||
//携带table id跳转到订单列表页面
|
||||
toTableOrderList(data) {
|
||||
// console.log(data)
|
||||
|
|
@ -155,6 +171,7 @@ export default {
|
|||
const file = await tableSummaryApi.export({
|
||||
beginDate: this.query.createdAt[0],
|
||||
endDate: this.query.createdAt[1],
|
||||
shopId: this.shopId
|
||||
});
|
||||
downloadFile(file, "数据", "xlsx");
|
||||
this.downloadLoading = false;
|
||||
|
|
@ -188,6 +205,7 @@ export default {
|
|||
size: this.tableData.size,
|
||||
beginDate: this.query.createdAt[0],
|
||||
endDate: this.query.createdAt[1],
|
||||
shopId: this.shopId
|
||||
});
|
||||
this.tableData.loading = false;
|
||||
this.tableData.data = res;
|
||||
|
|
|
|||
Loading…
Reference in New Issue