Commit fc032c40 authored by 黄奎's avatar 黄奎

酒店统计修改

parent 0f4c5b48
<template> <template>
<div> <div>
<div class="query-box" style="border-bottom: none;"> <div class="query-box" style="border-bottom: none;">
<ul> <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> <li><span><em>系列</em>
<el-select v-model="msg.LineteamId" filterable :placeholder="$t('pub.pleaseSel')"> <el-select v-model="msg.LineteamId" filterable :placeholder="$t('pub.pleaseSel')">
<el-option label="不限" value='-1'></el-option> <el-option label="不限" value='-1'></el-option>
<el-option <el-option v-for="item in LineTeamList" :label='item.LtName' :value='item.LtID' :key='item.LtID'>
v-for="item in LineTeamList"
:label='item.LtName'
:value='item.LtID'
:key='item.LtID'>
</el-option> </el-option>
</el-select> </el-select>
</span> </span>
</li> </li>
<li> <li>
<span> <span>
<em>团号</em><el-input v-model='msg.TCNUM' ></el-input> <em>团号</em>
<el-input v-model='msg.TCNUM'></el-input>
</span> </span>
</li> </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> <el-date-picker v-model='msg.EndDate' class='w135' value-format="yyyy-MM-dd" type="date"></el-date-picker>
</span> </span>
</li> </li>
<li> <li>
<input type="button" class="normalBtn" value="查询" @click="getList();resetPageIndex()"/> <input type="button" class="normalBtn" value="查询" @click="getList();resetPageIndex()" />
</li> </li>
</ul> </ul>
</div> </div>
...@@ -66,10 +53,13 @@ ...@@ -66,10 +53,13 @@
<div style="max-width: 100px; min-width: 50px; ">{{outindex+1}}</div> <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>1' class="w100">合团号:{{outItem.NewCombinationNum}}</div>
</td> </td>
<td><div class="w80"> <td>
<div class="w80">
{{item.StartCityNames}} {{item.StartCityNames}}
</div></td> </div>
<td><div class="w80"> </td>
<td>
<div class="w80">
{{item.FlightDate}} {{item.FlightDate}}
<el-popover popper-class="roomReservations_tripDetails" width="550" trigger="click"> <el-popover popper-class="roomReservations_tripDetails" width="550" trigger="click">
<table width="100%" border="0" cellspacing="0" cellpadding="0"> <table width="100%" border="0" cellspacing="0" cellpadding="0">
...@@ -84,7 +74,8 @@ ...@@ -84,7 +74,8 @@
<td class="_d_name _color_666"> <td class="_d_name _color_666">
<span v-if="din==0">{{$t('Airticket.Air_go')}}</span> <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==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>
<td> <td>
<div>{{ds.Flight_number}}</div> <div>{{ds.Flight_number}}</div>
...@@ -101,21 +92,34 @@ ...@@ -101,21 +92,34 @@
<td>{{ds.StopoverName}}</td> <td>{{ds.StopoverName}}</td>
</tr> </tr>
</table> </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> </el-popover>
</div></td> </div>
<td><div class="w120 link"> </td>
<td>
<div class="w120 link">
<p @click="goUrlT('productQuery',item.TCNUMS,'产品查询')">{{item.TCNUMS}}</p> <p @click="goUrlT('productQuery',item.TCNUMS,'产品查询')">{{item.TCNUMS}}</p>
</div></td> </div>
<td><div class="w120 link"> </td>
<p @click="goUrlT('RegistrationList',item.TCIDS,'报名清单')">{{item.TotalSeat}}/{{item.CommonReport.HouseStatistics.RealityYSeatNum}}/{{item.CommonReport.HouseStatistics.RealityESeatNum}}/{{item.CommonReport.HouseStatistics.RealityFSeatNum}}</p> <td>
</div></td> <div class="w120 link">
<td><div class="w80 link"> <p @click="goUrlT('RegistrationList',item.TCIDS,'报名清单')">
<p @click="goUrlT('passengerHouse',item.TCIDS,'房间分配')">{{item.CommonReport.HouseStatistics.NeedBed}}/{{item.CommonReport.HouseStatistics.NoNeedBed}}</p> {{item.TotalSeat}}/{{item.CommonReport.HouseStatistics.RealityYSeatNum}}/{{item.CommonReport.HouseStatistics.RealityESeatNum}}/{{item.CommonReport.HouseStatistics.RealityFSeatNum}}
</div></td> </p>
<td><div class="w80"> </div>
</td>
<td>
<div class="w80 link">
<p @click="goUrlT('passengerHouse',item.TCIDS,'房间分配')">
{{item.CommonReport.HouseStatistics.NeedBed}}/{{item.CommonReport.HouseStatistics.NoNeedBed}}</p>
</div>
</td>
<td>
<div class="w80">
{{item.CommonReport.HouseStatistics.RealityRoomNum}} {{item.CommonReport.HouseStatistics.RealityRoomNum}}
</div></td> </div>
</td>
<td style="vertical-align: top;"> <td style="vertical-align: top;">
<div class="w260"> <div class="w260">
<p class="pDateStyle">时间</p> <p class="pDateStyle">时间</p>
...@@ -131,7 +135,8 @@ ...@@ -131,7 +135,8 @@
<td v-for="(x,ii) in item.CommonReport.HotelList" style="vertical-align: top;"> <td v-for="(x,ii) in item.CommonReport.HotelList" style="vertical-align: top;">
<div class="w150" v-if='ii<item.CommonReport.valueLength'> <div class="w150" v-if='ii<item.CommonReport.valueLength'>
<p class="pDateStyle">{{x.CheckInDateStr}}</p> <p class="pDateStyle">{{x.CheckInDateStr}}</p>
<p @click="goUrlR('HotelManagement',x.HotelId,'酒店管理')" class="pDateStyle phoverStype ownScrollbarStyle" style="height: 50px!important; overflow:auto;"> <p @click="goUrlR('HotelManagement',x.HotelId,'酒店管理')"
class="pDateStyle phoverStype ownScrollbarStyle" style="height: 50px!important; overflow:auto;">
<span v-if='x.HotelOrderState==0' class="colorE95252">(待定)</span>{{x.NewHotelName}} <span v-if='x.HotelOrderState==0' class="colorE95252">(待定)</span>{{x.NewHotelName}}
</p> </p>
<p class="pDateStyle">{{item.CommonReport.HouseStatistics.RealityRoomNum}}</p> <p class="pDateStyle">{{item.CommonReport.HouseStatistics.RealityRoomNum}}</p>
...@@ -160,7 +165,8 @@ ...@@ -160,7 +165,8 @@
<td :colspan="colspanTotal" style="text-align: left!important;padding-left: 20px;"> <td :colspan="colspanTotal" style="text-align: left!important;padding-left: 20px;">
<div class="link"> <div class="link">
<p @click="goUrlT('productQuery',item.TCNUMS,'产品查询')">{{item.Titles}}</p> <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> </div>
</td> </td>
</tr> </tr>
...@@ -168,31 +174,32 @@ ...@@ -168,31 +174,32 @@
</tbody> </tbody>
</table> </table>
</div> </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="currentPage"
layout="total,prev, pager, next, jumper" :page-size=msg.pageSize :total=total></el-pagination>
</div> </div>
</template> </template>
<script> <script>
export default { export default {
data () { data() {
return { return {
loading:false, loading: false,
currentPage:1, currentPage: 1,
total:0, total: 0,
msg:{ msg: {
pageIndex:1, pageIndex: 1,
pageSize:5, pageSize: 5,
SelectType:1, SelectType: 1,
LineId: 14, LineId: 14,
LineteamId: "-1", LineteamId: "-1",
StartDate:'', StartDate: '',
EndDate:'' EndDate: ''
}, },
LineList: [], LineList: [],
LineTeamList: [], LineTeamList: [],
thLengthTitle:[], thLengthTitle: [],
list:[], list: [],
colspanTotal:0, colspanTotal: 0,
} }
}, },
...@@ -210,8 +217,7 @@ export default { ...@@ -210,8 +217,7 @@ export default {
getLineTeamList(lineId) { getLineTeamList(lineId) {
this.LineTeamList = []; this.LineTeamList = [];
this.apipost( this.apipost(
"team_post_GetList", "team_post_GetList", {
{
lineID: 14, lineID: 14,
isTOOP: 1 isTOOP: 1
}, },
...@@ -223,14 +229,39 @@ export default { ...@@ -223,14 +229,39 @@ export default {
} }
); );
}, },
goUrlR(path,obj,title){ goUrlR(path, obj, title) {
this.$router.push({ name:path,query:{"ID":obj,blank:'y',tab:title}}) this.$router.push({
name: path,
query: {
"ID": obj,
blank: 'y',
tab: title
}
})
}, },
goUrlT(path,obj,title){ goUrlT(path, obj, title) {
this.$router.push({ name:path,query:{"id":obj,blank:'y',tab:title}}) this.$router.push({
name: path,
query: {
"id": obj,
blank: 'y',
tab: title
}
})
}, },
goUrl(path,obj,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}}) 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) { handleCurrentChange(val) {
this.msg.pageIndex = val; this.msg.pageIndex = val;
...@@ -240,57 +271,59 @@ export default { ...@@ -240,57 +271,59 @@ export default {
this.msg.pageIndex = 1; this.msg.pageIndex = 1;
this.currentPage = 1; this.currentPage = 1;
}, },
getList(){ getList() {
this.loading=true this.loading = true
this.apipost('dmcstatistics_post_GetUniteCombinationNumService',this.msg,res=>{ this.apipost('dmcstatistics_post_GetUniteCombinationNumService', this.msg, res => {
if(res.data.resultCode==1){ if (res.data.resultCode == 1) {
this.loading=false this.loading = false
console.log(res.data.data.pageData.data) console.log(res.data.data.pageData.data)
this.total=res.data.data.count this.total = res.data.data.count
this.list=res.data.data.pageData.data this.list = res.data.data.pageData.data
this.thLengthArr=[] this.thLengthArr = []
this.thLengthTitle=[] this.thLengthTitle = []
this.colspanTotal=res.data.data.pageData.columnsCount+9 this.colspanTotal = res.data.data.pageData.columnsCount + 9
for(let i=1;i<=res.data.data.pageData.columnsCount;i++){ for (let i = 1; i <= res.data.data.pageData.columnsCount; i++) {
this.thLengthTitle.push('第'+i+'晚') this.thLengthTitle.push('第' + i + '晚')
} }
this.list.forEach(outItem=>{ this.list.forEach(outItem => {
outItem.StaticsReportList.forEach(item=>{ outItem.StaticsReportList.forEach(item => {
item.CommonReport['valueLength']=item.CommonReport.HotelList.length item.CommonReport['valueLength'] = item.CommonReport.HotelList.length
if(item.CommonReport.HotelList.length<res.data.data.pageData.columnsCount){ if (item.CommonReport.HotelList.length < res.data.data.pageData.columnsCount) {
let _cha=res.data.data.pageData.columnsCount-item.CommonReport.HotelList.length let _cha = res.data.data.pageData.columnsCount - item.CommonReport.HotelList.length
let _chaArr=new Array() let _chaArr = new Array()
for (let i=0;i<_cha;i++) { for (let i = 0; i < _cha; i++) {
_chaArr.push({'HotelName':''}) _chaArr.push({
'HotelName': ''
})
} }
item.CommonReport.HotelList=item.CommonReport.HotelList.concat(_chaArr) item.CommonReport.HotelList = item.CommonReport.HotelList.concat(_chaArr)
}else{ } else {
} }
}) })
}) })
// this.list.forEach(item=>{ // this.list.forEach(item=>{
// item.CommonReport['valueLength']=item.CommonReport.HotelList.length // item.CommonReport['valueLength']=item.CommonReport.HotelList.length
// if(item.CommonReport.HotelList.length<res.data.data.pageData.columnsCount){ // if(item.CommonReport.HotelList.length<res.data.data.pageData.columnsCount){
// let _cha=res.data.data.pageData.columnsCount-item.CommonReport.HotelList.length // let _cha=res.data.data.pageData.columnsCount-item.CommonReport.HotelList.length
// let _chaArr=new Array() // let _chaArr=new Array()
// for (let i=0;i<_cha;i++) { // for (let i=0;i<_cha;i++) {
// _chaArr.push({'HotelName':''}) // _chaArr.push({'HotelName':''})
// } // }
// item.CommonReport.HotelList=item.CommonReport.HotelList.concat(_chaArr) // item.CommonReport.HotelList=item.CommonReport.HotelList.concat(_chaArr)
// console.log(item.CommonReport) // console.log(item.CommonReport)
// }else{ // }else{
// //
// } // }
// }) // })
}else{ } else {
this.loading=false this.loading = false
this.$message.error(res.data.message) this.$message.error(res.data.message)
} }
},err=>{}) }, err => {})
}, },
}, },
beforeCreate(){ beforeCreate() {
}, },
mounted() { mounted() {
...@@ -303,31 +336,111 @@ export default { ...@@ -303,31 +336,111 @@ export default {
myDate.getDate(); myDate.getDate();
this.msg.StartDate = nowDate; this.msg.StartDate = nowDate;
this.getList() this.getList()
// this.getLineList() // this.getLineList()
this.getLineTeamList() this.getLineTeamList()
}, },
} }
</script> </script>
<style> <style>
.roomReservationsSplitTrCss td{background: #eee!important;} .roomReservationsSplitTrCss td {
.roomReservationsTalbe{ background: #ccc;} background: #eee !important;
.roomReservationsTalbe tr th{background: #E6E6E6;height:40px; font-size: 12px; color: #333;} }
.roomReservationsTalbe tr{background: #fff;text-align: center; height: 40px;}
.roomReservationsTalbe tr td{font-size: 12px;} .roomReservationsTalbe {
.roomReservationsTalbe tr td .pDateStyle{border-bottom: 1px solid #ccc; min-height: 24px; line-height: 24px; margin-top: 0; box-sizing: content-box; padding: 0 10px;} background: #ccc;
.roomReservationsTalbe tr td .pDateStyle:last-child{border-bottom: none;} }
.roomReservationsTalbe tr td .pDateStyle>span:after{content: '/';}
.roomReservationsTalbe tr td .pDateStyle>span:last-child:after{content:''} .roomReservationsTalbe tr th {
.roomReservationsTalbe tr td .link p:hover{text-decoration: underline; cursor: pointer;} background: #E6E6E6;
.roomReservationsTalbe tr td .phoverStype:hover{text-decoration: underline; cursor: pointer;} height: 40px;
.roomReservations_tripDetails {padding: 0; box-shadow: 0px 1px 3px 0px #dedede; max-height: 400px;overflow-y: auto;} font-size: 12px;
.roomReservations_tripDetails .popper__arrow::after {border-bottom-color: #ededed !important;} color: #333;
.roomReservations_tripDetails table { padding: 10px 0 0 20px; background-color: #ededed; border-collapse: collapse; border: 1px solid #d2d2d2; font-size: 12px;} }
.roomReservations_tripDetails table th { background-color: #ededed; padding: 5px;}
.roomReservations_tripDetails table td { background-color: #ffffff; padding: 9px 15px;color: #333333;border: 1px solid #d2d2d2;} .roomReservationsTalbe tr {
.roomReservations_tripDetails table td._d_name {background-color: #ededed;} background: #fff;
.roomReservations_tripDetails table ._color_666 {color: #666666;} text-align: center;
.roomReservations_tripDetails table tr._color_666 th { padding: 9px 15px;} height: 40px;
}
.roomReservationsTalbe tr td {
font-size: 12px;
}
.roomReservationsTalbe tr td .pDateStyle {
border-bottom: 1px solid #ccc;
min-height: 24px;
line-height: 24px;
margin-top: 0;
box-sizing: content-box;
padding: 0 10px;
}
.roomReservationsTalbe tr td .pDateStyle:last-child {
border-bottom: none;
}
.roomReservationsTalbe tr td .pDateStyle>span:after {
content: '/';
}
.roomReservationsTalbe tr td .pDateStyle>span:last-child:after {
content: ''
}
.roomReservationsTalbe tr td .link p:hover {
text-decoration: underline;
cursor: pointer;
}
.roomReservationsTalbe tr td .phoverStype:hover {
text-decoration: underline;
cursor: pointer;
}
.roomReservations_tripDetails {
padding: 0;
box-shadow: 0px 1px 3px 0px #dedede;
max-height: 400px;
overflow-y: auto;
}
.roomReservations_tripDetails .popper__arrow::after {
border-bottom-color: #ededed !important;
}
.roomReservations_tripDetails table {
padding: 10px 0 0 20px;
background-color: #ededed;
border-collapse: collapse;
border: 1px solid #d2d2d2;
font-size: 12px;
}
.roomReservations_tripDetails table th {
background-color: #ededed;
padding: 5px;
}
.roomReservations_tripDetails table td {
background-color: #ffffff;
padding: 9px 15px;
color: #333333;
border: 1px solid #d2d2d2;
}
.roomReservations_tripDetails table td._d_name {
background-color: #ededed;
}
.roomReservations_tripDetails table ._color_666 {
color: #666666;
}
.roomReservations_tripDetails table tr._color_666 th {
padding: 9px 15px;
}
</style> </style>
...@@ -3,8 +3,8 @@ ...@@ -3,8 +3,8 @@
<div class="query-box" style="border-bottom: none;"> <div class="query-box" style="border-bottom: none;">
<ul> <ul>
<li> <li>
<input type="button" class="fr normalBtn mb30" value="保存" @click="saveList(1)"/> <input type="button" class="fr normalBtn mb30" value="保存" @click="saveList(1)" />
<input type="button" class="fr normalBtn mb30" value="保存草稿" @click="saveList(0)"/> <input type="button" class="fr normalBtn mb30" value="保存草稿" @click="saveList(0)" />
</li> </li>
</ul> </ul>
</div> </div>
...@@ -43,58 +43,78 @@ ...@@ -43,58 +43,78 @@
<td :rowspan="list.length" v-if="index==0"> <td :rowspan="list.length" v-if="index==0">
<div class="w120"> <div class="w120">
<p class="link" @click="goUrlT('productQuery',TCNUM,'产品查询')">{{TCNUM}}</p> <p class="link" @click="goUrlT('productQuery',TCNUM,'产品查询')">{{TCNUM}}</p>
<el-button @click='openChart()' v-if="CreateByAccount!=''" type="primary" style="background:#6DD875; border-color:#6DD875;padding:4px;margin-top:10px;" >联系OP</el-button> <el-button @click='openChart()' v-if="CreateByAccount!=''" type="primary"
style="background:#6DD875; border-color:#6DD875;padding:4px;margin-top:10px;">联系OP</el-button>
</div> </div>
</td> </td>
<td><div class="w200 padding10"> <td>
<p class="link" style="word-break: normal;" :class="{'Hotel_red':item.HotelChangeState==3}" @click="goUrlR('HotelManagement',item.HotelId,'酒店管理')">{{item.HotelName}}</p> <div class="w200 padding10">
<p class="link" style="word-break: normal;" :class="{'Hotel_red':item.HotelChangeState==3}"
@click="goUrlR('HotelManagement',item.HotelId,'酒店管理')">{{item.HotelName}}</p>
</div>
</td>
<td>
<div class="w80">{{item.CheckInDateStr}}</div>
</td>
<td>
<div class="w120">
<p class="link" @click="goUrlT('RegistrationList',item.TCID,'报名清单')">
{{flightTotal}}/{{item.HouseStatistics.RealityYSeatNum}}/{{item.HouseStatistics.RealityESeatNum}}/{{item.HouseStatistics.RealityFSeatNum}}
</p>
</div> </div>
</td> </td>
<td><div class="w80">{{item.CheckInDateStr}}</div></td>
<td> <td>
<div class="w120"> <div class="w120">
<p class="link" @click="goUrlT('RegistrationList',item.TCID,'报名清单')">{{flightTotal}}/{{item.HouseStatistics.RealityYSeatNum}}/{{item.HouseStatistics.RealityESeatNum}}/{{item.HouseStatistics.RealityFSeatNum}}</p> <p class="link" @click="goUrlT('passengerHouse',item.TCIDS,'房间分配')">
{{item.HouseStatistics.NeedBed}}/{{item.HouseStatistics.NoNeedBed}}</p>
</div> </div>
</td> </td>
<td><div class="w120"> <td>
<p class="link" @click="goUrlT('passengerHouse',item.TCIDS,'房间分配')">{{item.HouseStatistics.NeedBed}}/{{item.HouseStatistics.NoNeedBed}}</p> <div class="w80">{{item.HouseStatistics.RealityRoomNum}}</div>
</div></td> </td>
<td><div class="w80">{{item.HouseStatistics.RealityRoomNum}}</div></td> <td>
<td><div class="w150"> <div class="w150">
<p class="pHouseStyle" v-for="o in item.HouseStatistics.HouseTypeList"> <p class="pHouseStyle" v-for="o in item.HouseStatistics.HouseTypeList">
{{o.HouseTypeName}} {{o.HouseTypeName}}
</p> </p>
</div></td> </div>
<td><div class="w80"> </td>
<td>
<div class="w80">
<p class="pHouseStyle" v-for="o in item.HouseStatistics.HouseTypeList"> <p class="pHouseStyle" v-for="o in item.HouseStatistics.HouseTypeList">
{{o.HouseTypeCount}} {{o.HouseTypeCount}}
</p> </p>
</div></td> </div>
<td><div class="w80"> </td>
<td>
<div class="w80">
<p class="pHouseStyle" v-for="o in item.HouseStatistics.HouseTypeList"> <p class="pHouseStyle" v-for="o in item.HouseStatistics.HouseTypeList">
{{o.HouseGuestNum}} {{o.HouseGuestNum}}
</p> </p>
</div></td> </div>
<td><div class="w150"> </td>
<el-select class='w120 sel' v-model='item.NewHotelId' filterable :placeholder="$t('pub.pleaseSel')" @visible-change='getHotelList(item)' @change='sendValue(item)'> <td>
<el-option <div class="w150">
v-for='itemHotel in item.hotelList' <el-select class='w120 sel' v-model='item.NewHotelId' filterable :placeholder="$t('pub.pleaseSel')"
:label='itemHotel.Name' @visible-change='getHotelList(item)' @change='sendValue(item)'>
:value='itemHotel.ID' <el-option v-for='itemHotel in item.hotelList' :label='itemHotel.Name' :value='itemHotel.ID'
:key='itemHotel.ID' :key='itemHotel.ID'></el-option>
></el-option>
</el-select> </el-select>
</div></td> </div>
</td>
<td> <td>
<div class="w80"> <div class="w80">
<p class="pHouseStyle" v-for="o in item.OrderDetailsList"> <p class="pHouseStyle" v-for="o in item.OrderDetailsList">
<el-input class='w50 tcenter' @keyup.native="checkInteger(o,'HouseTypeCount')" v-model='o.HouseTypeCount'></el-input> <el-input class='w50 tcenter' @keyup.native="checkInteger(o,'HouseTypeCount')"
v-model='o.HouseTypeCount'></el-input>
</p> </p>
</div> </div>
</td> </td>
<td> <td>
<div class="w80"> <div class="w80">
<p class="pHouseStyle" :class="{colorRed:o.HouseTypeCount-item.HouseStatistics.HouseTypeList[index].HouseTypeCount<0}" v-for="(o,index) in item.OrderDetailsList"> <p class="pHouseStyle"
:class="{colorRed:o.HouseTypeCount-item.HouseStatistics.HouseTypeList[index].HouseTypeCount<0}"
v-for="(o,index) in item.OrderDetailsList">
{{o.HouseTypeCount-item.HouseStatistics.HouseTypeList[index].HouseTypeCount}} {{o.HouseTypeCount-item.HouseStatistics.HouseTypeList[index].HouseTypeCount}}
</p> </p>
</div> </div>
...@@ -102,14 +122,16 @@ ...@@ -102,14 +122,16 @@
<td> <td>
<div class="w120"> <div class="w120">
<p class="pHouseStyle" v-for="(o,index) in item.OrderDetailsList" @input="calculationPrice(item)"> <p class="pHouseStyle" v-for="(o,index) in item.OrderDetailsList" @input="calculationPrice(item)">
<el-input @keyup.native="checkInteger(o,'UnitPrice')" class='w80 tcenter' v-model='o.UnitPrice'></el-input> <el-input @keyup.native="checkInteger(o,'UnitPrice')" class='w80 tcenter' v-model='o.UnitPrice'>
</el-input>
</p> </p>
</div> </div>
</td> </td>
<td> <td>
<div class="w80"> <div class="w80">
<p class="pHouseStyle" v-for="(o,index) in item.OrderDetailsList" @input="calculationPrice(item)"> <p class="pHouseStyle" v-for="(o,index) in item.OrderDetailsList" @input="calculationPrice(item)">
<el-input class='w50' @keyup.native="checkInteger(o,'HotelDiscount')" v-model='o.HotelDiscount'></el-input> <el-input class='w50' @keyup.native="checkInteger(o,'HotelDiscount')" v-model='o.HotelDiscount'>
</el-input>
</p> </p>
</div> </div>
</td> </td>
...@@ -121,7 +143,8 @@ ...@@ -121,7 +143,8 @@
</div> </div>
</td> </td>
<td> <!--返佣--> <td>
<!--返佣-->
<div class="w80"> <div class="w80">
<p class="pHouseStyle link" v-for="(o,index) in item.OrderDetailsList" @input="calculationPrice(item)"> <p class="pHouseStyle link" v-for="(o,index) in item.OrderDetailsList" @input="calculationPrice(item)">
<span class="spanlink" v-if='o.IsRebateRatio==0' @click="goUrl('HotelInfo',o,'酒店管理')">设置</span> <span class="spanlink" v-if='o.IsRebateRatio==0' @click="goUrl('HotelInfo',o,'酒店管理')">设置</span>
...@@ -134,17 +157,23 @@ ...@@ -134,17 +157,23 @@
{{item.TotalPrice}} {{item.TotalPrice}}
</div> </div>
</td> </td>
<td><div class="w120"> <td>
<div class="w120">
<el-select class='w100 sel' v-model='item.PayStyle' :placeholder="$t('pub.pleaseSel')"> <el-select class='w100 sel' v-model='item.PayStyle' :placeholder="$t('pub.pleaseSel')">
<el-option label='请选择' value='0' ></el-option> <el-option label='请选择' value='0'></el-option>
<el-option label='现付' value='1' ></el-option> <el-option label='现付' value='1'></el-option>
<el-option label='签单' value='2' ></el-option> <el-option label='签单' value='2'></el-option>
<el-option label='实物抵扣' value='5' ></el-option> <el-option label='实物抵扣' value='5'></el-option>
<el-option label='预付' value='4' ></el-option> <el-option label='预付' value='4'></el-option>
</el-select> </el-select>
</div></td> </div>
<td><div class="w120">{{item.Tel}}</div></td> </td>
<td><div class="w200 padding10">{{item.Address}}</div></td> <td>
<div class="w120">{{item.Tel}}</div>
</td>
<td>
<div class="w200 padding10">{{item.Address}}</div>
</td>
<td> <td>
<div class="w150"> <div class="w150">
<el-input class='w120' v-model='item.ReserveNo'></el-input> <el-input class='w120' v-model='item.ReserveNo'></el-input>
...@@ -156,7 +185,7 @@ ...@@ -156,7 +185,7 @@
</div> </div>
</td> </td>
<td> <td>
<input type="button" class="roomBtn" value="保存" @click="SaveSingle(item)"/> <input type="button" class="roomBtn" value="保存" @click="SaveSingle(item)" />
</td> </td>
</tr> </tr>
</table> </table>
...@@ -165,28 +194,32 @@ ...@@ -165,28 +194,32 @@
</template> </template>
<script> <script>
export default { export default {
data () { data() {
return { return {
defaultSelectValue:0, defaultSelectValue: 0,
list:[], list: [],
roomList:[], roomList: [],
TCNUM:'', TCNUM: '',
flightTotal:0, flightTotal: 0,
GuestNum:0, GuestNum: 0,
hotelList:[], hotelList: [],
//创建人头像 //创建人头像
CreateByPhoto:'', CreateByPhoto: '',
//创建人联系电话 //创建人联系电话
CreateByAccount:'', CreateByAccount: '',
//创建人姓名 //创建人姓名
CreateByName:'', CreateByName: '',
} }
}, },
methods: { methods: {
//联系op //联系op
openChart(){ openChart() {
this.MsgBus.$emit('openChat',{account:this.CreateByAccount,alias:this.CreateByName,avatar:this.CreateByPhoto}) this.MsgBus.$emit('openChat', {
account: this.CreateByAccount,
alias: this.CreateByName,
avatar: this.CreateByPhoto
})
}, },
goUrl(path, obj, name) { goUrl(path, obj, name) {
this.$router.push({ this.$router.push({
...@@ -198,144 +231,206 @@ export default { ...@@ -198,144 +231,206 @@ export default {
} }
}); });
}, },
goUrlR(path,obj,title){ goUrlR(path, obj, title) {
this.$router.push({ name:path,query:{"ID":obj,blank:'y',tab:title}}) this.$router.push({
name: path,
query: {
"ID": obj,
blank: 'y',
tab: title
}
})
}, },
goUrlT(path,obj,title){ goUrlT(path, obj, title) {
this.$router.push({ name:path,query:{"id":obj,blank:'y',tab:title}}) this.$router.push({
name: path,
query: {
"id": obj,
blank: 'y',
tab: title
}
})
}, },
getList(){ getList() {
this.apipost('dmcstatistics_get_GetHotelStaticsDetail',{TCIDs:this.$route.query.id,NewCombinationNum:this.$route.query.NewCombinationNum},res=>{ this.apipost('dmcstatistics_get_GetHotelStaticsDetail', {
if(res.data.resultCode==1){ TCIDs: this.$route.query.id,
this.list=res.data.data.HotelList; NewCombinationNum: this.$route.query.NewCombinationNum
}, res => {
if (res.data.resultCode == 1) {
this.list = res.data.data.HotelList;
this.CreateBy = res.data.data.CreateBy; this.CreateBy = res.data.data.CreateBy;
this.CreateByPhoto = res.data.data.CreateByPhoto; this.CreateByPhoto = res.data.data.CreateByPhoto;
this.CreateByAccount = res.data.data.CreateByAccount; this.CreateByAccount = res.data.data.CreateByAccount;
this.list.forEach(item=>{ this.list.forEach(item => {
this.calculationPrice(item) this.calculationPrice(item)
item.hotelList.push({ item.hotelList.push({
Name:item.NewHotelName, Name: item.NewHotelName,
ID:item.NewHotelId ID: item.NewHotelId
}) })
item.PayStyle=item.PayStyle.toString() item.PayStyle = item.PayStyle.toString()
item.OrderDetailsList.forEach((x,index1)=>{ item.OrderDetailsList.forEach((x, index1) => {
if(x.HouseTypeCount<=0){ if (x.HouseTypeCount <= 0) {
x.HouseTypeCount = item.HouseStatistics.HouseTypeList[index1].HouseTypeCount.toString(); x.HouseTypeCount = item.HouseStatistics.HouseTypeList[index1].HouseTypeCount.toString();
}else{ } else {
x.HouseTypeCount =x.HouseTypeCount.toString(); x.HouseTypeCount = x.HouseTypeCount.toString();
} }
x.HouseTypeCount = x.HouseTypeCount.toString(); x.HouseTypeCount = x.HouseTypeCount.toString();
x.UnitPrice = x.UnitPrice.toString(); x.UnitPrice = x.UnitPrice.toString();
x.HotelDiscount = x.HotelDiscount.toString(); x.HotelDiscount = x.HotelDiscount.toString();
}) })
}) })
}else{ } else {
this.$message.error(res.data.message) this.$message.error(res.data.message)
} }
},err=>{}) }, err => {})
}, },
calculationPrice(obj){ calculationPrice(obj) {
let totalPrice=0 let totalPrice = 0
obj.OrderDetailsList.forEach(item=>{ obj.OrderDetailsList.forEach(item => {
totalPrice+=item.UnitPrice*(item.HouseGuestNum-item.HotelDiscount)*(1-item.RebateRatio/100) totalPrice += item.UnitPrice * (item.HouseGuestNum - item.HotelDiscount) * (1 - item.RebateRatio / 100)
}) })
obj.TotalPrice=totalPrice.toFixed(2) obj.TotalPrice = totalPrice.toFixed(2)
this.$forceUpdate() this.$forceUpdate()
}, },
getHotelList(obj){ getHotelList(obj) {
this.apipost('hotel_post_GetLineHotelList',{IsGetPic: 0,IsGetRemark: 0,QCity:obj.QCity},res=>{ this.apipost('hotel_post_GetLineHotelList', {
if(res.data.resultCode==1){ IsGetPic: 0,
obj.hotelList=res.data.data IsGetRemark: 0,
}else{ QCity: obj.QCity
}, res => {
if (res.data.resultCode == 1) {
obj.hotelList = res.data.data
} else {
this.$message.error(res.data.message) this.$message.error(res.data.message)
} }
},err=>{}) }, err => {})
}, },
sendValue(obj){ sendValue(obj) {
if(obj.hotelList.length>0) if (obj.hotelList.length > 0) {
{ let ckedObj = obj.hotelList.find(item => item.ID == obj.NewHotelId)
let ckedObj=obj.hotelList.find(item=>item.ID==obj.NewHotelId) obj.Address = ckedObj.Address
obj.Address=ckedObj.Address obj.Tel = ckedObj.Tel
obj.Tel=ckedObj.Tel obj.NewHotelName = ckedObj.Name
obj.NewHotelName=ckedObj.Name } else {
}else{ obj.Address = ''
obj.Address='' obj.Tel = ''
obj.Tel=''
} }
}, },
saveList(type){ saveList(type) {
if(type==0){ if (type == 0) {
this.list.forEach(item=>{ this.list.forEach(item => {
item.HotelOrderState=0 item.HotelOrderState = 0
}) })
} }
if(type==1){ if (type == 1) {
this.list.forEach(item=>{ this.list.forEach(item => {
item.HotelOrderState=1 item.HotelOrderState = 1
}) })
} }
this.list.forEach(x=>{ this.list.forEach(x => {
x.OrderDetailsList.forEach(y=>{ x.OrderDetailsList.forEach(y => {
y.HouseTypeCount = parseInt(y.HouseTypeCount); y.HouseTypeCount = parseInt(y.HouseTypeCount);
y.UnitPrice = parseInt(y.UnitPrice); y.UnitPrice = parseInt(y.UnitPrice);
y.HotelDiscount = parseInt(y.HotelDiscount); y.HotelDiscount = parseInt(y.HotelDiscount);
}) })
}) })
this.apipost('dmcstatistics_get_SetHotelOrder',this.list,res=>{ this.apipost('dmcstatistics_get_SetHotelOrder', this.list, res => {
if(res.data.resultCode==1){ if (res.data.resultCode == 1) {
this.Success(res.data.message) this.Success(res.data.message)
}else{ } else {
this.Error(res.data.message) this.Error(res.data.message)
} }
},err=>{}) }, err => {})
}, },
//单条保存 //单条保存
SaveSingle(item){ SaveSingle(item) {
item.HotelOrderState=1; item.HotelOrderState = 1;
this.apipost('dmcstatistics_post_SetNewHotelOrder',item,res=>{ this.apipost('dmcstatistics_post_SetNewHotelOrder', item, res => {
if(res.data.resultCode==1){ if (res.data.resultCode == 1) {
this.Success(res.data.message) this.Success(res.data.message)
}else{ } else {
this.Error(res.data.message) this.Error(res.data.message)
} }
},err=>{}) }, err => {})
} }
},
created() {
}, },
mounted() { mounted() {
this.TCNUM=this.$route.query.TCNUM; this.TCNUM = this.$route.query.TCNUM;
this.flightTotal=this.$route.query.flightTotal; this.flightTotal = this.$route.query.flightTotal;
this.GuestNum=this.$route.query.GuestNum; this.GuestNum = this.$route.query.GuestNum;
this.NewCombinationNum=this.$route.query.NewCombinationNum; this.NewCombinationNum = this.$route.query.NewCombinationNum;
this.getList() this.getList()
// this.getHotelList()
}, },
} }
</script> </script>
<style> <style>
.roomReservationsDetailsTalbe .roomBtn{ .roomReservationsDetailsTalbe .roomBtn {
color: #fff; color: #fff;
padding: 0 10px!important; padding: 0 10px !important;
height: 30px!important; height: 30px !important;
background: #E95252; background: #E95252;
border: 1px solid #E95252; border: 1px solid #E95252;
cursor: pointer; cursor: pointer;
border-radius: 15px; border-radius: 15px;
margin:0 10px; margin: 0 10px;
} }
.roomReservationsDetailsTalbe{ background: #ddd;}
.roomReservationsDetailsTalbe tr th{background: #eee;height:40px; font-size: 12px; color: #333;} .roomReservationsDetailsTalbe {
.roomReservationsDetailsTalbe tr{background: #fff;text-align: center; height: 40px;} background: #ddd;
.roomReservationsDetailsTalbe tr td{font-size: 12px;} }
.roomReservationsDetailsTalbe tr td .pHouseStyle{border-bottom: 1px solid #ccc; height:28px; line-height: 28px;}
.roomReservationsDetailsTalbe tr td .colorRed{color: #E95252;} .roomReservationsDetailsTalbe tr th {
.roomReservationsDetailsTalbe tr td .pHouseStyle:last-child{border-bottom: none;} background: #eee;
.roomReservationsDetailsTalbe tr td input{height: 20px!important; padding: 0!important; text-align: center;} height: 40px;
.roomReservationsDetailsTalbe tr td .sel input{height: 34px!important; padding-right: 20px!important; padding-left: 5px!important; font-size: 12px!important;} font-size: 12px;
.roomReservationsDetailsTalbe tr td .link:hover{text-decoration: underline; cursor: pointer;} color: #333;
.roomReservationsDetailsTalbe .Hotel_red{color:red;} }
.roomReservationsDetailsTalbe tr {
background: #fff;
text-align: center;
height: 40px;
}
.roomReservationsDetailsTalbe tr td {
font-size: 12px;
}
.roomReservationsDetailsTalbe tr td .pHouseStyle {
border-bottom: 1px solid #ccc;
height: 28px;
line-height: 28px;
}
.roomReservationsDetailsTalbe tr td .colorRed {
color: #E95252;
}
.roomReservationsDetailsTalbe tr td .pHouseStyle:last-child {
border-bottom: none;
}
.roomReservationsDetailsTalbe tr td input {
height: 20px !important;
padding: 0 !important;
text-align: center;
}
.roomReservationsDetailsTalbe tr td .sel input {
height: 34px !important;
padding-right: 20px !important;
padding-left: 5px !important;
font-size: 12px !important;
}
.roomReservationsDetailsTalbe tr td .link:hover {
text-decoration: underline;
cursor: pointer;
}
.roomReservationsDetailsTalbe .Hotel_red {
color: red;
}
</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