Commit 65cf5b25 authored by zhengke's avatar zhengke

修改机票业绩

parent 01907f13
<style>
.fpTable th {
.flightPerformance .fpTable th {
border-bottom: 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>
<template>
<div class="flexOne">
<div class="flexOne flightPerformance">
<div class="query-box">
<ul>
<li>
......@@ -32,29 +40,59 @@
</li>
</ul>
</div>
<table class="singeRowTable fpTable" border="0" cellspacing="0" cellpadding="0" v-loading="loading">
<tr>
<th>团期</th>
<th>出团公司</th>
<th>线路</th>
<th>人数</th>
<th>操作人员</th>
</tr>
<tr v-for="item in dataList">
<td>
<template v-if="item.TCID>0">
<a style="color:blue;cursor:pointer" @click='goUrlT("RegistrationList",item.TCID,"报名清单")'>
({{item.TCID}}){{item.TCNUM}} </a>
</template>
<template v-else>
{{item.TCNUM}}
</template>
</td>
<td>{{item.OutBranchName}}</td>
<td>{{item.LineName}}</td>
<td>{{item.TicketNum}}</td>
<td>{{item.CreateByName}}</td>
</tr>
<table class="singeRowTable fpTable" border="0" cellspacing="0" cellpadding="0" v-loading="loading" v-for="(item,index) in dataList.resultList">
<tbody v-for="(subItem,subIndex) in item.TicketList">
<tr v-if="subIndex==0">
<td colspan="6">
<span class="creatName">{{item.CreateByName}}</span>
提成数据</td>
</tr>
<tr v-if="index==0&&subIndex==0">
<th>序号</th>
<th>公司</th>
<th>团号</th>
<th>人数</th>
<th>金额</th>
<th>小计</th>
</tr>
<tr v-for="(childItem,childIndex) in subItem.SubList">
<td width="10%">
{{childIndex+1}}
</td>
<td width="20%" :rowspan="subItem.SubList.length" v-if="childIndex==0">
{{subItem.OutBranchName}}
</td>
<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>
</div>
</template>
......@@ -70,7 +108,7 @@
QMonth: '', //月份
},
loading: false,
dataList: [],
dataList: {},
//航空公司下拉
airlineList: [],
//操作人下拉
......@@ -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() {
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