<template> <div class="roomQuery"> <div class="query-box" style="border-bottom: none;"> <ul style="position:relative;"> <li> <span> <!-- 国家/目的地 --> <em>{{$t('objFill.v101.rgguojmdd')}}</em> <el-select v-model="msg.PlaceID" filterable :placeholder="$t('objFill.v101.ryxuanzjdmc')" @change="getLineTeamList()"> <el-option :label="$t('objFill.v101.rybxuan')" :value="0"></el-option> <el-option v-for="item in queryCommonData.PlaceList" :label="item.PlaceName" :value="item.PlaceID" :key="item.LtID"></el-option> </el-select> </span> </li> <li> <span> <!-- 系列 --> <em>{{$t('objFill.v101.ryxilie')}}</em> <el-select v-model="msg.LineteamId" filterable :placeholder="$t('objFill.v101.ryxuanzjdmc')"> <el-option :label="$t('objFill.v101.rybxuan')" :value='0'></el-option> <el-option v-for="item in queryCommonData.LineTeamList" :label='item.LtName' :value='item.LtID' :key='item.LtID'> </el-option> </el-select> </span> </li> <li> <span> <!-- 团号 --> <em>{{$t('objFill.v101.rytuanhao')}}</em> <el-input v-model='msg.TCNUM'></el-input> </span> </li> <li> <span> <!-- 酒店 --> <em>{{$t('objFill.v101.busManagement.jiudian')}}</em> <el-select v-model="msg.HotelId" :placeholder="$t('objFill.v101.ryxuanzjdmc')" filterable> <el-option :label="$t('objFill.v101.rybxuan')" :value='0'></el-option> <el-option v-for="item in HotelList" :key="item.ID" :label="item.Name" :value="item.ID"></el-option> </el-select> </span> </li> <li><span> <!-- 状态 --> <em>{{$t('objFill.v101.ryzhuant')</em> <el-select v-model='msg.PriceStatus'> <el-option :label="$t('objFill.v101.rybxuan')" :value="0"></el-option> <el-option v-for="team in $tripUtils.TeamStatesList.TeamStates" :label="team.Name" :key="team.Id" :value="team.Id" v-if="team.Id==1 || team.Id==3"></el-option> </el-select> </span> </li> <li> <span> <!-- 航公公司 --> <em>{{$t('objFill.v101.ryhankgsi')}}</em> <el-select v-model="msg.AirLineId" filterable :placeholder="$t('system.ph_buxian')"> <el-option :label="$t('objFill.v101.rybxuan')" :value="0"> </el-option> <el-option v-for="item in queryCommonData.AirlineList" :key="item.AirLineId" :label="item.AlName" :value="item.AirLineId"></el-option> </el-select> </span> </li> <li> <span> <em>OP</em> <el-select v-model="msg.CreateBy" filterable :placeholder="$t('pub.pleaseSel')"> <el-option :label="$t('objFill.v101.rybxuan')" :value="0"> </el-option> <el-option v-for="item in queryCommonData.EmployeeList" :label="item.EmName" :value="item.EmployeeId" :key="item.EmployeeId"></el-option> </el-select> </span> </li> <li> <span> <!-- 地接团号 --> <em>{{$t('objFill.v101.rydijtuanh')}}</em> <el-input v-model='msg.CombinationNum'></el-input> </span> </li> <li> <span> <!-- 公司 --> <em>{{$t('objFill.v101.rygonsi')}}</em> <el-select v-model="msg.OutBranchIds" filterable multiple class="multiple_input" :placeholder="$t('pub.pleaseSel')"> <el-option v-for="item in queryCommonData.BranchList" :label='item.BName' :value='item.Id' :key='item.Id'> </el-option> </el-select> </span> </li> <li> <span> <!-- 日期 --> <em>{{$t('objFill.v101.busManagement.rifu')}}</em> <el-date-picker v-model='msg.StartDate' class='w135' value-format="yyyy-MM-dd" type="date" :picker-options="pickerBeginDateBefore"></el-date-picker> - <el-date-picker v-model='msg.EndDate' class='w135' value-format="yyyy-MM-dd" type="date" :picker-options="pickerBeginDateAfter"></el-date-picker> </span> </li> <li style="position:absolute;right:10px;top:0;"> <!-- 查询 --> <input type="button" class="normalBtn" :value="$t('objFill.v101.rychax')" @click="getList();resetPageIndex()" /> <!-- 下载 --> <input type="button" class="normalBtn" :value="$t('objFill.v101.ryxiaza')" @click="DownLoadHotel()" /> </li> </ul> </div> <div style="width: 100%; overflow-x: auto;padding-bottom: 10px; " class="ownScrollbarStyle"> <div style="font-size:12px;padding:2px 4px 3px 20px;"> <!-- 每次导出数据最好不要超过一个月 --> <div style="display:inline-block;color:red">{{$t('objFill.v101.ryzyshixmcbcyyue')}}</div> <!-- 颜色说明 --> <div class="rq_comSpan" style="display:inline-block;">{{$t('objFill.v101.ryyansesm')}}: <!-- 未操作 --> <!-- 操作中 --> <!-- 操作完成 --> <span class="rq_span1">{{$t('objFill.v101.ryweicz')}}</span><span class="rq_span2">{{$t('objFill.v101.rychaozuz')}}</span><span class="rq_span3">{{$t('objFill.v101.rychaozwl')}}</span><span class="rq_span4">{{$t('objFill.v101.ryjiwhrsbxfu')}}</span> <!-- 机位和人数不相符 --> </div> </div><br /> <table border="0" cellspacing="1" cellpadding="0" class="roomQuery_SupplierTable" v-loading='loading'> <tr> <!-- 序号 --> <th width="100">{{$t('objFill.v101.ryxuhao')}}</th> <!-- 出发地 --> <th width="120">{{$t('objFill.v101.rychufdi')}}</th> <!-- 公司团号 --> <th width="100">{{$t('objFill.v101.rygongstuhao')}}</th> <!-- 团队状态 --> <th width="80">{{$t('objFill.v101.rytuandzhuant')}}</th> <!-- 系列 --> <th width="100">{{$t('objFill.v101.ryxilie')}}</th> <!-- 机位总数 --> <th width="120">{{$t('objFill.v101.ryjiwzongs')}}<br />(Y/E/F)</th> <!-- 时间 --> <th width="100">{{$t('objFill.v101.ryshijian')}}</th> <!-- 酒店 --> <th width="150">{{$t('objFill.v101.busManagement.jiudian')}}</th> <!-- 酒店使用情况 --> <th width="100">{{$t('objFill.v101.ryjiandsyqink')}}</th> <!-- 操作 --> <th width="100">{{$t('objFill.v101.rychaozuo')}}</th> </tr> <tr v-if="dataList.length==0"> <!-- 暂无数据 --> <td colspan="9">{{$t('objFill.v101.commissonBill.womenhmysj')}}</td> </tr> <template v-for="(item,index) in dataList"> <template v-for="(subItem,subIndex) in item.subList"> <tr v-for="(childItem,childIndex) in subItem.hotelList" :class="{roomQuerySplitTrCss:index%2!=0}"> <td v-if="childIndex==0&&subIndex==0" :rowspan="item.RowSpan"> {{item.NewCombinationNum}} </td> <td v-if="childIndex==0" :rowspan="subItem.hotelList.length"> {{subItem.StartCityNames}} </td> <td v-if="childIndex==0" :rowspan="subItem.hotelList.length"> {{subItem.TCNUMS}} </td> <td v-if="childIndex==0" :rowspan="subItem.SupplierRemarks!=''?subItem.hotelList.length+1:subItem.hotelList.length"> <span v-if="subItem.TCState==3&&subItem.Status==1">{{$t('pub.normalSel')}}</span> <span v-else>{{$t('pub.cancelBtn')}}</span> </td> <td v-if="childIndex==0" :rowspan="subItem.hotelList.length"> {{subItem.LineteamIdNames}} </td> <td v-if="childIndex==0" :rowspan="subItem.hotelList.length"> {{subItem.TotalSeat}}/{{subItem.RealityYSeatNum}}/{{subItem.RealityESeatNum}}/{{subItem.RealityFSeatNum}} </td> <td> {{childItem.CheckInDateStr}} </td> <td class="tdLeft"> <template v-if="childItem.SupplierId==UserInfo.SupplierId"> <template v-if="childItem.SupplierHotelStatus==0"> {{childItem.NewHotelName}}</template> <template v-else-if="childItem.SupplierHotelStatus==1"> <a style="color:#7abd53">{{childItem.NewHotelName}}</a></template> <template v-else-if="childItem.SupplierHotelStatus==2"> <a style="color:blue">{{childItem.NewHotelName}}</a> </template> ( <template v-if="subItem.TotalSeat/2!=childItem.SupplierBookNum"> <a style="font-weight:bold; color:red;" :title="$t('objFill.v101.zongjwhydjsbxf')"> {{childItem.SupplierBookNum}} </a> </template> <template v-else> <a style="font-weight:bold;"> {{childItem.SupplierBookNum}} </a> </template> {{$t('hotel.hotel_room')}})</template> <template v-else> {{$t('objFill.v101.ryzhutgszl')}} </template> </td> <td> <!--<span > <template v-if="childItem.SupplierId==UserInfo.SupplierId"> <template v-if="childItem.OPState==1">[OP选房-OK]</template> <template v-else-if="childItem.OPState==2&&childItem.DMCState==0">[OP-暂定]</template> <template v-else>{{childItem.DMCState==1?"[地接-OK]":(childItem.DMCState==0?"[地接-未操作]":"[地接-暂定]")}}</template> </template> </span> --> <template v-if="childItem.SupplierId==UserInfo.SupplierId"> <template v-if="childItem.SupplierHotelStatus==0">{{$t('objFill.weicaozuo')}}</template> <template v-else-if="childItem.SupplierHotelStatus==1"><a style="color:#7abd53">{{$t('objFill.v101.chaozuozhong')}}</a></template> <template v-else-if="childItem.SupplierHotelStatus==2"><a style="color:blue">{{$t('objFill.v101.chaozuowchen')}}</a></template> </template> </td> <td v-if="childIndex==0" :rowspan="subItem.SupplierRemarks!=''?subItem.hotelList.length+1:subItem.hotelList.length"> <el-tooltip class="item" effect="dark" :content="$t('objFill.v101.FinancialModule.chaozuoxx')" placement="top-start"> <el-popover placement="bottom" width="500" trigger="click"> <table> <tr> <th width="90"> {{$t('salesModule.Time')}} </th> <th width="160"> {{$t('hotel.hotel')}} </th> <th width="100"> {{$t('restaurant.res_Number')}} </th> <th width="100"> {{$t('admin.admin_status')}} </th> </tr> <tr v-for="opItem in CurrentHotelList"> <template v-if="opItem.SupplierId==UserInfo.SupplierId"> <td> {{opItem.CheckInDateStr}} </td> <td style="padding-right:10px;"> {{opItem.NewHotelName}} </td> <td> <el-input style="width:60px;" v-model='opItem.SupplierBookNum' type='text' :placeholder="$t('objFill.v101.yudinshulian')"> </el-input> {{$t('hotel.hotel_room')}} </td> <td> <el-select v-model="opItem.SupplierHotelStatus" filterable class="multiple_input" :placeholder="$t('pub.pleaseSel')"> <el-option :label="$t('objFill.weicaozuo')" :value='0' :key='0'> </el-option> <el-option :label="$t('objFill.v101.chaozuozhong')" :value='1' :key='1'> </el-option> <el-option :label="$t('objFill.v101.chaozuowchen')" :value='2' :key='2'> </el-option> </el-select> </td> </template> </tr> </table> <p class="alcenter mt10"> <!-- 保存 --> <input type="button" :value="$t('objFill.v101.rybaoc')" @click="SaveSupplierData(CurrentHotelList)" class="normalBtn" /> </p> <!-- 操作 --> <a style="text-decoration:underline;color:blue;cursor:pointer" slot="reference" @click="GetItemHotelData(subItem.hotelList)">{{$t('objFill.v101.rychaozuo')}}</a> </el-popover> </el-tooltip> <el-tooltip class="item" effect="dark" :content="$t('objFill.v101.rizhixinxi')"placement="top-start"> <el-popover placement="bottom" width="500" trigger="click"> <table border="0" cellspacing="1" cellpadding="0" class="queryLogTable" style=" border-collapse:collapse;"> <tr> <th width="100" style="background: #e6e6e6; height: 35px; font-size: 12px;color: #333;text-align:center;border:1px solid #d1d1d1;">{{$t('admin.admin_czPerson')}}</th> <th width="100" style="background: #e6e6e6; height: 35px; font-size: 12px;color: #333;text-align:center;border:1px solid #d1d1d1;">{{$t('sm.Date')}}</th> <th width="100" style="background: #e6e6e6; height: 35px; font-size: 12px;color: #333;text-align:center;border:1px solid #d1d1d1;">{{$t('hotel.table_operattime')}}</th> <th width="190" style="background: #e6e6e6; height: 35px; font-size: 12px;color: #333;text-align:center;border:1px solid #d1d1d1;">{{$t('objFill.neirong')}}</th> </tr> <template v-if="LogsList.length>0"> <tr v-for="(item,index) in LogsList"> <td style="height: 35px; font-size: 12px;text-align:center;border:1px solid #d1d1d1;">{{item.CreateByName}}</td> <td style="height: 35px; font-size: 12px;text-align:center;border:1px solid #d1d1d1;">{{item.UseTimeStr}}</td> <td style="height: 35px; font-size: 12px;text-align:center;border:1px solid #d1d1d1;"> {{item.CreateTimeStr}} </td> <td style="height: 35px; font-size: 12px;text-align:left;border:1px solid #d1d1d1;">{{item.Remarks}}</td> </tr> </template> <tr v-else> <td colspan="5">{{$t('system.content_noData')}}</td> </tr> </table> <el-pagination background @current-change="handleCurrentChange2" :current-page.sync="queryLogMsg.currentPage" :page-size="queryLogMsg.pageSize" layout="total,prev, pager, next, jumper" :total="queryLogMsg.total"> </el-pagination> <!-- 日志 --> <a style="text-decoration:underline;color:blue;cursor:pointer" slot="reference" @click="getLogsList(subItem.TCID)">{{$t('objFill.v101.ryrizhi')}}</a> </el-popover> </el-tooltip> <a style="text-decoration:underline;color:blue;cursor:pointer" @click="AddSupplierComplain(subItem.Complain_Extend.Id,subItem.Complain_Extend.TCID)"> <!-- 编辑投诉 --> <template v-if="subItem.Complain_Extend.Id>0">{{$t('objFill.v101.rybianjtshu')}}</template> <!-- 添加投诉 --> <template v-else>{{$t('objFill.v101.rytianjtshu')}}</template> </a> <a style="text-decoration:underline;color:red;cursor:pointer" v-if="subItem.Complain_Extend.Id>0" @click="DeleteSupplierComplain(subItem.Complain_Extend.Id)">{{$t('system.table_delete')}}</a> </td> </tr> <template v-if="subItem.SupplierRemarks"> <tr v-if="subIndex==0" :class="{roomQuerySplitTrCss:index%2!=0}"> <td colspan="9" class="redTip"> <p>{{$t('pub.pubRemark')}}:{{subItem.SupplierRemarks}}</p> </td> </tr> </template> </template> </template> </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> </div> </template> <script> export default { data() { return { loading: false, currentPage: 1, total: 0, msg: { pageIndex: 1, pageSize: 5, SelectType: 1, StartDate: '', EndDate: '', //酒店编号 HotelId: 0, //日期 DateStr: "", //出团公司 OutBranchIds: [], LineId: 14, PlaceID: 0, LineteamId: 0, //航空公司 AirLineId: 0, CreateBy: 0, TCNUM: '', PriceStatus: 0, CombinationNum: '' }, UserInfo: {}, //分公司类表 companyList: [], //酒店列表 HotelList: [], LineList: [], LineTeamList: [], thLengthTitle: [], dataList: [], //日志信息 LogsList: [], queryLogMsg: { pageIndex: 1, pageSize: 5, currentPage: 1, total: 0, HotelId: 0, TCID: 0 }, queryCommonData: { //公司数据 BranchList: [], //国家 PlaceList: [], LineList: [], LineTeamList: [], AirlineList: [], EmployeeList: [], }, //当前酒店列表 CurrentHotelList: [], pickerBeginDateBefore: { disabledDate: time => { if (this.msg.EndDate == null) { return false; } else { let endTime = new Date(this.msg.EndDate) return endTime.getTime() < time.getTime() } } }, pickerBeginDateAfter: { disabledDate: time => { let startTime = new Date(this.msg.StartDate) return startTime.getTime() >= time.getTime() } } } }, methods: { handleCurrentChange2(val) { this.queryLogMsg.pageIndex = val; this.getLogsList(); }, //获取日志 getLogsList(TCID) { if (TCID) { this.queryLogMsg.TCID = TCID; } this.ApiPost2('DmcInfoChangeLog_get_GetHotelLogList', this.queryLogMsg, res => { if (res.data.resultCode == 1) { this.LogsList = res.data.data.pageData; this.queryLogMsg.total = res.data.data.count; } }, err => {}) }, GetItemHotelData(hotelList) { this.CurrentHotelList = JSON.parse(JSON.stringify(hotelList)); }, //删除投诉 DeleteSupplierComplain(Id) { if (Id > 0) { var that = this; this.Confirm(that.$t('objFill.v101.shifouxtsxxschu'), function () { var msg = { Id: Id }; that.ApiPost2("supplierComplain_Post_RemoveSupplierComplain", msg, res => { if (res.data.resultCode == 1) { that.Success(this.$t('tips.shanchuchenggong')); that.getList(); } else { that.Error(res.data.data); } }, null); }); } }, getLineList() { this.ApiPost2("line_post_GetAllList", {}, res => { if (res.data.resultCode == 1) { this.LineList = res.data.data; } }); }, //获取系列列表 getLineTeamList(lineId) { this.LineTeamList = []; this.ApiPost2( "team_post_GetList", { lineID: 14, isTOOP: 1 }, res => { if (res.data.resultCode == 1) { this.msg.LineteamId = "-1"; this.LineTeamList = res.data.data; } } ); }, AddSupplierComplain(id, tcid) { this.$router.push({ name: 'AddSupplierComplaints', query: { Id: id, TCID: tcid, blank: 'y', tab: '供应商投诉' } }) }, 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 } }) }, goUrl(path, obj, outItem, title) { this.$router.push({ name: path, query: { "id": obj.TCIDS, 'TCNUM': obj.TCNUMS, 'flightTotal': obj.TotalSeat, 'GuestNum': obj.CommonReport.HouseStatistics.RealityNum, 'NewCombinationNum': outItem.NewCombinationNum, blank: 'y', tab: title } }) }, handleCurrentChange(val) { this.msg.pageIndex = val; this.getList(); }, resetPageIndex() { this.msg.pageIndex = 1; this.currentPage = 1; }, getList() { this.loading = true; this.ApiPost2('dmcstatistics_post_GetUniteCombinationNumService_Supplier', this.msg, res => { this.loading = false; if (res.data.resultCode == 1) { this.total = res.data.data.count; this.dataList = res.data.data.pageData; } else { this.$message.error(res.data.message) } }, err => {}) }, //获取酒店列表 GetHotelList() { this.ApiPost2( "hotel_post_GetHasStockHotelList_Supplier", { Country: 651, IsMoreThanZero: 1 }, res => { if (res.data.resultCode == 1) { this.HotelList = res.data.data; } }, err => {} ); }, //保存酒店新 SaveSupplierData(hotelList) { this.ApiPost2( "dmcstatistics_post_SetNewHotelOrder_Supplier", hotelList, res => { if (res.data.resultCode == 1) { this.Success(this.$t('tips.czchenggong')); this.getList(); } else { this.Error(this.$t('objFill.chaozuosib')+'!'); } }, err => {} ); }, //下载Excel DownLoadHotel() { this.loading = true; let qMsg = { queryMsg: this.msg, uid: this.UserInfo.SupplierAccountId, OPType: 1 }; let fileName = this.$t('ground.dingfangcx') + this.$commonUtils.getCurrentDate() + ".xls"; this.GetLocalFile("hotel_get_downloadHotel", qMsg, fileName, res => { this.loading = false; }); }, //获取目的地列表 getLinePlaceList() { this.msg.PlaceID = 0; this.msg.LineteamId = 0; let msg = { lineID: this.msg.LineId, } this.ApiPost2('team_post_GetLinePlace', msg, res => { if (res.data.resultCode == 1) { this.queryCommonData.PlaceList = res.data.data this.queryCommonData.LineTeamList = [] } }) }, //获取系列列表 getLineTeamList() { this.msg.LineteamId = 0 let msg = { lineID: this.msg.LineId, placeID: this.msg.PlaceID, isTOOP: 1 } this.ApiPost2('team_post_GetList', msg, res => { if (res.data.resultCode == 1) { this.queryCommonData.LineTeamList = res.data.data } }) }, //获取航空公司 getAirlineList() { this.ApiPost2( 'airline_post_GetList', {}, res => { if (res.data.resultCode == 1) { this.queryCommonData.AirlineList = res.data.data } }, err => {} ) }, //根据当前员工所在部门获取该部门及子部门员工信息 getEmployeeList() { let userInfo = this.getLocalStorage() let msg = { GroupId: userInfo.RB_Group_id, BranchId: '-1', DepartmentId: '-1', PostId: '-1', IsLeave: '0' } this.ApiPost2( 'admin_get_EmployeeGetList', {}, res => { if (res.data.resultCode == 1) { this.queryCommonData.EmployeeList = res.data.data } }, err => {} ) }, //初始化公司 getCompanyList() { let userInfo = this.getLocalStorage() var RB_Group_id = userInfo.RB_Group_id let msg = { Status: 0, is_show: 0, RB_Group_Id: RB_Group_id } this.ApiPost2( 'admin_get_BranchGetList', msg, res => { if (res.data.resultCode == 1) { this.queryCommonData.BranchList = res.data.data; } }, err => {} ) }, }, mounted() { this.UserInfo = this.getLocalStorageSupplier(); let myDate = new Date(); let nowDate = myDate.getFullYear() + "-" + parseInt(myDate.getMonth() + 1) + "-" + myDate.getDate(); if (this.$route.query.hotelId) { this.msg.HotelId = this.$route.query.hotelId; } if (this.$route.query.dateStr) { this.msg.DateStr = this.$route.query.dateStr; } if (this.$route.query.hotelId || this.$route.query.dateStr) { this.msg.StartDate = ""; } else { this.msg.StartDate = nowDate; } this.getLinePlaceList(); this.getAirlineList(); this.getEmployeeList(); this.getCompanyList(); this.GetHotelList(); this.getList(); }, } </script> <style> .roomQuerySplitTrCss td { background: #eee !important; } .roomQuery_SupplierTable { width: 98%; font-size: 12px; color: #333; margin: auto; border-collapse: collapse; background-color: #fff; border: 1px solid #d1d1d1; } .roomQuery_SupplierTable tr th { background: #E6E6E6; height: 40px; font-size: 12px; color: #333; } .roomQuery_SupplierTable tr td { border: 1px solid #d1d1d1; text-align: center; padding: 5px 0; } .roomQuery_SupplierTable .tdLeft { text-align: left; padding-left: 5px; } .roomQuery_SupplierTable .redTip { text-align: left; color: red; padding-left: 5px; } .roomQuery .rq_comSpan { font-size: 14px; margin-left: 20px; } .roomQuery .rq_comSpan>span { display: inline-block; padding: 2px 4px; color: #fff; border-radius: 5px; margin-right: 10px; } .roomQuery .rq_span1 { background-color: #333; } .roomQuery .rq_span2 { background-color: #7abd53; } .roomQuery .rq_span3 { background-color: blue; } .roomQuery .rq_span4 { background-color: red; } </style>