|
|
@@ -935,7 +935,7 @@ const columns = [
|
|
|
{
|
|
|
title: "优惠价",
|
|
|
dataIndex: "prefPrice",
|
|
|
- width: 120,
|
|
|
+ width: 100,
|
|
|
scopedSlots: { customRender: "prefPrice" },
|
|
|
},
|
|
|
{
|
|
|
@@ -1892,6 +1892,16 @@ export default {
|
|
|
console.log("editTabs", e);
|
|
|
var index = this.model.roomIds.findIndex((t) => t.id == e);
|
|
|
this.model.roomIds.splice(index, 1);
|
|
|
+ console.log("this.canUserRooms", this.canUserRooms);
|
|
|
+ this.canUserRooms.forEach((t) => {
|
|
|
+ t.buildingRooms.forEach((b) => {
|
|
|
+ b.floorRooms.forEach((f) => {
|
|
|
+ if (f.id == e) {
|
|
|
+ f.check = 0;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ });
|
|
|
+ });
|
|
|
this.model.roomPrices = this.model.roomPrices.filter(
|
|
|
(t) => t.roomId != e
|
|
|
);
|
|
|
@@ -1959,6 +1969,15 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ if (this.modelDefault.roomIds && this.modelDefault.roomIds.length > 2) {
|
|
|
+ var mainRoom = this.modelDefault.roomIds[0];
|
|
|
+ var sortRooms = this.modelDefault.roomIds
|
|
|
+ .filter((t) => t.id != mainRoom.id)
|
|
|
+ .sort(function (a, b) {
|
|
|
+ return a.name.toUpperCase() > b.name.toUpperCase() ? 1 : -1;
|
|
|
+ });
|
|
|
+ this.modelDefault.roomIds = [...[mainRoom], ...sortRooms];
|
|
|
+ }
|
|
|
console.log(" this.modelDefault.roomIds", this.modelDefault.roomIds);
|
|
|
this.edit(this.modelDefault);
|
|
|
},
|
|
|
@@ -2073,6 +2092,15 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
this.model.roomPrices = [...this.model.roomPrices, ...roomPrices];
|
|
|
+ if (this.model.roomPrices && this.model.roomPrices.length > 2) {
|
|
|
+ var mainRoom = this.model.roomPrices[0];
|
|
|
+ var sortRooms = this.model.roomPrices
|
|
|
+ .filter((t) => t.roomId != mainRoom.roomId)
|
|
|
+ .sort(function (a, b) {
|
|
|
+ return a.roomNo.toUpperCase() > b.roomNo.toUpperCase() ? 1 : -1;
|
|
|
+ });
|
|
|
+ this.model.roomPrices = [...[mainRoom], ...sortRooms];
|
|
|
+ }
|
|
|
var sum = 0;
|
|
|
this.model.roomPrices.forEach(function (item) {
|
|
|
sum += item.roomFee + item.deposit;
|