gcz 2 лет назад
Родитель
Сommit
0d59d8d736
5 измененных файлов с 85 добавлено и 21 удалено
  1. 2 0
      shopping/evaluate.vue
  2. 1 0
      shopping/order.vue
  3. 68 8
      shopping/orderdetails.vue
  4. 0 13
      shopping/submitorder.vue
  5. 14 0
      uni.scss

+ 2 - 0
shopping/evaluate.vue

@@ -56,6 +56,7 @@
 				id:'',
 				params:{
 					orderId:'',
+					orderDetailId:'',
 					star:5,
 					contentText:'',
 					contentImgList:[]
@@ -76,6 +77,7 @@
 			getOrderDetails(id){
 				this.$u.api.orderDetails({id:id}).then(res=>{
 					this.orderDetails = res.data
+					this.params.orderDetailId= res.data.detailList[0]?.id
 					console.log('orderDetails',JSON.parse(JSON.stringify(res.data)));
 				}).catch(err=>{
 					console.log('getOrderDetails',err);

+ 1 - 0
shopping/order.vue

@@ -58,6 +58,7 @@
 							</view>
 						</view>
 						<view class="bottom">
+							<view class="" style="margin-bottom: 10rpx;">{{item.logisticsType|filterLogisticsType}}</view>
 							<view v-if="item.detailList.length>2" class="more" @click.stop="toggleMore(item,index)">
 								<text v-if="!item.showMore">查看剩余{{item.moreData.length}}件商品</text>
 								<text v-else>收起</text>

+ 68 - 8
shopping/orderdetails.vue

@@ -12,7 +12,7 @@
 		<view class="page-wrap">
 			<view class="box distribution u-flex u-row-between" 
 			v-if="orderDetails.status>0"
-			@click="$u.route('/shopping/distribution', {orderId: orderDetails.id})">
+			@click="statusClick">
 				<view class="left u-flex">
 					<u--image :showLoading="false" :src="staticUrl+'/img/car.png'" width="48rpx" height="48rpx"></u--image>
 					<view class="text">
@@ -22,7 +22,7 @@
 				</view>
 				<u-icon name="arrow-right" color="#676767" size="24rpx"></u-icon>
 			</view>
-			<view class="box addr u-flex u-row-between">
+			<view class="box addr u-flex u-row-between" v-if="orderDetails.logisticsType!=1">
 				<view class="left">
 					<view class="top">
 						<text class="label" v-if="orderDetails.ifDefault">默认</text>{{orderDetails.address||''}}
@@ -32,6 +32,36 @@
 				</view>
 				<!-- <u-icon name="arrow-right" color="#676767" size="20" @click="selectAddr"></u-icon> -->
 			</view>
+			<view class="box pickup-info" v-else>
+				<view class="item u-flex u-row-between">
+					<view class="left">
+						提货人:
+						<text>{{pickupInfo.pickupName}}</text>
+						<text>{{pickupInfo.pickupMobile}}</text>
+					</view>
+					<!-- <view class="right">
+						<u-icon name="arrow-right" color="#676767" size="20"></u-icon>
+					</view> -->
+				</view>
+				<view class="item u-flex u-row-between" @click="pickupTimeShow=true">
+					<view class="left">
+						预约提货时间:
+						<text>{{pickupInfo.pickupTime}}</text>
+					</view>
+					<!-- <view class="right">
+						<u-icon name="arrow-right" color="#676767" size="20"></u-icon>
+					</view> -->
+				</view>
+				<view class="item u-flex u-row-between">
+					<view class="left u-flex">
+						<text style="flex: 1;white-space: nowrap;">自提地点:</text>
+						<text class="ellipsis-1">{{pickupInfo.pickupAddress}}</text>
+					</view>
+					<view class="right">
+						<u-icon  @click="goMap" :name="staticUrl+'/img/go-map-icon-y.png'" color="#676767" size="20"></u-icon>
+					</view>
+				</view>
+			</view>
 			<!-- <view class="payway page-wrap u-flex u-row-between">
 				<view class="left">支付方式</view>
 				<view class="u-flex">
@@ -58,6 +88,15 @@
 						</view>
 					</view>
 				</view>
+				<!-- logisticsType==1 自提 -->
+				<view class="" v-if="orderDetails.logisticsType==1" style="font-size: 24rpx;color: #00A447;text-align: right;">
+					<view class="" v-if="orderDetails.status<=2">请尽快在{{orderDetails.orderShowTime}}小时内提走商品哦</view>
+				</view>
+				<!-- logisticsType==2 同城配送 -->
+				<view class="" v-if="orderDetails.logisticsType==2" style="font-size: 24rpx;color: #00A447;text-align: right;">
+					<view class="" v-if="orderDetails.status>1">商品将在{{orderDetails.orderShowTime}}小时内配送完成</view>
+					<view class="" v-else>商品即将开始配送请耐心等待</view>
+				</view>
 			</view>
 	<!-- 		<view class="page-wrap order-reduced">
 				<view class="reduced-item u-flex u-row-between u-border-bottom">
@@ -87,13 +126,13 @@
 			<view class="box total">
 				<view class="total-item u-flex u-row-between u-border-bottom">
 					<view class="left">
-						商品金额
+						实付金额
 					</view>
 					<view class="right red">
-						¥ {{orderDetails.originalOrderPrice}}
+						¥ {{orderDetails.realPrice}}
 					</view>
 				</view>
-				<view class="total-item u-flex u-row-between">
+				<view class="total-item u-flex u-row-between" v-if="orderDetails.logisticsType!=1">
 					<view class="left">
 						运费
 						<!-- <text class="gray">总重:{{totalWeight}}</text> -->
@@ -164,12 +203,13 @@
 					0:[],
 					1:[{name:'订单编号',key:'orderNum'},{name:'下单时间',key:'createTime'},{name:'支付方式',key:'payType'},{name:'支付时间',key:'payTime'}],
 					2:[{name:'订单编号',key:'orderNum'},{name:'下单时间',key:'createTime'},{name:'支付方式',key:'payType'},{name:'支付时间',key:'payTime'}],
-					3:[{name:'订单编号',key:'orderNum'},{name:'下单时间',key:'createTime'},{name:'支付方式',key:'payType'},{name:'支付时间',key:'payTime'}],
+					3:[{name:'订单编号',key:'orderNum'},{name:'下单时间',key:'createTime'},{name:'支付方式',key:'payType'},{name:'支付时间',key:'payTime'},{name:'收货时间',key:'receiveTime'}],
 					4:[{name:'订单编号',key:'orderNum'},{name:'下单时间',key:'createTime'}],
 					5:[{name:'订单编号',key:'orderNum'},{name:'下单时间',key:'createTime'},{name:'支付方式',key:'payType'},{name:'支付时间',key:'payTime'}],
 					6:[{name:'订单编号',key:'orderNum'},{name:'下单时间',key:'createTime'},{name:'支付方式',key:'payType'},{name:'支付时间',key:'payTime'}],
 					7:[{name:'订单编号',key:'orderNum'},{name:'下单时间',key:'createTime'},{name:'支付方式',key:'payType'},{name:'支付时间',key:'payTime'}],
-				}
+				},
+				pickupInfo:{}
             }
         },
 		onLoad(page) {
@@ -195,7 +235,8 @@
 				this.$u.api.orderDetails({id:id}).then(res=>{
 					this.loadingPage = false;
 					this.orderDetails = res.data
-					console.log('orderDetails',JSON.parse(JSON.stringify(res.data)));
+					this.pickupInfo =  res.data.pickupInfo;
+					// console.log('orderDetails',JSON.parse(JSON.stringify(res.data)));
 				}).catch(err=>{
 					console.log('getOrderDetails',err);
 				})
@@ -295,6 +336,25 @@
 				        }
 				    }
 				})
+			},
+			goMap(){
+				uni.openLocation({
+				  latitude: Number(this.pickupInfo.pickupLatitude),	//维度
+				  longitude: Number(this.pickupInfo.pickupLongitude), //经度
+				  name: "商行地址",	//目的地定位名称
+				  scale: 15,	//缩放比例
+				  address: this.pickupInfo.pickupAddress	//导航详细地址
+				})
+			},
+			statusClick(){
+				if (['1', '2'].includes(this.orderDetails.logisticsType)) {
+				    uni.$u.toast('暂无物流信息');
+				}else{
+					uni.$u.route('/shopping/distribution', {
+						orderId: this.orderDetails.id
+					});					
+				}
+				
 			}
         }
     }

+ 0 - 13
shopping/submitorder.vue

@@ -601,17 +601,4 @@
 	}
 	
 }
-.pickup-info{
-	padding: 0 30rpx;
-	.item{
-		padding: 30rpx 0;
-		font-size: 30rpx;
-		font-weight: 400;
-		color: #333333;
-		line-height: 42rpx;
-		&:not(:last-of-type){
-			border-bottom: 1px solid #eee;
-		}
-	}
-}
 </style>

+ 14 - 0
uni.scss

@@ -371,4 +371,18 @@ page{
 			line-height: 37rpx;
 		}
 	}
+}
+
+.pickup-info{
+	padding: 0 30rpx;
+	.item{
+		padding: 30rpx 0;
+		font-size: 30rpx;
+		font-weight: 400;
+		color: #333333;
+		line-height: 42rpx;
+		&:not(:last-of-type){
+			border-bottom: 1px solid #eee;
+		}
+	}
 }