Commit 20c3447c authored by huangyuanyuan's avatar huangyuanyuan

线路收客新增导出功能

parent 71137e35
......@@ -20,13 +20,15 @@
</el-date-picker>
</el-form-item>
<el-form-item>
<input type="button" class="hollowFixedBtn" :value="$t('pub.searchBtn')" @click="getList()"/>
<input type="button" class="normalBtn" :value="$t('pub.searchBtn')" @click="getList()"/>
<input type="button" class="hollowFixedBtn" value="导出" @click="Export"/>
</el-form-item>
</el-form>
</div>
<div>
<el-table :data="List" stripe border>
<div v-loading="loading">
<el-table :data="List" border>
<el-table-column fixed prop="BranchName" label="公司名称" min-width="100">
</el-table-column>
<el-table-column min-width="130" @sort-by="SortBy" sortable v-for='(item,index) in newArr' :prop='item.Rank' :label="item.title" :key='index'>
......@@ -53,6 +55,8 @@
ColList:[],
List:[],
newArr:[],
loading:false,
userId:0,
}
},
created(){
......@@ -61,11 +65,22 @@
this.productionDate=[mon2,mon1];
this.msg.StartTime=this.productionDate[0];
this.msg.EndTime=this.productionDate[1];
let userInfo = this.getLocalStorage();
this.userId = userInfo.EmployeeId;
},
mounted(){
this.getList();
},
methods:{
Export(){
this.msg.EmployeeId = this.userId;
let msg = JSON.parse(JSON.stringify(this.msg));
this.GetLocalFile(
"financestatistics_post_OutToExcelGetCompanyLineGuestList",
msg,
"线路收客统计.xls"
);
},
SortBy(){
},
......@@ -79,21 +94,20 @@
}
},
getList(){
this.loading=true;
this.apipost('financestatistics_post_GetCompanyLineGuestList',this.msg, res => {
this.loading=false;
if(res.data.resultCode == 1) {
this.ColList=res.data.data.ColList;
this.List=res.data.data.List;
console.log("this.ColList",this.ColList);
console.log("this.List",this.List);
for(let i = 1; i < this.ColList.length; i++) {
this.newArr.push({
"Rank":this.ColList[i].Sort,
'value': this.ColList[i].Col,
"title": this.ColList[i].Name,
})
}
console.log("this.newArr",this.newArr);
}
}else{
this.Error(res.data.message);
......
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