Commit fd9b3a97 authored by 黄媛媛's avatar 黄媛媛

排序问题

parent 13142db5
...@@ -305,9 +305,9 @@ ...@@ -305,9 +305,9 @@
<el-select style="width:120px" v-model="ggpl" slot="prepend" placeholder="请选择"> <el-select style="width:120px" v-model="ggpl" slot="prepend" placeholder="请选择">
<el-option label="价格" :value="1"></el-option> <el-option label="价格" :value="1"></el-option>
<el-option label="库存" :value="2"></el-option> <el-option label="库存" :value="2"></el-option>
<el-option label="成本价" :value="5"></el-option>
<el-option label="重量(g)" :value="3"></el-option> <el-option label="重量(g)" :value="3"></el-option>
<el-option label="货号" :value="4"></el-option> <el-option label="货号" :value="4"></el-option>
<el-option label="成本价" :value="5"></el-option>
<el-option v-if="FxState==1" label="返佣总金额" :value="6"></el-option> <el-option v-if="FxState==1" label="返佣总金额" :value="6"></el-option>
</el-select> </el-select>
<el-button @click="ggPlSet" slot="append">确定</el-button> <el-button @click="ggPlSet" slot="append">确定</el-button>
......
...@@ -420,7 +420,7 @@ ...@@ -420,7 +420,7 @@
<el-button type="primary" class="ZexportBtn" size="mini" @click="DownLoadSalesGoods">导出TOP100</el-button> <el-button type="primary" class="ZexportBtn" size="mini" @click="DownLoadSalesGoods">导出TOP100</el-button>
</div> </div>
<div class="table_Inner"> <div class="table_Inner">
<el-table :data="saleIncomeData" style="width: 100%"> <el-table :data="saleIncomeData" style="width: 100%" @sort-change='getSort'>
<el-table-column label="排名"> <el-table-column label="排名">
<template slot-scope="scope"> <template slot-scope="scope">
<div class="rankIng" style="text-align:center;"> <div class="rankIng" style="text-align:center;">
...@@ -465,7 +465,7 @@ ...@@ -465,7 +465,7 @@
<el-button type="primary" class="ZexportBtn" size="mini" @click="DownLoadSalesUser">导出TOP100</el-button> <el-button type="primary" class="ZexportBtn" size="mini" @click="DownLoadSalesUser">导出TOP100</el-button>
</div> </div>
<div class="table_Inner table2"> <div class="table_Inner table2">
<el-table :data="saleUserData" style="width: 100%"> <el-table :data="saleUserData" style="width: 100%" @sort-change='getSort'>
<el-table-column label="排名"> <el-table-column label="排名">
<template slot-scope="scope"> <template slot-scope="scope">
<div class="rankIng"> <div class="rankIng">
...@@ -538,6 +538,7 @@ ...@@ -538,6 +538,7 @@
StartDate: "", //开始时间 StartDate: "", //开始时间
EndDate: "", //结束时间 EndDate: "", //结束时间
SalesTimeType: 1, //默认昨日 SalesTimeType: 1, //默认昨日
OrderBy:'',
}, },
basicData: {}, //基础数据 basicData: {}, //基础数据
salesData: {}, //销售数据 salesData: {}, //销售数据
...@@ -767,7 +768,29 @@ ...@@ -767,7 +768,29 @@
"用户购买力TOP排行.xls", "用户购买力TOP排行.xls",
"getSalesUserTop" "getSalesUserTop"
); );
} },
getSort(val){
console.log(val)
if(val.prop == 'Income'){
if(val.order=='ascending'){
this.basicQMsg.OrderBy='Income asc'
}else if(val.order=='descending'){
this.basicQMsg.OrderBy='Income desc'
}else{
this.basicQMsg.OrderBy=''
}
}else if(val.prop == 'SaleCount'){
if(val.order=='ascending'){
this.basicQMsg.OrderBy='SaleCount asc'
}else if(val.order=='descending'){
this.basicQMsg.OrderBy='SaleCount desc'
}else{
this.basicQMsg.OrderBy=''
}
}
this.getBasicData()
},
}, },
mounted() { mounted() {
this.getChange(); this.getChange();
......
...@@ -76,6 +76,7 @@ ...@@ -76,6 +76,7 @@
<div style="padding: 20px;background: #fff;margin-top: 10px"> <div style="padding: 20px;background: #fff;margin-top: 10px">
<el-table <el-table
:data="tableData" :data="tableData"
@sort-change='getSort'
header-cell-class-name="headClass" header-cell-class-name="headClass"
style="width: 1698px;" style="width: 1698px;"
:default-sort = "{prop: 'date', order: 'descending'}" :default-sort = "{prop: 'date', order: 'descending'}"
...@@ -140,6 +141,7 @@ ...@@ -140,6 +141,7 @@
PlatformType:0, PlatformType:0,
StartDate:'', StartDate:'',
EndDate:'', EndDate:'',
OrderBy:'',
}, },
options:[], options:[],
options2:[{Name: "优惠券", Id: 0}], options2:[{Name: "优惠券", Id: 0}],
...@@ -265,7 +267,43 @@ ...@@ -265,7 +267,43 @@
getList(){ getList(){
this.msg.pageIndex=1 this.msg.pageIndex=1
this.getIntegraStatisticslList() this.getIntegraStatisticslList()
},
getSort(val){
console.log(val)
if(val.prop == 'IsSued'){
if(val.order=='ascending'){
this.msg.OrderBy='IsSued asc'
}else if(val.order=='descending'){
this.msg.OrderBy='IsSued desc'
}else{
this.msg.OrderBy=''
}
}else if(val.prop == 'Used'){
if(val.order=='ascending'){
this.msg.OrderBy='Used asc'
}else if(val.order=='descending'){
this.msg.OrderBy='Used desc'
}else{
this.msg.OrderBy=''
}
}else if(val.prop == 'UnUsed'){
if(val.order=='ascending'){
this.msg.OrderBy='UnUsed asc'
}else if(val.order=='descending'){
this.msg.OrderBy='UnUsed desc'
}else{
this.msg.OrderBy=''
}
}else if(val.prop == 'Voksi'){
if(val.order=='ascending'){
this.msg.OrderBy='Voksi asc'
}else if(val.order=='descending'){
this.msg.OrderBy='Voksi desc'
}else{
this.msg.OrderBy=''
} }
}
},
}, },
mounted(){ mounted(){
......
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
<el-table <el-table
:data="tableData" :data="tableData"
v-loading="loading" v-loading="loading"
@sort-change='getSort'
header-cell-class-name="headClass" header-cell-class-name="headClass"
style="width: 1500px;" style="width: 1500px;"
:default-sort = "{prop: 'date', order: 'descending'}" :default-sort = "{prop: 'date', order: 'descending'}"
...@@ -126,6 +126,7 @@ ...@@ -126,6 +126,7 @@
pageSize:20, pageSize:20,
Name:'', Name:'',
Source:0, Source:0,
OrderBy:'',
}, },
loading:false, loading:false,
count:0, count:0,
...@@ -180,6 +181,7 @@ ...@@ -180,6 +181,7 @@
handleCurrentChange(val) { handleCurrentChange(val) {
this.msg.pageIndex = val; this.msg.pageIndex = val;
this.getRankingListPage(); this.getRankingListPage();
}, },
empty(){ empty(){
this.msg.pageIndex=1; this.msg.pageIndex=1;
...@@ -190,7 +192,61 @@ ...@@ -190,7 +192,61 @@
}, },
getList(){ getList(){
this.getRankingListPage() this.getRankingListPage()
},
getSort(val){
if(val.prop == 'ChildrenNum'){
if(val.order=='ascending'){
this.msg.OrderBy='ChildrenNum asc'
}else if(val.order=='descending'){
this.msg.OrderBy='ChildrenNum desc'
}else{
this.msg.OrderBy=''
}
}else if(val.prop == 'AllChildrenNum'){
if(val.order=='ascending'){
this.msg.OrderBy='AllChildrenNum asc'
}else if(val.order=='descending'){
this.msg.OrderBy='AllChildrenNum desc'
}else{
this.msg.OrderBy=''
}
}else if(val.prop == 'AllOrderNum'){
if(val.order=='ascending'){
this.msg.OrderBy='AllOrderNum asc'
}else if(val.order=='descending'){
this.msg.OrderBy='AllOrderNum desc'
}else{
this.msg.OrderBy=''
}
}else if(val.prop == 'Commission'){
if(val.order=='ascending'){
this.msg.OrderBy='Commission asc'
}else if(val.order=='descending'){
this.msg.OrderBy='Commission desc'
}else{
this.msg.OrderBy=''
} }
}else if(val.prop == 'TotalCommission'){
if(val.order=='ascending'){
this.msg.OrderBy='TotalCommission asc'
}else if(val.order=='descending'){
this.msg.OrderBy='TotalCommission desc'
}else{
this.msg.OrderBy=''
}
}else if(val.prop == 'Price'){
if(val.order=='ascending'){
this.msg.OrderBy='Price asc'
}else if(val.order=='descending'){
this.msg.OrderBy='Price desc'
}else{
this.msg.OrderBy=''
}
}
this.msg.pageIndex =1
this.getList()
}
}, },
mounted(){ mounted(){
......
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