Преглед на файлове

Merge branch 'master' of http://git.ringzle.com:3000/htcwl/hotelHomestayWx

2912631854@qq.com преди 1 година
родител
ревизия
dbe058fe82
променени са 1 файла, в които са добавени 14 реда и са изтрити 11 реда
  1. 14 11
      pages/house/createOrder.vue

+ 14 - 11
pages/house/createOrder.vue

@@ -146,7 +146,6 @@
 		<view class="footer">
 			<view class="total"><text>订单金额:</text><text>¥{{totalMOney}}</text></view>
 			<view class="btns">
-				{{today}}
 				<text @click="confirmOrder(2)" v-if="today==1">直接入住</text>
 				<text @click="confirmOrder(1)">提交</text>
 			</view>
@@ -252,7 +251,6 @@
 				this.getInfo();
 			}
 			// 当前日期
-			this.getleftData();
 			let myDate = new Date();
 			let year = myDate.getFullYear();
 			let mon = myDate.getMonth() + 1;
@@ -295,23 +293,21 @@
 				this.leaveDateShow = false;
 			},
 			compareDate(data) {
+				let data2=data.substring(0,10);
 				if (
-					new Date(data).getTime() < new Date(this.currentDate).getTime()
+					new Date(data2).getTime() < new Date(this.currentDate).getTime()
 				) {
 					this.today = -1;
-					//v.push("-1"); //有时间小于今天
 				}
 				if (
-					new Date(newval[i]).getTime() == new Date(this.currentDate).getTime()
+					new Date(data2).getTime() == new Date(this.currentDate).getTime()
 				) {
 					this.today = 1;
-					v.push("1"); //有时间等于今天
 				}
 				if (
-					new Date(newval[i]).getTime() > new Date(this.currentDate).getTime()
+					new Date(data2).getTime() > new Date(this.currentDate).getTime()
 				) {
 					this.today = 2;
-					//v.push("2"); //有时间大于今天
 				}
 			},
 			//添加入住人
@@ -461,8 +457,12 @@
 							...this.dataForm,
 							...res.data.data,
 						};
+						this.compareDate(this.dataForm.arriveDate);
+						this.dataForm.detailFormList[0].checkInType = res.data.data.detailFormList[0].checkInType;
+						this.dataForm.detailFormList[0].checkInTypeName = this.checkInType[0].filter((item => item
+							.val ==this.dataForm.detailFormList[0].checkInType))[0].label;
 						this.totalMOney = this.dataForm.orderAmount;
-						this.compareDate(this.dataForm.arriveDate)
+						
 					}
 				})
 			},
@@ -478,11 +478,13 @@
 							.val == res.data.data.checkInType))[0].label;
 						this.dataForm.detailFormList[0].roomAmount = res.data.data.roomAmount;
 						this.dataForm.arriveDate = res.data.data.arriveDate;
+						this.compareDate(this.dataForm.arriveDate);
 						this.dataForm.leaveDate = res.data.data.leaveDate;
 						this.dataForm.houseBaseId = res.data.data.houseBaseId;
 						this.dataForm.houseBaseName = res.data.data.houseBaseName;
 						this.dataForm.num = res.data.data.num;
 						this.totalMOney = res.data.data.roomAmount;
+						
 					}
 				})
 			},
@@ -493,9 +495,9 @@
 				this.showLaiyuan = false;
 			},
 			//入住类型
-			passengerConfirm2() {
+			passengerConfirm2(e) {
 				this.dataForm.detailFormList[0].checkInType = e.value[0].val;
-				this.dataForm.detailFormList[0].checkInTypeName = e.value[0].guestSource;
+				this.dataForm.detailFormList[0].checkInTypeName = e.value[0].label;
 				this.checkInTypeShow = false;
 			}
 		}
@@ -551,6 +553,7 @@
 				border-radius: 48rpx;
 				border: 1rpx solid #D1D1D1;
 				color: #999;
+				margin:0 3%;
 				flex: 1;
 
 				&:last-child {