Commit d10f6c43 authored by 邓春圆's avatar 邓春圆

Merge remote-tracking branch 'origin/dev1.6' into dev1.6

parents 8a7e6896 585bc36e
......@@ -94,3 +94,23 @@ export function exportDeptTargetExcel(query) {
responseType: 'blob'
})
}
// 导出部门业绩目标设置 Excel
export function exportDetailExcel(query) {
return request({
url: '/sale/dept-target/exportDetailExcel',
method: 'get',
params: query,
responseType: 'blob'
})
}
// 导出部门业绩目标设置 Excel
export function exportStatisticsExcel(query) {
return request({
url: '/sale/dept-target/exportStatisticsExcel',
method: 'get',
params: query,
responseType: 'blob'
})
}
......@@ -69,7 +69,7 @@
</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" :loading="exportLoading" v-hasPermi="['shipment:box:action:export']">{{$t('导出')}}
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" :loading="exportLoading" v-hasPermi="['shipment:box:export']">{{$t('导出')}}
</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
......
......@@ -55,7 +55,7 @@
</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" :loading="exportLoading" v-hasPermi="['shipment:seaAir:action:export']">{{$t('导出')}}
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" :loading="exportLoading" v-hasPermi="['shipment:box:export:seaAir']">{{$t('导出')}}
</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
......
......@@ -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>
......@@ -116,6 +118,8 @@
getDeptTarget,
getDeptTargetPage,
exportDeptTargetExcel,
exportDetailExcel,
exportStatisticsExcel,
getCreateInitData,
getPersonTargetPage,
allAchievementByPage
......@@ -426,20 +430,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);
return exportDetailExcel(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 exportStatisticsExcel(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