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