lilei 7 months ago
parent
commit
f239cce319
2 changed files with 7 additions and 11 deletions
  1. 5 10
      pagesB/procureOrder/orderDetail.vue
  2. 2 1
      pagesB/procureOrder/orderList.vue

+ 5 - 10
pagesB/procureOrder/orderDetail.vue

@@ -1,6 +1,6 @@
 <template>
 	<view class="orderDetail-digitalShel flex flex_column">
-		<view class="contHead" :style="{background:state!= 'error'&&state!= 'AUDIT_REJECT'&&state!='CANCEL'&&state!='WAIT_PAY' ? '#066cff':'#e61100',color:'#fff'}">
+		<view class="contHead" :style="{background:state!= 'error'&&state!= 'AUDIT_REJECT'&&state!='CANCEL'&&state!='WAIT_PAY' ? '#066cff':(state=='WAIT_PAY'?'#f45c03':'#e61100'),color:'#fff'}">
 			<view class="statusH">
 				<view class="flex flex_column align_center">
 					<view class="status-row">
@@ -230,13 +230,6 @@
 		   if(option.purchaseSn){
 			   this.purchaseSn = option.purchaseSn
 			   this.getDetail()
-		   }else{
-			   // 从列表过来不需要查
-			   const data = this.$store.state.vuex_tempOrderData //获取订单信息
-			   if(data){
-				 this.purchaseSn = data.purchaseSn
-			   	 this.pageInit(data)
-			   }
 		   }
 		   // 获取明细列表
 		   this.getDetailList()
@@ -281,7 +274,7 @@
 			 // 更改标题栏背景色
 			 uni.setNavigationBarColor({
 			 	frontColor: '#ffffff',
-			 	backgroundColor: this.state!= 'error'&&this.state!= 'AUDIT_REJECT'&&this.state!= 'CANCEL'&&this.state!= 'WAIT_PAY' ? '#066cff':'#e61100',
+			 	backgroundColor: this.state!= 'error'&&this.state!= 'AUDIT_REJECT'&&this.state!= 'CANCEL'&&this.state!= 'WAIT_PAY' ? '#066cff':(this.state=='WAIT_PAY'?'#f45c03':'#e61100'),
 			 })
 		 },
 		 // 实时查询详情
@@ -344,6 +337,7 @@
 		 				purchaseCancel({purchaseSn:_this.purchaseSn}).then(res => {
 		 					if (res.status == 200) {
 		 						_this.message('取消成功')
+								item.payInfo = null
 								uni.$emit('refreshPurcaOrder',item,'CANCEL')
 								uni.navigateBack()
 		 					} else {
@@ -364,13 +358,14 @@
 				showCancel:false,
 				confirmText:'知道了',
 			 	success: function (res) {
-			 		uni.$emit('refreshPurcaOrder',_this.info,'CANCEL')
 			 		_this.state = 'CANCEL'
 			 		_this.info.billStatus = 'CANCEL'
+					_this.info.payInfo = null
 			 		_this.statusText = '已取消'
 			 		_this.statusIcon = 'close-circle'
 			 		_this.statusMessage = '订单超过30分钟已自动取消'
 			 		_this.info.cancelDate = moment().format('YYYY-MM-DD hh:mm:ss')
+					uni.$emit('refreshPurcaOrder',_this.info,'CANCEL')
 			 		// 更改标题栏背景色
 			 		uni.setNavigationBarColor({
 			 			frontColor: '#ffffff',

+ 2 - 1
pagesB/procureOrder/orderList.vue

@@ -314,6 +314,7 @@
 			},
 			// 订单超时
 			countDownEnd(item){
+				item.payInfo = null
 				this.resetList(item,'CANCEL')
 			},
 			// 确认收货
@@ -409,7 +410,7 @@
 			viewRow(item){
 				this.$store.state.vuex_tempOrderData = item
 				uni.navigateTo({
-					url: "/pagesB/procureOrder/orderDetail"
+					url: "/pagesB/procureOrder/orderDetail?purchaseSn="+item.purchaseSn
 				})
 			}
 		}