Commit 683eda57 authored by 黄奎's avatar 黄奎

新增机票下载

parent 7eb9d3b3
<style> <style>
/* 日期样式开始 */ /* 日期样式开始 */
.seatStatistics .month ul { .seatStatistics .month ul {
border-radius: 4px 4px 0 0; border-radius: 4px 4px 0 0;
width: 100%; width: 100%;
height: 50px; height: 50px;
line-height: 50px; line-height: 50px;
background: #e95252; background: #e95252;
margin: 0; margin: 0;
padding: 0; padding: 0;
text-align: center; text-align: center;
} }
.seatStatistics .year-month {
flex-direction: column; .seatStatistics .year-month {
align-items: center; flex-direction: column;
justify-content: space-around; align-items: center;
} justify-content: space-around;
.seatStatistics .year-month > input { }
width: 100px;
float: left; .seatStatistics .year-month>input {
} width: 100px;
.seatStatistics .arrow { float: left;
padding: 10px; }
font-style: normal;
cursor: pointer; .seatStatistics .arrow {
} padding: 10px;
.seatStatistics .monthminus { font-style: normal;
position: absolute; cursor: pointer;
left: 0px; }
top: 15px;
} .seatStatistics .monthminus {
.seatStatistics .monthadd { position: absolute;
position: absolute; left: 0px;
right: 21px; top: 15px;
top: 15px; }
}
.seatStatistics .month ul li { .seatStatistics .monthadd {
font-size: 18px; position: absolute;
color: #fff; right: 21px;
position: relative; top: 15px;
display: inline-block; }
letter-spacing: 3px;
} .seatStatistics .month ul li {
.seatStatistics .month ul li i { font-size: 18px;
font-size: 22px; color: #fff;
color: #ff7e7e; position: relative;
cursor: pointer; display: inline-block;
} letter-spacing: 3px;
.seatStatistics .month ul li > input { }
text-align: center;
} .seatStatistics .month ul li i {
.seatStatistics .weekdays { font-size: 22px;
margin: 0; color: #ff7e7e;
padding: 3px 0; cursor: pointer;
background-color: #3fa783; }
display: flex;
width: 100%; .seatStatistics .month ul li>input {
flex-wrap: wrap; text-align: center;
color: #fff; }
justify-content: space-around;
} .seatStatistics .weekdays {
.seatStatistics .weekdays li { margin: 0;
display: inline-block; padding: 3px 0;
width: 14.2857%; background-color: #3fa783;
text-align: center; display: flex;
} width: 100%;
.seatStatistics .days li:nth-child(7n-1) p { flex-wrap: wrap;
color: #e95252 !important; color: #fff;
} justify-content: space-around;
.seatStatistics .days li:nth-child(7n) p { }
color: #e95252 !important;
} .seatStatistics .weekdays li {
.seatStatistics .days { display: inline-block;
width: 100%; width: 14.2857%;
padding: 0; text-align: center;
margin: 0; }
border-left: 1px solid #dddddd;
flex-wrap: wrap; .seatStatistics .days li:nth-child(7n-1) p {
box-sizing: border-box; color: #e95252 !important;
justify-content: space-around; }
}
.seatStatistics .days > li { .seatStatistics .days li:nth-child(7n) p {
list-style-type: none; color: #e95252 !important;
width: 14.2857%; }
height: 140px;
text-align: center; .seatStatistics .days {
position: relative; width: 100%;
font-size: 12px; padding: 0;
float: left; margin: 0;
color: #000; border-left: 1px solid #dddddd;
box-sizing: border-box; flex-wrap: wrap;
border-right: 1px solid #ddd; box-sizing: border-box;
border-bottom: 1px solid #ddd; justify-content: space-around;
} }
.seatStatistics .days li > div {
height: 112px; .seatStatistics .days>li {
width: 100%; list-style-type: none;
overflow-y: auto; width: 14.2857%;
text-align: left; height: 140px;
} text-align: center;
.seatStatistics .days li > div > p { position: relative;
border-bottom: 1px dashed #ccc; font-size: 12px;
height: 28px; float: left;
line-height: 28px; color: #000;
width: 100%; box-sizing: border-box;
text-indent: 10px; border-right: 1px solid #ddd;
background: #fff; border-bottom: 1px solid #ddd;
} }
.seatStatistics .days li > div > p:nth-child(2n) {
background: #f5f5f5; .seatStatistics .days li>div {
} height: 112px;
.seatStatistics .currentInput { width: 100%;
width: 120px; overflow-y: auto;
height: 30px; text-align: left;
border-radius: 17px; }
outline: none;
border: none; .seatStatistics .days li>div>p {
color: #fff; border-bottom: 1px dashed #ccc;
background: transparent; height: 28px;
font-size: 18px; line-height: 28px;
} width: 100%;
.seatStatistics .days li .other-month { text-indent: 10px;
display: inline-block; background: #fff;
position: absolute; }
right: 0;
bottom: 0; .seatStatistics .days li>div>p:nth-child(2n) {
width: 24px; background: #f5f5f5;
height: 17px; }
font-size: 12px;
line-height: 17px; .seatStatistics .currentInput {
background-color: #cccccc; width: 120px;
color: #fff; height: 30px;
} border-radius: 17px;
.seatStatistics .addCompany { outline: none;
width: 700px; border: none;
} color: #fff;
.seatStatistics .ckStyle { background: transparent;
width: 100%; font-size: 18px;
height: 28px; }
line-height: 28px;
text-align: center; .seatStatistics .days li .other-month {
font-size: 14px; display: inline-block;
font-weight: bold; position: absolute;
background: #ccc; right: 0;
color: #000; bottom: 0;
} width: 24px;
.seatStatistics .ckStyleOther { height: 17px;
background: #dddddd !important; font-size: 12px;
font-weight: normal !important; line-height: 17px;
color: #999; background-color: #cccccc;
} color: #fff;
.seatStatistics .el-dialog--center .el-dialog__body { }
padding-top: 0;
} .seatStatistics .addCompany {
.HB_Inventor { width: 700px;
display: block; }
text-align: left;
padding-top: 8px; .seatStatistics .ckStyle {
} width: 100%;
.HB_Inventor > span { height: 28px;
display: block; line-height: 28px;
padding-left: 10px; text-align: center;
font-size: 12px; font-size: 14px;
height: 18px; font-weight: bold;
margin-bottom: 3px; background: #ccc;
} color: #000;
.seatStatistics .Owe_Room { }
color: #e95252;
} .seatStatistics .ckStyleOther {
.seatStatistics .Used_room { background: #dddddd !important;
color: #13b0ae; font-weight: normal !important;
} color: #999;
.seatStatistics .otherMoth { }
background: #f2f2f2;
} .seatStatistics .el-dialog--center .el-dialog__body {
.seatStatistics .weekendDay { padding-top: 0;
color: #e95252; }
}
.seatStatistics .title { .HB_Inventor {
height: 14px; display: block;
line-height: 14px; text-align: left;
border-left: 3px solid #e95252; padding-top: 8px;
font-size: 16px; }
color: #333;
text-indent: 10px; .HB_Inventor>span {
margin: 20px 0; display: block;
} padding-left: 10px;
/* 日期样式结束*/ font-size: 12px;
height: 18px;
margin-bottom: 3px;
}
.seatStatistics .Owe_Room {
color: #e95252;
}
.seatStatistics .Used_room {
color: #13b0ae;
}
.seatStatistics .otherMoth {
background: #f2f2f2;
}
.seatStatistics .weekendDay {
color: #e95252;
}
.seatStatistics .title {
height: 14px;
line-height: 14px;
border-left: 3px solid #e95252;
font-size: 16px;
color: #333;
text-indent: 10px;
margin: 20px 0;
}
/* 日期样式结束*/
</style> </style>
<template> <template>
<div class="flexOne seatStatistics"> <div class="flexOne seatStatistics">
...@@ -196,12 +228,8 @@ ...@@ -196,12 +228,8 @@
<em>{{$t('advmanager.v_line')}}</em> <em>{{$t('advmanager.v_line')}}</em>
<el-select v-model="msg.QLineId" :placeholder="$t('pub.pleaseSel')" filterable> <el-select v-model="msg.QLineId" :placeholder="$t('pub.pleaseSel')" filterable>
<el-option :label="$t('pub.unlimitedSel')" :value="defaultSelectValue"></el-option> <el-option :label="$t('pub.unlimitedSel')" :value="defaultSelectValue"></el-option>
<el-option <el-option v-for="item in LineList" :key="item.LineID" :label="item.LineName" :value="item.LineID">
v-for="item in LineList" </el-option>
:key="item.LineID"
:label="item.LineName"
:value="item.LineID"
></el-option>
</el-select> </el-select>
</span> </span>
</li> </li>
...@@ -210,40 +238,23 @@ ...@@ -210,40 +238,23 @@
<em>{{$t('system.table_goCity')}}</em> <em>{{$t('system.table_goCity')}}</em>
<el-select v-model="msg.QCityId" :placeholder="$t('system.ph_in')" filterable> <el-select v-model="msg.QCityId" :placeholder="$t('system.ph_in')" filterable>
<el-option :label="$t('pub.unlimitedSel')" :value="defaultSelectValue"></el-option> <el-option :label="$t('pub.unlimitedSel')" :value="defaultSelectValue"></el-option>
<el-option <el-option v-for="item in cityList" :key="item.ID" :label="item.Name" :value="item.ID"></el-option>
v-for="item in cityList"
:key="item.ID"
:label="item.Name"
:value="item.ID"
></el-option>
</el-select> </el-select>
</span> </span>
</li> </li>
<li> <li>
<span> <span>
<em>{{$t('admin.admin_czPerson')}}</em> <em>{{$t('admin.admin_czPerson')}}</em>
<el-select <el-select v-model="msg.QCreateBy" filterable :placeholder="$t('system.ph_in')" class="w120">
v-model="msg.QCreateBy"
filterable
:placeholder="$t('system.ph_in')"
class="w120"
>
<el-option :label="$t('pub.unlimitedSel')" :value="defaultSelectValue"></el-option> <el-option :label="$t('pub.unlimitedSel')" :value="defaultSelectValue"></el-option>
<el-option <el-option v-for="item in EmployeeList" :label="item.EmName" :value="item.EmployeeId"
v-for="item in EmployeeList" :key="item.EmployeeId"></el-option>
:label="item.EmName"
:value="item.EmployeeId"
:key="item.EmployeeId"
></el-option>
</el-select> </el-select>
</span> </span>
</li> </li>
<li style="margin-right:50px;"> <li style="margin-right:50px;">
<button <button class="normalBtn" type="button" @click="GetHoltelInventory()">{{$t('pub.searchBtn')}}</button>
class="normalBtn" <button class="normalBtn" type="button" @click="DownLoadAirticket()">下载</button>
type="button"
@click="GetHoltelInventory()"
>{{$t('pub.searchBtn')}}</button>
</li> </li>
</ul> </ul>
</div> </div>
...@@ -255,31 +266,15 @@ ...@@ -255,31 +266,15 @@
<div class="month"> <div class="month">
<ul> <ul>
<li> <li>
<i <i class="el-icon-caret-left monthminus" @click="currentYear-=1,getDateString(),initCalendar(dateString)"></i>
class="el-icon-caret-left monthminus" <input type="text" disabled="disabled" v-model="currentYear" class="currentInput"
@click="currentYear-=1,getDateString(),initCalendar(dateString)" @input="getDateString(),initCalendar(dateString)">
></i> <i class="el-icon-caret-right monthadd" @click="currentYear+=1,getDateString(),initCalendar(dateString)"></i>
<input
type="text"
disabled="disabled"
v-model="currentYear"
class="currentInput"
@input="getDateString(),initCalendar(dateString)"
>
<i
class="el-icon-caret-right monthadd"
@click="currentYear+=1,getDateString(),initCalendar(dateString)"
></i>
</li> </li>
<li> <li>
<i class="el-icon-caret-left monthminus" @click="pickPre(currentYear,currentMonth)"></i> <i class="el-icon-caret-left monthminus" @click="pickPre(currentYear,currentMonth)"></i>
<input <input type="text" disabled="disabled" v-model="currentMonth" class="currentInput"
type="text" @input="getDateString(),initCalendar(dateString)">
disabled="disabled"
v-model="currentMonth"
class="currentInput"
@input="getDateString(),initCalendar(dateString)"
>
<i class="el-icon-caret-right monthadd" @click="pickNext(currentYear,currentMonth)"></i> <i class="el-icon-caret-right monthadd" @click="pickNext(currentYear,currentMonth)"></i>
</li> </li>
</ul> </ul>
...@@ -294,18 +289,12 @@ ...@@ -294,18 +289,12 @@
<li class="weekendDay">{{$t('hotel.hotel_Saturday')}}</li> <li class="weekendDay">{{$t('hotel.hotel_Saturday')}}</li>
<li class="weekendDay">{{$t('hotel.hotel_Sunday')}}</li> <li class="weekendDay">{{$t('hotel.hotel_Sunday')}}</li>
</ul> </ul>
<ul class="days clearfix"> <ul class="days clearfix" v-loading="loading">
<li v-for="(dayobject,index) in days" :key="dayobject.index"> <li v-for="(dayobject,index) in days" :key="dayobject.index">
<p <p class="ckStyle" :class="{ckStyleOther:dayobject.day.getMonth()+1 != currentMonth}">
class="ckStyle" {{dayobject.day.getDate()}} ({{dayobject.TotalCount}})</p>
:class="{ckStyleOther:dayobject.day.getMonth()+1 != currentMonth}"
>{{dayobject.day.getDate()}} ({{dayobject.TotalCount}})</p>
<div class="ownScrollbarStyle"> <div class="ownScrollbarStyle">
<p <p class="over_ellipsis" v-for="item in dayobject.listArr" @click="goUrl('TicketManager',item,'票务管理')">
class="over_ellipsis"
v-for="item in dayobject.listArr"
@click="goUrl('TicketManager',item,'票务管理')"
>
{{item.AirLineTicketId}} {{item.AirLineTicketId}}
{{item.DepartureName}} {{item.DepartureName}}
- -
...@@ -319,178 +308,192 @@ ...@@ -319,178 +308,192 @@
</div> </div>
</template> </template>
<script> <script>
export default { export default {
data() { data() {
return { return {
msg: { msg: {
Year: new Date().Format("yyyy"), Year: new Date().Format("yyyy"),
Month: new Date().Format("MM"), Month: new Date().Format("MM"),
//线路编号 //线路编号
QLineId: 0, QLineId: 0,
//出发城市 //出发城市
QCityId: 0, QCityId: 0,
//操作人 //操作人
QCreateBy: "", QCreateBy: "",
FlightDate: "" FlightDate: ""
},
//线路列表
LineList: [],
defaultSelectValue: 0,
//城市列表
cityList: [],
currentDay: 1,
currentMonth: 1,
currentYear: 1970,
currentWeek: 1,
days: [],
//每天的机位库存
DayData: [],
//员工列表
EmployeeList: [],
TotalCount: 0,
TotalSeat: 0
};
},
methods: {
//获取线路列表
GetLineList() {
this.apipost(
"line_post_GetAllList",
{},
res => {
if (res.data.resultCode == 1) {
this.LineList = res.data.data;
}
}, },
err => {} //线路列表
); LineList: [],
defaultSelectValue: 0,
//城市列表
cityList: [],
currentDay: 1,
currentMonth: 1,
currentYear: 1970,
currentWeek: 1,
days: [],
//每天的机位库存
DayData: [],
//员工列表
EmployeeList: [],
TotalCount: 0,
TotalSeat: 0,
loading:false
};
}, },
goUrl(path, obj, name) { methods: {
this.$router.push({ //获取线路列表
path: path, GetLineList() {
query: { this.apipost(
id: obj.AirLineTicketId, "line_post_GetAllList", {},
blank: "y", res => {
tab: name if (res.data.resultCode == 1) {
this.LineList = res.data.data;
}
},
err => {}
);
},
goUrl(path, obj, name) {
this.$router.push({
path: path,
query: {
id: obj.AirLineTicketId,
blank: "y",
tab: name
}
});
},
//格式化日期
getDateString: function () {
this.dateString = this.$calendarUtils.formatDate(
this.currentYear,
this.currentMonth,
1
);
this.GetHoltelInventory();
},
initCalendar: function (cur) {
var newDays = this.$calendarUtils.createCalendar(cur);
this.currentDay = newDays.CurrentDay;
this.currentYear = newDays.CurrentYear;
this.currentMonth = newDays.CurrentMonth;
this.currentWeek = newDays.CurrentWeek;
this.days.length = 0;
var dateArray = newDays.DayArray;
for (var i = 0; i < dateArray.length; i++) {
var d = dateArray[i].day;
var dayobject = {};
dayobject.day = d;
this.days.push(dayobject);
} }
}); },
}, //点击左箭头切换年月
//格式化日期 pickPre: function (year, month) {
getDateString: function() { var d = new Date(this.$calendarUtils.formatDate(year, month, 1));
this.dateString = this.$calendarUtils.formatDate( d.setDate(0);
this.currentYear, this.nowDate = d.getFullYear() + "-" + (d.getMonth() + 1) + "-1";
this.currentMonth, this.initCalendar(
1 this.$calendarUtils.formatDate(d.getFullYear(), d.getMonth() + 1, 1)
); );
this.GetHoltelInventory(); this.GetHoltelInventory();
}, },
initCalendar: function(cur) { //点击右箭头切换年月
var newDays = this.$calendarUtils.createCalendar(cur); pickNext: function (year, month) {
this.currentDay = newDays.CurrentDay; var d = new Date(this.$calendarUtils.formatDate(year, month, 1));
this.currentYear = newDays.CurrentYear; d.setDate(35);
this.currentMonth = newDays.CurrentMonth; this.nowDate = d.getFullYear() + "-" + (d.getMonth() + 1) + "-1";
this.currentWeek = newDays.CurrentWeek; this.initCalendar(
this.days.length = 0; this.$calendarUtils.formatDate(d.getFullYear(), d.getMonth() + 1, 1)
var dateArray = newDays.DayArray; );
for (var i = 0; i < dateArray.length; i++) { this.GetHoltelInventory();
var d = dateArray[i].day; },
var dayobject = {}; //点击获取机票库存数据
dayobject.day = d; GetHoltelInventory() {
this.days.push(dayobject); this.loading=true;
} this.msg.FlightDate = this.currentYear + "-" + this.currentMonth + "-01";
}, this.apipost(
//点击左箭头切换年月 "AirTicket_get_GetMonthAirticketFlight",
pickPre: function(year, month) { this.msg,
var d = new Date(this.$calendarUtils.formatDate(year, month, 1)); res => {
d.setDate(0); this.loading=false;
this.nowDate = d.getFullYear() + "-" + (d.getMonth() + 1) + "-1"; this.DayData = res.data.data;
this.initCalendar( this.TotalCount = 0;
this.$calendarUtils.formatDate(d.getFullYear(), d.getMonth() + 1, 1) this.TotalSeat = 0;
); this.days.forEach(dayItem => {
this.GetHoltelInventory(); let d = dayItem.day;
}, let myDate = this.$calendarUtils.formatDate(
//点击右箭头切换年月 d.getFullYear(),
pickNext: function(year, month) { d.getMonth() + 1,
var d = new Date(this.$calendarUtils.formatDate(year, month, 1)); d.getDate()
d.setDate(35); );
this.nowDate = d.getFullYear() + "-" + (d.getMonth() + 1) + "-1"; for (var j = 0; j < this.DayData.length; j++) {
this.initCalendar( if (this.DayData[j].DayStr == myDate) {
this.$calendarUtils.formatDate(d.getFullYear(), d.getMonth() + 1, 1) dayItem.listArr = this.DayData[j].SubList;
); dayItem.TotalCount = dayItem.listArr.length;
this.GetHoltelInventory(); dayItem.listArr.forEach(subItem => {
}, this.TotalSeat += subItem.TicketNum;
//点击获取机票库存数据 });
GetHoltelInventory() { this.TotalCount += dayItem.TotalCount;
this.msg.FlightDate = this.currentYear + "-" + this.currentMonth + "-01"; }
this.apipost(
"AirTicket_get_GetMonthAirticketFlight",
this.msg,
res => {
this.DayData = res.data.data;
this.TotalCount = 0;
this.TotalSeat = 0;
this.days.forEach(dayItem => {
let d = dayItem.day;
let myDate = this.$calendarUtils.formatDate(
d.getFullYear(),
d.getMonth() + 1,
d.getDate()
);
for (var j = 0; j < this.DayData.length; j++) {
if (this.DayData[j].DayStr == myDate) {
dayItem.listArr = this.DayData[j].SubList;
dayItem.TotalCount = dayItem.listArr.length;
dayItem.listArr.forEach(subItem => {
this.TotalSeat += subItem.TicketNum;
});
this.TotalCount += dayItem.TotalCount;
} }
});
this.$forceUpdate();
},
err => {}
);
},
//获取中国下面的城市列表
getCityList() {
this.apipost(
"Destination_get_GetCityListByCountryId", {
Id: 2
},
res => {
this.cityList = res.data.data;
},
err => {}
);
},
//根据当前员工所在部门获取该部门及子部门员工信息
getEmployeeList() {
let UserInfo = this.getLocalStorage();
var msg = {
GroupId: UserInfo.RB_Group_id
};
this.apipost(
"admin_get_EmployeeGetList",
msg,
res => {
if (res.data.resultCode == 1) {
this.EmployeeList = res.data.data;
} }
},
err => {}
);
},
//机票导出
DownLoadAirticket() {
this.loading = true;
var fileName = "机票下载" + this.msg.Month + ".xls";
this.GetLocalFile("airticket_get_DownLoadAirticket", this.msg, fileName,
res => {
this.loading = false;
}); });
this.$forceUpdate();
}, },
err => {}
);
},
//获取中国下面的城市列表
getCityList() {
this.apipost(
"Destination_get_GetCityListByCountryId",
{
Id: 2
},
res => {
this.cityList = res.data.data;
},
err => {}
);
}, },
//根据当前员工所在部门获取该部门及子部门员工信息 mounted() {
getEmployeeList() { //初始化日历
let UserInfo = this.getLocalStorage(); let myDate = new Date();
var msg = { GroupId: UserInfo.RB_Group_id }; this.currentYear = myDate.getFullYear();
this.apipost( this.currentMonth = myDate.getMonth() + 1;
"admin_get_EmployeeGetList", this.getEmployeeList();
msg, this.getCityList();
res => { this.GetLineList();
if (res.data.resultCode == 1) { this.initCalendar();
this.EmployeeList = res.data.data; this.GetHoltelInventory();
}
},
err => {}
);
} }
}, };
mounted() {
//初始化日历
let myDate = new Date();
this.currentYear = myDate.getFullYear();
this.currentMonth = myDate.getMonth() + 1;
this.getEmployeeList();
this.getCityList();
this.GetLineList();
this.initCalendar();
this.GetHoltelInventory();
}
};
</script> </script>
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