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

酒店统计修改

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