소스 검색

1.商城订单详情

guo 2 년 전
부모
커밋
ffd3227e88
4개의 변경된 파일117개의 추가작업 그리고 52개의 파일을 삭제
  1. 1 1
      pages.json
  2. 114 49
      pages/user/myOrder/mallOrderDetail.vue
  3. 2 2
      pages/user/myOrder/myOrder.vue
  4. BIN
      static/img/icon_store.png

+ 1 - 1
pages.json

@@ -179,7 +179,7 @@
             "style" :                                                                                    
             {
                 "navigationBarTitleText": "订单详情",
-                "enablePullDownRefresh": false
+                "enablePullDownRefresh": true
             }
             
         },

+ 114 - 49
pages/user/myOrder/mallOrderDetail.vue

@@ -48,7 +48,7 @@
 			<view class="informationLine2">
 				<view class="salePrice"><span
 						class="informationNum">¥</span>{{orderData.OpenSheetQRCodeList.totalPrice}}</view>
-				<view class="informationNum">
+				<view class="informationNum" style="color: #999999;">
 					x{{orderData.OpenSheetQRCodeList.itemQty}}</view>
 			</view>
 			<view v-if="orderData.data.sheetState != 1" class="line"></view>
@@ -63,9 +63,14 @@
 						<view class="code">{{v.qrCode}}</view>
 						<view class="quanState">待使用</view>
 
+					</view>
+					<view v-if="v.writeoffState==3" class="detailedName old">
+						<view class="redPoint"></view>
+						<view class="code">{{v.qrCode}}</view>
+						<view class="quanState">已使用</view>
+					
 					</view>
-					<view v-if="v.writeoffState==3" class="detailedName old"><span
-							class="redPoint">{{v.qrCode}}</span><span class="quanState2">已使用</span></view>
+					
 					<image src="../../../static/img/icon_erweima.png" mode="" style="width: 36rpx;height: 36rpx;"
 						v-if="v.writeoffState==1" @click="isShowMa=true"></image>
 				</view>
@@ -117,7 +122,7 @@
 		<!-- 实付款 -->
 		<view class="money">
 			<view class="informationNum">实付款:</view>
-			<view class="informationNum" style="color: #FF0000;">¥{{orderData.data.realMoney}}</view>
+			<view class="informationNum" style="color: #FF0000;font-weight: bold;">¥{{orderData.data.realMoney}}</view>
 		</view>
 
 		<!-- 订单信息 -->
@@ -139,7 +144,7 @@
 
 			<view class="informationLine">
 				<view class="informationTxt">订单备注:</view>
-				<view class="informationNum">{{orderData.data.comment?orderData.data.comment:''}}</view>
+				<view class="informationNum" style="width: 524rpx;">{{orderData.data.comment?orderData.data.comment:''}}</view>
 			</view>
 
 		</view>
@@ -181,17 +186,23 @@
 					<image @click="isShowMa=false" src="../../../static/img/icon_delete.png" mode=""
 						style="width: 26rpx;height: 26rpx;margin-left: 10rpx;"></image>
 
-				</view>
-				<view class="macodeBox" v-for="(item,index) in orderData.OpenSheetQRCodeList.OpenSheetQRCode"
-					:key="index">
-					<view class="maCode">{{item.qrCode}}</view>
-					<view class="maBoximg">
-						<tki-qrcode cid="qrcode1" ref="qrcode" :val="item.qrCode" :size="400" :unit="unit"
-							:pdground="pdground" :icon="icon" :iconSize="iconsize" :lv="lv" :onval="onval"
-							:loadMake="loadMake" :usingComponents="true" @result="qrR" />
-					</view>
-				</view>
-
+				</view>
+				<swiper class="swiper" circular  :autoplay="false" :indicator-dots="true" indicator-color="#CCCCCC" indicator-active-color="#D53533">
+					<swiper-item v-for="(item,index) in orderData.OpenSheetQRCodeList.OpenSheetQRCode">
+						<view class="swiper-item">
+							<view class="maCode">{{item.qrCode}}</view>
+							<view class="maBoximg">
+								<tki-qrcode cid="qrcode1" ref="qrcode" :val="item.qrCode" :size="400" :unit="unit"
+									:pdground="pdground" :icon="icon" :iconSize="iconsize" :lv="lv" :onval="onval"
+									:loadMake="loadMake" :usingComponents="true" @result="qrR" />
+							</view>
+						</view>
+					</swiper-item>
+					
+					
+				</swiper>
+				
+			
 			</view>
 		</view>
 
@@ -229,7 +240,7 @@
 				lv: 3, // 二维码容错级别 , 一般不用设置,默认就行
 				src: '', // 二维码生成后的图片地址或base64
 				isShowMa: false,
-				
+				 timer: null,
 			}
 		},
 		onLoad(opt) {
@@ -239,11 +250,38 @@
 
 			if (this.id) {
 				this.getData()
-			}
-
+			}
+			
+			var that=this;
+			this.timer = setInterval(() => {
+				
+				that.$http('openOrderManagement/queryOpenSheet', {
+				
+					id: that.id,
+				}, 'GET').then(res => {
+					//已完成 sheetState == 3
+					let state = res.data.data.sheetState;
+					if (state==3) {
+						that.getData()
+						if(that.timer) {
+							clearTimeout(that.timer);  
+							that.timer = null;  
+						} 
+					}
+					
+				})
+			},5000)
+
+		},
+		onUnload() {
+			if(this.timer) {  
+				clearTimeout(this.timer);  
+				this.timer = null;  
+			}  
 		},
 
-		methods: {
+		methods: {
+			
 			pay(){
 				this.$http('openMallOrder/unifiedPay', {
 					sheetId:this.id
@@ -334,30 +372,47 @@
 
 
 				})
+			},
+			cancelBespeak(){
+				var that = this
+				uni.showModal({
+				    title: '提示',
+				    content: '是否取消该订单',
+					cancelText:'否',
+					confirmText:'是',
+				    success: function (res) {
+				        if (res.confirm) {
+							
+								uni.showLoading({
+									title: '加载中'
+								})
+								
+								that.$http('openOrderManagement/updateSheetState', {
+							
+									id: that.id,
+							
+								}, 'POST').then(res => {
+									uni.hideLoading();
+									// var list = res.data.Items
+									
+									uni.showToast({
+										title: '取消成功',
+										icon: 'none',
+										duration: 2000
+									});
+									setTimeout(function() {
+										that.getData();
+									}, 1000);
+								})
+							
+				          
+				        } else if (res.cancel) {
+				           
+				        }
+				    }
+				});
 			},
-			cancelBespeak() {
-				uni.showLoading({
-					title: '加载中'
-				})
-				var that = this
-				this.$http('openOrderManagement/updateSheetState', {
-
-					id: this.id,
-
-				}, 'POST').then(res => {
-					uni.hideLoading();
-					// var list = res.data.Items
-					var list = res.data
-					uni.showToast({
-						title: '取消成功',
-						icon: 'none',
-						duration: 2000
-					});
-					setTimeout(function() {
-						that.getData();
-					}, 1000);
-				})
-			},
+			
 			map() {
 				console.log("打开地图")
 				var that = this;
@@ -404,8 +459,6 @@
 					uni.hideLoading();
 					this.orderData = res.data;
 
-
-
 				})
 			},
 
@@ -634,7 +687,7 @@
 
 	.salePrice {
 
-		font-size: 32rpx;
+		font-size: 26rpx;
 		font-weight: 500;
 		color: #333333;
 		line-height: 45rpx;
@@ -685,7 +738,8 @@
 		color: #333333;
 		text-align: center;
 		line-height: 33rpx;
-		padding: 0 15rpx;
+		padding: 0 15rpx;
+		margin-left: 20rpx;
 	}
 
 	.orderBottom {
@@ -814,8 +868,19 @@
 		font-size: 26rpx;
 		text-align: center;
 		padding-left: 100rpx;
-	}
-
+	}
+	.swiper{
+		width: 100%;
+		height: 85%;
+		background: #FFFFFF;
+		
+	}
+	.swiper-item{
+		width: 100%;
+		height: 100%;
+	}
+	
+	
 	.maCode {
 
 		font-size: 30rpx;

+ 2 - 2
pages/user/myOrder/myOrder.vue

@@ -153,9 +153,9 @@
 	}
 
 	.tabActive {
-		color: #FF4F00;
+		color: #FF0000;
 		font-weight: bold;
-		border-bottom: 4rpx solid #FF4F00;
+		border-bottom: 4rpx solid #FF0000;
 
 	}
 

BIN
static/img/icon_store.png