Selaa lähdekoodia

fix: 退款按钮从待支付(status=1)改为已完成(status=2)订单

之前退款按钮 v-if 和 handleRefund 判断的都是 status===1(待支付),
与提示文案"只有已完成的订单才能退款"矛盾。修正为 status===2(已完成)。

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
skyline 2 viikkoa sitten
vanhempi
säilyke
1ecd731d9d

+ 1 - 1
haha-admin-web/src/views/order/index.vue

@@ -218,7 +218,7 @@ async function doPayScoreCancel() {
               详情
             </el-button>
             <el-button
-              v-if="row.status === 1"
+              v-if="row.status === 2"
               class="reset-margin"
               link
               type="danger"

+ 1 - 1
haha-admin-web/src/views/order/utils/hook.tsx

@@ -398,7 +398,7 @@ export function useOrder(tableRef: Ref) {
   }
 
   async function handleRefund(row: OrderItem) {
-    if (row.status !== 1) {
+    if (row.status !== 2) {
       message("只有已完成的订单才能退款", { type: "warning" });
       return;
     }