|
|
@@ -682,6 +682,9 @@
|
|
|
<a-select-option :value="1">
|
|
|
押金
|
|
|
</a-select-option>
|
|
|
+ <a-select-option :value="3">
|
|
|
+ 押金2
|
|
|
+ </a-select-option>
|
|
|
</a-select>
|
|
|
</div>
|
|
|
</template>
|
|
|
@@ -708,7 +711,7 @@
|
|
|
<div>
|
|
|
<a-input-number
|
|
|
v-model="record.money"
|
|
|
- :min="1"
|
|
|
+ :min="0"
|
|
|
@change="presetNumChange($event, record)"
|
|
|
/>
|
|
|
</div>
|
|
|
@@ -717,9 +720,10 @@
|
|
|
<div
|
|
|
style="color: rgba(255, 141, 26, 1); font-weight: 200"
|
|
|
>
|
|
|
- <!-- <p style="margin-bottom: 2px">
|
|
|
- 实收:支付宝600.00元;微信292.00元;现金1000.00元;会员卡400元。
|
|
|
- </p> -->
|
|
|
+ <p style="margin-bottom: 2px">
|
|
|
+ <template></template>
|
|
|
+ 实收:{{ orderFeesText }}
|
|
|
+ </p>
|
|
|
<p style="margin-bottom: 2px">
|
|
|
合计实款:{{ orderFeesAmout.toFixed(2) }}
|
|
|
</p>
|
|
|
@@ -973,9 +977,9 @@ export default {
|
|
|
PriceData: [],
|
|
|
newTabIndex: 0,
|
|
|
//调价弹窗
|
|
|
- editPriceModal:false,
|
|
|
+ editPriceModal: false,
|
|
|
//调价的索引
|
|
|
- editPriceIndex:null,
|
|
|
+ editPriceIndex: null,
|
|
|
selectedRowKeys: [],
|
|
|
// data,
|
|
|
columns,
|
|
|
@@ -1061,23 +1065,31 @@ export default {
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
|
|
-
|
|
|
- editPriceData(){
|
|
|
- let arr = []
|
|
|
- arr.length = this.model.orderInfo.dayCount
|
|
|
+ editPriceData() {
|
|
|
+ let arr = [];
|
|
|
+ arr.length = this.model.orderInfo.dayCount;
|
|
|
for (let i = 0; i < arr.length; i++) {
|
|
|
arr[i] = {
|
|
|
- day:this.addDate(this.model.orderInfo.arrivalTime2,i),
|
|
|
- price: this.model.roomPrices[this.editPriceIndex] && this.model.roomPrices[this.editPriceIndex].prefPrice || 0
|
|
|
- }
|
|
|
- let idx = this.model.roomPrices[this.editPriceIndex] && this.model.roomPrices[this.editPriceIndex].editPriceTime && this.model.roomPrices[this.editPriceIndex].editPriceTime.findIndex( item => item == arr[i].day)
|
|
|
- if ( idx > -1) {
|
|
|
- console.log(idx)
|
|
|
- arr[i].price = this.model.roomPrices[this.editPriceIndex].editPrice[idx]
|
|
|
+ day: this.addDate(this.model.orderInfo.arrivalTime2, i),
|
|
|
+ price:
|
|
|
+ (this.model.roomPrices[this.editPriceIndex] &&
|
|
|
+ this.model.roomPrices[this.editPriceIndex].prefPrice) ||
|
|
|
+ 0,
|
|
|
+ };
|
|
|
+ let idx =
|
|
|
+ this.model.roomPrices[this.editPriceIndex] &&
|
|
|
+ this.model.roomPrices[this.editPriceIndex].editPriceTime &&
|
|
|
+ this.model.roomPrices[this.editPriceIndex].editPriceTime.findIndex(
|
|
|
+ (item) => item == arr[i].day
|
|
|
+ );
|
|
|
+ if (idx > -1) {
|
|
|
+ console.log(idx);
|
|
|
+ arr[i].price =
|
|
|
+ this.model.roomPrices[this.editPriceIndex].editPrice[idx];
|
|
|
}
|
|
|
}
|
|
|
- this.PriceData = arr
|
|
|
- return arr
|
|
|
+ this.PriceData = arr;
|
|
|
+ return arr;
|
|
|
},
|
|
|
|
|
|
formDisabled() {
|
|
|
@@ -1093,6 +1105,81 @@ export default {
|
|
|
orderFeesArrearsAmout() {
|
|
|
return this.orderFeesAmout - this.amount;
|
|
|
},
|
|
|
+ orderFeesText() {
|
|
|
+ var text = "";
|
|
|
+ this.model.orderFees.forEach((item) => {
|
|
|
+ var find = this.payTypeList.find((t) => t.id == item.payType);
|
|
|
+ if (find) {
|
|
|
+ text += find.name + ":" + item.money + "元;";
|
|
|
+ }
|
|
|
+ });
|
|
|
+ return text;
|
|
|
+ },
|
|
|
+ },
|
|
|
+ watch: {
|
|
|
+ depositSplit(value) {
|
|
|
+ if (!value) {
|
|
|
+ var yajin = this.model.roomPrices.reduce((sum, val) => {
|
|
|
+ let total = sum + val.deposit;
|
|
|
+ return isNaN(total) ? 0 : total;
|
|
|
+ }, 0);
|
|
|
+ this.model.roomPrices.forEach((t) => {
|
|
|
+ t.deposit = 0;
|
|
|
+ });
|
|
|
+ this.model.roomPrices[0].deposit = yajin;
|
|
|
+ } else {
|
|
|
+ this.model.roomPrices.forEach((t) => {
|
|
|
+ t.deposit = this.compuleDeposit(t.marketPrice);
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },
|
|
|
+ paymentSplit(value) {
|
|
|
+ if (!value) {
|
|
|
+ var list2 = this.model.orderFees.filter(
|
|
|
+ (t) => t.subjectType == 2 && (!t.add || t.add != 1)
|
|
|
+ );
|
|
|
+ var list1 = this.model.orderFees.filter((t) => t.subjectType == 1);
|
|
|
+ var list = this.model.orderFees.filter(
|
|
|
+ (t) =>
|
|
|
+ (t.subjectType != 1 && t.subjectType != 2) || (t.add && t.add == 1)
|
|
|
+ );
|
|
|
+ list2.forEach((t) => {
|
|
|
+ var yjList = list1.filter((b) => b.roomId == t.roomId);
|
|
|
+ var yajin = yjList.reduce((sum, val) => {
|
|
|
+ let total = sum + val.money;
|
|
|
+ return isNaN(total) ? 0 : total;
|
|
|
+ }, 0);
|
|
|
+ t.yajing = yajin;
|
|
|
+ t.money += yajin;
|
|
|
+ t.receivable = t.money;
|
|
|
+ });
|
|
|
+ this.model.orderFees = [...list, ...list2];
|
|
|
+ } else {
|
|
|
+ var list2 = this.model.orderFees.filter(
|
|
|
+ (t) => t.subjectType == 2 && (!t.add || t.add != 1)
|
|
|
+ );
|
|
|
+ var list1 = [];
|
|
|
+
|
|
|
+ var list = this.model.orderFees.filter(
|
|
|
+ (t) =>
|
|
|
+ (t.subjectType != 1 && t.subjectType != 2) || (t.add && t.add == 1)
|
|
|
+ );
|
|
|
+ list2.forEach((t) => {
|
|
|
+ if (t.yajing && t.yajing > 0) {
|
|
|
+ t.money -= t.yajing;
|
|
|
+ t.receivable = t.money;
|
|
|
+ var item = JSON.parse(JSON.stringify(t));
|
|
|
+ item.subjectType = 1;
|
|
|
+ item.money = t.yajing;
|
|
|
+ item.yajing = 0;
|
|
|
+ item.receivable = item.money;
|
|
|
+ list1.push(item);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ list = [...list, ...list1];
|
|
|
+ this.model.orderFees = [...list, ...list2];
|
|
|
+ }
|
|
|
+ },
|
|
|
},
|
|
|
created() {
|
|
|
var _info = JSON.parse(localStorage.getItem("storeInfo"));
|
|
|
@@ -1178,60 +1265,92 @@ export default {
|
|
|
// this.getcesRoomLayout();
|
|
|
},
|
|
|
methods: {
|
|
|
-
|
|
|
//批量调价
|
|
|
- batchPrice(e){
|
|
|
+ batchPrice(e) {
|
|
|
console.log(e);
|
|
|
- this.editPriceData.forEach(ele=>{
|
|
|
- ele.price = e
|
|
|
- })
|
|
|
+ this.editPriceData.forEach((ele) => {
|
|
|
+ ele.price = e;
|
|
|
+ });
|
|
|
},
|
|
|
|
|
|
-
|
|
|
//根据传入的数字将日期加上对应的天数
|
|
|
- addDate(date,days){
|
|
|
- console.log(date, days);
|
|
|
- let time = new Date(date);
|
|
|
- time.setDate(time.getDate() + days);
|
|
|
- let m = time.getMonth() + 1;
|
|
|
- let d = time.getDate();
|
|
|
- if (m<10) {
|
|
|
- m = '0' + m;
|
|
|
- }
|
|
|
- if (d<10) {
|
|
|
- d = '0' + d;
|
|
|
- }
|
|
|
- return time.getFullYear() + '-' + m + '-' + d;
|
|
|
- },
|
|
|
+ addDate(date, days) {
|
|
|
+ console.log(date, days);
|
|
|
+ let time = new Date(date);
|
|
|
+ time.setDate(time.getDate() + days);
|
|
|
+ let m = time.getMonth() + 1;
|
|
|
+ let d = time.getDate();
|
|
|
+ if (m < 10) {
|
|
|
+ m = "0" + m;
|
|
|
+ }
|
|
|
+ if (d < 10) {
|
|
|
+ d = "0" + d;
|
|
|
+ }
|
|
|
+ return time.getFullYear() + "-" + m + "-" + d;
|
|
|
+ },
|
|
|
/**
|
|
|
* 点击修改图标时
|
|
|
*/
|
|
|
- onCellExpand(idx){
|
|
|
+ onCellExpand(idx) {
|
|
|
console.log(idx);
|
|
|
- this.editPriceIndex = idx
|
|
|
- console.log('11111111111111111111111',this.model.roomPrices[this.editPriceIndex]);
|
|
|
+ this.editPriceIndex = idx;
|
|
|
+ console.log(
|
|
|
+ "11111111111111111111111",
|
|
|
+ this.model.roomPrices[this.editPriceIndex]
|
|
|
+ );
|
|
|
this.editPriceModal = true;
|
|
|
},
|
|
|
|
|
|
/**
|
|
|
* 修改完成
|
|
|
*/
|
|
|
- editPriceOk(){
|
|
|
+ editPriceOk() {
|
|
|
console.log(this.editPriceData);
|
|
|
- this.model.roomPrices[this.editPriceIndex].editPriceTime = []
|
|
|
- this.model.roomPrices[this.editPriceIndex].editPrice = []
|
|
|
- this.editPriceData.forEach(ele=>{
|
|
|
- this.model.roomPrices[this.editPriceIndex].editPriceTime.push(ele.day)
|
|
|
- this.model.roomPrices[this.editPriceIndex].editPrice.push(ele.price)
|
|
|
- })
|
|
|
+ this.model.roomPrices[this.editPriceIndex].editPriceTime = [];
|
|
|
+ this.model.roomPrices[this.editPriceIndex].editPrice = [];
|
|
|
+ this.editPriceData.forEach((ele) => {
|
|
|
+ this.model.roomPrices[this.editPriceIndex].editPriceTime.push(ele.day);
|
|
|
+ this.model.roomPrices[this.editPriceIndex].editPrice.push(ele.price);
|
|
|
+ });
|
|
|
console.log(this.model.roomPrices);
|
|
|
- this.model.roomPrices[this.editPriceIndex].prefPrice = this.editPriceData[0].price
|
|
|
- this.onCellChange('prefPrice', this.editPriceIndex, this.editPriceData[0].price)
|
|
|
- this.editPriceData.forEach(ele=>{
|
|
|
- ele.prcie = 0
|
|
|
- })
|
|
|
+ this.model.roomPrices[this.editPriceIndex].prefPrice =
|
|
|
+ this.editPriceData[0].price;
|
|
|
+ this.onCellChange(
|
|
|
+ "prefPrice",
|
|
|
+ this.editPriceIndex,
|
|
|
+ this.editPriceData[0].price
|
|
|
+ );
|
|
|
+ this.editPriceData.forEach((ele) => {
|
|
|
+ ele.prcie = 0;
|
|
|
+ });
|
|
|
console.log(this.editPriceData);
|
|
|
- this.editPriceModal = false
|
|
|
+ this.editPriceModal = false;
|
|
|
+
|
|
|
+ var sum = 0;
|
|
|
+ for (var i = 0; i < this.model.roomPrices.length; i++) {
|
|
|
+ var money = 0;
|
|
|
+ var item = this.model.roomPrices[i];
|
|
|
+ if (item.editPrice && item.editPrice.length > 0) {
|
|
|
+ item.editPrice.forEach((p) => {
|
|
|
+ money += p;
|
|
|
+ });
|
|
|
+ item.roomFee = money;
|
|
|
+ sum += money + item.deposit;
|
|
|
+ } else {
|
|
|
+ sum += item.roomFee + item.deposit;
|
|
|
+ }
|
|
|
+
|
|
|
+ var find = this.model.orderFees.find(
|
|
|
+ (t) =>
|
|
|
+ t.subjectType == 2 &&
|
|
|
+ t.roomId == this.model.roomPrices[this.editPriceIndex].roomId
|
|
|
+ );
|
|
|
+ if (find && find.roomId == item.roomId) {
|
|
|
+ find.money = money;
|
|
|
+ find.receivable = money;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.amount = sum;
|
|
|
},
|
|
|
|
|
|
presetNumChange(e, record) {
|
|
|
@@ -1264,7 +1383,7 @@ export default {
|
|
|
loadRooms() {
|
|
|
// this.model.roomPrices = [];
|
|
|
// this.model.roomIds = [];
|
|
|
- this.amount = 0;
|
|
|
+ // this.amount = 0;
|
|
|
getAction("/rooms/cesRooms/can-user-rooms", {
|
|
|
startOf:
|
|
|
this.model.orderInfo.arrivalTime2 +
|
|
|
@@ -1286,7 +1405,11 @@ export default {
|
|
|
// });
|
|
|
t.buildingRooms.forEach((b) => {
|
|
|
b.floorRooms.forEach((f) => {
|
|
|
- this.$set(f, "check", 0);
|
|
|
+ this.$set(
|
|
|
+ f,
|
|
|
+ "check",
|
|
|
+ this.model.roomIds.some((r) => r.id == f.id) ? 1 : 0
|
|
|
+ );
|
|
|
});
|
|
|
});
|
|
|
});
|
|
|
@@ -1348,13 +1471,23 @@ export default {
|
|
|
this.loadRooms();
|
|
|
},
|
|
|
dayCountChange(e) {
|
|
|
- this.model.orderInfo.dueOutTime2 = moment(
|
|
|
- this.model.orderInfo.arrivalTime2
|
|
|
- )
|
|
|
- .add(e, "days")
|
|
|
- .format("YYYY-MM-DD");
|
|
|
+ if (e) {
|
|
|
+ this.model.orderInfo.dueOutTime2 = moment(
|
|
|
+ this.model.orderInfo.arrivalTime2
|
|
|
+ )
|
|
|
+ .add(e, "days")
|
|
|
+ .format("YYYY-MM-DD");
|
|
|
+ }
|
|
|
this.loadRooms();
|
|
|
- this.edit(this.modelDefault);
|
|
|
+
|
|
|
+ // this.edit(this.modelDefault);
|
|
|
+ var i = 0;
|
|
|
+ this.model.roomPrices.forEach((t) => {
|
|
|
+ t.day = this.model.orderInfo.dayCount;
|
|
|
+ this.editPriceIndex = i;
|
|
|
+ this.editPriceOk();
|
|
|
+ i++;
|
|
|
+ });
|
|
|
},
|
|
|
disabledDate(current) {
|
|
|
return current && current < moment().add(-1, "days").endOf("day");
|
|
|
@@ -1378,7 +1511,8 @@ export default {
|
|
|
(1000 * 60 * 60 * 24)
|
|
|
);
|
|
|
this.model.orderInfo.dayCount = Math.abs(v);
|
|
|
- this.loadRooms();
|
|
|
+ // this.loadRooms();
|
|
|
+ this.dayCountChange();
|
|
|
},
|
|
|
arrivalTimeChange2(e) {
|
|
|
var v = parseInt(
|
|
|
@@ -1399,7 +1533,8 @@ export default {
|
|
|
(1000 * 60 * 60 * 24)
|
|
|
);
|
|
|
this.model.orderInfo.dayCount = Math.abs(v);
|
|
|
- this.loadRooms();
|
|
|
+ // this.loadRooms();
|
|
|
+ this.dayCountChange();
|
|
|
},
|
|
|
arrivalTimeSpanChange(m, time) {
|
|
|
console.log(time);
|
|
|
@@ -1452,6 +1587,7 @@ export default {
|
|
|
pulsFee() {
|
|
|
var payType = this.payTypeList[0];
|
|
|
this.model.orderFees.push({
|
|
|
+ add: 1,
|
|
|
subjectType: 2,
|
|
|
subjectTypeLabel: "预收房费",
|
|
|
payType: payType ? payType.id : "",
|
|
|
@@ -1474,12 +1610,12 @@ export default {
|
|
|
this.model.roomPrices = dataSource;
|
|
|
}
|
|
|
|
|
|
- var sum = 0;
|
|
|
- this.model.roomPrices.forEach(function (item) {
|
|
|
- sum += item.roomFee + item.deposit;
|
|
|
- });
|
|
|
- this.amount = sum;
|
|
|
- console.log("this.model.roomPrices", this.model.roomPrices);
|
|
|
+ // var sum = 0;
|
|
|
+ // this.model.roomPrices.forEach(function (item) {
|
|
|
+ // sum += item.roomFee + item.deposit;
|
|
|
+ // });
|
|
|
+ // this.amount = sum;
|
|
|
+ // console.log("this.model.roomPrices", this.model.roomPrices);
|
|
|
},
|
|
|
// handleChange(value, index, column) {
|
|
|
// const newData = [...this.data2];
|
|
|
@@ -1535,6 +1671,25 @@ export default {
|
|
|
console.log("editTabs", e);
|
|
|
var index = this.model.roomIds.findIndex((t) => t.id == e);
|
|
|
this.model.roomIds.splice(index, 1);
|
|
|
+ this.model.roomPrices = this.model.roomPrices.filter(
|
|
|
+ (t) => t.roomId != e
|
|
|
+ );
|
|
|
+ this.model.orderFees = this.model.orderFees.filter((t) => t.roomId != e);
|
|
|
+ var sum = 0;
|
|
|
+ for (var i = 0; i < this.model.roomPrices.length; i++) {
|
|
|
+ var money = 0;
|
|
|
+ var item = this.model.roomPrices[i];
|
|
|
+ if (item.editPrice && item.editPrice.length > 0) {
|
|
|
+ item.editPrice.forEach((p) => {
|
|
|
+ money += p;
|
|
|
+ });
|
|
|
+ item.roomFee = money;
|
|
|
+ sum += money + item.deposit;
|
|
|
+ } else {
|
|
|
+ sum += item.roomFee + item.deposit;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.amount = sum;
|
|
|
},
|
|
|
tabClick(e) {
|
|
|
console.log("tabClick", e);
|
|
|
@@ -1543,8 +1698,16 @@ export default {
|
|
|
},
|
|
|
modalFormOk(e) {
|
|
|
console.log("e", e);
|
|
|
+ this.model.roomPrices = this.model.roomPrices.filter((t) =>
|
|
|
+ e.some((r) => r.id == t.roomId)
|
|
|
+ );
|
|
|
+ this.model.orderFees = this.model.orderFees.filter((t) =>
|
|
|
+ e.some((r) => r.id == t.roomId)
|
|
|
+ );
|
|
|
this.modelDefault = Object.assign({}, this.modelDefault, {
|
|
|
roomIds: e,
|
|
|
+ roomPrices: this.model.roomPrices,
|
|
|
+ orderFees: this.model.orderFees,
|
|
|
});
|
|
|
this.edit(this.modelDefault);
|
|
|
},
|
|
|
@@ -1599,52 +1762,69 @@ export default {
|
|
|
var roomLayout = this.roomLayoutList.find(
|
|
|
(t) => (t.id = item.layoutId)
|
|
|
);
|
|
|
- roomPrices.push({
|
|
|
- roomNo: item.name,
|
|
|
- roomId: item.id,
|
|
|
- marketPrice: item.marketPrice,
|
|
|
- prefPrice: item.marketPrice,
|
|
|
- day: this.model.orderInfo.dayCount,
|
|
|
- roomFee: item.marketPrice * this.model.orderInfo.dayCount,
|
|
|
- deposit: this.compuleDeposit(item.marketPrice),
|
|
|
- layoutName: roomLayout ? roomLayout.name : "",
|
|
|
- layoutId: item.layoutId,
|
|
|
- });
|
|
|
+ this.editPriceIndex = this.model.roomPrices.findIndex(
|
|
|
+ (t) => t.roomId == item.id
|
|
|
+ );
|
|
|
+ var find = this.model.roomPrices[this.editPriceIndex];
|
|
|
+ if (!find) {
|
|
|
+ var obj = {
|
|
|
+ roomNo: item.name,
|
|
|
+ roomId: item.id,
|
|
|
+ marketPrice: item.marketPrice,
|
|
|
+ prefPrice: item.marketPrice,
|
|
|
+ day: this.model.orderInfo.dayCount,
|
|
|
+ roomFee: item.marketPrice * this.model.orderInfo.dayCount,
|
|
|
+ deposit: this.compuleDeposit(item.marketPrice),
|
|
|
+ layoutName: roomLayout ? roomLayout.name : "",
|
|
|
+ layoutId: item.layoutId,
|
|
|
+ };
|
|
|
+ roomPrices.push(obj);
|
|
|
+ } else {
|
|
|
+ find.day = this.model.orderInfo.dayCount;
|
|
|
+ this.editPriceOk();
|
|
|
+ }
|
|
|
var payType = this.payTypeList[0];
|
|
|
-
|
|
|
- orderFees.push({
|
|
|
- subjectType: 2,
|
|
|
- subjectTypeLabel: "预收房费",
|
|
|
- payType: payType ? payType.id : "",
|
|
|
- payTypeLabel: payType ? payType.name : "",
|
|
|
- receivable: item.marketPrice * this.model.orderInfo.dayCount,
|
|
|
- money: item.marketPrice * this.model.orderInfo.dayCount,
|
|
|
- roomId: item.id,
|
|
|
- });
|
|
|
- var deposit = this.compuleDeposit(item.marketPrice);
|
|
|
- if (deposit > 0) {
|
|
|
+ if (!this.model.orderFees.some((t) => t.roomId == item.id)) {
|
|
|
orderFees.push({
|
|
|
- subjectType: 1,
|
|
|
- subjectTypeLabel: "押金",
|
|
|
+ subjectType: 2,
|
|
|
+ subjectTypeLabel: "预收房费",
|
|
|
payType: payType ? payType.id : "",
|
|
|
payTypeLabel: payType ? payType.name : "",
|
|
|
- receivable: deposit,
|
|
|
- money: deposit,
|
|
|
+ receivable: item.marketPrice * this.model.orderInfo.dayCount,
|
|
|
+ money: item.marketPrice * this.model.orderInfo.dayCount,
|
|
|
roomId: item.id,
|
|
|
});
|
|
|
+ var deposit = this.compuleDeposit(item.marketPrice);
|
|
|
+ if (deposit > 0) {
|
|
|
+ orderFees.push({
|
|
|
+ subjectType: 1,
|
|
|
+ subjectTypeLabel: "押金",
|
|
|
+ payType: payType ? payType.id : "",
|
|
|
+ payTypeLabel: payType ? payType.name : "",
|
|
|
+ receivable: deposit,
|
|
|
+ money: deposit,
|
|
|
+ roomId: item.id,
|
|
|
+ });
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ // var find = this.model.orderFees.find(
|
|
|
+ // (t) => t.subjectType == 2 && t.roomId == item.id
|
|
|
+ // );
|
|
|
+ // if (find) {
|
|
|
+ // find.money = money;
|
|
|
+ // find.receivable = money;
|
|
|
+ // }
|
|
|
}
|
|
|
});
|
|
|
- this.model.roomPrices = roomPrices;
|
|
|
+ this.model.roomPrices = [...this.model.roomPrices, ...roomPrices];
|
|
|
var sum = 0;
|
|
|
this.model.roomPrices.forEach(function (item) {
|
|
|
sum += item.roomFee + item.deposit;
|
|
|
});
|
|
|
this.amount = sum;
|
|
|
-
|
|
|
- this.model.orderFees = orderFees;
|
|
|
- console.log("this.model", this.model);
|
|
|
+ console.log("orderFees", orderFees);
|
|
|
+ this.model.orderFees = [...this.model.orderFees, ...orderFees];
|
|
|
}
|
|
|
- // console.log("this.amount2", JSON.stringify(this.amount));
|
|
|
},
|
|
|
submitForm() {
|
|
|
const that = this;
|
|
|
@@ -1657,9 +1837,12 @@ export default {
|
|
|
.format("YYYY-MM-DD");
|
|
|
that.model.livingRoomDayPrices.push({
|
|
|
livingType: 1,
|
|
|
- dayTime: t.editPriceTime? t.editPriceTime[b].toString() : dayTime,
|
|
|
+ dayTime: t.editPriceTime ? t.editPriceTime[b].toString() : dayTime,
|
|
|
// price: t.editPrice? t.editPrice[b].toString() : t.prefPrice,
|
|
|
- price: ( t.editPrice && t.editPriceTime && t.editPriceTime[b]==dayTime ) ? t.editPrice[b].toString() : t.prefPrice,
|
|
|
+ price:
|
|
|
+ t.editPrice && t.editPriceTime && t.editPriceTime[b] == dayTime
|
|
|
+ ? t.editPrice[b].toString()
|
|
|
+ : t.prefPrice,
|
|
|
// dayTime: dayTime,
|
|
|
// price: t.prefPrice,
|
|
|
roomLayoutId: t.layoutId,
|