Commit 136db343 authored by huyf's avatar huyf

全部业绩导出

parent a2202da6
......@@ -41,6 +41,8 @@
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="handleQuery">{{$t('搜索')}}</el-button>
<el-button type="primary" icon="el-icon-search" @click="resetQuery">{{$t('重置')}}</el-button>
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExportDetail" :loading="exportLoading">{{ $t('导出明细') }}</el-button>
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExportStatistics" :loading="exportLoading">{{ $t('导出统计') }}</el-button>
<!-- <el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" :loading="exportLoading"
>{{$t('导出')}}</el-button> -->
</el-form-item>
......@@ -426,20 +428,44 @@
}
},
/** 导出按钮操作 */
handleExport() {
handleExportDetail() {
// 处理查询参数
let params = {...this.queryParams};
params.pageNo = undefined;
params.pageSize = undefined;
this.addBeginAndEndTime(params, this.dateRangeCreateTime, 'createTime');
this.addBeginAndEndTime(params, this.dateRangeStartTime, 'startTime');
this.addBeginAndEndTime(params, this.dateRangeEndTime, 'endTime');
params.beginStartTime=this.dateFilter[0];
params.endStartTime=this.dateFilter[1];
// this.addBeginAndEndTime(params, this.dateRangeCreateTime, 'createTime');
// this.addBeginAndEndTime(params, this.dateRangeStartTime, 'startTime');
// this.addBeginAndEndTime(params, this.dateRangeEndTime, 'endTime');
// 执行导出
this.$modal.confirm(this.$t('是否确认导出所有部门业绩目标设置数据项?')).then(() => {
this.$modal.confirm(this.$t('是否确认导出所有部门业绩数据项?')).then(() => {
this.exportLoading = true;
return exportDeptTargetExcel(params);
}).then(response => {
this.$download.excel(response, `${this.$t('我的业绩')}.xls`);
this.$download.excel(response, `${this.$t('业绩明细')}.xls`);
this.exportLoading = false;
}).catch(() => {
});
},
/** 导出按钮操作 */
handleExportStatistics() {
// 处理查询参数
let params = {...this.queryParams};
params.pageNo = undefined;
params.pageSize = undefined;
params.beginStartTime=this.dateFilter[0];
params.endStartTime=this.dateFilter[1];
// this.addBeginAndEndTime(params, this.dateRangeCreateTime, 'createTime');
// this.addBeginAndEndTime(params, this.dateRangeStartTime, 'startTime');
// this.addBeginAndEndTime(params, this.dateRangeEndTime, 'endTime');
// 执行导出
this.$modal.confirm(this.$t('是否确认导出所有部门业绩统计?')).then(() => {
this.exportLoading = true;
return exportDeptTargetExcel(params);
}).then(response => {
this.$download.excel(response, `${this.$t('业绩统计')}.xls`);
this.exportLoading = false;
}).catch(() => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment