Merge remote-tracking branch 'origin/test' into test
commit
82f9e16fe3
|
@ -68,6 +68,16 @@ export function getPromoterPage(query) {
|
|||
})
|
||||
}
|
||||
|
||||
// 导出所有推广员 Excel
|
||||
export function allExport(query) {
|
||||
return request({
|
||||
url: '/member/promoter/all-export-excel',
|
||||
method: 'get',
|
||||
params: query,
|
||||
responseType: 'blob'
|
||||
})
|
||||
}
|
||||
|
||||
// 导出推广员 Excel
|
||||
export function exportPromoterExcel(query) {
|
||||
return request({
|
||||
|
|
|
@ -1,8 +1,10 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-card class="box-card">
|
||||
<div slot="header" class="clearfix">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" label-width="100px">
|
||||
<el-form-item label="快速查看" class="width100" prop="type">
|
||||
<el-radio-group v-model="queryParams.type" type="button" class="mr20" size="small" >
|
||||
<el-radio-group v-model="queryParams.type" type="button" class="mr20" size="small" @change="getList">
|
||||
<el-radio-button v-for="(item,i) in lookList" :label=i+1 :key="i">{{item.name}}</el-radio-button>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
|
@ -15,14 +17,18 @@
|
|||
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
|
||||
<div class="statistics">
|
||||
<div v-for="(item,index) in list" :key="index" :class="[item.class,'statistics_item']">
|
||||
<div v-for="(item,index) in statisticsList" :key="index" :class="[item.class,'statistics_item']">
|
||||
<span>{{item.name}}</span>
|
||||
<span v-if="index<3">¥{{item.value}}</span>
|
||||
<span v-else>{{item.value}} 单</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</el-card>
|
||||
|
||||
</div>
|
||||
<!-- <div class="dashboard-editor-container">-->
|
||||
|
||||
|
@ -97,15 +103,18 @@ export default {
|
|||
return {
|
||||
lineChartData: lineChartData.newVisitis,
|
||||
queryParams: {
|
||||
type:4
|
||||
},
|
||||
list:[],
|
||||
// list:[],
|
||||
lookList:[{name:'今日'},{name:'上周'},{name:'上月'},{name:'全部'}],
|
||||
statisticsList:[{name:'总销售金额',class:'totalMoney'},{name:'总订单数量(单)',class:'totalNum'},{name:'总退款金额',class:'totalWithdrawMoney'},{name:'240档订单数量(单)',class:'threeTotalNum'},{name:'400档订单数量(单)',class:'twoTotalNum'},{name:'640档订单数量(单)',class:'oneTotalNum'}],
|
||||
statisticsList:[{name:'总销售金额',class:'totalMoney',value:0},{name:'总退款金额',class:'totalWithdrawMoney',value:0},{name:'总订单数量(单)',class:'totalNum',value:0},{name:'240档订单数量(单)',class:'threeTotalNum',value:0},{name:'400档订单数量(单)',class:'twoTotalNum',value:0},{name:'640档订单数量(单)',class:'oneTotalNum',value:0}],
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
computed:{
|
||||
},
|
||||
methods: {
|
||||
onchangeTime(value){
|
||||
this.queryParams.startTime = value[0]
|
||||
|
@ -119,11 +128,10 @@ export default {
|
|||
this.statisticsList.forEach((item,index) =>{
|
||||
for (let key in response.data){
|
||||
if(item.class === key){
|
||||
item.value = response.data[key]
|
||||
item.value = response.data[key] || 0
|
||||
}
|
||||
}
|
||||
})
|
||||
this.list = this.statisticsList
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
|
@ -133,7 +141,9 @@ export default {
|
|||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.queryParams ={};
|
||||
this.queryParams ={
|
||||
type: 4
|
||||
};
|
||||
this.handleQuery();
|
||||
},
|
||||
handleSetLineChartData(type) {
|
||||
|
@ -150,6 +160,7 @@ export default {
|
|||
display: flex;
|
||||
justify-content: space-around;
|
||||
flex-wrap: wrap;
|
||||
border-bottom: 1px solid #e6ebf5;
|
||||
.statistics_item{
|
||||
border-radius: 10px;
|
||||
width: 240px;
|
||||
|
|
|
@ -44,10 +44,10 @@
|
|||
<!-- v-hasPermi="['member:promoter:export']">导入-->
|
||||
<!-- </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="['member:promoter:export']">导出</el-button>-->
|
||||
<!-- </el-col>-->
|
||||
<el-col :span="1.5">
|
||||
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" :loading="exportLoading"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
|
@ -161,7 +161,7 @@ import {
|
|||
createPromoter,
|
||||
tenantIgnoreUpdate,
|
||||
deletePromoter,
|
||||
getPromoter,
|
||||
allExport,
|
||||
getallPage,
|
||||
importTemplate,
|
||||
exportPromoterExcel, updatePassword
|
||||
|
@ -462,11 +462,10 @@ export default {
|
|||
handleExport() {
|
||||
// 处理查询参数
|
||||
let params = {...this.queryParams};
|
||||
params.pageNo = undefined;
|
||||
params.pageSize = undefined;
|
||||
params.pageSize = 999;
|
||||
this.$modal.confirm('是否确认导出所有推广员数据项?').then(() => {
|
||||
this.exportLoading = true;
|
||||
return exportPromoterExcel(params);
|
||||
return allExport(params);
|
||||
}).then(response => {
|
||||
this.$download.excel(response, '推广员.xls');
|
||||
this.exportLoading = false;
|
||||
|
|
Loading…
Reference in New Issue