Răsfoiți Sursa

fix: 已退款订单不再显示退款操作入口

index.vue 退款按钮增加 refundStatus !== 'REFUNDED' 条件
hook.tsx handleRefund 增加已退款校验,双重保障

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
skyline 2 săptămâni în urmă
părinte
comite
de9a07c15e

+ 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 === 2"
+              v-if="row.status === 2 && row.refundStatus !== 'REFUNDED'"
               class="reset-margin"
               link
               type="danger"

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

@@ -402,6 +402,10 @@ export function useOrder(tableRef: Ref) {
       message("只有已完成的订单才能退款", { type: "warning" });
       return;
     }
+    if (row.refundStatus === "REFUNDED" || row.payStatus === "REFUND") {
+      message("该订单已退款", { type: "warning" });
+      return;
+    }
 
     const refundState = reactive({
       loadingDetail: true,