index.vue 退款按钮增加 refundStatus !== 'REFUNDED' 条件 hook.tsx handleRefund 增加已退款校验,双重保障 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@@ -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"
@@ -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,