shish 7 ماه پیش
والد
کامیت
8cb9b222dc
2فایلهای تغییر یافته به همراه39 افزوده شده و 26 حذف شده
  1. 2 2
      ghsApp/src/admin/home/order.vue
  2. 37 24
      ghsApp/src/pagesOrder/detail.vue

+ 2 - 2
ghsApp/src/admin/home/order.vue

@@ -240,11 +240,11 @@ export default {
   methods: {
     directFh(info) {
       let that = this;
-      that.$util.confirmModal({ content: '确认发货?' }, () => {
+      that.$util.confirmModal({ content: '确认自配送?' }, () => {
         orderFh({ id: info.id, fhType: 0 }).then((res) => {
           if (res.code == 1) {
             that.$refs[`orderRef${info.id}`][0].currentStatus = 3;
-            that.$msg('发货成功');
+            that.$msg('发货');
           }
         });
       });

+ 37 - 24
ghsApp/src/pagesOrder/detail.vue

@@ -182,9 +182,20 @@
 						<button @click='pageTo({url:"/pagesArrears/details",query: {id: detailInfo.customId}})' class="admin-button-com" style="border:1upx solid red;color:red;">全部赊账</button>
 					</view>
 				</view>
-				<view class="order-info_box">
+				<view class="order-info_box" style="margin-top:38upx;">
 					<view>订单状态:</view>
 					<view>{{ detailInfo.status==1?'待付款':detailInfo.status==2?'待发货':detailInfo.status==3?'配送中':detailInfo.status==4?'已完成':detailInfo.status==5?'已取消':'已退款' }}</view>
+
+					<view class="price" style="font-weight:normal;">
+						<block v-if="detailInfo.status == 2 && detailInfo.book == 0">
+							<button class="admin-button-com bule" @click.stop="directFh(detailInfo)">自配送</button>
+							<button class="admin-button-com bule" style="margin-left:30upx;" @click.stop="fillNoFh(detailInfo)">物流单发货</button>
+						</block>
+						<block v-else>
+							<button disabled="true" class="admin-button-com bule active" style="border:1rpx solid #ccc;">自配送</button>
+							<button disabled="true" class="admin-button-com bule active" style="margin-left:30upx;border:1rpx solid #ccc;">物流单发货</button>
+						</block>
+					</view>
 				</view>
 				<view class="order-info_box" v-if="detailInfo.fhType == 1">
 					<view>物流名称:</view>
@@ -228,26 +239,23 @@
 			</view>
 			<view class="flex-space title">
 				商品信息
-				<view class="flex" style="font-weight:normal;">
-					<block v-if="detailInfo.status == 2 && detailInfo.book == 0">
-						<button class="admin-button-com bule" @click.stop="directFh(detailInfo)">发货</button>
-						<button class="admin-button-com bule" style="margin-left:50upx;" @click.stop="fillNoFh(detailInfo)">填单发货</button>
-					</block>
-					<block v-else>
-						<button disabled="true" class="admin-button-com bule active" style="border:1rpx solid #ccc;">发货</button>
-						<button disabled="true" class="admin-button-com bule active" style="margin-left:50upx;border:1rpx solid #ccc;">填单发货</button>
-					</block>
+				<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" @click.stop="confirmReach(detailInfo,0)">确认送达</button>
 				</view>
-				<view class="flex" style="color: #3385ff;font-weight: 400" v-if="detailInfo.status == 4">
+				<view v-else>
+					<button disabled="true" class="admin-button-com bule active" style="border:1rpx solid #ccc;">确认送达</button>
+				</view>
+
+				<view class="flex" style="color: #3385ff;" v-if="detailInfo.status == 4">
 					<button class="admin-button-com bule" @click.stop="goRefund()">发起售后</button>
 				</view>
 				<view v-else>
 					<block v-if="detailInfo.status == 1 || detailInfo.status == 5">
 						<button disabled="true" class="admin-button-com bule active" style="border:1rpx solid #ccc;">发起售后</button>
 					</block>
-				</view>
-				<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" @click.stop="confirmReach(detailInfo)">确认送达</button>
+					<block v-else>
+						<button class="admin-button-com bule" @click.stop="readyGoRefund(detailInfo)">发起售后</button>
+					</block>
 				</view>
 			</view>
 			<view class="module-com content-box">
@@ -1015,11 +1023,11 @@ export default {
 		},
 		directFh(info){
 			let that = this
-			that.$util.confirmModal({content:'确认发货?'},() => {
+			that.$util.confirmModal({content:'确认自配送?'},() => {
 				orderFh({id:info.id,fhType:0}).then(res=>{
 					if(res.code == 1){
 						that.init()
-						that.$msg('发货成功')
+						that.$msg('发货')
 					}
 				})
 			})
@@ -1225,23 +1233,28 @@ export default {
 				}
 			})
 		},
-		confirmReach(info){
+		confirmReach(info,type){
 			let that = this
-
-
-			if(![-1, -4].includes(that.detailInfo.sendStatus)){
-				that.$msg('已使用跑腿配送')
+			if(![-1, -2,-4].includes(that.detailInfo.sendStatus)){
+				that.$msg('等跑腿送完再操作')
 				return
 			}
-			that.$util.confirmModal({content:'确认已送达?'},() => {
+			that.$util.confirmModal({content:'确认已送达或要退货?'},() => {
 				confirmReachFn({id:info.id}).then(res=>{
 					if(res.code == 1){
-						that.init()
-						that.$msg('已确认')
+						if(type == 0){
+							that.init()
+							that.$msg('已确认')
+						}else{
+							that.$util.pageTo({url:'/pagesOrder/refund?id='+this.option.id})
+						}
 					}
 				})
             })
 		},
+		readyGoRefund(info){
+			this.confirmReach(info,1)
+		},
 		goRefund(){
 			this.$util.pageTo({url:'/pagesOrder/refund?id='+this.option.id})
 		},