浏览代码

fix 修改 bug

ylong 3 周之前
父节点
当前提交
5ce61b4bd6

+ 1 - 1
pages-mine/components/order-actions.vue

@@ -14,7 +14,7 @@
                     已用时长:
                     <time-clock :initialSeconds="order.reviewCostTime"></time-clock>
                 </div>
-                <button v-if="order.showReview == 2" class="action-btn plain">已申请复审</button>
+                <button v-if="order.showReview == 2" class="action-btn plain" @click.stop>已申请复审</button>
                 <button class="action-btn" v-if="order.showReview == 3"
                     @click.stop="handleAction('reviewImage')">审核图片</button>
             </template>

+ 26 - 18
pages-mine/components/order-return-item.vue

@@ -8,8 +8,9 @@
                 }}</text>
 
             <template v-else>
-                <text class="order-status" style="color: #FF000C" v-if="order.refundStatus==3">订单复审中</text>
-                <text class="order-status" style="color: #FF000C" v-else-if="!order.restTime&&order.refundStatus!=3">已超时</text>
+                <text class="order-status" style="color: #FF000C" v-if="order.refundStatus == 3">订单复审中</text>
+                <text class="order-status" style="color: #FF000C"
+                    v-else-if="!order.restTime && order.refundStatus != 3">已超时</text>
                 <view class="time-container" style="min-width: 220rpx;" v-else>
                     <u-count-down class="time" :timestamp="order.restTime" separator="zh" separator-size="28"
                         separator-color="#FF0000" color="#FF0000" bg-color="transparent" :show-seconds="false"
@@ -35,15 +36,20 @@
 
         <!-- 底部按钮 -->
         <order-return-actions :order="order" :status="order.status" @action="handleAction" v-if="showAction" />
+        <common-dialog ref="reviewDialog" title="温馨提示" @confirm="onApplyReturn">
+            <text>该订单正在排队复审,申请退回复审将退出!</text>
+        </common-dialog>
     </view>
 </template>
 
 <script>
 import OrderReturnActions from '@/pages-mine/components/order-return-actions.vue'
+import CommonDialog from '@/components/common-dialog.vue'
 export default {
     name: 'order-return-item',
     components: {
-        OrderReturnActions
+        OrderReturnActions,
+        CommonDialog
     },
     props: {
         order: {
@@ -82,27 +88,29 @@ export default {
                 })
             } else {
                 if (this.order.refundStatus != 3) {
-                    if (this.order.restTime) {
-                        uni.navigateTo({
-                            url: `/pages-mine/pages/apply?orderId=${this.order.orderId}`
-                        })
-                    } else {
-                        uni.showToast({
-                            title: '已超时',
-                            icon: 'none'
-                        })
-                    }
+                    this.onApplyReturn();
                 } else {
-                    uni.showToast({
-                        title: '订单复审中,暂时不能操作退回订单',
-                        icon: 'none'
-                    })
+                    this.$refs.reviewDialog.openPopup();
                 }
             }
         },
+        //跳转申请退回页面
+        onApplyReturn() {
+            if (this.order.restTime) {
+                uni.navigateTo({
+                    url: `/pages-mine/pages/apply?orderId=${this.order.orderId}`
+                })
+            } else {
+                uni.showToast({
+                    title: '已超时',
+                    icon: 'none'
+                })
+            }
+        },
+
         handleAction(data) {
             this.$emit('action', data)
-        }
+        },
     }
 }
 </script>

+ 28 - 2
pages-mine/components/return-notice.vue

@@ -8,7 +8,17 @@
             </view>
             <view class="countdown">
                 您需要在
-                <u-count-down class="time" :timestamp="orderInfo.restTime" separator="zh" separator-size="28" separator-color="#FF0000" color="#FF0000" bg-color="transparent"></u-count-down>
+                <u-count-down
+                    v-if="!isRestStopped"
+                    class="time"
+                    :timestamp="orderInfo.restTime"
+                    separator="zh"
+                    separator-size="28"
+                    separator-color="#FF0000"
+                    color="#FF0000"
+                    bg-color="transparent"
+                ></u-count-down>
+                <text v-else class="time">{{ hmsTextZh }}</text>
                 内处理
             </view>
         </view>
@@ -24,6 +34,22 @@ export default {
             default: {}
         }
     },
+    computed: {
+        // 是否停止倒计时
+        isRestStopped() {
+            const stop = this.orderInfo && this.orderInfo.restStop
+            return Number(stop) === 1
+        },
+        // 当停止时,静态显示“时分秒”
+        hmsTextZh() {
+            const secRaw = this.orderInfo && this.orderInfo.restTime
+            const sec = Math.max(0, Number(secRaw || 0))
+            const h = String(Math.floor(sec / 3600)).padStart(2, '0')
+            const m = String(Math.floor((sec % 3600) / 60)).padStart(2, '0')
+            const s = String(sec % 60).padStart(2, '0')
+            return `${h}时${m}分${s}秒`
+        }
+    },
     methods: {
         handleReturn() {
             this.$emit('close')
@@ -78,4 +104,4 @@ export default {
         }
     }
 }
-</style>
+</style>

+ 36 - 22
pages-mine/pages/order-detail.vue

@@ -12,7 +12,8 @@
 		<view class="info-block">
 			<view class="flex-a flex-j-b">
 				<text class="common-title font-32">卖书收入:</text>
-				<text class="common-text" style="color: #ff0000" v-if="orderInfo.finalMoney">¥{{ orderInfo.finalMoney }}</text>
+				<text class="common-text" style="color: #ff0000" v-if="orderInfo.finalMoney">¥{{ orderInfo.finalMoney
+				}}</text>
 				<text class="common-text" style="color: #ff0000" v-else>待审核</text>
 			</view>
 			<view class="desc-bg">
@@ -23,7 +24,8 @@
 
 				<view class="flex-a flex-j-b" v-if="orderInfo.upsellFinalMoney || orderInfo.upsellExpectMoney">
 					<text class="common-text-2 font-26">限时加价:</text>
-					<text class="common-text-2 font-26">¥{{ orderInfo.upsellFinalMoney || orderInfo.upsellExpectMoney }}</text>
+					<text class="common-text-2 font-26">¥{{ orderInfo.upsellFinalMoney || orderInfo.upsellExpectMoney
+					}}</text>
 				</view>
 				<view class="flex-a flex-j-b">
 					<view class="common-text-2 font-26">
@@ -40,7 +42,8 @@
 				<text class="common-title font-32">卖书编号:</text>
 				<view class="common-text-2 font-26 flex-a">
 					{{ orderInfo.orderId }}
-					<image src="../static/copy.png" style="width: 42rpx; height: 42rpx; margin-left: 20rpx" @click="copyOrderNo"></image>
+					<image src="../static/copy.png" style="width: 42rpx; height: 42rpx; margin-left: 20rpx"
+						@click="copyOrderNo"></image>
 				</view>
 			</view>
 			<view class="desc-bg">
@@ -71,24 +74,22 @@
 		<!-- 底部操作栏 -->
 		<view class="bottom-fixed-con detail-bottom flex-d">
 			<service-info :firstOrder="orderInfo.firstOrder"></service-info>
-			<view class="flex-a" style="width: 100%; padding: 0 30rpx;justify-content: flex-end;align-items: center;min-height: 42px;">
-				<u-button size="small" type="warning" @click="handleOpenOverTime" v-if="orderInfo.confirmCompensationMoney" style="margin-right: 10px">验货超时补偿</u-button>
-				<u-button size="small" type="warning" @click="handleOpenSellLoss" v-if="orderInfo.priceCompensationMoney" style="margin-right: 10px">卖亏必赔</u-button>
-				<order-actions style="width:fit-content" :order="orderInfo" :status="orderInfo.status" @action="handleAction" @success="getOrderInfo"></order-actions>
+			<view class="flex-a"
+				style="width: 100%; padding: 0 30rpx;justify-content: flex-end;align-items: center;min-height: 42px;">
+				<u-button size="small" type="warning" @click="handleOpenOverTime"
+					v-if="orderInfo.confirmCompensationMoney" style="margin-right: 10px">验货超时补偿</u-button>
+				<u-button size="small" type="warning" @click="handleOpenSellLoss"
+					v-if="orderInfo.priceCompensationMoney" style="margin-right: 10px">卖亏必赔</u-button>
+				<order-actions style="width:fit-content" :order="orderInfo" :status="orderInfo.status"
+					@action="handleAction" @success="getOrderInfo"></order-actions>
 			</view>
 		</view>
 
-		<u-action-sheet
-			v-model="showReportSheet"
-			:list="actionList"
-			@close="showReportSheet = false"
-			@click="handleReportSelect"
-			cancelText="取消"
-			:mask-close-able="false"
-			:safe-area-inset-bottom="true"
-		/>
+		<u-action-sheet v-model="showReportSheet" :list="actionList" @close="showReportSheet = false"
+			@click="handleReportSelect" cancelText="取消" :mask-close-able="false" :safe-area-inset-bottom="true" />
 
-		<CommonDialog ref="returnDialog" title="退回不通过书籍" :showFooter="false" @confirm="handleRecycleConfirm" width="88%">
+		<CommonDialog ref="returnDialog" title="退回不通过书籍" :showFooter="false" @confirm="handleRecycleConfirm"
+			width="88%">
 			<view class="flex-a flex-j-b">
 				<button class="confirm-btn plain" @click="handleApplyBack">我要取回</button>
 				<button class="confirm-btn plain" @click="handleRecycleWare">仓库循环处理</button>
@@ -99,21 +100,28 @@
 			</view>
 		</CommonDialog>
 
-		<CommonDialog ref="recycleDialog" title="是否按纸价回收" @confirm="handleRecycleConfirm">补贴 ¥{{ orderInfo.basicRecycleMoney || 0 }} 到余额</CommonDialog>
-		<CommonDialog ref="recycleWare" title="是否仓库循环处理" @confirm="handleRecycleWareConfirm">感谢您对环保事业的支持,仓库将循环处理</CommonDialog>
+		<CommonDialog ref="recycleDialog" title="是否按纸价回收" @confirm="handleRecycleConfirm">补贴 ¥{{
+			orderInfo.basicRecycleMoney || 0 }} 到余额</CommonDialog>
+		<CommonDialog ref="recycleWare" title="是否仓库循环处理" @confirm="handleRecycleWareConfirm">感谢您对环保事业的支持,仓库将循环处理
+		</CommonDialog>
 
 		<CommonDialog ref="overTimeDialog" title="验货超时补偿" @confirm="handleOverTimeConfirm" :showFooter="false">
 			<view class="flex-a flex-j-b" style="padding: 40rpx 0">
-				<u-button class="confirm-btn" type="success" @click="handleOverTimeConfirm">补贴 ¥{{ orderInfo.confirmCompensationMoney || 0 }} 到余额</u-button>
+				<u-button class="confirm-btn" type="success" @click="handleOverTimeConfirm">补贴 ¥{{
+					orderInfo.confirmCompensationMoney || 0 }} 到余额</u-button>
 				<u-button class="confirm-btn" type="warning" @click="handleCloseOverTime">原谅你了</u-button>
 			</view>
 		</CommonDialog>
 		<CommonDialog ref="sellLossDialog" title="卖亏必赔" @confirm="handleSellLossConfirm" :showFooter="false">
 			<view class="flex-a flex-j-b" style="padding: 40rpx 0">
-				<u-button class="confirm-btn" type="success" @click="handleSellLossConfirm">补贴 ¥{{ orderInfo.priceCompensationMoney || 0 }} 到余额</u-button>
+				<u-button class="confirm-btn" type="success" @click="handleSellLossConfirm">补贴 ¥{{
+					orderInfo.priceCompensationMoney || 0 }} 到余额</u-button>
 				<u-button class="confirm-btn" type="warning" @click="handleCloseSellLoss">原谅你了</u-button>
 			</view>
 		</CommonDialog>
+		<common-dialog ref="reviewDialog" title="温馨提示" @confirm="onApplyReturn">
+			<text>该订单正在排队复审,申请退回复审将退出!</text>
+		</common-dialog>
 	</view>
 </template>
 
@@ -182,7 +190,13 @@ export default {
 			});
 		},
 		handleReturn() {
-			console.log('退回不通过书籍');
+			if (this.orderInfo.restStop === 1) {
+				this.$refs.reviewDialog?.openPopup();
+			} else {
+				this.$refs.returnDialog?.openPopup();
+			}
+		},
+		onApplyReturn() {
 			this.$refs.returnDialog?.openPopup();
 		},
 		//仓库循环处理

+ 10 - 40
pages-mine/pages/review-image.vue

@@ -6,8 +6,9 @@
 				<!-- 标题 -->
 				<view class="review-title">
 					<text class="title-text">{{ item.bookName }}</text>
-					<text class="title-tag" v-if="item.reviewAudit && item.reviewAuditSts==3">复审结果:{{ item.reviewAudit }}</text>
-					<text class="title-tag success-tag" v-if="item.reviewAuditSts==1">复审结果:良好</text>
+					<text class="title-tag" v-if="item.reviewAudit && item.reviewAuditSts == 3">复审结果:{{ item.reviewAudit
+						}}</text>
+					<text class="title-tag success-tag" v-if="item.reviewAuditSts == 1">复审结果:良好</text>
 				</view>
 
 				<!-- 文字说明 -->
@@ -17,7 +18,8 @@
 
 				<!-- 图片网格 -->
 				<view class="image-grid">
-					<view class="image-item" v-for="(img, imgIndex) in item.reviewImg" :key="imgIndex" @click="previewImage(item.reviewImg, imgIndex)">
+					<view class="image-item" v-for="(img, imgIndex) in item.reviewImg" :key="imgIndex"
+						@click="previewImage(item.reviewImg, imgIndex)">
 						<u-image :src="img" width="100%" height="200rpx" border-radius="10rpx"
 							mode="aspectFill"></u-image>
 					</view>
@@ -52,45 +54,13 @@ export default {
 		return {
 			orderId: "",
 			// 复审列表数据(假数据)
-			reviewList: [
-				{
-					title: "科学百科",
-					tag: "复审结果:笔记杂乱/习题做完",
-					images: [
-						"https://wx3.sinaimg.cn/mw690/88e90961ly1hwvqdknjo4j20u0140tav.jpg",
-						"https://wx3.sinaimg.cn/mw690/88e90961ly1hwvqdknjo4j20u0140tav.jpg",
-						"https://wx3.sinaimg.cn/mw690/88e90961ly1hwvqdknjo4j20u0140tav.jpg",
-					],
-					showAll: false,
-				},
-				{
-					title: "科学百科",
-					tag: "复审结果:笔记杂乱/习题做完",
-					images: [
-						"https://wx3.sinaimg.cn/mw690/88e90961ly1hwvqdknjo4j20u0140tav.jpg",
-						"https://wx3.sinaimg.cn/mw690/88e90961ly1hwvqdknjo4j20u0140tav.jpg",
-						"https://wx3.sinaimg.cn/mw690/88e90961ly1hwvqdknjo4j20u0140tav.jpg",
-					],
-					showAll: false,
-				},
-				{
-					title: "科学百科",
-					tag: "复审结果:笔记杂乱/习题做完",
-					images: [
-						"https://wx3.sinaimg.cn/mw690/88e90961ly1hwvqdknjo4j20u0140tav.jpg",
-						"https://wx3.sinaimg.cn/mw690/88e90961ly1hwvqdknjo4j20u0140tav.jpg",
-						"https://wx3.sinaimg.cn/mw690/88e90961ly1hwvqdknjo4j20u0140tav.jpg",
-					],
-					showAll: false,
-				},
-			],
+			reviewList: [],
 			// 订单信息(假数据)
 			orderInfo: {
-				orderId: "14847984",
-				senderName: "张潇潇",
-				senderPhone: "18888888888",
-				address:
-					"hi是u发hi跟带回家大饭店计算度假村计算度假村计算度假村计算度假村计算度假村计算度假村几集",
+				orderId: "",
+				senderName: "",
+				senderPhone: "",
+				address:"",
 			},
 		};
 	},