Commit 470ee9bf authored by 黄媛媛's avatar 黄媛媛

数据统计分页问题

parent 282a0630
...@@ -118,11 +118,12 @@ ...@@ -118,11 +118,12 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
<el-pagination style="text-align:right" <el-pagination style="text-align:right"
background background
@current-change="handleCurrentChange" @current-change="handleCurrentChange"
:page-size="msg.pageSize" :page-size="msg.pageSize"
layout="prev, pager, next" layout="prev, pager, next"
:total="count"> :current-page.sync="msg.pageIndex"
:total="count">
</el-pagination> </el-pagination>
</div> </div>
</div> </div>
...@@ -172,13 +173,17 @@ ...@@ -172,13 +173,17 @@
}, },
change(val){ change(val){
this.activeName='' this.activeName=''
this.msg.pageIndex=1
this.getIntegraStatisticslList() this.getIntegraStatisticslList()
}, },
getIntegraStatisticslList(){ getIntegraStatisticslList(){
this.loading=true; this.loading=true;
if(this.value!=''){ if(this.value!='' && this.value !=null ){
this.msg.StartDate = this.value[0]; this.msg.StartDate = this.value[0];
this.msg.EndDate = this.value[1]; this.msg.EndDate = this.value[1];
}else{
this.msg.StartDate = '';
this.msg.EndDate = '';
} }
this.apipost("/api/Coupon/GetCouponStatisticslList", this.msg, res => { this.apipost("/api/Coupon/GetCouponStatisticslList", this.msg, res => {
this.loading=false; this.loading=false;
...@@ -253,6 +258,7 @@ ...@@ -253,6 +258,7 @@
data.push(time2) data.push(time2)
data.push(time1) data.push(time1)
that.value = data; that.value = data;
this.msg.pageIndex=1
this.getIntegraStatisticslList() this.getIntegraStatisticslList()
}, },
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
start-placeholder="开始日期" start-placeholder="开始日期"
end-placeholder="结束日期" end-placeholder="结束日期"
value-format="yyyy-MM-dd" value-format="yyyy-MM-dd"
@change="change" @change="change()"
align="right"> align="right">
</el-date-picker> </el-date-picker>
</div> </div>
...@@ -82,11 +82,12 @@ ...@@ -82,11 +82,12 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
<el-pagination style="text-align:right" <el-pagination style="text-align:right"
background background
@current-change="handleCurrentChange" @current-change="handleCurrentChange"
:page-size="msg.pageSize" :page-size="msg.pageSize"
layout="prev, pager, next" layout="prev, pager, next"
:total="count"> :current-page.sync="msg.pageIndex"
:total="count">
</el-pagination> </el-pagination>
</div> </div>
</div> </div>
...@@ -99,7 +100,7 @@ ...@@ -99,7 +100,7 @@
return{ return{
msg:{ msg:{
pageIndex:1, pageIndex:1,
pageSize:20, pageSize:15,
PlatformType:0, PlatformType:0,
StartDate:'', StartDate:'',
EndDate:'', EndDate:'',
...@@ -130,15 +131,19 @@ ...@@ -130,15 +131,19 @@
}) })
}, },
change(val){ change(){
this.activeName='' this.activeName='',
this.msg.pageIndex=1,
this.getIntegraStatisticslList() this.getIntegraStatisticslList()
}, },
getIntegraStatisticslList(){ getIntegraStatisticslList(){
this.loading=true; this.loading=true;
if(this.value!=''){ if(this.value!='' && this.value!=null){
this.msg.StartDate = this.value[0]; this.msg.StartDate = this.value[0];
this.msg.EndDate = this.value[1]; this.msg.EndDate = this.value[1];
}else{
this.msg.StartDate='';
this.msg.EndDate = ''
} }
this.apipost("/api/Integral/GetIntegraStatisticslList", this.msg, res => { this.apipost("/api/Integral/GetIntegraStatisticslList", this.msg, res => {
this.loading=false; this.loading=false;
...@@ -178,7 +183,7 @@ ...@@ -178,7 +183,7 @@
StartDate :this.msg.StartDate , StartDate :this.msg.StartDate ,
EndDate :this.msg.EndDate, EndDate :this.msg.EndDate,
} }
msg = JSON.parse(JSON.stringify(msg)); msg = JSON.parse(JSON.stringify(msg));
this.GetLocalFile( this.GetLocalFile(
"/api/Integral/GetIntegralListToExcel", "/api/Integral/GetIntegralListToExcel",
msg, msg,
...@@ -189,6 +194,7 @@ ...@@ -189,6 +194,7 @@
this.msg.PlatformType=0; this.msg.PlatformType=0;
this.msg.StartDate=''; this.msg.StartDate='';
this.msg.EndDate=''; this.msg.EndDate='';
this.msg.pageIndex=1
this.value=''; this.value='';
this.activeName=''; this.activeName='';
this.getIntegraStatisticslList() this.getIntegraStatisticslList()
...@@ -214,6 +220,7 @@ ...@@ -214,6 +220,7 @@
data.push(time2) data.push(time2)
data.push(time1) data.push(time1)
that.value = data; that.value = data;
this.msg.pageIndex=1
this.getIntegraStatisticslList() this.getIntegraStatisticslList()
}, },
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
<div class="content"> <div class="content">
<div> <div>
<el-select class="w100" @change="getList" style="margin-right: 10px;" v-model="msg.Source" size="small" placeholder="请选择"> <el-select class="w100" @change="msg.pageIndex=1,getList()" style="margin-right: 10px;" v-model="msg.Source" size="small" placeholder="请选择">
<el-option label="全部平台" :value="msg.Source"></el-option> <el-option label="全部平台" :value="msg.Source"></el-option>
<el-option <el-option
v-for="item in options" v-for="item in options"
...@@ -21,12 +21,14 @@ ...@@ -21,12 +21,14 @@
<div class="searchInput" style="width:250px"> <div class="searchInput" style="width:250px">
<el-input style="display:inline-block;width:225px;height:30px" <el-input style="display:inline-block;width:225px;height:30px"
placeholder="请输入分销商名称或ID搜索" placeholder="请输入分销商名称或ID搜索"
v-model="msg.Name" v-model="msg.Name"
size="small" size="small"
clearable> @clear="msg.pageIndex=1,getList()"
@keyup.enter.native="msg.pageIndex=1,getList()"
clearable>
</el-input> </el-input>
<span @click="getList" class="el-icon-search" style="color:#979dad;font-size:14px;position:relative;top:1px"></span> <span @click="msg.pageIndex=1,getList()" class="el-icon-search" style="color:#979dad;font-size:14px;position:relative;top:1px"></span>
</div> </div>
<span style="color: #92959B;margin-left: 35px;cursor: pointer;font-size: 15px;" @click="empty">清空筛选</span> <span style="color: #92959B;margin-left: 35px;cursor: pointer;font-size: 15px;" @click="empty">清空筛选</span>
</div> </div>
...@@ -106,6 +108,7 @@ ...@@ -106,6 +108,7 @@
@current-change="handleCurrentChange" @current-change="handleCurrentChange"
:page-size="msg.pageSize" :page-size="msg.pageSize"
layout="prev, pager, next" layout="prev, pager, next"
:current-page.sync="msg.pageIndex"
:total="count"> :total="count">
</el-pagination> </el-pagination>
</div> </div>
......
...@@ -143,12 +143,12 @@ ...@@ -143,12 +143,12 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
<el-pagination style="text-align:right" <el-pagination style="text-align:right"
background background
@current-change="handleCurrentChange" @current-change="handleCurrentChange"
:page-size="msg.pageSize" :page-size="msg.pageSize"
:current-page.sync="msg.pageIndex" :current-page.sync="msg.pageIndex"
layout="prev, pager, next" layout="prev, pager, next"
:total="count"> :total="count">
</el-pagination> </el-pagination>
</div> </div>
</div> </div>
...@@ -225,12 +225,16 @@ ...@@ -225,12 +225,16 @@
}, },
change(val){ change(val){
this.activeName='' this.activeName=''
this.msg.pageIndex=1
this.getIntegraStatisticslList(false) this.getIntegraStatisticslList(false)
}, },
getDataList(show=false){ getDataList(show=false){
if(this.value!=''){ if(this.value!='' && this.value != null){
this.msg.StartDate = this.value[0]; this.msg.StartDate = this.value[0];
this.msg.EndDate = this.value[1]; this.msg.EndDate = this.value[1];
}else{
this.msg.StartDate = '';
this.msg.EndDate = '';
} }
if(show==true){ if(show==true){
this.Listloading=true; this.Listloading=true;
...@@ -317,6 +321,7 @@ ...@@ -317,6 +321,7 @@
this.msg.OrderType=0; this.msg.OrderType=0;
this.msg.StartDate=''; this.msg.StartDate='';
this.msg.EndDate=''; this.msg.EndDate='';
this.msg.pageIndex=1
this.value=''; this.value='';
this.activeName=''; this.activeName='';
this.getIntegraStatisticslList() this.getIntegraStatisticslList()
...@@ -346,6 +351,7 @@ ...@@ -346,6 +351,7 @@
data.push(time2) data.push(time2)
data.push(time1) data.push(time1)
that.value = data; that.value = data;
this.msg.pageIndex=1
this.getIntegraStatisticslList(false) this.getIntegraStatisticslList(false)
}, },
......
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