|
@@ -1,13 +1,24 @@
|
|
|
<template>
|
|
|
<div class="app-container">
|
|
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="40px">
|
|
|
- <el-form-item label="日期">
|
|
|
+ <!-- <el-form-item label="日期">
|
|
|
<el-date-picker
|
|
|
v-model="queryParams.performStartDate"
|
|
|
type="date"
|
|
|
value-format="yyyy-MM-dd"
|
|
|
placeholder="日期">
|
|
|
</el-date-picker>
|
|
|
+ </el-form-item> -->
|
|
|
+ <el-form-item label="日期" label-width="70px">
|
|
|
+ <el-date-picker
|
|
|
+ style="width: 250px;"
|
|
|
+ v-model="queryParams.performTime"
|
|
|
+ type="daterange"
|
|
|
+ value-format="yyyy-MM-dd"
|
|
|
+ range-separator="至"
|
|
|
+ start-placeholder="开始日期"
|
|
|
+ end-placeholder="结束日期">
|
|
|
+ </el-date-picker>
|
|
|
</el-form-item>
|
|
|
<el-form-item>
|
|
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
|
@@ -147,14 +158,14 @@ export default {
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
|
- this.$set(this.queryParams,'performStartDate',moment().format("yyyy-MM-DD"))
|
|
|
+ this.$set(this.queryParams,'performTime',[moment().format("yyyy-MM-DD"),moment().format("yyyy-MM-DD")])
|
|
|
this.getList();
|
|
|
},
|
|
|
methods: {
|
|
|
/** 查询列表 */
|
|
|
getList() {
|
|
|
this.loading = true;
|
|
|
- performTimeCount(this.addDateRange(this.queryParams))
|
|
|
+ performTimeCount(this.addDateRange(this.setParams(this.queryParams)))
|
|
|
.then(response => {
|
|
|
this.dataList = response.data.rows;
|
|
|
this.total = response.data.total;
|
|
@@ -162,6 +173,17 @@ export default {
|
|
|
}
|
|
|
);
|
|
|
},
|
|
|
+ setParams(obj={}){
|
|
|
+ let params = JSON.parse(JSON.stringify(obj))
|
|
|
+ params['performStartDate'] = null
|
|
|
+ params['performEndDate'] = null
|
|
|
+ if(params.performTime && params.performTime.length>0) {
|
|
|
+ params['performStartDate'] = params.performTime[0]
|
|
|
+ params['performEndDate'] = params.performTime[1]
|
|
|
+ }
|
|
|
+ delete params.performTime
|
|
|
+ return params
|
|
|
+ },
|
|
|
// 取消按钮
|
|
|
cancel() {
|
|
|
this.open = false;
|
|
@@ -198,7 +220,7 @@ export default {
|
|
|
postMap[key] = this.queryParams[key]
|
|
|
}
|
|
|
}
|
|
|
- downTimeCountListXls(postMap)
|
|
|
+ downTimeCountListXls(this.setParams(postMap))
|
|
|
.then((res) => {
|
|
|
exportExcel(res, '场次销售统计', '.xlsx');
|
|
|
this.handleExportLoading = false;
|