Commit d76a0df4 authored by 黄奎's avatar 黄奎

酒店工作表新增导出和下载

parent c4f00c56
<style> <style>
.HotelWorkList .has-gutter tr th, .el-table th.is-leaf{ .HotelWorkList .has-gutter tr th,
background-color: #EAEAEA!important; .el-table th.is-leaf {
background-color: #EAEAEA !important;
} }
.HotelWorkList .HW_hotelDialog{
width:900px; .HotelWorkList .HW_hotelDialog {
width: 900px;
} }
.HotelWorkList .Hw_tableOne{
width:100%; .HotelWorkList .Hw_tableOne {
height:40px; width: 100%;
background-color:#EAEAEA; height: 40px;
background-color: #EAEAEA;
} }
.HotelWorkList .Hw_tableOne th{
.HotelWorkList .Hw_tableOne th {
text-align: center; text-align: center;
} }
</style> </style>
<template> <template>
<div class="HotelWorkList"> <div class="HotelWorkList">
<div class="query-box" style="border-bottom: none;"> <div class="query-box" style="border-bottom: none;">
<ul> <ul>
<li>
<span>
<em>{{$t('system.quety_area')}}</em>
<el-select v-model="msg.Province" filterable @change="getProvinceList(msg.Province,2)"
:placeholder="$t('hotel.hotel_province')">
<el-option :key="0" :value="0" label="请选择"></el-option>
<el-option v-for="item in provinceList" :key="item.ID" :label="item.Name" :value="item.ID"></el-option>
</el-select>
<el-select v-model="msg.City" filterable :placeholder="$t('hotel.hotel_city')" >
<el-option :key="0" :value="0" label="请选择"></el-option>
<el-option v-for="item in cityList" :key="item.ID" :label="item.Name" :value="item.ID"></el-option>
</el-select>
</span>
</li>
<li style="display:none;">
<span><em>{{$t('admin.admin_company')}}</em>
<el-select filterable v-model='msg.OutBranchId' :placeholder="$t('pub.unlimitedSel')">
<el-option :label="$t('pub.unlimitedSel')" :value='-1'></el-option>
<el-option v-for='item in companyList' :label='item.BName' :value='item.Id' :key="item.Id">
</el-option>
</el-select>
</span>
</li>
<li>
<span>
<em>星级</em>
<el-select v-model="msg.Star" :placeholder="$t('pub.pleaseSel')">
<el-option :label="$t('pub.unlimitedSel')" :value='0'></el-option>
<el-option label="3星或商务" :value='3'></el-option>
<el-option label="4星" :value='4'></el-option>
<el-option label="5星" :value='5'></el-option>
</el-select>
</span>
</li>
<li>
<span>
<em>价格区间</em>
<el-select v-model="msg.PriceLevel" :placeholder="$t('pub.pleaseSel')">
<el-option :label="$t('pub.unlimitedSel')" :value='0'></el-option>
<el-option label="5000以下" :value='1'></el-option>
<el-option label="5000~6000" :value='2'></el-option>
<el-option label="6000~7000" :value='3'></el-option>
<el-option label="7000~8000" :value='4'></el-option>
<el-option label="8000~9000" :value='5'></el-option>
<el-option label="9000~10000" :value='6'></el-option>
<el-option label="10000以上" :value='7'></el-option>
</el-select>
</span>
</li>
<li> <li>
<span> <span>
<em>时间</em> <em>时间</em>
...@@ -26,8 +80,29 @@ ...@@ -26,8 +80,29 @@
</el-date-picker> </el-date-picker>
</span> </span>
</li> </li>
<li>
<span>
<em>供应商</em>
<el-select v-model="msg.Supplier" placeholder="请选择">
<el-option :label="$t('pub.unlimitedSel')" :value='0'></el-option>
<el-option v-for="(item,index) in SupplierList" :key="index" :label="item.Name" :value="item.ID">
</el-option>
</el-select>
</span>
</li>
<li>
<span>
<em>酒店</em>
<el-select v-model="msg.HotelChooseArray" :placeholder="$t('pub.pleaseSel')" class="multiple_input w300"
filterable multiple :multiple-limit="3">
<el-option v-for="item in HotelList" :key="item.ID" :label="item.Name" :value="item.ID"></el-option>
</el-select>
</span>
</li>
<li> <li>
<input type="button" class="normalBtn" value="查询" @click="getList()" /> <input type="button" class="normalBtn" value="查询" @click="getList()" />
<input type="button" class="normalBtn" value="下载" @click="DownLoadHotelWork()" />
</li> </li>
</ul> </ul>
</div> </div>
...@@ -58,22 +133,21 @@ ...@@ -58,22 +133,21 @@
<template v-for="(childItem,childIndex) in scope.row.DayList[index].HotelJourneyOrderList"> <template v-for="(childItem,childIndex) in scope.row.DayList[index].HotelJourneyOrderList">
<div :title="childItem.TCID+'【未操作】'" v-if="childItem.DMCState==0" slot="reference" class="w80" <div :title="childItem.TCID+'【未操作】'" v-if="childItem.DMCState==0" slot="reference" class="w80"
style="white-space:nowrap;color:red;cursor:pointer;text-decoration:underline;" style="white-space:nowrap;color:red;cursor:pointer;text-decoration:underline;"
@click="outerVisible=true,GetChangeHotelList(item.DateAllStr,scope.row.Hotel,childItem.TCID)"> @click="outerVisible=true,GetClickItem(item.DateAllStr,scope.row.Hotel,childItem.TCID)">
{{childItem.BookGroup}}</div> {{childItem.BookGroup}}</div>
<div :title="childItem.TCID+'【OK】'" v-if="childItem.DMCState==1" slot="reference" class="w80" <div :title="childItem.TCID+'【OK】'" v-if="childItem.DMCState==1" slot="reference" class="w80"
style="white-space:nowrap;color:green;cursor:pointer;text-decoration:underline;" style="white-space:nowrap;color:green;cursor:pointer;text-decoration:underline;"
@click="outerVisible=true,GetChangeHotelList(item.DateAllStr,scope.row.Hotel,childItem.TCID)"> @click="outerVisible=true,GetClickItem(item.DateAllStr,scope.row.Hotel,childItem.TCID)">
{{childItem.BookGroup}} </div> {{childItem.BookGroup}} </div>
<div :title="childItem.TCID+'【暂定】'" v-if="childItem.DMCState==2" slot="reference" class="w80" <div :title="childItem.TCID+'【暂定】'" v-if="childItem.DMCState==2" slot="reference" class="w80"
style="white-space:nowrap;color:#3333CC;;cursor:pointer;text-decoration:underline;" style="white-space:nowrap;color:#3333CC;;cursor:pointer;text-decoration:underline;"
@click="outerVisible=true,GetChangeHotelList(item.DateAllStr,scope.row.Hotel,childItem.TCID)"> @click="outerVisible=true,GetClickItem(item.DateAllStr,scope.row.Hotel,childItem.TCID)">
{{childItem.BookGroup}}</div> {{childItem.BookGroup}}</div>
</template> </template>
</template> </template>
<template v-else> <template v-else>
<div slot="reference" class="w80" style="cursor:pointer;text-decoration:underline;" <div slot="reference" class="w80" style="cursor:pointer;text-decoration:underline;"
@click="outerVisible=true,GetChangeHotelList(item.DateAllStr,scope.row.Hotel,0)">设置酒店 @click="outerVisible=true,GetClickItem(item.DateAllStr,scope.row.Hotel,0)">设置酒店
</div> </div>
</template> </template>
</template> </template>
...@@ -85,34 +159,39 @@ ...@@ -85,34 +159,39 @@
<p>{{$t("active.ld_noData")}}</p> <p>{{$t("active.ld_noData")}}</p>
</div> </div>
</template> </template>
<el-dialog custom-class='HW_hotelDialog' :title="'【'+CurrentDateStr+'】团期酒店信息列表'" :visible.sync="outerVisible" center> <el-dialog custom-class='HW_hotelDialog' :title="'【'+qMsg.DateStr+'】团期酒店信息列表'" :visible.sync="outerVisible" center>
<table class="Hw_tableOne"> <div>
<tr> 团号/地接团号:&nbsp;&nbsp;&nbsp;<el-input type="text" v-model="qMsg.TCNUM" maxlength="50" class="w200"></el-input>
<th width="60"> <input type="button" class="normalBtn" value="查询" @click="GetChangeHotelList()" />
选择 </div>
</th> <table class="Hw_tableOne" style="margin-top:20px;">
<th width="145"> <tr>
团号 <th width="60">
</th> 选择
<th width="150"> </th>
地接团号 <th width="145">
</th> 团号
<th width="125"> </th>
酒店 <th width="150">
</th> 地接团号
<th width="125"> </th>
更换酒店 <th width="125">
</th> 酒店
<th width="80"> </th>
OP状态 <th width="125">
</th> 更换酒店
<th width="90"> </th>
地接状态 <th width="80">
</th> OP状态
</tr> </th>
<th width="90">
地接状态
</th>
</tr>
</table> </table>
<div style="height:450px;overflow:auto;"> <div style="height:400px;overflow:auto;border-bottom:1px solid #d1d1d1;border-left:1px solid #d1d1d1;"
<table v-loading="changeLoading" style="width:100%;"> v-loading="changeLoading">
<table style="width:100%;">
<tr v-for="(hItem,hIndex) in MyDataList"> <tr v-for="(hItem,hIndex) in MyDataList">
<td style="text-align:center;" width="60"> <td style="text-align:center;" width="60">
<el-checkbox :checked="hItem.IsChecked" @change="ChangeStatus(hItem)"></el-checkbox> <el-checkbox :checked="hItem.IsChecked" @change="ChangeStatus(hItem)"></el-checkbox>
...@@ -149,19 +228,11 @@ ...@@ -149,19 +228,11 @@
</template> </template>
</td> </td>
</tr> </tr>
<!-- <tfoot>
<tr>
<td colspan="7" style="text-align:center;">
<input type="button" class="normalBtn" value="保存" @click="SaveHotelOrder()" />
<input type="button" class="normalBtn" value="关闭" @click="CloseHotel()" />
</td>
</tr>
</tfoot> -->
</table> </table>
</div> </div>
<div style="text-align:center;margin-top:20px;"> <div style="text-align:center;margin-top:20px;">
<input type="button" class="normalBtn" value="保存" @click="SaveHotelOrder()" /> <input type="button" class="normalBtn" value="保存" @click="SaveHotelOrder()" />
<input type="button" class="normalBtn" value="关闭" @click="CloseHotel()" /> <input type="button" class="normalBtn" value="关闭" @click="CloseHotel()" />
</div> </div>
</el-dialog> </el-dialog>
</div> </div>
...@@ -175,16 +246,41 @@ ...@@ -175,16 +246,41 @@
msg: { msg: {
YearMonthStr: "", YearMonthStr: "",
CountryId: 651, //只查询日本 CountryId: 651, //只查询日本
//酒店选择数组
HotelChooseArray: [],
Province: 0,//省份编号
City: 0, //城市编号
OutBranchId: -1, //出团公司编号
//星级
Star: 0,
//价格等级
PriceLevel: 0,
//供应商
Supplier: 0,
}, },
qMsg: {
DateStr: "",
HotelId: 0,
TCID: 0,
TCNUM: "", //团号
}, //团查询条件
defaultSelectValue: 0, defaultSelectValue: 0,
HotelId: 0,
dataList: [], dataList: [],
loading: false, loading: false,
isShow: false, isShow: false,
changeLoading: false, //改变酒店loading changeLoading: false, //改变酒店loading
MyDataList: [], //获取可变更的酒店列表 MyDataList: [], //获取可变更的酒店列表
outerVisible: false, outerVisible: false,
CurrentDateStr:"",//选中的日期 //省份列表
provinceList: [],
//城市列表
cityList: [],
//供应商列表
SupplierList: [],
//公司列表
companyList: [],
//酒店列表
HotelList: [],
}; };
}, },
components: { components: {
...@@ -204,34 +300,36 @@ ...@@ -204,34 +300,36 @@
ChangeStatus(item) { ChangeStatus(item) {
item.IsChecked = !item.IsChecked; item.IsChecked = !item.IsChecked;
}, },
CloseHotel() CloseHotel() {
{ this.outerVisible = false;
this.outerVisible=false; this.MyDataList = [];
this.HotelId=0; this.qMsg.DateStr = "";
this.MyDataList=[]; this.qMsg.HotelId = 0;
this.CurrentDateStr=''; this.qMsg.TCID = 0;
this.qMsg.TCNUM = "";
},
GetClickItem(DateStr, HotelId, TCID) {
this.qMsg.DateStr = DateStr;
this.qMsg.HotelId = HotelId;
this.qMsg.TCID = TCID;
this.GetChangeHotelList();
}, },
//获取可以改变的酒店列表 //获取可以改变的酒店列表
GetChangeHotelList(DateStr, HotelId,TCID) { GetChangeHotelList() {
this.CurrentDateStr=DateStr;
this.changeLoading = true; this.changeLoading = true;
this.HotelId=HotelId;
this.MyDataList = []; this.MyDataList = [];
var that = this; var that = this;
this.apipost("journeyorder_post_GetCanChangeHotelListService", { this.apipost("journeyorder_post_GetCanChangeHotelListService", this.qMsg,
UseTime: DateStr
},
res => { res => {
that.changeLoading = false; that.changeLoading = false;
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
var nArray = res.data.data; var nArray = res.data.data;
nArray.forEach(item => { nArray.forEach(item => {
if (item.TCID == TCID) { if (item.TCID == this.qMsg.TCID) {
item.IsChecked = true; item.IsChecked = true;
} }
}); });
that.MyDataList = nArray; that.MyDataList = nArray;
console.log(that.MyDataList,'MydataList');
} else { } else {
that.Error(res.data.message); that.Error(res.data.message);
} }
...@@ -291,9 +389,88 @@ ...@@ -291,9 +389,88 @@
err => {} err => {}
); );
}, },
getProvinceList(ID, type) {
//根据省份获取城市
let msg = {
Id: ID
};
if (type == 1) {
this.msg.Province = 0;
this.msg.City = 0;
this.provinceList = [];
this.cityList = [];
} else if (type == 2) {
this.msg.City = 0;
this.cityList = [];
}
this.apipost(
"dict_post_Destination_GetChildList",
msg,
res => {
if (type == 1) {
this.provinceList = res.data.data;
} else if (type == 2) {
this.cityList = res.data.data;
}
},
err => {}
);
},
// 获取供应商
initSupplier() {
this.apipost("supplier_post_GetAllList", {
Type: 1
}, res => {
if (res.data.resultCode === 1) {
this.SupplierList = res.data.data;
}
}, err => {});
},
getBranchList() {
this.apipost('admin_get_BranchGetList', {
RB_Group_Id: '2',
Status: 0,
}, res => {
if (res.data.resultCode == 1) {
this.companyList = res.data.data;
}
}, err => {})
},
//获取酒店列表
GetHotelList() {
this.apipost(
"hotel_post_GetHasStockHotelList", {
Country: 651,
IsMoreThanZero: 1
},
res => {
if (res.data.resultCode == 1) {
this.HotelList = res.data.data;
}
},
err => {}
);
},
//Excel下载
DownLoadHotelWork() {
this.loading = true;
let qMsg = {
queryMsg: this.msg,
uid: this.getLocalStorage().EmployeeId
};
let fileName = "酒店工作表" + this.$commonUtils.getCurrentDate() + ".xls";
this.GetLocalFile("hotel_get_downloadHotelWork", qMsg, fileName,
res => {
this.loading = false;
});
},
}, },
mounted() { mounted() {
this.GetHotelList();
this.msg.YearMonthStr = new Date().Format("yyyy-MM"); this.msg.YearMonthStr = new Date().Format("yyyy-MM");
this.getProvinceList(651, 1);
//this.getBranchList();
this.initSupplier();
this.getList(); this.getList();
}, },
}; };
......
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