|
|
@@ -8,6 +8,7 @@
|
|
|
:search.sync="search"
|
|
|
:table-loading="loading"
|
|
|
:span-method="spanMethod"
|
|
|
+ :cell-style="cellStyle"
|
|
|
@search-change="searchChange"
|
|
|
@search-reset="searchReset"
|
|
|
@selection-change="selectionChange"
|
|
|
@@ -17,10 +18,22 @@
|
|
|
@saveColumn="saveColumn"
|
|
|
@resetColumn="resetColumn"
|
|
|
@on-load="onLoad">
|
|
|
+ <template slot="yearSearch">
|
|
|
+ <el-date-picker
|
|
|
+ v-model="search.year"
|
|
|
+ type="year"
|
|
|
+ placeholder="">
|
|
|
+ </el-date-picker>
|
|
|
+ </template>
|
|
|
+ <template slot="userIdSearch">
|
|
|
+ <user-com
|
|
|
+ v-model="search.userId"
|
|
|
+ style="width: 100%"
|
|
|
+ ></user-com>
|
|
|
+ </template>
|
|
|
<template slot="menuLeft">
|
|
|
<el-button size="small"
|
|
|
- type="info"
|
|
|
- icon="el-icon-download"
|
|
|
+ type="primary"
|
|
|
:loading="exportLoading"
|
|
|
@click.stop="downFile"
|
|
|
>报表
|
|
|
@@ -32,7 +45,7 @@
|
|
|
|
|
|
<script>
|
|
|
import option from "./config/mainList.json";
|
|
|
- import { getProfitList } from "@/api/statisticAnalysis/profit";
|
|
|
+ import { getCommission } from "@/api/statisticAnalysis/profit";
|
|
|
import { contrastList } from "@/util/contrastData";
|
|
|
|
|
|
export default {
|
|
|
@@ -82,9 +95,9 @@
|
|
|
},
|
|
|
rowspan() {
|
|
|
//记录原始
|
|
|
- let oldList = [this.dataList[0].name]
|
|
|
+ let oldList = [this.dataList[0].userName]
|
|
|
this.dataList.forEach((item,index)=>{
|
|
|
- let newList = [item.name]
|
|
|
+ let newList = [item.userName]
|
|
|
if(index===0){
|
|
|
this.spanArr.push(1)
|
|
|
this.position=0;
|
|
|
@@ -103,7 +116,7 @@
|
|
|
})
|
|
|
},
|
|
|
spanMethod({ row, column, rowIndex, columnIndex }) {
|
|
|
- if (column.property === "name") {
|
|
|
+ if (column.property === "userName") {
|
|
|
const _row=this.spanArr[rowIndex];
|
|
|
const _col=_row>0?1:0;
|
|
|
return {
|
|
|
@@ -136,23 +149,29 @@
|
|
|
},
|
|
|
paramsAdjustment(params) {
|
|
|
params = Object.assign({}, this.search);
|
|
|
- if (params.createTime && params.createTime.length !==0 ) { //发货
|
|
|
- params.startTime = params.createTime[0]+ " " + "00:00:00";
|
|
|
- params.endTime = params.createTime[1] + " " + "23:59:59";
|
|
|
- this.$delete(params,'createTime')
|
|
|
+ // if (params.createTime && params.createTime.length !==0 ) { //发货
|
|
|
+ // params.startTime = params.createTime[0]+ " " + "00:00:00";
|
|
|
+ // params.endTime = params.createTime[1] + " " + "23:59:59";
|
|
|
+ // this.$delete(params,'createTime')
|
|
|
+ // }
|
|
|
+ if(!params.userType){
|
|
|
+ params.userType = "业务"
|
|
|
}
|
|
|
return params
|
|
|
},
|
|
|
onLoad(page, params) {
|
|
|
- // this.loading = true;
|
|
|
- // params = this.paramsAdjustment(params)
|
|
|
- // getProfitList(page.currentPage, page.pageSize,params).then(res=>{
|
|
|
- // this.dataList = res.data.data.records
|
|
|
- // this.page.total = res.data.data.total
|
|
|
- // this.rowspan()
|
|
|
- // }).finally(()=>{
|
|
|
- // this.loading = false;
|
|
|
- // })
|
|
|
+ this.loading = true;
|
|
|
+ params = this.paramsAdjustment(params)
|
|
|
+ getCommission(page.currentPage, page.pageSize,params).then(res=>{
|
|
|
+ this.dataList = res.data.data.records
|
|
|
+ this.page.total = res.data.data.total
|
|
|
+ // this.rowspan()
|
|
|
+ }).finally(()=>{
|
|
|
+ this.loading = false;
|
|
|
+ })
|
|
|
+ },
|
|
|
+ cellStyle() {
|
|
|
+ return "padding:0;height:40px;";
|
|
|
},
|
|
|
//列保存触发
|
|
|
async saveColumn() {
|