fix: 抽佣明细-会员充值增加导出功能

pull/6/head
TianYu 2023-05-31 15:00:19 +08:00
parent 160f9d306f
commit 145c966b6e
3 changed files with 27 additions and 8 deletions

View File

@ -70,3 +70,13 @@ export function exportRechargeOrderExcel(query) {
responseType: 'blob' responseType: 'blob'
}) })
} }
// 导出抽佣明细-会员充值
export function exportCommissionDetailsExcel(query) {
return request({
url: '/shop/recharge-order/promoterDraw-excel',
method: 'get',
params: query,
responseType: 'blob'
})
}

View File

@ -31,15 +31,15 @@
<!-- <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd"--> <!-- <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd"-->
<!-- v-hasPermi="['shop:recharge-order:create']">新增</el-button>--> <!-- v-hasPermi="['shop:recharge-order:create']">新增</el-button>-->
<!-- </el-col>--> <!-- </el-col>-->
<!-- <el-col :span="1.5">--> <el-col :span="1.5">
<!-- <el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" :loading="exportLoading"--> <el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" :loading="exportLoading"
<!-- v-hasPermi="['shop:recharge-order:export']">导出</el-button>--> v-hasPermi="['commission:recharge:export']">导出</el-button>
<!-- </el-col>--> </el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row> </el-row>
<!-- 列表 --> <!-- 列表 -->
<el-table v-loading="loading" :data="list"> <el-table v-loading="loading" :data="list" @sort-change="onSortChange">
<el-table-column label="组织名称" align="center" prop="deptName" /> <el-table-column label="组织名称" align="center" prop="deptName" />
<el-table-column label="推广员" align="center" prop="parentOrganizationName" > <el-table-column label="推广员" align="center" prop="parentOrganizationName" >
<template v-slot="scope"> <template v-slot="scope">
@ -55,7 +55,7 @@
</el-table-column> </el-table-column>
<el-table-column label="成交定单数" align="center" prop="orderCount" /> <el-table-column label="成交定单数" align="center" prop="orderCount" />
<el-table-column label="成交金额" align="center" prop="dealAmount" /> <el-table-column label="成交金额" align="center" prop="dealAmount" />
<el-table-column label="累计金额" align="center" prop="totalAmount" /> <el-table-column label="累计金额" align="center" prop="totalAmount" sortable="custom"/>
<el-table-column label="可提现金额" align="center" prop="drawAmount" /> <el-table-column label="可提现金额" align="center" prop="drawAmount" />
</el-table> </el-table>
<!-- 分页组件 --> <!-- 分页组件 -->
@ -69,7 +69,7 @@
<script> <script>
import { import {
getCommissionDetailsPage, getCommissionDetailsPage,
exportRechargeOrderExcel exportRechargeOrderExcel, exportCommissionDetailsExcel
} from '@/api/shop/rechargeOrder'; } from '@/api/shop/rechargeOrder';
import {DICT_TYPE, getDictDatas} from "@/utils/dict"; import {DICT_TYPE, getDictDatas} from "@/utils/dict";
import ElementForm from "@/components/bpmnProcessDesigner/package/penal/form/ElementForm.vue"; import ElementForm from "@/components/bpmnProcessDesigner/package/penal/form/ElementForm.vue";
@ -117,6 +117,14 @@ export default {
this.getList(); this.getList();
}, },
methods: { methods: {
onSortChange({order}){
if(order){
this.queryParams.sort = order === 'ascending' ? 1 : 2
} else {
delete this.queryParams.sort
}
this.handleQuery()
},
/** 查询列表 */ /** 查询列表 */
getList() { getList() {
this.loading = true; this.loading = true;
@ -145,7 +153,7 @@ export default {
params.pageSize = undefined; params.pageSize = undefined;
this.$modal.confirm('是否确认导出所有数据项?').then(() => { this.$modal.confirm('是否确认导出所有数据项?').then(() => {
this.exportLoading = true; this.exportLoading = true;
return exportRechargeOrderExcel(params); return exportCommissionDetailsExcel(params);
}).then(response => { }).then(response => {
this.$download.excel(response, '抽佣明细-会员充值.xls'); this.$download.excel(response, '抽佣明细-会员充值.xls');
this.exportLoading = false; this.exportLoading = false;

View File

@ -357,6 +357,7 @@ export default {
/** 新增按钮操作 */ /** 新增按钮操作 */
handleAdd() { handleAdd() {
this.reset(); this.reset();
this.form.status = 0
this.open = true; this.open = true;
this.title = '添加推广员'; this.title = '添加推广员';
}, },