twt 1 anno fa
parent
commit
41ab98163f
4 ha cambiato i file con 60 aggiunte e 23 eliminazioni
  1. 16 6
      pages/index/confirmRescue.vue
  2. 5 5
      pages/index/index.vue
  3. 37 10
      pages/index/rescue.vue
  4. 2 2
      pages/user/user.vue

+ 16 - 6
pages/index/confirmRescue.vue

@@ -44,7 +44,7 @@
 		  <view class="kklineLeft">
 			<span>救援项目</span>
 		  </view>
-		  <view class="kklineRight" v-if="opt.type==1">电</view>
+		  <view class="kklineRight" v-if="opt.type==1">电</view>
 		  <view class="kklineRight" v-if="opt.type==2">拖车</view>
 		  <view class="kklineRight" v-if="opt.type==3">换胎</view>
 		  <view class="kklineRight" v-if="opt.type==4">未知原因</view>
@@ -129,7 +129,8 @@
 				jykkNum:1,
 				customerName:'',
 				mobilePhone:'',
-				isGoing:false,
+				isGoing:false,
+				orderId:'',
 			}
 		},
 		onLoad(opt) {
@@ -202,7 +203,9 @@
 				  endLng:this.opt.endLng,
 				  endLat:this.opt.endLat,
 				 },'POST').then(res => {
-					 this.isGoing=false;
+					console.log(res)
+					var id=res.data
+					console.log(id)
 					 if(res.code==0){
 						 uni.showModal({
 						     title: '提示',
@@ -210,6 +213,8 @@
 						 	confirmText:'返回首页',
 						 	cancelText:'查看订单',
 						     success: function (res) {
+								  this.isGoing=false;
+								
 						         if (res.confirm) {
 						            // console.log('用户点击确定');
 						 		   uni.switchTab({
@@ -224,10 +229,13 @@
 						         }
 						     }
 						 });
+					 }else{
+						 this.isGoing=false;
 					 }
 				 })
 			},
-			yuyue(){
+			yuyue(){
+				var that=this;
 				if(!this.billDate){
 					uni.showToast({
 						title: '请选择预约时间',
@@ -248,7 +256,9 @@
 				  shopId: this.yyshopInfo.id,
 				  unionId: this.userInfo.unionId
 				 },'POST').then(res => {
-					    var id=res.data;
+					    console.log(res)
+						console.log(res.data)
+					    that.orderId=res.data
 						this.isGoing=false;
 						if(res.code==0){
 							uni.showModal({
@@ -268,7 +278,7 @@
 										  //  url:'../user/bespeakDetail?id='+id
 									   // })
 									   uni.redirectTo({
-									   		url:'../subPack/rescueOrderOrderDetail?id='+id
+									   		url:'../subPack/rescueOrderOrderDetail?id='+that.orderId
 									   })
 									   
 							        }

+ 5 - 5
pages/index/index.vue

@@ -510,14 +510,14 @@
 							});
 						}
 					}else if(item.bizType==1){ //紧急救援
-						// uni.navigateTo({
-						// 	url:'rescue'
-						// })
-						uni.showToast({
+						 uni.navigateTo({
+						 	url:'rescue'
+						 })
+						/* uni.showToast({
 							 title: '敬请期待',
 							 icon:'none',
 							 duration: 3000
-						});
+						}); */
 						
 					}else if(item.bizType==2){ //钣金喷漆
 						 uni.navigateTo({

+ 37 - 10
pages/index/rescue.vue

@@ -148,6 +148,7 @@
 				shopid:'',
 				msg:'',
 				helpPrice:'',
+				helptime:'',
 			}
 		},
 		onLoad() {
@@ -184,7 +185,7 @@
 					console.log('当前位置的纬度:' + res.latitude);
 					that.latitude=res.latitude;
 					that.longitude=res.longitude;
-					that.getShopInfo()
+					//that.getShopInfo()
 					var obj={
 						 latitude: that.latitude,
 						 longitude: that.longitude,
@@ -255,6 +256,7 @@
 			onConfirm(e){
 				console.log(e)
 				this.yytime=e.result
+				this.helptime=e.obj.hour+':'+e.obj.minute
 			},
 			openDatetimePicker() {
 			     this.$refs.picker.show()
@@ -284,14 +286,6 @@
 				})
 			},
 			sure(){
-				 if(!this.shopInfo){
-					uni.showToast({
-						 title: this.msg||'暂未找到救援门店',
-						 icon:'none',
-						 duration: 3000
-					});
-					return false
-				} 
 				if(this.tabIndex==0){
 					const yy = new Date().getFullYear()
 					  const MM = (new Date().getMonth() + 1) < 10 ? '0' + (new Date().getMonth() + 1) : (new Date().getMonth() + 1)
@@ -301,6 +295,7 @@
 					  //const ss = new Date().getSeconds() < 10 ? '0' + new Date().getSeconds() : new Date().getSeconds()
 					  var time= yy + '-' + MM + '-' + dd + ' ' + HH + ':' + mm //+ ':' + ss
 					  console.log(time) 
+					  this.helptime=HH + ':' + mm
 					  //return false;
 					
 				}else{
@@ -325,10 +320,41 @@
 						return false;
 					}
 				}
+				//console.log(time)
+				
+				this.$http('openShopHelpSheetOrder/getShopInfo', {
+					lat:this.latitude,
+					lng:this.longitude,
+					type:this.typeIndex,
+					helptime:this.helptime
+				}, 'GET').then(res => {
+					if(res.code==0){
+						this.shopInfo=res.data.shopInfo;
+						this.helpPrice=res.data.shopHelpSetting.helpPrice;
+						this.msg=res.msg
+					}else{
+						this.shopInfo=''
+					}
+					
+				
+				/* uni.redirectTo({
+						url:'../subPack/rescueOrderOrderDetail?id='
+				}) */
+				 if(!this.shopInfo){
+					uni.showToast({
+						 title: '暂未找到救援门店',
+						 icon:'none',
+						 duration: 3000
+					});
+					return false
+				} 
+			
 				
 				uni.navigateTo({
 					url:'confirmRescue?lat='+this.latitude+"&lng="+this.longitude+"&shopId="+this.shopInfo.ID+'&shopName='+this.shopInfo.ShopName+'&type='+this.typeIndex+'&time='+time+'&currentAddress='+this.currentAddress+'&endAddress='+this.endAddress+'&endLat='+this.endLat+'&endLng='+this.endLng
 				})
+				
+				})
 			},
 			startBtn(){
 				var that=this;
@@ -341,7 +367,7 @@
 						// console.log('纬度:' + res.latitude);
 						// console.log('经度:' + res.longitude);
 						that.longitude=res.longitude
-						that.latitude=res.latitude
+						that.latitude=res.latitude//.toFixed(5)
 						var obj={
 							 latitude: that.latitude,
 							 longitude: that.longitude,
@@ -355,6 +381,7 @@
 						}
 						that.covers[0]=obj;
 						that.points[0]=obj2;
+						//that.getShopInfo()
 						//that.calculateDistance()
 						console.log(that.covers)
 					},

+ 2 - 2
pages/user/user.vue

@@ -147,13 +147,13 @@
 
 		<!-- 我的 相关 -->
 		<view class="rowBoxBg">
-			<!-- <view class="rowBox" @click="gonavigateTo('../subPack/rescueOrder')">
+			 <view class="rowBox" @click="gonavigateTo('../subPack/rescueOrder')">
 				<view class="leftView">
 					<image src="../../static/img/icon_me1.png" mode="" class="liftIcon"></image>
 					<view class="rowTitle">救援订单</view>
 				</view>
 				<image src="../../static/img/big_rightArrow.png" mode="" class="big_rightArrow"></image>
-			</view> -->
+			</view> 
 			<view class="rowBox" @click="gonavigateTo('../user/expertServices')">
 				<view class="leftView">
 					<image src="../../static/img/icon_me1.png" mode="" class="liftIcon"></image>