From de0c04bd910370c99d6903372a5215d2aceafb95 Mon Sep 17 00:00:00 2001
From: xuxueyang <xuxy@fengyuntec.com>
Date: 星期五, 20 九月 2024 23:40:02 +0800
Subject: [PATCH] update 合伙人打印和订单详情刷新问题

---
 sub_pages/customer/coupon/good-all.vue                       |    5 +-
 sub_pages/partner/delivery/delivery-supplier-detail-list.vue |    7 ++-
 pages/order/order.vue                                        |    2 
 pages/order/order-detail.vue                                 |   72 +++++++++++++++++++-----------------
 4 files changed, 46 insertions(+), 40 deletions(-)

diff --git a/pages/order/order-detail.vue b/pages/order/order-detail.vue
index 4340a8b..8feb5ab 100644
--- a/pages/order/order-detail.vue
+++ b/pages/order/order-detail.vue
@@ -41,45 +41,49 @@
 					pictureList: []
 				}
 				this.showSales = options.showsales && true || false
-				this.timer = setInterval(() => {
-					//倒计时
-					var nowdate = new Date().getTime() - 1000 * 60 * 5
-					var change = false
 
-					//计算倒计时
-					var diff = new Date(this.dto.createTime).getTime() - nowdate
-					console.log('diff', diff)
-					if (diff <= 2000 && true) {
-						//超过了5分钟
-						this.dto.statusBackend = 'CANCEL'
-						this.dto.statusBackendStr = '已取消'
-						this.dto.status = 'CANCEL'
-						this.dto.statusStr = '已取消'
+				if (this.dto.statusBackend === 'PENDING' || this.dto.status === 'PENDING') {
 
-						this.dto.bctime = ''
-						// console.log('change cancel', this.dto)
-						change = true
-						clearInterval(this.timer)
-						this.timer = undefined
-					} else {
-						//相差
-						var alltime = parseInt(diff / 1000)
-						var tt = 0
-						if (alltime > 60) {
-							tt = alltime - parseInt(alltime / 60) * 60
+
+					this.timer = setInterval(() => {
+						//倒计时
+						var nowdate = new Date().getTime() - 1000 * 60 * 5
+						var change = false
+
+						//计算倒计时
+						var diff = new Date(this.dto.createTime).getTime() - nowdate
+						console.log('diff', diff)
+						if (diff <= 2000 && true) {
+							//超过了5分钟
+							this.dto.statusBackend = 'CANCEL'
+							this.dto.statusBackendStr = '已取消'
+							this.dto.status = 'CANCEL'
+							this.dto.statusStr = '已取消'
+
+							this.dto.bctime = ''
+							// console.log('change cancel', this.dto)
+							change = true
+							clearInterval(this.timer)
+							this.timer = undefined
 						} else {
-							tt = alltime
+							//相差
+							var alltime = parseInt(diff / 1000)
+							var tt = 0
+							if (alltime > 60) {
+								tt = alltime - parseInt(alltime / 60) * 60
+							} else {
+								tt = alltime
+							}
+							this.dto.bctime = `0${parseInt(alltime / 60)}:${tt<10?'0':''}${tt}`
+							change = true
+
 						}
-						this.dto.bctime = `0${parseInt(alltime / 60)}:${tt<10?'0':''}${tt}`
-						change = true
-
-					}
 
 
-					if (change)
-						this.$forceUpdate()
-				}, 1000)
-
+						if (change)
+							this.$forceUpdate()
+					}, 1000)
+				}
 
 
 			}
@@ -562,7 +566,7 @@
 			</view>
 			<view class="form-item">
 				<view class="label">下单日期:</view>
-				<view class="value">{{ dto.paymentTime || '-' }}</view>
+				<view class="value">{{ dto.createTime || '-' }}</view>
 			</view>
 			<view class="form-item" v-if="dto.cancelTime&&(dto.status==='CANCEL'||dto.status==='REFUND')">
 				<view class="label">取消时间:</view>
diff --git a/pages/order/order.vue b/pages/order/order.vue
index 6b31755..d5b59ea 100644
--- a/pages/order/order.vue
+++ b/pages/order/order.vue
@@ -131,7 +131,7 @@
 			},
 			toOrderItemDetail(item, op, opstr) {
 				uni.navigateTo({
-					url: `/sub_pages/supplier/order-manage/order-manage-settlement-op-detail?opStr=${opStr}&op=${op}&orderItemId=${item.id || item.orderItemId}`
+					url: `/sub_pages/supplier/order-manage/order-manage-settlement-op-detail?opStr=${opstr}&op=${op}&orderItemId=${item.id || item.orderItemId}`
 				})
 			},
 			async buttonClick(item, buttontype) {
diff --git a/sub_pages/customer/coupon/good-all.vue b/sub_pages/customer/coupon/good-all.vue
index 54bdd00..cd9f6eb 100644
--- a/sub_pages/customer/coupon/good-all.vue
+++ b/sub_pages/customer/coupon/good-all.vue
@@ -220,11 +220,12 @@
 			this.listApi = '/api/customer/point/goods/list'
 			this.getList()
 		},
-		onPullDownRefresh() {
+		async onPullDownRefresh() {
 			//刷新积分和刷新商品
 			this.$store.dispatch('getCurrentInfo');
 			// this.list = []
-			this.refreshList()
+			await this.refreshList()
+			uni.stopPullDownRefresh()
 		},
 
 		onReachBottom() {
diff --git a/sub_pages/partner/delivery/delivery-supplier-detail-list.vue b/sub_pages/partner/delivery/delivery-supplier-detail-list.vue
index ee3c99f..48c7dd7 100644
--- a/sub_pages/partner/delivery/delivery-supplier-detail-list.vue
+++ b/sub_pages/partner/delivery/delivery-supplier-detail-list.vue
@@ -63,7 +63,7 @@
 			this.query.supplierId = options.supplierId || ''
 			this.query.stationId = options.stationId || ''
 			if (options.warehouseLocationCode) {
-				console.log('options',options)
+				console.log('options', options)
 				this.query.warehouseLocationCode = options.warehouseLocationCode || ''
 			}
 
@@ -333,13 +333,14 @@
 					// this.$message.showToast('敬请期待')
 					var arr = []
 					for (var item of this.list) {
-						if (this.ids.indexOf(item.orderNo)) {
+						if (this.ids.indexOf(item.orderNo) >= 0) {
 							for (var each of item.items) {
 								arr.push(each)
 							}
 						}
 					}
 					if (arr.length > 0) {
+						// console.log('cache_delivery_order_print', arr)
 						this.$storage.setItem('cache_delivery_order_print', JSON.stringify(arr))
 						uni.navigateTo({
 							url: '/sub_pages/supplier/print/print-list'
@@ -381,7 +382,7 @@
 						配送单状态:{{ query.statusStr || '全部' }}
 						<image src="../../../static/common/icon-arrow-down.png" class="icon-arrow-down"></image>
 					</view> -->
-					<view class="flex1 m-l-a m-r-10" @click="selectAllOrder"  style="text-align: right;">
+					<view class="flex1 m-l-a m-r-10" @click="selectAllOrder" style="text-align: right;">
 						点击打印全部(已选{{ids.length}}个)
 						<!-- <image src="../../../static/common/icon-arrow-down.png" class="icon-arrow-down"></image> -->
 					</view>

--
Gitblit v1.9.3