shish 11 сар өмнө
parent
commit
8fd6bc3394

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

@@ -161,7 +161,6 @@ export default {
       uni.stopPullDownRefresh()
     }
   },
-  
   onShow () {
     let tabIndex = uni.getStorageSync("switchTabQuery") || null;
     if (tabIndex) {
@@ -183,7 +182,6 @@ export default {
   },
   methods: {
     getCustom(item){
-      console.log(item)
       this.showSearch = false
       this.customId = item.id
       this.resetList()
@@ -236,6 +234,10 @@ export default {
     changeSearchStyle(){
       this.searchStyle = this.searchStyle ==0 ? 1 : 0
       this.showSearch = false
+      this.customId = 0
+      this.searchText=''
+      this.resetList()
+      this.getOrderList()
     },
     getScanOrder(){
       this.repeat = this.repeat == -1 ? 1 : -1
@@ -320,30 +322,19 @@ export default {
      */
     async cancelExpress(orderId) {
       this.$util.confirmModal({content: '确认取消?(若配送员接单1分钟后取消,扣2元违约金)'}, async () => {
-        try {
           const res = await cancelExpressOrder({orderId: orderId})
           if (res.code === 1) {
-            this.$msg('配送订单已取消')
-            // 刷新订单列表
+            this.$msg('取消成功')
             this.resetList()
             this.getOrderList()
-          } else {
-            this.$msg(res.msg || '取消配送订单失败')
           }
-        } catch (error) {
-          this.$msg('取消配送订单失败,请重试')
-          console.error('取消配送订单错误:', error)
-        }
       })
     },
     /**
      * 查看配送成功详情
      */
     selectExpress(orderId) {
-      this.$util.pageTo({ 
-        url: '/admin/express/success', 
-        query: { orderId: orderId }
-      })
+      this.$util.pageTo({ url: '/admin/express/success', query: { orderId: orderId } })
     }
   }
 };