f
Some checks failed
CI / Test (ubuntu-latest) (push) Has been cancelled
CI / Test (windows-latest) (push) Has been cancelled
CI / Lint (ubuntu-latest) (push) Has been cancelled
CI / Lint (windows-latest) (push) Has been cancelled
CI / Check (ubuntu-latest) (push) Has been cancelled
CI / Check (windows-latest) (push) Has been cancelled
CodeQL / Analyze (javascript-typescript) (push) Has been cancelled
CI / CI OK (push) Has been cancelled
Lock Threads / action (push) Has been cancelled
Issue Close Require / close-issues (push) Has been cancelled
Close stale issues / stale (push) Has been cancelled
Some checks failed
CI / Test (ubuntu-latest) (push) Has been cancelled
CI / Test (windows-latest) (push) Has been cancelled
CI / Lint (ubuntu-latest) (push) Has been cancelled
CI / Lint (windows-latest) (push) Has been cancelled
CI / Check (ubuntu-latest) (push) Has been cancelled
CI / Check (windows-latest) (push) Has been cancelled
CodeQL / Analyze (javascript-typescript) (push) Has been cancelled
CI / CI OK (push) Has been cancelled
Lock Threads / action (push) Has been cancelled
Issue Close Require / close-issues (push) Has been cancelled
Close stale issues / stale (push) Has been cancelled
This commit is contained in:
@@ -13,6 +13,11 @@ export namespace OrderQueryApi {
|
||||
order_id: number;
|
||||
user_id: number;
|
||||
product_name: string;
|
||||
order_no?: string;
|
||||
platform_order_id?: string;
|
||||
payment_status?: string;
|
||||
pay_time?: string;
|
||||
refund_time?: string;
|
||||
query_params: Recordable<any>;
|
||||
query_data: QueryItem[];
|
||||
create_time: string;
|
||||
@@ -29,6 +34,11 @@ export namespace OrderQueryApi {
|
||||
order_id: number;
|
||||
user_id: number;
|
||||
product_name: string;
|
||||
order_no?: string;
|
||||
platform_order_id?: string;
|
||||
payment_status?: string;
|
||||
pay_time?: string;
|
||||
refund_time?: string;
|
||||
query_params: Recordable<any>;
|
||||
query_data: QueryItem[];
|
||||
create_time: string;
|
||||
|
||||
@@ -44,6 +44,34 @@ function getQueryStateConfig(state: string) {
|
||||
);
|
||||
}
|
||||
|
||||
// 支付状态文案
|
||||
const paymentStatusMap: Record<string, string> = {
|
||||
pending: '待支付',
|
||||
paid: '已支付',
|
||||
refunded: '已退款',
|
||||
refunding: '退款中',
|
||||
closed: '已关闭',
|
||||
failed: '支付失败',
|
||||
};
|
||||
function getPaymentStatusLabel(status: string | undefined) {
|
||||
if (!status) return '-';
|
||||
return paymentStatusMap[status] ?? status;
|
||||
}
|
||||
|
||||
// 支付状态颜色
|
||||
const paymentStatusColorMap: Record<string, string> = {
|
||||
pending: 'warning',
|
||||
paid: 'success',
|
||||
refunded: 'default',
|
||||
refunding: 'processing',
|
||||
closed: 'default',
|
||||
failed: 'error',
|
||||
};
|
||||
function getPaymentStatusColor(status: string | undefined) {
|
||||
if (!status) return 'default';
|
||||
return paymentStatusColorMap[status] ?? 'default';
|
||||
}
|
||||
|
||||
// 字段名称映射
|
||||
const fieldNameMap: Record<string, string> = {
|
||||
// 基础字段
|
||||
@@ -143,6 +171,23 @@ onMounted(() => {
|
||||
<Descriptions.Item label="产品名称">
|
||||
{{ queryDetail.product_name }}
|
||||
</Descriptions.Item>
|
||||
<Descriptions.Item label="商户订单号">
|
||||
{{ queryDetail.order_no ?? '-' }}
|
||||
</Descriptions.Item>
|
||||
<Descriptions.Item label="支付订单号">
|
||||
{{ queryDetail.platform_order_id ?? '-' }}
|
||||
</Descriptions.Item>
|
||||
<Descriptions.Item label="支付状态">
|
||||
<Tag :color="getPaymentStatusColor(queryDetail.payment_status)">
|
||||
{{ getPaymentStatusLabel(queryDetail.payment_status) }}
|
||||
</Tag>
|
||||
</Descriptions.Item>
|
||||
<Descriptions.Item label="支付时间">
|
||||
{{ queryDetail.pay_time ?? '-' }}
|
||||
</Descriptions.Item>
|
||||
<Descriptions.Item label="退款时间">
|
||||
{{ queryDetail.refund_time ?? '-' }}
|
||||
</Descriptions.Item>
|
||||
<Descriptions.Item label="创建时间">
|
||||
{{ queryDetail.create_time }}
|
||||
</Descriptions.Item>
|
||||
|
||||
Reference in New Issue
Block a user