Commit eb9f177f authored by zhengke's avatar zhengke

修改

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