Browse Source

feat: 订单bug

2912631854@qq.com 1 year ago
parent
commit
bb37a5e9fe
1 changed files with 34 additions and 19 deletions
  1. 34 19
      pages/house/stayCheck.vue

+ 34 - 19
pages/house/stayCheck.vue

@@ -43,12 +43,13 @@
 		</view>
 		<!-- 按钮 -->
 		<!-- 按钮 -->
-
-		<view class="yes" @click.native="conform">
-			确定
-
+		<view class="btn-tbn">
+			<view class="yes" @click.native="conform">
+				确定
+			</view>
 		</view>
 
+
 	</view>
 </template>
 
@@ -101,7 +102,7 @@
 			}
 
 		},
-		
+
 		filters: {
 			cardName(val) {
 				let item = that.list2.filter((item) => item.value == val);
@@ -119,7 +120,7 @@
 			this.checkInPersonList = this.orderInfo.detailFormList[0].checkInPersonList;
 			if (!this.checkInPersonList || this.checkInPersonList.length == 0) {
 				this.checkInPersonList.push({
-					cardType:0,
+					cardType: 0,
 					idCard: '',
 					checkInPhone: '',
 					checkInName: '',
@@ -148,28 +149,34 @@
 				})
 			},
 			conform() {
-				this.checkInPersonList.forEach((item)=>{
+				this.checkInPersonList.forEach((item) => {
+					console.log(item.checkInPhone);
+					console.log(item.idCard);
 					console.log(1)
-					if(!this.$u.test.mobile(item.checkInPhone)){
+					if (!this.$u.test.mobile(item.checkInPhone)) {
+						console.log('请输入正确手机号');
 						this.$showToast('请输入正确手机号');
 						return
 					}
-					if(!this.$u.test.idCard(item.idCard)){
+					if (!this.$u.test.idCard(item.idCard)) {
+						console.log('请输入正确身份证号');
 						this.$showToast('请输入正确身份证号');
 						return
 					}
+					let list = this.checkInPersonList.filter((item) => item.idCard && item.checkInName);
+					this.getOpenerEventChannel().emit('addSuccess', {
+						'data': list
+					});
+					//
+					uni.navigateBack();
+
 				})
-				let list = this.checkInPersonList.filter((item) => item.idCard && item.checkInName);
-				this.getOpenerEventChannel().emit('addSuccess', {
-					'data': list
-				});
-				//
-				uni.navigateBack();
+
 				// this.$api.post('/merchant/hotel/order/updOrder', this.orderInfo).then(res => {
 				// 	if (res.data.code == 0) {
 				// 		this.$showToast('操作成功');
 				// 		setTimeout(() => {
-							
+
 				// 		}, 1500)
 				// 	}
 				// })
@@ -232,15 +239,23 @@
 
 	}
 
+	.btn-tbn {
+		width: 100%;
+		height: 136rpx;
+		background-color: #fff;
+		position: fixed;
+		bottom: 0;
+		padding: 30rpx;
+		z-index: 999;
+	}
+
 	.yes {
 		width: 690rpx;
 		height: 96rpx;
 		line-height: 96rpx;
 		background-color: #1372FF;
 		border-radius: 48rpx;
-		position: fixed;
-		bottom: 40rpx;
-		margin-left: 30rpx;
+		// margin-left: 30rpx;
 		color: #fff;
 		font-size: 34rpx;
 		text-align: center;