|
@@ -1,12 +1,14 @@
|
|
|
<template>
|
|
<template>
|
|
|
<div class="app-container">
|
|
<div class="app-container">
|
|
|
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="120px">
|
|
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="120px">
|
|
|
- <el-form-item label="时间" prop="consumptionDate">
|
|
|
|
|
|
|
+ <el-form-item label="时间" prop="dateRange">
|
|
|
<el-date-picker clearable size="small"
|
|
<el-date-picker clearable size="small"
|
|
|
- v-model="queryParams.consumptionDate"
|
|
|
|
|
- type="date"
|
|
|
|
|
- value-format="yyyy-MM-dd"
|
|
|
|
|
- placeholder="时间">
|
|
|
|
|
|
|
+ v-model="dateRange"
|
|
|
|
|
+ type="daterange"
|
|
|
|
|
+ value-format="yyyy-MM-dd"
|
|
|
|
|
+ range-separator="-"
|
|
|
|
|
+ start-placeholder="开始日期"
|
|
|
|
|
+ end-placeholder="结束日期">
|
|
|
</el-date-picker>
|
|
</el-date-picker>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
<el-form-item label="类型" prop="logType">
|
|
<el-form-item label="类型" prop="logType">
|
|
@@ -125,8 +127,12 @@ export default {
|
|
|
consumptionDate: null,
|
|
consumptionDate: null,
|
|
|
integralConsume: null,
|
|
integralConsume: null,
|
|
|
integralRefund: null,
|
|
integralRefund: null,
|
|
|
- logType: null
|
|
|
|
|
|
|
+ logType: null,
|
|
|
|
|
+ beginDate: null,
|
|
|
|
|
+ endDate: null
|
|
|
},
|
|
},
|
|
|
|
|
+ // 时间范围
|
|
|
|
|
+ dateRange: [],
|
|
|
// 表单参数
|
|
// 表单参数
|
|
|
form: {},
|
|
form: {},
|
|
|
// 表单校验
|
|
// 表单校验
|
|
@@ -144,7 +150,15 @@ export default {
|
|
|
/** 查询通用积分消耗退还统计(不含看课领的积分)列表 */
|
|
/** 查询通用积分消耗退还统计(不含看课领的积分)列表 */
|
|
|
getList() {
|
|
getList() {
|
|
|
this.loading = true;
|
|
this.loading = true;
|
|
|
- listIntegralCount(this.queryParams).then(response => {
|
|
|
|
|
|
|
+ const params = { ...this.queryParams };
|
|
|
|
|
+ if (this.dateRange && this.dateRange.length === 2) {
|
|
|
|
|
+ params.beginDate = this.dateRange[0];
|
|
|
|
|
+ params.endDate = this.dateRange[1];
|
|
|
|
|
+ } else {
|
|
|
|
|
+ params.beginDate = null;
|
|
|
|
|
+ params.endDate = null;
|
|
|
|
|
+ }
|
|
|
|
|
+ listIntegralCount(params).then(response => {
|
|
|
this.integralCountList = response.rows;
|
|
this.integralCountList = response.rows;
|
|
|
this.total = response.total;
|
|
this.total = response.total;
|
|
|
this.loading = false;
|
|
this.loading = false;
|
|
@@ -174,6 +188,7 @@ export default {
|
|
|
},
|
|
},
|
|
|
/** 重置按钮操作 */
|
|
/** 重置按钮操作 */
|
|
|
resetQuery() {
|
|
resetQuery() {
|
|
|
|
|
+ this.dateRange = [];
|
|
|
this.resetForm("queryForm");
|
|
this.resetForm("queryForm");
|
|
|
this.handleQuery();
|
|
this.handleQuery();
|
|
|
},
|
|
},
|