Commit 0f4c5b48 authored by 黄奎's avatar 黄奎

酒店统计修改

parent a0c5fb94
......@@ -258,9 +258,10 @@
<div v-if="dayItem.dayValue" >
<p style="word-break:breakall;" :class="stockColor(subItem.InventoryType)"
v-for="subItem in dayItem.dayValue">{{subItem.HotelName}}
(总: {{subItem.Inventory}}
<a v-if="subItem.UseInventory>0" @click="goUrl('TicketManager',dayItem,'票务管理')">已用:{{subItem.UseInventory}})</a>
<span v-else>已用:{{subItem.UseInventory}})</span>
(总: {{subItem.Inventory}} &nbsp;&nbsp;
<a title="点击跳转到订房管理" v-if="subItem.UseInventory>0" @click="goUrl('roomReservations',subItem,dayItem.DayStr,'订房管理')" style="cursor:pointer;text-decoration:underline;color:red;">已用:{{subItem.UseInventory}}</a>
<span v-else>已用:{{subItem.UseInventory}}</span>
)
</p>
</div>
</li>
......@@ -272,8 +273,8 @@
data() {
return {
msg: {
Year: new Date().Format("yyyy"),
Month: new Date().Format("MM"),
Year: 0,
Month: 0,
HotelId: 0,
//只查询日本
Country: "651",
......@@ -312,17 +313,18 @@
else if (type === 4) {
return 'hasStock_4'
}
},
goUrl(path, obj, name) {
// this.$router.push({
// path: path,
// query: {
// id: obj.AirLineTicketId,
// blank: "y",
// tab: name
// }
// });
//调整到订房管理
goUrl(path, obj,dateStr, name) {
this.$router.push({
path: path,
query: {
hotelId: obj.HotelId,
dateStr:dateStr,
blank: "y",
tab: name
}
});
},
//格式化日期
getDateString: function () {
......@@ -371,6 +373,8 @@
//点击获取酒店库存数据
GetHoltelInventory() {
this.msg.loading = true;
this.msg.Year=this.currentYear;
this.msg.Month=this.currentMonth;
this.DayData = [];
this.apipost(
"hotelreport_get_GetHotelPriceMonthStatisticsExt",
......@@ -391,6 +395,7 @@
for (var j = 0; j < this.DayData.length; j++) {
if (this.DayData[j].DayStr == myDate) {
dayItem.dayValue = this.DayData[j].SubList;
dayItem.DayStr = this.DayData[j].DayStr;
this.DayData[j].SubList.forEach(subItem => {
this.TotalInventory = parseFloat(this.TotalInventory) + parseFloat(subItem.Inventory);
this.UseInventory = parseFloat(this.UseInventory) + parseFloat(subItem.UseInventory);
......@@ -427,6 +432,8 @@
let myDate = new Date();
this.currentYear = myDate.getFullYear();
this.currentMonth = myDate.getMonth() + 1;
this.msg.Year=this.currentYear;
this.msg.Month=this.currentDay;
this.GetHotelList();
this.initCalendar();
this.GetHoltelInventory();
......
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