shish 23 ساعت پیش
والد
کامیت
bfb362a7a6
1فایلهای تغییر یافته به همراه17 افزوده شده و 21 حذف شده
  1. 17 21
      ghsApp/src/pagesOrder/detail.vue

+ 17 - 21
ghsApp/src/pagesOrder/detail.vue

@@ -257,22 +257,18 @@
 				商品信息
 				<text style="font-weight:normal;font-size:26upx;color:green;max-width:190upx;overflow: hidden;white-space:nowrap;">{{ detailInfo.customName||'' }}</text>
 				<view class="flex" style="color: #3385ff;font-weight: 400" v-if="(detailInfo.status == 3 || detailInfo.status == 2) && detailInfo.book == 0">
-					<button class="admin-button-com bule middle" @click.stop="confirmReach(detailInfo,0)">确认送达</button>
+					<button class="admin-button-com bule middle" @click.stop="confirmReach(detailInfo)">确认送达</button>
 				</view>
 				<view v-else class="flex">
 					<button disabled="true" class="admin-button-com bule active middle" style="border:1rpx solid #ccc;">确认送达</button>
 				</view>
 
-				<view class="flex" style="color: #3385ff;" v-if="detailInfo.status == 4">
+				<!-- 待付款/已取消不可售后;其余直接进售后页(未完成由后端提交时自动确认送达/完成) -->
+				<view class="flex" style="color: #3385ff;" v-if="detailInfo.status != 1 && detailInfo.status != 5">
 					<button class="admin-button-com bule middle" @click.stop="goRefund()">发起售后</button>
 				</view>
 				<view v-else class="flex">
-					<block v-if="detailInfo.status == 1 || detailInfo.status == 5">
-						<button disabled="true" class="admin-button-com bule active middle" style="border:1rpx solid #ccc;">发起售后</button>
-					</block>
-					<block v-else>
-						<button class="admin-button-com bule middle" @click.stop="readyGoRefund(detailInfo)">发起售后</button>
-					</block>
+					<button disabled="true" class="admin-button-com bule active middle" style="border:1rpx solid #ccc;">发起售后</button>
 				</view>
 			</view>
 			<view class="module-com content-box">
@@ -1401,29 +1397,29 @@ export default {
 				}
 			})
 		},
-		confirmReach(info,type){
+		/**
+		 * 确认送达:仅「确认送达」按钮,把待发货/配送中订单置为已完成
+		 * @param {Object} info 订单详情
+		 */
+		confirmReach(info){
 			let that = this
 			if(![-1, -2,-4].includes(that.detailInfo.sendStatus)){
 				that.$msg('等跑腿送完再操作')
 				return
 			}
-			let remind = type == 0 ? '确认已送达?' : '确认订单完成?'
-			that.$util.confirmModal({content:remind},() => {
+			that.$util.confirmModal({content:'确认已送达?'},() => {
 				confirmReachFn({id:info.id}).then(res=>{
 					if(res.code == 1){
-						if(type == 0){
-							that.init()
-							that.$msg('已确认')
-						}else{
-							that.$util.pageTo({url:'/pagesOrder/refund?id='+this.option.id})
-						}
+						that.init()
+						that.$msg('已确认')
 					}
 				})
-            })
-		},
-		readyGoRefund(info){
-			this.confirmReach(info,1)
+			})
 		},
+		/**
+		 * 发起售后:直接进售后页,不再前端预确认送达/完成
+		 * 订单未完成时,由后端在提交售后时自动 confirmReach
+		 */
 		goRefund(){
 			this.$util.pageTo({url:'/pagesOrder/refund?id='+this.option.id})
 		},