Commit 0a7a1260 authored by 黄媛媛's avatar 黄媛媛

酒店使用数据修改

parent f6ab8a15
...@@ -1725,7 +1725,7 @@ ...@@ -1725,7 +1725,7 @@
} }
Diningdest[i].row = row Diningdest[i].row = row
} }
console.log(Diningdest) // console.log(Diningdest)
this.DiningDataList = this.unique(Diningdest, 'id'); this.DiningDataList = this.unique(Diningdest, 'id');
// this.DiningDataList = Diningdest // this.DiningDataList = Diningdest
//票 //票
...@@ -1735,7 +1735,7 @@ ...@@ -1735,7 +1735,7 @@
ScenicList.push(res.data.data.ScenicList[i].ScenicStatisticsList[o]) ScenicList.push(res.data.data.ScenicList[i].ScenicStatisticsList[o])
} }
} }
console.log(ScenicList) // console.log(ScenicList)
var Scenicmap = {}, var Scenicmap = {},
Scenicdest = []; Scenicdest = [];
for (var i = 0; i < ScenicList.length; i++) { for (var i = 0; i < ScenicList.length; i++) {
...@@ -1783,24 +1783,38 @@ ...@@ -1783,24 +1783,38 @@
HotelList.push(res.data.data.HotelOrderListReport[i].HotelOrderList[o]) HotelList.push(res.data.data.HotelOrderListReport[i].HotelOrderList[o])
} }
} }
var Hotelmap = {}, var Hotelmap = {},Hotelmap2 = {},
Hoteldest = []; Hoteldest = [];
for (var i = 0; i < HotelList.length; i++) { for (var i = 0; i < HotelList.length; i++) {
var ai = HotelList[i]; var ai = HotelList[i];
if (!Hotelmap[ai.CheckInDateStr]) { if (!Hotelmap[ai.CheckInDateStr]) {
Hoteldest.push({ Hoteldest.push({
CheckInDateStr: ai.CheckInDateStr, CheckInDateStr: ai.CheckInDateStr,
NewHotelId: ai.NewHotelId, NewHotelId: ai.NewHotelId,
data: [ai] data: [ai]
}); });
Hotelmap[ai.CheckInDateStr] = ai; Hotelmap[ai.CheckInDateStr] = ai;
} else { Hotelmap2[ai.NewHotelId] = ai;
}
else if (Hotelmap[ai.CheckInDateStr] && !Hotelmap2[ai.NewHotelId]) {
Hoteldest.push({
CheckInDateStr: ai.CheckInDateStr,
NewHotelId: ai.NewHotelId,
data: [ai]
});
Hotelmap2[ai.NewHotelId] = ai;
}
else {
for (var j = 0; j < Hoteldest.length; j++) { for (var j = 0; j < Hoteldest.length; j++) {
var dj = Hoteldest[j]; var dj = Hoteldest[j];
if (dj.CheckInDateStr == ai.CheckInDateStr && dj.NewHotelId == ai.NewHotelId) { if (dj.CheckInDateStr == ai.CheckInDateStr && dj.NewHotelId == ai.NewHotelId) {
dj.data.push(ai); dj.data.push(ai);
break; break;
} }
} }
} }
} }
...@@ -1811,7 +1825,8 @@ ...@@ -1811,7 +1825,8 @@
} }
Hoteldest[i].row = row Hoteldest[i].row = row
} }
this.HotelDataList = Hoteldest this.HotelDataList = Hoteldest;
console.log("this.HotelDataList",this.HotelDataList)
} else { } else {
this.$message.error(res.data.message); this.$message.error(res.data.message);
} }
......
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