Commit 60b3b70d authored by 黄奎's avatar 黄奎

票务提成修改

parent 09c8bed2
<style> <style>
.flightPerformance .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;
background: #E6E6E6; background: #e6e6e6;
height: 40px; height: 40px;
font-size: 14px; font-size: 14px;
color: #333; color: #333;
} }
.flightPerformance .fpTable { .flightPerformance .fpTable {
width: 1000px; width: 1000px;
margin-bottom: 30px; margin-bottom: 30px;
border-collapse: collapse; border-collapse: collapse;
} }
.flightPerformance .creatName { .flightPerformance .creatName {
color: green; color: green;
font-weight: bold; font-weight: bold;
margin-right: 10px; margin-right: 10px;
} }
.flightPerformance .fpTable tr { .flightPerformance .fpTable tr {
background: #fff; background: #fff;
text-align: center; text-align: center;
height: 40px; height: 40px;
} }
.flightPerformance .fpTable tr td { .flightPerformance .fpTable tr td {
font-size: 12px; font-size: 12px;
border: 1px solid #E5E5E5; border: 1px solid #e5e5e5;
} }
.flightPerformance .fpTable tbody tr:last-child { .flightPerformance .fpTable tbody tr:last-child {
border-bottom: 2px solid #333; border-bottom: 2px solid #333;
} }
</style> </style>
<template> <template>
...@@ -44,35 +43,68 @@ ...@@ -44,35 +43,68 @@
<li> <li>
<span> <span>
<em>操作人</em> <em>操作人</em>
<el-select v-model="msg.CreateBy" filterable :placeholder="$t('system.ph_in')"> <el-select
v-model="msg.CreateBy"
filterable
:placeholder="$t('system.ph_in')"
>
<el-option :label="$t('pub.unlimitedSel')" :value="0"></el-option> <el-option :label="$t('pub.unlimitedSel')" :value="0"></el-option>
<el-option v-for="item in EmployeeList" :label="item.EmName" :value="item.EmployeeId" <el-option
:key="item.EmployeeId"></el-option> v-for="item in EmployeeList"
:label="item.EmName"
:value="item.EmployeeId"
:key="item.EmployeeId"
></el-option>
</el-select> </el-select>
</span> </span>
</li> </li>
<li> <li>
<span> <span>
<em>月份</em> <em>月份</em>
<el-date-picker v-model='msg.QMonth' value-format="yyyy-MM" type="month"></el-date-picker> <el-date-picker
v-model="msg.QMonth"
value-format="yyyy-MM"
type="month"
></el-date-picker>
</span> </span>
</li> </li>
<li style="line-height:34px;font-size:14px;">
单买机票计算方式:<span style="color:red;">(售价-成本价)&nbsp;X&nbsp;{{singlePercent}}</span>
</li>
<li> <li>
<input type="button" class="hollowFixedBtn" @click="getList()" :value="$t('pub.searchBtn')" /> <input
<input type="button" class="hollowFixedBtn" @click="DownLoad()" value="导出" /> type="button"
class="hollowFixedBtn"
@click="getList()"
:value="$t('pub.searchBtn')"
/>
<input
type="button"
class="hollowFixedBtn"
@click="DownLoad()"
value="导出"
/>
</li> </li>
</ul> </ul>
</div> </div>
<table class="fpTable" border="0" cellspacing="0" cellpadding="0" v-loading="loading" <table
v-for="(item,index) in dataList.resultList" :key="index"> class="fpTable"
<tbody v-for="(subItem,subIndex) in item.TicketList" :key="subIndex"> border="0"
<tr v-if="subIndex==0"> cellspacing="0"
cellpadding="0"
v-loading="loading"
v-for="(item, index) in dataList.resultList"
:key="index"
>
<tbody v-for="(subItem, subIndex) in item.TicketList" :key="subIndex">
<tr v-if="subIndex == 0">
<td colspan="6"> <td colspan="6">
<span class="creatName">{{item.CreateByName}}</span> <span class="creatName">{{ item.CreateByName }}</span>
{{msg.QMonth}} {{ msg.QMonth }}
提成数据</td> 提成数据
</td>
</tr> </tr>
<tr v-if="index==0&&subIndex==0"> <tr v-if="index == 0 && subIndex == 0">
<th>序号</th> <th>序号</th>
<th>公司</th> <th>公司</th>
<th>团号</th> <th>团号</th>
...@@ -80,57 +112,109 @@ ...@@ -80,57 +112,109 @@
<th>金额</th> <th>金额</th>
<th>小计</th> <th>小计</th>
</tr> </tr>
<template v-for="(childItem,childIndex) in subItem.SubList" > <template v-for="(childItem, childIndex) in subItem.SubList">
<tr :key="childIndex"> <tr :key="childIndex">
<td width="10%"> <td width="10%">
{{childIndex+1}} {{ childIndex + 1 }}
</td> </td>
<td width="20%" :rowspan="subItem.SubList.length+1" style="border-bottom:2px solid black" <td
v-if="childIndex==0"> width="20%"
{{subItem.OutBranchName}} :rowspan="subItem.SubList.length + 1"
style="border-bottom:2px solid black"
v-if="childIndex == 0"
>
{{ subItem.OutBranchName }}
</td> </td>
<td width="30%"> <td width="30%">
<template v-if="childItem.TCID>0"> <template v-if="childItem.TCID > 0">
<a style="color:blue;cursor:pointer" @click='goUrlT("RegistrationList",childItem.TCID,"报名清单")'> <template v-if="childItem.TicketType==2">
({{childItem.TCID}}){{childItem.TCNUM}} <a style="color:blue;cursor:pointer" @click="goUrlT('TicketManager', childItem.TCID, '票务关闭')">{{ childItem.TCNUM }}</a>
</template>
<template v-if="childItem.TicketType==1">
<a style="color:blue;cursor:pointer" @click="goUrlT('RegistrationList', childItem.TCID, '报名清单')">({{ childItem.TCID }}){{ childItem.TCNUM }}
</a> </a>
</template> </template>
</template>
<template v-else> <template v-else>
{{childItem.TCNUM}} {{childItem.TCNUM}}
</template> </template>
</td> </td>
<td width="10%">{{childItem.TicketNum}}</td> <td width="10%">{{ childItem.TicketNum }}</td>
<td width="10%" :rowspan="subItem.SubList.length+1" style="border-bottom:2px solid black" <!--单卖机票-->
v-if="childIndex==0">{{dataList.UnitPrice}}</td> <template v-if="childItem.TicketType == 2">
<td width="10%">{{childItem.TicketNum*dataList.UnitPrice}}</td> <td width="10%">
{{ childItem.SalePrice - childItem.CostPrice }}
</td>
<td width="10%">
{{
childItem.TicketNum *(childItem.SalePrice - childItem.CostPrice) *singlePercent
}}
</td>
</template>
<template v-else>
<td
width="10%"
:rowspan="subItem.SubList.length + 1"
style="border-bottom:2px solid black"
v-if="childIndex == 0"
>
{{ dataList.UnitPrice }}
</td>
<td width="10%">
{{ childItem.TicketNum * dataList.UnitPrice }}
</td>
</template>
</tr>
<template v-if="childItem.TicketType == 2">
<tr
v-if="childIndex == subItem.SubList.length - 1"
:key="childIndex + 500">
<td></td>
<td style="font-weight:bold;">合计</td>
<td style="color:red;">
{{ getPeopleCount(subItem.SubList) }}
</td>
<td>
</td>
<td style="color:red;">
{{ getSingleCount(subItem.SubList) }}
</td>
</tr> </tr>
<tr v-if="childIndex==subItem.SubList.length-1" :key="childIndex+500"> </template>
<template v-else>
<tr
v-if="childIndex == subItem.SubList.length - 1"
:key="childIndex + 500"
>
<td></td> <td></td>
<td style="font-weight:bold;">合计</td> <td style="font-weight:bold;">合计</td>
<td style="color:red;"> <td style="color:red;">
{{getPeopleCount(subItem.SubList)}} {{ getPeopleCount(subItem.SubList) }}
</td> </td>
<td style="color:red;"> <td style="color:red;">
{{getCount(subItem.SubList)}} {{ getCount(subItem.SubList) }}
</td> </td>
</tr> </tr>
</template> </template>
<tr v-if="subIndex==item.TicketList.length-1"> </template>
<tr v-if="subIndex == item.TicketList.length - 1">
<td></td> <td></td>
<td></td> <td></td>
<td style="font-weight:bold;">总计</td> <td style="font-weight:bold;">总计</td>
<td> <td>
<span style="color:red;">{{getTotalNum(item.TicketList)}}</span> <span style="color:red;">{{ getTotalNum(item.TicketList) }}</span>
</td>
<td>{{ dataList.UnitPrice }}</td>
<td>
<span style="color:red;">{{ getTotalCount(item.TicketList) }}</span>
</td> </td>
<td>{{dataList.UnitPrice}}</td>
<td><span style="color:red;">{{getTotalCount(item.TicketList)}}</span></td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
</div> </div>
</template> </template>
<script> <script>
export default { export default {
data() { data() {
return { return {
msg: { msg: {
...@@ -138,15 +222,17 @@ ...@@ -138,15 +222,17 @@
OutBranchId: -1, //出团公司 OutBranchId: -1, //出团公司
AirLineID: 0, //航空公司编号 AirLineID: 0, //航空公司编号
CreateBy: 0, //操作人 CreateBy: 0, //操作人
QMonth: '', //月份 QMonth: "" //月份
}, },
//单机票百分比
singlePercent:0.1,
loading: false, loading: false,
dataList: {}, dataList: {},
//航空公司下拉 //航空公司下拉
airlineList: [], airlineList: [],
//操作人下拉 //操作人下拉
EmployeeList: [], EmployeeList: []
} };
}, },
mounted() { mounted() {
this.getEmployeeList(); this.getEmployeeList();
...@@ -159,23 +245,34 @@ ...@@ -159,23 +245,34 @@
} else { } else {
let date = new Date(), let date = new Date(),
y = date.getFullYear(), y = date.getFullYear(),
m = date.getMonth() < 10 ? "0" + (date.getMonth() + 1) : date.getMonth() + 1; m =
this.msg.QMonth = y + '-' + m; date.getMonth() < 10
? "0" + (date.getMonth() + 1)
: date.getMonth() + 1;
this.msg.QMonth = y + "-" + m;
} }
this.initAirlines(); this.initAirlines();
this.getList() this.getList();
}, },
methods: { methods: {
//单卖机票计算
getSingleCount(list) {
let count = 0;
list.forEach(x => {
count += x.TicketNum*(x.SalePrice-x.CostPrice)*this.singlePercent;
});
return count;
},
//页面跳转 //页面跳转
goUrlT(path, obj, title) { goUrlT(path, obj, title) {
this.$router.push({ this.$router.push({
name: path, name: path,
query: { query: {
"id": obj, id: obj,
blank: 'y', blank: "y",
tab: title tab: title
} }
}) });
}, },
//获取列表数据 //获取列表数据
getList() { getList() {
...@@ -210,25 +307,33 @@ ...@@ -210,25 +307,33 @@
let count = 0; let count = 0;
list.forEach(x => { list.forEach(x => {
x.SubList.forEach(y => { x.SubList.forEach(y => {
count += y.TicketNum if(y.TicketType!=2)
}) {
}) count += y.TicketNum * this.dataList.UnitPrice;
return count * this.dataList.UnitPrice; }
else
{
count += y.TicketNum*(y.SalePrice-y.CostPrice)*this.singlePercent;
}
});
});
return count ;
}, },
//获取总计人数 //获取总计人数
getTotalNum(list) { getTotalNum(list) {
let count = 0; let count = 0;
list.forEach(x => { list.forEach(x => {
x.SubList.forEach(y => { x.SubList.forEach(y => {
count += y.TicketNum count += y.TicketNum;
}) });
}) });
return count; return count;
}, },
//初始化航空公司下拉 //初始化航空公司下拉
initAirlines() { initAirlines() {
this.apipost( this.apipost(
"airline_post_GetList", {}, "airline_post_GetList",
{},
res => { res => {
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
this.airlineList = res.data.data; this.airlineList = res.data.data;
...@@ -240,7 +345,8 @@ ...@@ -240,7 +345,8 @@
//根据当前员工所在部门获取该部门及子部门员工信息 //根据当前员工所在部门获取该部门及子部门员工信息
getEmployeeList() { getEmployeeList() {
this.apipost( this.apipost(
"admin_get_GetEmployeeByUserDepartmentId", {}, "admin_get_GetEmployeeByUserDepartmentId",
{},
res => { res => {
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
this.EmployeeList = res.data.data; this.EmployeeList = res.data.data;
...@@ -253,12 +359,15 @@ ...@@ -253,12 +359,15 @@
DownLoad() { DownLoad() {
this.loading = true; this.loading = true;
var fileName = "机票业绩下载" + this.msg.QMonth + ".xls"; var fileName = "机票业绩下载" + this.msg.QMonth + ".xls";
this.GetLocalFile("AirTicket_get_DownLoadGetTicketPerformance", this.msg, fileName, this.GetLocalFile(
"AirTicket_get_DownLoadGetTicketPerformance",
this.msg,
fileName,
res => { res => {
this.loading = false; this.loading = false;
});
} }
);
} }
} }
};
</script> </script>
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