Commit b86a8e6a authored by 黄奎's avatar 黄奎

餐厅统计

parent 0b2d095e
<template>
<div>
<div>
<div class="query-box" style="border-bottom: none;">
<ul>
<!--<li><span><em>线路</em>
<el-select v-model="msg.LineId" filterable :placeholder="$t('pub.pleaseSel')" @change="getLineTeamList(msg.LineId)">
<el-option label="不限" value='-1'></el-option>
<el-option
v-for="item in LineList"
:label='item.LineName'
:value='item.LineID'
:key='item.LineID'>
</el-option>
</el-select>
</span>
</li>-->
<li><span><em>系列</em>
<el-select v-model="msg.LineteamId" filterable :placeholder="$t('pub.pleaseSel')">
<el-option label="不限" value='-1'></el-option>
<el-option
v-for="item in LineTeamList"
:label='item.LtName'
:value='item.LtID'
:key='item.LtID'>
<el-option v-for="item in LineTeamList" :label='item.LtName' :value='item.LtID' :key='item.LtID'>
</el-option>
</el-select>
</span>
</li>
<li>
<span>
<em>团号</em><el-input v-model='msg.TCNUM' ></el-input>
<em>团号</em>
<el-input v-model='msg.TCNUM'></el-input>
</span>
</li>
<li><span><em>日期</em><el-date-picker v-model='msg.StartDate' class='w135' value-format="yyyy-MM-dd" type="date"></el-date-picker>
<li><span><em>日期</em>
<el-date-picker v-model='msg.StartDate' class='w135' value-format="yyyy-MM-dd" type="date"></el-date-picker>
-
<el-date-picker v-model='msg.EndDate' class='w135' value-format="yyyy-MM-dd" type="date"></el-date-picker>
</span>
</li>
<li>
<input type="button" class="normalBtn" value="查询" @click="getList();resetPageIndex()"/>
<input type="button" class="normalBtn" value="查询" @click="getList();resetPageIndex()" />
</li>
</ul>
</div>
......@@ -48,7 +34,6 @@
<th width="80">出发地</th>
<th width="80">航班时间</th>
<th width="80">公司团号</th>
<!--<th width="150">团名</th>-->
<th width="120">机位总数/已收客数</th>
<th v-for='item in thLengthTitle'>{{item}}</th>
<th>备注</th>
......@@ -59,12 +44,15 @@
<tr>
<td :rowspan="2*outItem.StaticsReportList.length" v-if='index==0'>
<div style="max-width: 100px; min-width: 50px; ">{{outindex+1}}</div>
<div v-if='outItem.StaticsReportList.length>1' class="w100">合团号:{{outItem.NewCombinationNum}}</div>
<div v-if='outItem.StaticsReportList.length>0' class="w100">合团号:{{outItem.NewCombinationNum}}</div>
</td>
<td><div class="w80">
<td>
<div class="w80">
{{item.StartCityNames}}
</div></td>
<td><div class="w120">
</div>
</td>
<td>
<div class="w120">
{{item.FlightDate}}
<el-popover popper-class="bookDinnerStatistics_tripDetails" width="550" trigger="click">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
......@@ -79,7 +67,8 @@
<td class="_d_name _color_666">
<span v-if="din==0">{{$t('Airticket.Air_go')}}</span>
<span v-else-if="din==item.FlightList.length-1">{{$t('Airticket.Air_returnTrip')}}</span>
<span v-else-if="din>0 && din!=item.FlightList.length-1">{{$t('Airticket.Air_transit')}}</span>
<span
v-else-if="din>0 && din!=item.FlightList.length-1">{{$t('Airticket.Air_transit')}}</span>
</td>
<td>
<div>{{ds.Flight_number}}</div>
......@@ -96,22 +85,27 @@
<td>{{ds.StopoverName}}</td>
</tr>
</table>
<el-button slot="reference" class="normalBtn mt5" style='height:24px; padding: 0 10px; background: #2AAEF2; border-color: #2AAEF2;'>详情</el-button>
<el-button slot="reference" class="normalBtn mt5"
style='height:24px; padding: 0 10px; background: #2AAEF2; border-color: #2AAEF2;'>详情</el-button>
</el-popover>
</div></td>
<td><div class="w120 link">
</div>
</td>
<td>
<div class="w120 link">
<p v-for='xx in stringToArr(item.TCNUMS)' @click="goUrlT('productQuery',xx,'产品查询')">{{xx}}</p>
</div></td>
<!--<td><div class="w200 padding10">
{{item.Titles}}
</div></td>-->
<td><div class="w120 link">
<p @click="goUrlT('RegistrationList',item.TCIDS,'报名清单')">{{item.TotalSeat}}/{{item.CommonReport.HouseStatistics.RealityYSeatNum}}/{{item.CommonReport.HouseStatistics.RealityESeatNum}}/{{item.CommonReport.HouseStatistics.RealityFSeatNum}}</p>
</div></td>
</div>
</td>
<td>
<div class="w120 link">
<p @click="goUrlT('RegistrationList',item.TCIDS,'报名清单')">
{{item.TotalSeat}}/{{item.CommonReport.HouseStatistics.RealityYSeatNum}}/{{item.CommonReport.HouseStatistics.RealityESeatNum}}/{{item.CommonReport.HouseStatistics.RealityFSeatNum}}
</p>
</div>
</td>
<td v-for="x in item.CommonReport.DiningList" style="vertical-align: top;">
<div style="width:350px;">
<!--<p v-if="x.UseTimeStr">{{x.UseTimeStr}}</p>-->
<table v-if="x.UseTimeStr" class="DiningTable" width="100%" border="0" cellspacing="0" cellpadding="0">
<table v-if="x.UseTimeStr" class="DiningTable" width="100%" border="0" cellspacing="0"
cellpadding="0">
<tr>
<th width="12%">{{x.UseTimeStr.substring(5)}}</th>
<th width="10%"></th>
......@@ -125,35 +119,10 @@
<td v-for="t in s.DiningPriceList">{{t.PeoplePrice}}</td>
<td>{{s.PayStyleStr}}</td>
<td><span v-if="s.IsFeature==1" style="color:red;">{{s.DiningName}}</span> <span v-else>{{s.DiningName}}</span></td>
<td><span v-if="s.IsFeature==1" style="color:red;">{{s.DiningName}}</span> <span
v-else>{{s.DiningName}}</span></td>
</tr>
</table>
<!--<div style="width: 100%; max-height: 100px; overflow-y: auto; " class="ownScrollbarStyle">
<table class="DiningTable" width="100%" border="0" cellspacing="0" cellpadding="0" >
<tbody v-for="s in x.DiningSummaryList">
<tr>
<td width="30%">{{useDinnerTypeToWord(s.UseDinnerType)}}</td>
<td width="70%">
<p class="phoverStype" @click="goUrlT('restaurantList',s.ID,'餐厅列表')">{{s.DiningName}}</p>
</td>
</tr>
<tr>
<td>支付方式</td>
<td>
<el-select v-model="s.DiningReserveType" :placeholder="$t('pub.pleaseSel')">
<el-option label='请选择' value='0'></el-option>
<el-option label='公司预定' value='1'></el-option>
<el-option label='导游预定' value='2'></el-option>
</el-select>
</td>
</tr>
<tr>
<td>用餐人数</td>
<td><span style="margin-right: 5px;" v-for="t in s.DiningPriceList">{{PeopleTypeToWord(t.PeopleType)}}{{t.PeoplePrice}}</span></td>
</tr>
</tbody>
</table>
</div>-->
</div>
</td>
<td>
......@@ -171,7 +140,8 @@
<td :colspan="colspanTotal" style="text-align: left!important;padding-left: 20px;">
<div class="link">
<p @click="goUrlT('productQuery',item.TCNUMS,'产品查询')">{{item.Titles}}</p>
<div v-show="outItem.StaticsReportList[0].DMCRemark!=''" class="colorE95252">地接备注:{{outItem.StaticsReportList[0].DMCRemark}}</div>
<div v-show="outItem.StaticsReportList[0].DMCRemark!=''" class="colorE95252">
地接备注:{{outItem.StaticsReportList[0].DMCRemark}}</div>
</div>
</td>
</tr>
......@@ -179,43 +149,45 @@
</tbody>
</table>
</div>
<el-pagination background @current-change="handleCurrentChange" :current-page.sync="currentPage" layout="total,prev, pager, next, jumper" :page-size=msg.pageSize :total=total></el-pagination>
<el-pagination background @current-change="handleCurrentChange" :current-page.sync="msg.currentPage"
layout="total,prev, pager, next, jumper" :page-size="msg.pageSize" :total="msg.total"></el-pagination>
</div>
</template>
<script>
export default {
data () {
export default {
data() {
return {
loading:false,
currentPage:1,
total:0,
msg:{
pageIndex:1,
pageSize:10,
SelectType:2,
loading: false,
msg: {
pageIndex: 1,
pageSize: 10,
SelectType: 2,
LineId: 14,
LineteamId: "-1",
StartDate:'',
EndDate:''
StartDate: '',
EndDate: '',
currentPage: 1,
total: 0,
},
LineList: [],
LineTeamList: [],
thLengthTitle:[],
list:[],
colspanTotal:0,
thLengthTitle: [],
list: [],
colspanTotal: 0,
}
},
methods: {
stringToArr(str){
stringToArr(str) {
return str.split(',')
},
PeopleTypeToWord(str){
if(str==1)
PeopleTypeToWord(str) {
if (str == 1)
return '成人:'
if(str==2)
if (str == 2)
return '小孩:'
if(str==3)
if (str == 3)
return '婴儿:'
},
getLineList() {
......@@ -231,8 +203,7 @@ export default {
getLineTeamList(lineId) {
this.LineTeamList = [];
this.apipost(
"team_post_GetList",
{
"team_post_GetList", {
lineID: 14,
isTOOP: 1
},
......@@ -244,14 +215,39 @@ export default {
}
);
},
goUrlR(path,obj,title){
this.$router.push({ name:path,query:{"ID":obj,blank:'y',tab:title}})
goUrlR(path, obj, title) {
this.$router.push({
name: path,
query: {
"ID": obj,
blank: 'y',
tab: title
}
})
},
goUrlT(path,obj,title){
this.$router.push({ name:path,query:{"id":obj,blank:'y',tab:title}})
goUrlT(path, obj, title) {
this.$router.push({
name: path,
query: {
"id": obj,
blank: 'y',
tab: title
}
})
},
goUrl(path,obj,title){
this.$router.push({ name:path,query:{"id":obj.TCIDS,'TCNUM':obj.TCNUMS,'flightTotal':obj.TotalSeat,'GuestNum':obj.CommonReport.HouseStatistics.RealityNum,'NewCombinationNum':obj.NewCombinationNum,blank:'y',tab:title}})
goUrl(path, obj, title) {
this.$router.push({
name: path,
query: {
"id": obj.TCIDS,
'TCNUM': obj.TCNUMS,
'flightTotal': obj.TotalSeat,
'GuestNum': obj.CommonReport.HouseStatistics.RealityNum,
'NewCombinationNum': obj.NewCombinationNum,
blank: 'y',
tab: title
}
})
},
handleCurrentChange(val) {
this.msg.pageIndex = val;
......@@ -259,53 +255,39 @@ export default {
},
resetPageIndex() {
this.msg.pageIndex = 1;
this.currentPage = 1;
this.msg.currentPage = 1;
},
getList(){
this.loading=true
this.apipost('dmcstatistics_post_GetUniteCombinationNumService',this.msg,res=>{
if(res.data.resultCode==1){
this.loading=false
this.total=res.data.data.count
this.list=res.data.data.pageData.data
this.thLengthArr=[]
this.thLengthTitle=[]
this.colspanTotal=res.data.data.pageData.columnsCount+6
for(let i=1;i<=res.data.data.pageData.columnsCount;i++){
this.thLengthTitle.push('第'+i+'天')
}
// this.list.forEach(item=>{
// console.log(item)
// if(item.CommonReport.DiningList.length<res.data.data.pageData.columnsCount){
// let _cha=res.data.data.pageData.columnsCount-item.CommonReport.DiningList.length
// let _chaArr=new Array()
// for (let i=0;i<_cha;i++) {
// _chaArr.push({'HotelName':''})
// }
// item.CommonReport.DiningList=item.CommonReport.DiningList.concat(_chaArr)
// }else{
//
// }
// })
this.list.forEach(outItem=>{
outItem.StaticsReportList.forEach(item=>{
if(item.CommonReport.DiningList.length<res.data.data.pageData.columnsCount){
let _cha=res.data.data.pageData.columnsCount-item.CommonReport.DiningList.length
let _chaArr=new Array()
for (let i=0;i<_cha;i++) {
_chaArr.push({'HotelName':''})
}
item.CommonReport.DiningList=item.CommonReport.DiningList.concat(_chaArr)
}else{
getList() {
this.loading = true
this.apipost('dmcstatistics_post_GetUniteCombinationNumService', this.msg, res => {
this.loading = false
if (res.data.resultCode == 1) {
this.msg.total = res.data.data.count;
this.list = res.data.data.pageData.data;
this.thLengthArr = [];
this.thLengthTitle = [];
this.colspanTotal = res.data.data.pageData.columnsCount + 6;
for (let i = 1; i <= res.data.data.pageData.columnsCount; i++) {
this.thLengthTitle.push('第' + i + '天');
}
})
})
}else{
this.loading=false
this.$message.error(res.data.message)
this.list.forEach(outItem => {
outItem.StaticsReportList.forEach(item => {
if (item.CommonReport.DiningList.length < res.data.data.pageData.columnsCount) {
let _cha = res.data.data.pageData.columnsCount - item.CommonReport.DiningList.length;
let _chaArr = new Array();
for (let i = 0; i < _cha; i++) {
_chaArr.push({
'HotelName': ''
});
}
item.CommonReport.DiningList = item.CommonReport.DiningList.concat(_chaArr);
}
},err=>{})
});
});
} else {
this.$message.error(res.data.message);
}
}, err => {})
},
},
mounted() {
......@@ -319,37 +301,140 @@ export default {
this.msg.StartDate = nowDate;
this.getList()
},
}
}
</script>
<style>
.bookDinnerStatisticsSplitTrCss td{background: #eee!important;}
.bookDinnerStatisticsTalbe{ background: #ccc;}
.bookDinnerStatisticsTalbe tr th{background: #E6E6E6;height:40px; font-size: 12px; color: #333;}
.bookDinnerStatisticsTalbe tr{background: #fff;text-align: center; height: 40px;}
/*.bookDinnerStatisticsTalbe tr:nth-child(2n+1){background:#f2f2f2; }*/
.bookDinnerStatisticsTalbe tr td{font-size: 12px;}
.bookDinnerStatisticsTalbe tr td .pHouseStyle{border-bottom: 1px solid #ccc; height: 20px; line-height: 20px;}
.bookDinnerStatisticsTalbe tr td .pHouseStyle:last-child{border-bottom: none;}
.bookDinnerStatisticsTalbe tr td .pDateStyle{border-bottom: 1px solid #ccc; height: 20px; line-height: 20px; margin-top: 0;}
.bookDinnerStatisticsTalbe tr td .pMsgStyle{; padding: 0 10px; line-height: 20px;}
.bookDinnerStatisticsTalbe tr td .link p:hover{text-decoration: underline; cursor: pointer;}
.bookDinnerStatisticsTalbe tr td .phoverStype:hover{text-decoration: underline; cursor: pointer;}
.bookDinnerStatistics_tripDetails {padding: 0; box-shadow: 0px 1px 3px 0px #dedede; max-height: 400px;overflow-y: auto;}
.bookDinnerStatistics_tripDetails .popper__arrow::after {border-bottom-color: #ededed !important;}
.bookDinnerStatistics_tripDetails>table { padding: 10px 0 0 20px; background-color: #ededed; border-collapse: collapse; border: 1px solid #d2d2d2; font-size: 12px;}
.bookDinnerStatistics_tripDetails>table th { background-color: #ededed; padding: 5px;}
.bookDinnerStatistics_tripDetails>table td { background-color: #ffffff; padding: 9px 15px;color: #333333;border: 1px solid #d2d2d2;}
.bookDinnerStatistics_tripDetails>table td._d_name {background-color: #ededed;}
.bookDinnerStatistics_tripDetails>table ._color_666 {color: #666666;}
.bookDinnerStatistics_tripDetails table tr._color_666 th { padding: 9px 15px;}
.DiningTable{background: #fff;}
.DiningTable tr {height: 20px;}
.DiningTable tr th{ height:20px; font-size: 12px;background: #fafafa!important; border-bottom: 1px solid #ccc; border-right: 1px solid #ccc;}
.DiningTable tr th:last-child{border-right: none;}
.DiningTable tr td{ height:30px; border-bottom: 1px solid #ccc; border-right: 1px solid #ccc;}
.DiningTable tr td:last-child{border-right: none;}
.bookDinnerStatisticsSplitTrCss td {
background: #eee !important;
}
.bookDinnerStatisticsTalbe {
background: #ccc;
}
.bookDinnerStatisticsTalbe tr th {
background: #E6E6E6;
height: 40px;
font-size: 12px;
color: #333;
}
.bookDinnerStatisticsTalbe tr {
background: #fff;
text-align: center;
height: 40px;
}
/*.bookDinnerStatisticsTalbe tr:nth-child(2n+1){background:#f2f2f2; }*/
.bookDinnerStatisticsTalbe tr td {
font-size: 12px;
}
.bookDinnerStatisticsTalbe tr td .pHouseStyle {
border-bottom: 1px solid #ccc;
height: 20px;
line-height: 20px;
}
.bookDinnerStatisticsTalbe tr td .pHouseStyle:last-child {
border-bottom: none;
}
.bookDinnerStatisticsTalbe tr td .pDateStyle {
border-bottom: 1px solid #ccc;
height: 20px;
line-height: 20px;
margin-top: 0;
}
.bookDinnerStatisticsTalbe tr td .pMsgStyle {
;
padding: 0 10px;
line-height: 20px;
}
.bookDinnerStatisticsTalbe tr td .link p:hover {
text-decoration: underline;
cursor: pointer;
}
.bookDinnerStatisticsTalbe tr td .phoverStype:hover {
text-decoration: underline;
cursor: pointer;
}
.bookDinnerStatistics_tripDetails {
padding: 0;
box-shadow: 0px 1px 3px 0px #dedede;
max-height: 400px;
overflow-y: auto;
}
.bookDinnerStatistics_tripDetails .popper__arrow::after {
border-bottom-color: #ededed !important;
}
.bookDinnerStatistics_tripDetails>table {
padding: 10px 0 0 20px;
background-color: #ededed;
border-collapse: collapse;
border: 1px solid #d2d2d2;
font-size: 12px;
}
.bookDinnerStatistics_tripDetails>table th {
background-color: #ededed;
padding: 5px;
}
.bookDinnerStatistics_tripDetails>table td {
background-color: #ffffff;
padding: 9px 15px;
color: #333333;
border: 1px solid #d2d2d2;
}
.bookDinnerStatistics_tripDetails>table td._d_name {
background-color: #ededed;
}
.bookDinnerStatistics_tripDetails>table ._color_666 {
color: #666666;
}
.bookDinnerStatistics_tripDetails table tr._color_666 th {
padding: 9px 15px;
}
.DiningTable {
background: #fff;
}
.DiningTable tr {
height: 20px;
}
.DiningTable tr th {
height: 20px;
font-size: 12px;
background: #fafafa !important;
border-bottom: 1px solid #ccc;
border-right: 1px solid #ccc;
}
.DiningTable tr th:last-child {
border-right: none;
}
.DiningTable tr td {
height: 30px;
border-bottom: 1px solid #ccc;
border-right: 1px solid #ccc;
}
.DiningTable tr td:last-child {
border-right: none;
}
</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