浏览代码

救援订单

twt 1 年之前
父节点
当前提交
777722c51d
共有 4 个文件被更改,包括 42 次插入22 次删除
  1. 6 1
      components/homenav/nav.vue
  2. 24 13
      pages/index/confirmRescue.vue
  3. 10 6
      pages/subPack/rescueOrder.vue
  4. 2 2
      pages/subPack/rescueOrderOrderDetail.vue

+ 6 - 1
components/homenav/nav.vue

@@ -41,12 +41,17 @@ export default {
 			})
 			})
 		},
 		},
 		gohome(){
 		gohome(){
-			//console.log(23+this.cj)
+			console.log(23+this.cj)
+			
 			if(this.cj==3){
 			if(this.cj==3){
 				//console.log(123)
 				//console.log(123)
 				uni.switchTab({
 				uni.switchTab({
 					url:'../../index/index'
 					url:'../../index/index'
 				})
 				})
+			}else if(this.cj==4){
+				uni.switchTab({
+					url:'/pages/index/index'
+				})
 			}else{
 			}else{
 				uni.switchTab({
 				uni.switchTab({
 					url:'../index/index'
 					url:'../index/index'

+ 24 - 13
pages/index/confirmRescue.vue

@@ -129,7 +129,7 @@
 				jykkNum:1,
 				jykkNum:1,
 				customerName:'',
 				customerName:'',
 				mobilePhone:'',
 				mobilePhone:'',
-				
+				isGoing:false,
 			}
 			}
 		},
 		},
 		onLoad(opt) {
 		onLoad(opt) {
@@ -156,6 +156,10 @@
 				})
 				})
 			},
 			},
 			submitOrder(){
 			submitOrder(){
+				if(this.isGoing){
+					return false;
+				}
+				this.isGoing=true;
 				this.$http('openShopHelpSheetOrder/submitOrder', {
 				this.$http('openShopHelpSheetOrder/submitOrder', {
 				  helpType:this.opt.type,
 				  helpType:this.opt.type,
 				  customerName: this.customerName,
 				  customerName: this.customerName,
@@ -164,12 +168,17 @@
 				  shopID: this.opt.shopId,
 				  shopID: this.opt.shopId,
 				  plateNumber: this.carInfo.plateNumber,
 				  plateNumber: this.carInfo.plateNumber,
 				  carModel:this.carInfo.carModel,
 				  carModel:this.carInfo.carModel,
-				  hEndAddress:'',
-				  hStartAddress:'',
+				  hEndAddress:this.opt.endAddress,
+				  hStartAddress:this.opt.currentAddress,
 				  orderType:1,
 				  orderType:1,
 				  hTime:this.opt.time,
 				  hTime:this.opt.time,
 				  hscene:this.jykkNum,
 				  hscene:this.jykkNum,
+				  startLng:this.opt.lng,
+				  startLat:this.opt.lat,
+				  endLng:this.opt.endLng,
+				  endLat:this.opt.endLat,
 				 },'POST').then(res => {
 				 },'POST').then(res => {
+					 this.isGoing=false;
 					 if(res.code==0){
 					 if(res.code==0){
 						 uni.showModal({
 						 uni.showModal({
 						     title: '提示',
 						     title: '提示',
@@ -183,13 +192,10 @@
 						 		   	url:'index'
 						 		   	url:'index'
 						 		   })
 						 		   })
 						         } else if (res.cancel) {
 						         } else if (res.cancel) {
-						            // console.log('用户点击取消');
-						 		   // uni.reLaunch({
-						 			  //  url:'../user/bespeakDetail?id='+id
-						 		   // })
-						 		   uni.redirectTo({
-						 		   		url:'../user/bespeakDetail?id='+id
-						 		   })
+									// uni.hideLoading();
+						          /* uni.redirectTo({
+						           		url:'../subPack/rescueOrderOrderDetail?id='+id
+						           }) */
 						 		   
 						 		   
 						         }
 						         }
 						     }
 						     }
@@ -205,7 +211,11 @@
 						duration: 3000
 						duration: 3000
 					});
 					});
 					return false;
 					return false;
-				}
+				}
+				if(!this.isGoing){
+					return false;
+				}
+				this.isGoing=true;
 				this.$http('openreservation/saveOrderSheet', {
 				this.$http('openreservation/saveOrderSheet', {
 				  billDate: this.billDate,
 				  billDate: this.billDate,
 				  comment: this.comment,
 				  comment: this.comment,
@@ -214,7 +224,8 @@
 				  shopId: this.yyshopInfo.id,
 				  shopId: this.yyshopInfo.id,
 				  unionId: this.userInfo.unionId
 				  unionId: this.userInfo.unionId
 				 },'POST').then(res => {
 				 },'POST').then(res => {
-					    var id=res.data
+					    var id=res.data;
+						this.isGoing=false;
 						if(res.code==0){
 						if(res.code==0){
 							uni.showModal({
 							uni.showModal({
 							    title: '提示',
 							    title: '提示',
@@ -233,7 +244,7 @@
 										  //  url:'../user/bespeakDetail?id='+id
 										  //  url:'../user/bespeakDetail?id='+id
 									   // })
 									   // })
 									   uni.redirectTo({
 									   uni.redirectTo({
-									   		url:'../user/bespeakDetail?id='+id
+									   		url:'../subPack/rescueOrderOrderDetail?id='+id
 									   })
 									   })
 									   
 									   
 							        }
 							        }

+ 10 - 6
pages/subPack/rescueOrder.vue

@@ -1,6 +1,6 @@
 <template>
 <template>
 	<view class="box">
 	<view class="box">
-		<homenav :iStatusBarHeight="iStatusBarHeight" :title="'我的订单'" :cj="3"></homenav>
+		<homenav :iStatusBarHeight="iStatusBarHeight" :title="'我的订单'" :cj="4"></homenav>
 		<view class="tab">
 		<view class="tab">
 			<view class="tabLine" :class="{tabActive:tabIndex==-1}" @click="tabClick(-1)">全部</view>
 			<view class="tabLine" :class="{tabActive:tabIndex==-1}" @click="tabClick(-1)">全部</view>
 			<view class="tabLine" :class="{tabActive:tabIndex==0}" @click="tabClick(0)">待确认</view>
 			<view class="tabLine" :class="{tabActive:tabIndex==0}" @click="tabClick(0)">待确认</view>
@@ -22,11 +22,15 @@
 
 
 				</view>
 				</view>
 				<view class="itemShopBg">
 				<view class="itemShopBg">
-					<view class="shopName">救援类型- 
-					   <span v-if="item.HelpType==1">搭电</span> 
-					   <span v-if="item.HelpType==2">拖车</span>
-					   <span v-if="item.HelpType==3">换胎</span>
-					   <span v-if="item.HelpType==4">未知原因</span>
+					<view class="shopName">
+					 <span v-if="item.HelpType==1">搭电</span>
+					 <span v-if="item.HelpType==2">拖车</span>
+					 <span v-if="item.HelpType==3">换胎</span>
+					 <span v-if="item.HelpType==4">未知原因</span>
+					 -
+					 <span v-if="item.Hscene==1">地面</span>
+					 <span v-if="item.Hscene==2">车库</span>
+					 <span v-if="item.Hscene==3">其他</span>
 					</view>
 					</view>
 					<!-- <view style="color: #333333;font-size: 22rpx;">¥<span class="price">{{item.PayType==1?item.RealMoney:0}}</span></view> -->
 					<!-- <view style="color: #333333;font-size: 22rpx;">¥<span class="price">{{item.PayType==1?item.RealMoney:0}}</span></view> -->
 				</view>
 				</view>

+ 2 - 2
pages/subPack/rescueOrderOrderDetail.vue

@@ -15,7 +15,7 @@
 		</view>
 		</view>
 		<view class="status_bar" :style="{height: iStatusBarHeight + 'px'}"></view>
 		<view class="status_bar" :style="{height: iStatusBarHeight + 'px'}"></view>
 		<view style="height: 44px;"></view> -->
 		<view style="height: 44px;"></view> -->
-		<homenav :iStatusBarHeight="iStatusBarHeight" :title="'订单详情'" :cj="3"></homenav>
+		<homenav :iStatusBarHeight="iStatusBarHeight" :title="'订单详情'" :cj="4"></homenav>
 		
 		
 		<view class="top" :style="{background:'#'+themeColor}">
 		<view class="top" :style="{background:'#'+themeColor}">
 			<view class="orderState">
 			<view class="orderState">
@@ -113,7 +113,7 @@
 			</view>
 			</view>
 			<view class="informationLine">
 			<view class="informationLine">
 				<view class="informationTxt">下单人:</view>
 				<view class="informationTxt">下单人:</view>
-				<view class="informationNum" >{{orderData.openUser.nickName}}</view>
+				<view class="informationNum" >{{orderData.openUser.nickName|| '未知'}}</view>
 			</view>
 			</view>
 			<view class="informationLine" v-if="orderData.openShopHelpSheet.confirmTime">
 			<view class="informationLine" v-if="orderData.openShopHelpSheet.confirmTime">
 				<view class="informationTxt">确认时间:</view>
 				<view class="informationTxt">确认时间:</view>