Commit eb9f177f authored by zhengke's avatar zhengke

修改

parent 7baa0dc3
......@@ -2,7 +2,10 @@
<div class="orderList distributionOrder">
<div class="head-title">
订单列表
<el-button @click="dialogVisible=true" style="float:right;margin-top: -5px;" size="small" type="primary">批量导出</el-button>
<div style="float:right;">
<el-button @click="getExport(1)" style="margin: -5px 0 0 20px;" size="small" type="primary">批量导出</el-button>
<el-button @click="getExport(2)" style="margin-top: -5px;" size="small" type="primary">粉象导出</el-button>
</div>
</div>
<div class="content">
<div>
......@@ -156,15 +159,30 @@
</div>
<div flex="main:center cross:center" class="app-order-info" style="border-right: 0px; width: 20%;">
<div style="margin:0 auto;width:90%;margin-left:17%">
<div v-for="(list,index2) in item.OrderCommissionList" :key="index2" style="margin: 10px;text-align:left">
<div>
<span>{{list.GradeDescription}}</span>
<span class="price">{{list.Commission}}</span>
<template v-if="item.isShow">
<div v-for="(list,index2) in item.OrderCommissionList" v-if="index2<3" :key="index2" style="margin: 10px;text-align:left">
<div>
<span>{{list.GradeDescription}}</span>
<span class="price">{{list.Commission}}</span>
</div>
<div>昵称:{{list.UserName}}</div>
<div v-if="list.Name!=''">姓名:{{list.Name}}</div>
<div v-if="getPanduan(list.Mobile)">手机:{{list.Mobile}}</div>
</div>
<div>昵称:{{list.UserName}}</div>
<div>姓名:{{list.Name}}</div>
<div>手机:{{list.Mobile}}</div>
</div>
<span v-if="item.OrderCommissionList.length>3" @click="showMoreDis(item)" class="distri_more">查看更多↓</span>
</template>
<template v-else>
<div v-for="(list,index2) in item.OrderCommissionList" :key="index2" style="margin: 10px;text-align:left">
<div>
<span>{{list.GradeDescription}}</span>
<span class="price">{{list.Commission}}</span>
</div>
<div>昵称:{{list.UserName}}</div>
<div v-if="list.Name!=''">姓名:{{list.Name}}</div>
<div v-if="getPanduan(list.Mobile)">手机:{{list.Mobile}}</div>
</div>
<span v-if="item.OrderCommissionList.length>3" @click="hideMoreDis(item)" class="distri_more">点击收起↑</span>
</template>
</div>
</div>
</div>
......@@ -200,7 +218,7 @@
width="960px">
<el-form style="border: 1px solid #F0F2F7;" :model="addMsg" ref="addMsg" label-width="100px">
<div style="box-sizing: border-box;background-color: #F3F5F6;width: 100%;padding-left: 20px;height: 50px;line-height: 50px;">
<el-checkbox :indeterminate="isIndeterminate" v-model="checkAll" @change="handleCheckAllChange">全选</el-checkbox>
<el-checkbox v-model="checkAll" @change="handleCheckAllChange">全选</el-checkbox>
</div>
<div style="margin: 15px 0;"></div>
<div style="padding: 10px 25px 20px;">
......@@ -211,7 +229,8 @@
</el-form>
<div style="text-align:right;margin-top:20px">
<el-button size="small" type="primary" @click="Export">导出</el-button>
<el-button size="small" v-if="commonNum==1" type="primary" @click="Export">导出</el-button>
<el-button size="small" v-if="commonNum==2" type="primary" @click="ExportFX">导出</el-button>
</div>
</el-dialog>
</div>
......@@ -227,7 +246,6 @@ export default {
checkedCities: [],
cities: [],
cityOptions: [],
isIndeterminate: true,
addMsg:{},
dialogVisible:false,
......@@ -274,18 +292,18 @@ export default {
moresendtips:'',
hszDig:false,
hszMsg:{},
commonNum:0
}
},
created(){
if (this.$route.query.UserId) {//如果有UserId过来 查询显示用户id
console.log(this.$route.query.UserId)
this.msg.UserId = this.$route.query.UserId;
this.msgId = 3;
this.msgVal = this.msg.UserId
}
this.getList();
this.getplat();
this.getDown();
// this.getDown();
this.getOrderStatus();
this.getDelivery();
this.getOrderType();
......@@ -330,7 +348,16 @@ export default {
this.msg.DistributionUserId = msgVal
}
},
//点击批量导出或粉象导出
getExport(num){
this.dialogVisible=true;
this.commonNum=num;
if(num==1){
this.getDown();
}else{
this.getFxList();
}
},
Export(){
this.msg.ExcelEnumIds=this.checkedCities;
let msg = JSON.parse(JSON.stringify(this.msg));
......@@ -351,14 +378,44 @@ export default {
})
},
//粉象弹窗数据
getFxList(){
this.cityOptions=[];
this.apipost("/api/order/GetDistributionOrdersExportEnumListForFX",{}, res => {
this.cities=res.data.data;
let data=res.data.data;
data.forEach(item=>{
this.cityOptions.push(item.Id)
})
})
},
//导出粉象
ExportFX(){
this.msg.ExcelEnumIds=this.checkedCities;
let msg = JSON.parse(JSON.stringify(this.msg));
this.GetLocalFile(
"/api/order/GetDistributionOrdersToExcelForFX",
msg,
"分销订单列表.xls"
);
},
//显示更多
showMoreDis(item){
item.isShow=false;
this.$forceUpdate();
},
//点击收起
hideMoreDis(item){
item.isShow=true;
this.$forceUpdate();
},
handleCheckAllChange(val) {
this.checkedCities = val ? this.cityOptions : [];
this.isIndeterminate = false;
},
handleCheckedCitiesChange(value) {
let checkedCount = value.length;
this.checkAll = checkedCount === this.cities.length;
this.isIndeterminate = checkedCount > 0 && checkedCount < this.cities.length;
},
handleClick(val){
let dataId=val.$attrs.dataId;
......@@ -367,6 +424,15 @@ export default {
this.getList();
},
//判断字段是否全为空格
getPanduan(val){
if(val.trim().length === 0){
return false;
}else{
return true;
}
},
getList(){
this.ChangeId(this.msgId);
if(!this.msgVal || this.msgVal==''){
......@@ -390,6 +456,11 @@ export default {
this.total=res.data.data.count;
let pageData=res.data.data.pageData;
this.tableData=pageData;
if(this.tableData){
this.tableData.forEach(x=>{
x.isShow=true;
})
}
}
})
......@@ -600,5 +671,10 @@ export default {
padding: 20px;
box-sizing: border-box;
}
.distri_more{
color:#409EFF;
margin-bottom:20px;
cursor: pointer;
display:block;
}
</style>
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