Browse Source

fix: 更新订单状态映射并修正按钮显示逻辑

更新订单状态映射以匹配后端新状态定义(4-用户已签收,5-已完成,6-已取消)
移除查看物流、申请售后和申请开票按钮对状态3和4的显示限制
修正更多操作按钮的显示条件为状态3或5时显示
ylong 23 hours ago
parent
commit
3232ecc2b2

+ 8 - 7
pages-car/components/buy-order-item.vue

@@ -64,7 +64,7 @@
                 :custom-style="btnStyle" @click.stop="handleAction('evaluate', order)">评价</u-button>
 
             <!-- 查看物流 -->
-            <u-button v-if="order.showCheckExpress == 1 && order.status != '4' && order.status != '3'" size="mini" shape="circle"
+            <u-button v-if="order.showCheckExpress == 1" size="mini" shape="circle"
                 type="primary" plain :custom-style="btnStyle"
                 @click.stop="handleAction('logistics', order)">查看物流</u-button>
 
@@ -78,7 +78,7 @@
 
 
             <!-- 申请售后 -->
-            <u-button v-if="order.showAfterSales == 1 && order.status != '4' && order.status != '3'" size="mini" shape="circle" type="error"
+            <u-button v-if="order.showAfterSales == 1" size="mini" shape="circle" type="error"
                 plain :custom-style="btnStyle" @click.stop="handleAction('refund', order)">申请售后</u-button>
 
             <!-- 取消订单 (未包含在Flags中,保留原逻辑: 待付款且未取消) -->
@@ -94,7 +94,7 @@
                 @click.stop="handleAction('detail', order)">查看详情</u-button>
 
             <!-- 申请开票 -->
-            <u-button v-if="order.showApplyInvoice == 1 && order.status != '4' && order.status != '3'" size="mini" shape="circle" plain
+            <u-button v-if="order.showApplyInvoice == 1" size="mini" shape="circle" plain
                 :custom-style="btnStyle" @click.stop="handleAction('invoice', order)">申请开票</u-button>
 
             <!-- 投诉 -->
@@ -107,7 +107,7 @@
 
             <!-- 更多操作 (在待收货和已完成状态下显示) -->
             <u-button
-                v-if="(order.showAfterSales == 1 || order.showCheckExpress == 1 || order.showApplyInvoice == 1) && (order.status == '3' || order.status == '4')"
+                v-if="(order.showAfterSales == 1 || order.showCheckExpress == 1 || order.showApplyInvoice == 1) && (order.status == '3' || order.status == '5')"
                 size="mini" shape="circle" plain :custom-style="btnStyle" @click.stop="handleMoreAction">更多</u-button>
 
         </view>
@@ -150,13 +150,14 @@
                 })
             },
             getStatusText(order) {
-                //订单状态:1-待付款 2-待发货 3-待收货 4-已完成 5-已取消
+                //订单状态:1-待付款 2-待发货 3-待收货 4-用户已签收 5-已完成 6-已取消
                 const map = {
                     '1': '待付款',
                     '2': '待发货',
                     '3': '待收货',
-                    '4': '已完成',
-                    '5': '已取消',
+                    '4': '用户已签收',
+                    '5': '已完成',
+                    '6': '已取消',
                 }
                 return map[order.status] || '未知状态'
             },

+ 5 - 4
pages-car/pages/order-detail.vue

@@ -193,13 +193,14 @@ export default {
     },
     computed: {
         statusText() {
-            //订单状态:1-待付款 2-待发货 3-待收货 4-已完成 5-已取消 6-退款中 7-已退款
+            //订单状态:1-待付款 2-待发货 3-待收货 4-用户已签收 5-已完成 6-已取消
             const map = {
-                '1': '等待买家付款',
+                '1': '等待买家付款',    
                 '2': '等待卖家发货',
                 '3': '已发货',
-                '4': '交易完成',
-                '5': '已取消',
+                '4': '用户已签收',
+                '5': '交易完成',
+                '6': '已取消',
             };
             return map[String(this.orderInfo.status)] || '未知状态';
         },

+ 4 - 5
pages-mine/components/partner-order-item.vue

@@ -71,15 +71,14 @@
                     "10": "待到款",
                     "11": "已完成",
                 },
-                // 1-待付款 2-待发货 3-待收货 4-已完成 5-已取消 6-退款中 7-已退款
+                // 1-待付款 2-待发货 3-待收货 4-用户已签收 5-已完成 6-已取消
                 buyStatusList: {
                     "1": "待付款",
                     "2": "待发货",
                     "3": "待收货",
-                    "4": "已完成",
-                    "5": "已取消",
-                    "6": "退款中",
-                    "7": "已退款",
+                    "4": "用户已签收",
+                    "5": "已完成",
+                    "6": "已取消",
                 }
             };
         },