Răsfoiți Sursa

Merge branch 'zhongqi-delivery' of git.huaml.com:zhh/front-end into zhongqi-delivery

shizhongqi 7 luni în urmă
părinte
comite
db0ba2f93d

+ 15 - 5
ghsApp/src/admin/delivery/deliveryManage.vue

@@ -96,18 +96,28 @@ export default {
 			}
 		},
 	    openAddAuthModal() {
+            // 平台判断:只在 App 端允许操作
+            // #ifdef MP-WEIXIN
+            uni.showToast({
+                title: '请用APP操作,小程序不支持',
+                icon: 'none',
+                duration: 2000
+            });
+            return;
+            // #endif
+
             // TODO: 调用API获取可添加的平台列表
             const allPlatforms = [
-			    { id: 'meituan', name: '美团配送', logo: '🍱' },
+		    { id: 'meituan', name: '美团配送', logo: '🍱' },
                 { id: 'fengniao', name: '蜂鸟配送', logo: '🍜'},
                 { id: 'huolala', name: '货拉拉跑腿', logo: '🚛'},
                 { id: 'shansong', name: '闪送', logo: '⚡'},
                 { id: 'didi', name: '滴滴', logo: '🚗'},
-			    { id: 'uu', name: 'UU跑腿', logo: '🛵'},
+		    { id: 'uu', name: 'UU跑腿', logo: '🛵'},
                 { id: 'shunfeng', name: '顺丰同城', logo: '🚚'},
-				{ id: 'dada', name: '达达', logo: '📦'}
-		    ];
-		
+			{ id: 'dada', name: '达达', logo: '📦'}
+	    ];
+	
             // 获取已授权平台的id集合
             const authorizedIds = this.platformList.map(p => p.id);
             // 过滤出未授权的平台

+ 1 - 3
ghsApp/src/admin/home/components/OrderItem.vue

@@ -11,9 +11,7 @@
         <text class="other-book" v-if="item.book == 1">预订单</text>
         <text class="other-presell" v-if="item.presell == 1">预售单</text>
         <view :class="['status', currentStatus == 4 ? 'buleColor' : currentStatus == 3 ? 'buleColor' : currentStatus == 1 ? 'defColor' : '']">
-          {{
-            currentStatus == 1 ? '待付款' : currentStatus == 2 ? '待发货' : currentStatus == 3 ? '配送中' : currentStatus == 4 ? '已完成' : '已取消'
-          }}
+          {{currentStatus == 1 ? '待付款' : currentStatus == 2 ? '待发货' : currentStatus == 3 ? '配送中' : currentStatus == 4 ? '已完成' : currentStatus == 5?'已取消':''}}
         </view>
       </view>
       <view class="order-list_info">

+ 1 - 10
ghsApp/src/admin/home/me.vue

@@ -152,7 +152,7 @@
               <view class="tui-title">更多设置</view>
             </tui-list-cell>
 
-            <tui-list-cell @click="handleDeliveryManage()" class="line-cell" :hover="false" :arrow="true">
+            <tui-list-cell @click="pageTo({ url: '/admin/delivery/deliveryManage' })" class="line-cell" :hover="false" :arrow="true">
               <view class="tui-title">绑定跑腿</view>
             </tui-list-cell>
 
@@ -618,15 +618,6 @@ export default {
         }
       })
     },
-    handleDeliveryManage() {
-      // #ifdef MP-WEIXIN
-      this.$msg('请使用 APP 操作')
-      return
-      // #endif
-      // #ifdef APP-PLUS
-      this.$util.pageTo({ url: '/admin/delivery/deliveryManage' })
-      // #endif
-    }
   },
 };
 </script>

+ 1 - 1
ghsApp/src/pagesOrder/detail.vue

@@ -7,7 +7,7 @@
 			<view class="address-des_bx content-box">
 				<view @click.stop="goCustom(detailInfo)">
 					<view style="overflow:hidden;text-overflow:ellipsis;white-space: nowrap;width:450upx;"> {{ detailInfo.customName }} {{ detailInfo.customMobile }}</view>
-					<view style="margin-bottom:20upx;color:#333333">店长 {{ detailInfo.customSuper.name||''}}</view>
+					<view style="margin-bottom:20upx;color:#333333;padding:10upx 0 10upx 0;">店长 {{ detailInfo.customSuper.name||''}}</view>
 					<view style="margin-bottom:15upx;color:black;">{{ detailInfo.customAddress}}</view>
 					<view v-if="!$util.isEmpty(detailInfo.showAddress) && detailInfo.showAddress != detailInfo.customAddress" style="color:#656363;">{{detailInfo.showAddress}}</view>
 				</view>

+ 14 - 4
hdApp/src/admin/delivery/deliveryManage.vue

@@ -96,17 +96,27 @@ export default {
 			}
 		},
 	    openAddAuthModal() {
+            // 平台判断:只在 App 端允许操作
+            // #ifdef MP-WEIXIN
+            uni.showToast({
+                title: '请用APP操作,小程序不支持',
+                icon: 'none',
+                duration: 2000
+            });
+            return;
+            // #endif
+
             // TODO: 调用API获取可添加的平台列表
             const allPlatforms = [
-			    { id: 'meituan', name: '美团配送', logo: '🍱' },
+		    { id: 'meituan', name: '美团配送', logo: '🍱' },
                 { id: 'fengniao', name: '蜂鸟配送', logo: '🍜'},
                 { id: 'huolala', name: '货拉拉跑腿', logo: '🚛'},
                 { id: 'shansong', name: '闪送', logo: '⚡'},
                 { id: 'didi', name: '滴滴', logo: '🚗'},
-			    { id: 'uu', name: 'UU跑腿', logo: '🛵'},
+		    { id: 'uu', name: 'UU跑腿', logo: '🛵'},
                 { id: 'shunfeng', name: '顺丰同城', logo: '🚚'}
-		    ];
-		
+	    ];
+	
             // 获取已授权平台的id集合
             const authorizedIds = this.platformList.map(p => p.id);
             // 过滤出未授权的平台

+ 1 - 10
hdApp/src/admin/home/me.vue

@@ -78,7 +78,7 @@
             <tui-list-cell @click="pageTo({ url: '/admin/shop/sk' })" class="line-cell" :hover="false" :arrow="true">
               <view class="tui-title">更多设置</view>
             </tui-list-cell>
-            <tui-list-cell @click="handleDeliveryManage()" class="line-cell" :hover="false" :arrow="true" >
+            <tui-list-cell @click="pageTo({ url: '/admin/delivery/deliveryManage' })" class="line-cell" :hover="false" :arrow="true" >
               <view class="tui-title">绑定跑腿</view>
             </tui-list-cell>
 
@@ -371,15 +371,6 @@ export default {
           this.$msg('修改成功')
         }
       })
-    },
-    handleDeliveryManage() {
-      // #ifdef MP-WEIXIN
-      this.$msg('请使用 APP 操作')
-      return
-      // #endif
-      // #ifdef APP-PLUS
-      this.$util.pageTo({ url: '/admin/delivery/deliveryManage' })
-      // #endif
     }
   },
 };

+ 13 - 15
hdApp/src/admin/home/order.vue

@@ -196,7 +196,7 @@ export default {
       tabs: [ { name: "全部", value: 0 }, { name: "待付款", value: 0 }, { name: "待发货", value: 0 }, { name: "配送中", value: 0 }, { name: "已完成", value: 0 } ],
       staffList:[],
       shopAdminId:0,
-      refreshPage:0,
+      refreshPage:1,
       showSearch:false,
       searchList:[],
       customId:0,
@@ -249,29 +249,27 @@ export default {
       uni.removeStorageSync("switchTabQuery");
       this.tabIndex = parseInt(tabIndex.tabIndex);
     }
-    let that = this
-    getStaffList().then(res=>{
-      if(res.code ==1){
-        this.staffList = res.data.list
-      }
-    })
-
-    if(this.refreshPage == 1){
-      this.resetList();
-      this.getOrderList()
-      this.refreshPage = 0
-    }
 
     // 重置搜索
     if (this.customId !== 0) {
       this.clearFn()
     }
 
-    this.getOrderList();
+    //需要控制订单详情页,返回到列表页时不需要刷新页面
+    if(this.refreshPage == 1){
+      this.resetList();
+      this.getOrderList()
+    }else{
+      this.refreshPage = 1
+    }
   },
   methods: {
     init () {
-      //this.getOrderList();
+      getStaffList().then(res=>{
+        if(res.code ==1){
+          this.staffList = res.data.list
+        }
+      })
     },
     // 面板相关
     openFilterPanel () {

+ 11 - 12
hdApp/src/admin/order/detail.vue

@@ -455,20 +455,22 @@ export default {
       currentExpressInfo: {}
     };
   },
-  
   onLoad() {
-    //返回上一页时不需要刷新
+    //返回列表页时不需要刷新
     let pages = getCurrentPages();
     let prevPage = pages[pages.length - 2];
     prevPage.$vm.refreshPage = 0
   },
-  
   onShow() {
-    // if (this.refreshPage == 1) {
-    //   this.refreshPage = 0
-    //   this.init()
-    // }
-    this.init()
+    if (this.refreshPage == 1) {
+      this.refreshPage = 0
+      this.init()
+    }
+  },
+  onPullDownRefresh() {
+    this.init().then(res => {
+      uni.stopPullDownRefresh()
+    })
   },
   
   methods: {
@@ -614,15 +616,12 @@ export default {
     goRefund() {
       this.$util.pageTo({url: '/admin/order/refund?id=' + this.option.id})
     },
-    
     goShOrder(info) {
       this.$util.pageTo({url: '/admin/order/detail?id=' + info.shOrderId})
     },
-    
     init() {
-      this.getDetailInfo()
+      return this.getDetailInfo()
     },
-
     getDetailInfo() {
       return getDetB({ id: this.option.id }).then(res => {
         this.orderInfo = res.data;

+ 1 - 1
hdApp/src/pages.json

@@ -408,7 +408,7 @@
 		{
 			"root": "admin/order",
 			"pages": [
-				{ "path": "detail", "style": { "navigationBarTitleText": "详情" } },
+				{ "path": "detail", "style": { "navigationBarTitleText": "详情" , "enablePullDownRefresh": true} },
 				{ "path": "info", "style": { "navigationBarTitleText": "详情" } },
 				{ "path": "addOrder", "style": { "navigationBarTitleText": "开单" } },
 				{ "path": "addOrderConfirm", "style": { "navigationBarTitleText": "确认" } },