Commit 65cf5b25 authored by zhengke's avatar zhengke

修改机票业绩

parent 01907f13
<style> <style>
.fpTable th { .flightPerformance .fpTable th {
border-bottom: 1px solid #d1d1d1; border-bottom: 1px solid #d1d1d1;
border-right: 1px solid #d1d1d1; border-right: 1px solid #d1d1d1;
} }
.flightPerformance .fpTable{
width:1000px;
margin-bottom:30px;
}
.flightPerformance .creatName{
color:green;
font-weight: bold;
margin-right:10px;
}
</style> </style>
<template> <template>
<div class="flexOne"> <div class="flexOne flightPerformance">
<div class="query-box"> <div class="query-box">
<ul> <ul>
<li> <li>
...@@ -32,29 +40,59 @@ ...@@ -32,29 +40,59 @@
</li> </li>
</ul> </ul>
</div> </div>
<table class="singeRowTable fpTable" border="0" cellspacing="0" cellpadding="0" v-loading="loading"> <table class="singeRowTable fpTable" border="0" cellspacing="0" cellpadding="0" v-loading="loading" v-for="(item,index) in dataList.resultList">
<tr> <tbody v-for="(subItem,subIndex) in item.TicketList">
<th>团期</th> <tr v-if="subIndex==0">
<th>出团公司</th> <td colspan="6">
<th>线路</th> <span class="creatName">{{item.CreateByName}}</span>
<th>人数</th> 提成数据</td>
<th>操作人员</th> </tr>
</tr> <tr v-if="index==0&&subIndex==0">
<tr v-for="item in dataList"> <th>序号</th>
<td> <th>公司</th>
<template v-if="item.TCID>0"> <th>团号</th>
<a style="color:blue;cursor:pointer" @click='goUrlT("RegistrationList",item.TCID,"报名清单")'> <th>人数</th>
({{item.TCID}}){{item.TCNUM}} </a> <th>金额</th>
</template> <th>小计</th>
<template v-else> </tr>
{{item.TCNUM}} <tr v-for="(childItem,childIndex) in subItem.SubList">
</template> <td width="10%">
</td> {{childIndex+1}}
<td>{{item.OutBranchName}}</td> </td>
<td>{{item.LineName}}</td> <td width="20%" :rowspan="subItem.SubList.length" v-if="childIndex==0">
<td>{{item.TicketNum}}</td> {{subItem.OutBranchName}}
<td>{{item.CreateByName}}</td> </td>
</tr> <td width="30%">
<template v-if="childItem.TCID>0">
<a style="color:blue;cursor:pointer" @click='goUrlT("RegistrationList",childItem.TCID,"报名清单")'>
({{childItem.TCID}}){{childItem.TCNUM}}
</a>
</template>
<template v-else>
{{childItem.TCNUM}}
</template>
</td>
<td width="10%">{{childItem.TicketNum}}</td>
<td width="10%" :rowspan="subItem.SubList.length+1" v-if="childIndex==0">{{dataList.UnitPrice}}</td>
<td width="10%">{{childItem.TicketNum*dataList.UnitPrice}}</td>
</tr>
<tr v-if="subIndex!=item.TicketList.length-1">
<td></td>
<td></td>
<td style="font-weight:bold;">合计</td>
<td style="color:red;">
{{getPeopleCount(subItem.SubList)}}
</td>
<td style="color:red;">
{{getCount(subItem.SubList)}}
</td>
</tr>
<tr v-if="subIndex==item.TicketList.length-1">
<td colspan="6">
总计:<span style="color:red;">{{getTotalCount(item.TicketList)}}</span>
</td>
</tr>
</tbody>
</table> </table>
</div> </div>
</template> </template>
...@@ -70,7 +108,7 @@ ...@@ -70,7 +108,7 @@
QMonth: '', //月份 QMonth: '', //月份
}, },
loading: false, loading: false,
dataList: [], dataList: {},
//航空公司下拉 //航空公司下拉
airlineList: [], airlineList: [],
//操作人下拉 //操作人下拉
...@@ -116,6 +154,32 @@ ...@@ -116,6 +154,32 @@
} }
}); });
}, },
//获取没个的人数
getPeopleCount(subList){
let count=0;
subList.forEach(x => {
count+=x.TicketNum;
});
return count;
},
//计算小计
getCount(list){
let count=0;
list.forEach(x => {
count+=x.TicketNum;
});
return count*this.dataList.UnitPrice;
},
//计算总计
getTotalCount(list){
let count=0;
list.forEach(x=>{
x.SubList.forEach(y=>{
count+=y.TicketNum
})
})
return count*this.dataList.UnitPrice;
},
//初始化航空公司下拉 //初始化航空公司下拉
initAirlines() { initAirlines() {
this.apipost( this.apipost(
......
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