Commit d76a0df4 authored by 黄奎's avatar 黄奎

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

parent c4f00c56
<style>
.HotelWorkList .has-gutter tr th, .el-table th.is-leaf{
background-color: #EAEAEA!important;
.HotelWorkList .has-gutter tr th,
.el-table th.is-leaf {
background-color: #EAEAEA !important;
}
.HotelWorkList .HW_hotelDialog{
width:900px;
.HotelWorkList .HW_hotelDialog {
width: 900px;
}
.HotelWorkList .Hw_tableOne{
width:100%;
height:40px;
background-color:#EAEAEA;
.HotelWorkList .Hw_tableOne {
width: 100%;
height: 40px;
background-color: #EAEAEA;
}
.HotelWorkList .Hw_tableOne th{
.HotelWorkList .Hw_tableOne th {
text-align: center;
}
</style>
<template>
<div class="HotelWorkList">
<div class="query-box" style="border-bottom: none;">
<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>
<span>
<em>时间</em>
......@@ -26,8 +80,29 @@
</el-date-picker>
</span>
</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>
<input type="button" class="normalBtn" value="查询" @click="getList()" />
<input type="button" class="normalBtn" value="下载" @click="DownLoadHotelWork()" />
</li>
</ul>
</div>
......@@ -58,22 +133,21 @@
<template v-for="(childItem,childIndex) in scope.row.DayList[index].HotelJourneyOrderList">
<div :title="childItem.TCID+'【未操作】'" v-if="childItem.DMCState==0" slot="reference" class="w80"
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>
<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;"
@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>
<div :title="childItem.TCID+'【暂定】'" v-if="childItem.DMCState==2" slot="reference" class="w80"
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>
</template>
</template>
<template v-else>
<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>
</template>
</template>
......@@ -85,34 +159,39 @@
<p>{{$t("active.ld_noData")}}</p>
</div>
</template>
<el-dialog custom-class='HW_hotelDialog' :title="'【'+CurrentDateStr+'】团期酒店信息列表'" :visible.sync="outerVisible" center>
<table class="Hw_tableOne">
<tr>
<th width="60">
选择
</th>
<th width="145">
团号
</th>
<th width="150">
地接团号
</th>
<th width="125">
酒店
</th>
<th width="125">
更换酒店
</th>
<th width="80">
OP状态
</th>
<th width="90">
地接状态
</th>
</tr>
<el-dialog custom-class='HW_hotelDialog' :title="'【'+qMsg.DateStr+'】团期酒店信息列表'" :visible.sync="outerVisible" center>
<div>
团号/地接团号:&nbsp;&nbsp;&nbsp;<el-input type="text" v-model="qMsg.TCNUM" maxlength="50" class="w200"></el-input>
<input type="button" class="normalBtn" value="查询" @click="GetChangeHotelList()" />
</div>
<table class="Hw_tableOne" style="margin-top:20px;">
<tr>
<th width="60">
选择
</th>
<th width="145">
团号
</th>
<th width="150">
地接团号
</th>
<th width="125">
酒店
</th>
<th width="125">
更换酒店
</th>
<th width="80">
OP状态
</th>
<th width="90">
地接状态
</th>
</tr>
</table>
<div style="height:450px;overflow:auto;">
<table v-loading="changeLoading" style="width:100%;">
<div style="height:400px;overflow:auto;border-bottom:1px solid #d1d1d1;border-left:1px solid #d1d1d1;"
v-loading="changeLoading">
<table style="width:100%;">
<tr v-for="(hItem,hIndex) in MyDataList">
<td style="text-align:center;" width="60">
<el-checkbox :checked="hItem.IsChecked" @change="ChangeStatus(hItem)"></el-checkbox>
......@@ -149,19 +228,11 @@
</template>
</td>
</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>
</div>
<div style="text-align:center;margin-top:20px;">
<input type="button" class="normalBtn" value="保存" @click="SaveHotelOrder()" />
<input type="button" class="normalBtn" value="关闭" @click="CloseHotel()" />
<input type="button" class="normalBtn" value="保存" @click="SaveHotelOrder()" />
<input type="button" class="normalBtn" value="关闭" @click="CloseHotel()" />
</div>
</el-dialog>
</div>
......@@ -175,16 +246,41 @@
msg: {
YearMonthStr: "",
CountryId: 651, //只查询日本
//酒店选择数组
HotelChooseArray: [],
Province: 0,//省份编号
City: 0, //城市编号
OutBranchId: -1, //出团公司编号
//星级
Star: 0,
//价格等级
PriceLevel: 0,
//供应商
Supplier: 0,
},
qMsg: {
DateStr: "",
HotelId: 0,
TCID: 0,
TCNUM: "", //团号
}, //团查询条件
defaultSelectValue: 0,
HotelId: 0,
dataList: [],
loading: false,
isShow: false,
changeLoading: false, //改变酒店loading
MyDataList: [], //获取可变更的酒店列表
outerVisible: false,
CurrentDateStr:"",//选中的日期
//省份列表
provinceList: [],
//城市列表
cityList: [],
//供应商列表
SupplierList: [],
//公司列表
companyList: [],
//酒店列表
HotelList: [],
};
},
components: {
......@@ -204,34 +300,36 @@
ChangeStatus(item) {
item.IsChecked = !item.IsChecked;
},
CloseHotel()
{
this.outerVisible=false;
this.HotelId=0;
this.MyDataList=[];
this.CurrentDateStr='';
CloseHotel() {
this.outerVisible = false;
this.MyDataList = [];
this.qMsg.DateStr = "";
this.qMsg.HotelId = 0;
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) {
this.CurrentDateStr=DateStr;
GetChangeHotelList() {
this.changeLoading = true;
this.HotelId=HotelId;
this.MyDataList = [];
var that = this;
this.apipost("journeyorder_post_GetCanChangeHotelListService", {
UseTime: DateStr
},
this.apipost("journeyorder_post_GetCanChangeHotelListService", this.qMsg,
res => {
that.changeLoading = false;
if (res.data.resultCode == 1) {
var nArray = res.data.data;
nArray.forEach(item => {
if (item.TCID == TCID) {
if (item.TCID == this.qMsg.TCID) {
item.IsChecked = true;
}
});
that.MyDataList = nArray;
console.log(that.MyDataList,'MydataList');
} else {
that.Error(res.data.message);
}
......@@ -291,9 +389,88 @@
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() {
this.GetHotelList();
this.msg.YearMonthStr = new Date().Format("yyyy-MM");
this.getProvinceList(651, 1);
//this.getBranchList();
this.initSupplier();
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