zhengkaixin 3 éve
szülő
commit
2f9601f34e

+ 22 - 3
pages/searchPile/apointment/apointmentRecharge.vue

@@ -62,7 +62,12 @@
 		</view>
 		
 		<view class="bottom">
-			<u-button class="button" 
+			
+		:class="{
+			buttonlockStatus:lockStatus
+				button:!lockStatus
+		}"
+				
 			@click="submit()"
 			shape="square">提交预约</u-button>
 		</view>
@@ -82,6 +87,8 @@
 		data() {
 			return {
 				id:0,
+				lockStatus:false,
+				lockTime:"",
 				detail:{},
 				timeList:[],
 				numList:[60,90,120,0],
@@ -97,7 +104,9 @@
 		},
 		methods:{
 			submit(){
-				 
+				 if(this.lockStatus){
+					 return
+				 }
 				uni.showLoading({
 					title: "加载中",
 					mask: true,
@@ -123,7 +132,7 @@
 				newsApi.findConfigureByKey({
 					key:"apointment"
 				}).then((res) => {
-										
+									
 					this.apointment = res.data.value;
 				
 				}).catch(error => {
@@ -139,6 +148,8 @@
 				
 				}).then((res) => {
 					uni.hideLoading()
+					this.lockStatus=res.data.lockStatus
+					this.lockTime=res.data.lockTime
 					
 					this.detail= {
 						stationName:res.data.gun.stationName,
@@ -334,6 +345,14 @@
 	        	font-size: 16px;
 				
 			}
+			.buttonlockStatus{
+				border-radius: 50px;
+				background-color: rgba(0, 185, 98, 100);
+				    background-color: #e7edea;
+				    color: #141212;
+				color: rgba(255, 255, 255, 100);
+				font-size: 16px;
+			}
 		
 		}
 </style>

+ 17 - 1
pages/user/myReservation/reservationListDetails.vue

@@ -109,7 +109,7 @@
 		<!-- 	<u-button shape='circle' class="refuse-btn">拒绝</u-button>
 			<u-button type="success" shape='circle'>确认</u-button>
 			 --><!-- 删除订单按钮 -->
-		 <u-button shape='circle' type="success" >开始充电</u-button>
+		 <u-button shape='circle' type="success" @click="charge" >开始充电</u-button>
 		</view>
 	</view>
 </template>
@@ -126,6 +126,10 @@
 	export default {
 		data() {
 			return {
+				deviceNo:"",
+				channelNo:"",
+				carNumber:"",
+				stationId:"",
 				isback:false,
 				detail:{},
 				price:{},
@@ -141,10 +145,22 @@
 			if(op.qr){
 				//扫码进入的
 			}
+			if (op.deviceNo) {
+				this.stationId= op.stationId;
+				this.deviceNo = op.deviceNo;
+				this.channelNo = op.gun;
+				this.carNumber = op.carNumber;
+			
+			}
 			this.id= op.id;
 			this.getInfo()
 		},
 		methods:{
+			charge(){
+				uni.navigateTo({
+					url:'/pages/searchPile/chargeProcess/charge?stationId='+this.stationId+'&deviceNo='+this.deviceNo+"&gun="+this.channelNo+"&carNumber="+(this.carNumber?this.carNumber:'')
+				})
+			},
 			regChangeStatusSuccess(){
 				uni.showLoading({
 					title: "加载中",