lilei 2 anni fa
parent
commit
992e18eeb5

+ 4 - 26
pagesA/digitalShelf/choosePart.vue

@@ -225,17 +225,6 @@
 				</view>
 			</view>
 		</u-popup>
-		<!-- 红包 -->
-		<u-mask :show="showMask">
-			<view class="imageWarp flex flex_column justify_center align_center" style="width:100%;height:100vh;">
-				<view style="position: relative;">
-					<u-image src="/pagesA/static/hb.png" width="700" height="657" @click="toSuccess"></u-image>
-					<view style="font-size: 60rpx;color:#fff;position: absolute;top:50%;text-align: center;width: 100%;">
-						{{tempData&&tempData.shelfOrder&&tempData.shelfOrder.totalRewardAmount||'0.00'}} <text style="font-size: 26rpx;margin-left: 10rpx;">元</text>
-					</view>
-				</view>
-			</view>
-		</u-mask>
 	</view>
 </template>
 
@@ -245,7 +234,6 @@
 		data() {
 			return {
 				showOther: false,
-				showMask: false,
 				theme: '',
 				vinNumber: '',
 				leve2Data: [],  //  二级菜单数据
@@ -266,7 +254,6 @@
 				isIphoneXup: false,
 				saveLoading: false,
 				showPopup: false,
-				tempData: null
 			}
 		},
 		computed:{
@@ -615,13 +602,10 @@
 					shelfOrderFlowCreate(params).then(res => {
 						console.log(res,'shelfOrderFlowCreate')
 						if(res.status == 200){
-							this.tempData = res.data
-							// 有红包活动
-							if(res.data.shelfOrder && res.data.shelfOrder.totalRewardAmount){
-								this.showMask = true
-							}else{
-								this.toSuccess()
-							}
+							// 提交成功
+							uni.redirectTo({
+								url:"/pagesA/digitalShelf/choosePartResult?data="+encodeURIComponent(JSON.stringify(res.data))+"&state=1"
+							})
 						}else{
 							// 或失败
 							uni.redirectTo({
@@ -632,12 +616,6 @@
 					})
 				}
 			},
-			toSuccess(){
-				// 提交成功
-				uni.redirectTo({
-					url:"/pagesA/digitalShelf/choosePartResult?data="+encodeURIComponent(JSON.stringify(this.tempData))+"&state=1"
-				})
-			}
 		}
 	}
 </script>

+ 27 - 10
pagesA/digitalShelf/choosePartResult.vue

@@ -1,6 +1,6 @@
 <template>
 	<view class="choosePartResult flex flex_column">
-		<view class="contHead" v-if="state" :style="{background:state==1?'#1283d4':'#ff5500',color:'#fff'}">
+		<view class="contHead" v-if="state" :style="{background:state==1?'#066cff':'#ff5500',color:'#fff'}">
 			<view class="statusH">
 				<view class="flex flex_column align_center">
 					<view class="status-row">
@@ -9,7 +9,7 @@
 						<text>{{statusText}}</text>
 					</view>
 					<view class="messageText" v-html="info&&info.shelfOrder&&info.shelfOrder.remindMessage||''"></view>
-					<view class="messageText" v-if="info&&info.shelfOrder&&info.shelfOrder.totalRewardAmount">
+					<view class="messageText" v-if="info&&info.shelfOrder&&info.shelfOrder.totalRewardAmount&&!showMask">
 						您已获得<text>{{info.shelfOrder.totalRewardAmount}}</text>元红包奖励,可在“更多-红包奖励”中查看
 					</view>
 					<!-- <view class="button-group"> -->
@@ -120,6 +120,17 @@
 				</view>
 			</view>
 		</view>
+		<!-- 红包 -->
+		<u-mask :show="showMask">
+			<view class="imageWarp flex flex_column justify_center align_center" style="width:100%;height:100vh;">
+				<view style="position: relative;">
+					<u-image src="/pagesA/static/hb.png" width="700" height="657" @click="showMask=false"></u-image>
+					<view style="font-size: 60rpx;color:#fff;position: absolute;top:50%;text-align: center;width: 100%;">
+						{{info&&info.shelfOrder&&info.shelfOrder.totalRewardAmount||'0.00'}} <text style="font-size: 26rpx;margin-left: 10rpx;">元</text>
+					</view>
+				</view>
+			</view>
+		</u-mask>
 	</view>
 </template>
 
@@ -142,7 +153,8 @@
 			   tempPartList: [], 
 			   state: null,
 			   current: 0,
-			   shelfOrderSn: ''
+			   shelfOrderSn: '',
+			   showMask: false,
 		   }
 	   },
 	   onLoad(option) { 
@@ -150,13 +162,18 @@
 		  this.state = option.state
 		  console.log(this.info,'-------------')
 		  if(option.state==1){
-			  this.statusText = '拿货成功'
-			  this.statusIcon = 'checkmark-circle'
+			  this.statusText = '拿货成功';
+			  this.statusIcon = 'checkmark-circle';
 			  // 获取配件列表
-			  this.partList = this.info.shelfOrder ? this.info.shelfOrder.shelfOrderDetailList : []
-			  this.tempPartList = this.info.shelfTempBill ? this.info.shelfTempBill.detailList : [],
-			  this.shelfOrderSn = this.info.shelfOrder ? this.info.shelfOrder.shelfOrderSn : ''
-			  this.current = this.partList.length ? 0 : 1
+			  this.partList = this.info.shelfOrder ? this.info.shelfOrder.shelfOrderDetailList : [];
+			  this.tempPartList = this.info.shelfTempBill ? this.info.shelfTempBill.detailList : [];
+			  this.shelfOrderSn = this.info.shelfOrder ? this.info.shelfOrder.shelfOrderSn : '';
+			  this.current = this.partList.length ? 0 : 1;
+			  
+			  // 有红包活动
+			  if(this.info.shelfOrder && this.info.shelfOrder.totalRewardAmount){
+				  this.showMask = true
+			  }
 		  }else{
 			  this.statusText = '拿货失败'
 			  this.statusIcon = 'close-circle'
@@ -165,7 +182,7 @@
 		  // 更改标题栏背景色
 		  uni.setNavigationBarColor({
 		  	frontColor: '#ffffff',
-		  	backgroundColor: option.state==1 ? '#1283d4':'#ff5500',
+		  	backgroundColor: option.state==1 ? '#066cff':'#ff5500',
 		  })
 	   },
 	   computed: {

+ 2 - 2
pagesA/digitalShelf/orderDetail.vue

@@ -1,6 +1,6 @@
 <template>
 	<view class="orderDetail-digitalShel flex flex_column">
-		<view class="contHead" :style="{background:state== 'FINISH'?'#1283d4':'#ff5500',color:'#fff'}">
+		<view class="contHead" :style="{background:state== 'FINISH'?'#066cff':'#ff5500',color:'#fff'}">
 			<view class="statusH">
 				<view class="flex flex_column align_center">
 					<view class="status-row">
@@ -132,7 +132,7 @@
 		  // 更改标题栏背景色
 		  uni.setNavigationBarColor({
 		  	frontColor: '#ffffff',
-		  	backgroundColor: option.state== 'FINISH' ? '#1283d4':'#ff5500',
+		  	backgroundColor: option.state== 'FINISH' ? '#066cff':'#ff5500',
 		  })
 	   },
 	   onShow() {

+ 3 - 42
pagesA/queryByCode/confirmQh.vue

@@ -30,17 +30,6 @@
 			 	确认拿货
 			 </u-button>
 		 </view>
-		 <!-- 红包 -->
-		 <u-mask :show="showMask">
-		 	<view class="imageWarp flex flex_column justify_center align_center" style="width:100%;height:100vh;">
-		 		<view style="position: relative;">
-		 			<u-image src="/pagesA/static/hb.png" width="700" height="657" @click="toDetail"></u-image>
-		 			<view style="font-size: 60rpx;color:#fff;position: absolute;top:50%;text-align: center;width: 100%;">
-		 				{{tempData&&tempData.totalRewardAmount||'0.00'}} <text style="font-size: 26rpx;margin-left: 10rpx;">元</text>
-		 			</view>
-		 		</view>
-		 	</view>
-		 </u-mask>
 	</view>
 </template>
 
@@ -52,8 +41,6 @@
 				 loading:false,
 				 nowData: null,
 				 qty: 1,
-				 showMask: false,
-				 tempData: null
 			}
 		},
 		onLoad(options) {
@@ -86,18 +73,11 @@
 			},
 			toDetail(data){
 				uni.$emit("updateQueryByCodeList")
+				// 提交成功
 				uni.redirectTo({
-					url: "/pagesA/digitalShelf/orderDetail?shelfOrderSn="+this.tempData.shelfOrderSn
+					url:"/pagesA/digitalShelf/choosePartResult?data="+encodeURIComponent(JSON.stringify({shelfOrder:data}))+"&state=1"
 				})
 			},
-			showRedModal(data){
-				this.tempData = data
-				if(data.totalRewardAmount){
-					this.showMask = true
-				}else{
-				    this.toDetail(data)
-				}
-			},
 			// 确认拿货
 			 outShelfOrder(){
 				 const _this = this
@@ -110,26 +90,7 @@
 						}]
 				 }).then(res => {
 					 if(res.status == 200){
-						 if(res.data&&res.data.remindMessage){
-							 uni.showModal({
-							 	title: '提示',
-							 	content: res.data.remindMessage,
-							 	confirmText: '知道了',
-							 	showCancel: false,
-								success(ret) {
-									if(ret.confirm){
-										_this.showRedModal(res.data)
-									}
-								}
-							 })
-						 }else{
-							 uni.showToast({
-							 	icon:'none',
-								title: res.message,
-								duration: 4000
-							 })
-							 _this.showRedModal(res.data)
-						 }
+						 this.toDetail(res.data)
 					 }else{
 						 uni.showModal({
 						 	title: res.errCode == 'VALIDATE_STOCK_LACK' ? '以下产品库存不足' : '提示',

BIN
static/banner2.jpg