aleyds 3 anni fa
parent
commit
75ef916c13
1 ha cambiato i file con 14 aggiunte e 6 eliminazioni
  1. 14 6
      pages/getin/getin.vue

+ 14 - 6
pages/getin/getin.vue

@@ -177,6 +177,10 @@
 			this.inTime = page.inTime;
 			this.placeStatus=page.placeStatus;
 			this.currentVehicleNo=page.currentVehicleNo
+			if(this.inTime == null || this.inTime == ''){
+				this.timeList[0].disabled = true;
+				
+			}
 		},
 		onShow() {
 			this.timeList[1].time = this.getTimer();
@@ -282,19 +286,21 @@
 					images:this.images,
 					inTime:this.time
 				};
-				if(this.placeStatus==1&&(this.currentVehicleNo=='')){
+				if(this.placeStatus==1&&(this.currentVehicleNo == null || this.currentVehicleNo=='')){
 					this.$u.api.parkInConfirm(param)//有车但是车牌为空
 					.then(res=>{
 						this.$refs.uToast.show({
 							title: res.msg,
-							type: 'success',
-							url:'pages/getout/getout'
+							type: 'success'
+						});
+						uni.redirectTo({
+						    url: '/pages/getout/getout'
 						});
 						//#ifdef APP-PLUS
 						device.print(res.data.print);
 						speak(res.data.speak);
 						//#endif
-						console.log('parkInConfirm',res)
+						// console.log('parkInConfirm',res)
 					}).catch(err=>{
 						this.$refs.uToast.show({
 							title: err.msg,
@@ -308,8 +314,10 @@
 				.then(res=>{
 					this.$refs.uToast.show({
 						title: res.msg,
-						type: 'success',
-						url:'pages/getout/getout'
+						type: 'success'
+					});
+					uni.redirectTo({
+					    url: '/pages/getout/getout'
 					});
 					//#ifdef APP-PLUS
 					device.print(res.data.print);