-
-
-
-
-
- {statusMeta.label}
-
- {item.status === 0 && (
-
{
- await cancelMutation.mutateAsync(item.id);
- }}
- title="取消提现申请"
- trigger={
-
- }
- />
+
+
+ {t("withdrawRecords", "Withdrawal Records")}
+
+ {activeRecordTab === "withdrawal"
+ ? t(
+ "withdrawalRecordsDescription",
+ "Review your withdrawal requests, statuses, and payout details."
+ )
+ : t(
+ "commissionReturn.description",
+ "Review order refunds and returned withdrawal commissions."
+ )}
+
+
+
+
+ {t("recordsTabs.withdrawal", "Withdrawal Records")}
+
+
+ {t("recordsTabs.refund", "Refund Records")}
+
+
+
+
+ >
+ action={withdrawalListActionRef}
+ empty={
+
-
-
- -
- 收款方式
- {getWithdrawalMethodLabel(item.method)}
-
- {item.account && (
- -
- 收款账号
- {item.account}
-
- )}
- {item.qr_code_url && (
- -
- 收款码
-
-
- )}
- {item.content && (
- -
-
- {t("withdrawal.record.content", "Payout Information")}
-
-
- {item.content}
-
-
- )}
- -
-
- {t("withdrawal.record.createdAt", "Created At")}
-
-
-
- {item.reason && (
- -
-
- {t("withdrawal.record.reason", "Reject Reason")}
-
-
- {item.reason}
-
-
- )}
-
-
-
- );
- }}
- request={async (pagination) => {
- const response = await queryWithdrawalLog({
- page: pagination.page,
- size: pagination.size,
- });
- return {
- list: response.data.data?.list || [],
- total: response.data.data?.total || 0,
- };
- }}
- />
+ />
+ }
+ renderItem={(item) => {
+ const statusMeta = getWithdrawalStatusMeta(item.status, t);
+ return (
+
+
+
+
+
+
+
+
+ {statusMeta.label}
+
+ {item.status === 0 && (
+ {
+ await cancelMutation.mutateAsync(item.id);
+ }}
+ title="取消提现申请"
+ trigger={
+
+ }
+ />
+ )}
+
+
+
+ -
+
+ 收款方式
+
+ {getWithdrawalMethodLabel(item.method)}
+
+ {item.account && (
+ -
+
+ 收款账号
+
+ {item.account}
+
+ )}
+ {item.qr_code_url && (
+ -
+
+ 收款码
+
+
+
+ )}
+ {item.content && (
+ -
+
+ {t(
+ "withdrawal.record.content",
+ "Payout Information"
+ )}
+
+
+ {item.content}
+
+
+ )}
+ -
+
+ {t("withdrawal.record.createdAt", "Created At")}
+
+
+
+ {item.reason && (
+ -
+
+ {t("withdrawal.record.reason", "Reject Reason")}
+
+
+ {item.reason}
+
+
+ )}
+
+
+
+ );
+ }}
+ request={async (pagination) => {
+ const response = await queryWithdrawalLog({
+ page: pagination.page,
+ size: pagination.size,
+ });
+ return {
+ list: response.data.data?.list || [],
+ total: response.data.data?.total || 0,
+ };
+ }}
+ />
+
+
+
+ >
+ empty={
+
+ }
+ renderItem={(item) => (
+
+
+
+
+
+
+
+ {getCommissionReturnEventLabel(item.event_type, t)}
+
+
+
+ -
+
+ {t("commissionReturn.fields.eventType", "Type")}
+
+
+ {getCommissionReturnEventLabel(item.event_type, t)}
+
+
+ -
+
+ {t("commissionReturn.fields.orderNo", "Order No.")}
+
+
+ {item.order_no || "-"}
+
+
+ -
+
+ {t(
+ "commissionReturn.fields.createdAt",
+ "Created At"
+ )}
+
+
+
+
+
+
+ )}
+ request={async (pagination) => {
+ const response = await queryCommissionReturnLog({
+ page: pagination.page,
+ size: pagination.size,
+ });
+ return {
+ list: response.data.data?.list || [],
+ total: response.data.data?.total || 0,
+ };
+ }}
+ />
+
+
+
+
>
header={{
title: t("inviteRecords", "Invite Records"),
diff --git a/packages/ui/src/services/user/typings.d.ts b/packages/ui/src/services/user/typings.d.ts
index 9a5e1be..b6c5b7b 100644
--- a/packages/ui/src/services/user/typings.d.ts
+++ b/packages/ui/src/services/user/typings.d.ts
@@ -170,6 +170,17 @@ declare namespace API {
timestamp: number;
};
+ type CommissionReturnLog = {
+ id: number;
+ user_id: number;
+ amount: number;
+ event_type: number;
+ order_no?: string;
+ content?: string;
+ created_at: number;
+ updated_at: number;
+ };
+
type CommissionWithdrawRequest = {
amount: number;
method: number;
@@ -821,6 +832,21 @@ declare namespace API {
size: number;
};
+ type QueryCommissionReturnLogListRequest = {
+ page: number;
+ size: number;
+ };
+
+ type QueryCommissionReturnLogListResponse = {
+ list: CommissionReturnLog[];
+ total: number;
+ };
+
+ type QueryCommissionReturnLogParams = {
+ page: number;
+ size: number;
+ };
+
type QueryUserSubscribeListResponse = {
list: UserSubscribe[];
total: number;
diff --git a/packages/ui/src/services/user/user.ts b/packages/ui/src/services/user/user.ts
index 16a6950..e77e075 100644
--- a/packages/ui/src/services/user/user.ts
+++ b/packages/ui/src/services/user/user.ts
@@ -1,4 +1,3 @@
-// @ts-expect-error
/* eslint-disable */
import request from "@workspace/ui/lib/request";
@@ -471,6 +470,25 @@ export async function queryWithdrawalLog(
);
}
+/** Query Commission Return Log GET /v1/public/user/commission_return_log */
+export async function queryCommissionReturnLog(
+ params: API.QueryCommissionReturnLogParams,
+ options?: { [key: string]: any }
+) {
+ return request<
+ API.Response & { data?: API.QueryCommissionReturnLogListResponse }
+ >(
+ `${import.meta.env.VITE_API_PREFIX || ""}/v1/public/user/commission_return_log`,
+ {
+ method: "GET",
+ params: {
+ ...params,
+ },
+ ...(options || {}),
+ }
+ );
+}
+
/** Cancel Withdrawal POST /v1/public/user/withdrawal_cancel */
export async function withdrawalCancel(
body: API.WithdrawalCancelRequest,