完善本地质量门禁与资金链路测试
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
.order-metrics {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.metric-card strong {
|
||||
overflow-wrap: anywhere;
|
||||
font-size: 20px;
|
||||
line-height: 1.25;
|
||||
}
|
||||
|
||||
.metric-card small {
|
||||
display: block;
|
||||
margin-top: 8px;
|
||||
color: #8f9bba;
|
||||
font-size: 12px;
|
||||
line-height: 1.4;
|
||||
word-break: break-word;
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
<script setup lang="ts">
|
||||
export interface AdminOrderMetric {
|
||||
key: string
|
||||
label: string
|
||||
value: string
|
||||
detail: string
|
||||
}
|
||||
|
||||
defineProps<{ rows: AdminOrderMetric[] }>()
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="metric-grid dashboard-metrics order-metrics">
|
||||
<div v-for="row in rows" :key="row.key" class="metric-card">
|
||||
<span>{{ row.label }}</span>
|
||||
<strong>{{ row.value }}</strong>
|
||||
<small>{{ row.detail }}</small>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped src="./AdminOrderMetrics.css"></style>
|
||||
@@ -0,0 +1,67 @@
|
||||
.panel-heading,
|
||||
.record-main {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
justify-content: space-between;
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.panel-heading {
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
|
||||
.panel-heading h2 {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.panel-subtitle {
|
||||
color: #8f9bba;
|
||||
font-size: 13px;
|
||||
line-height: 1.6;
|
||||
}
|
||||
|
||||
.record-list,
|
||||
.record-item {
|
||||
display: grid;
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.record-item {
|
||||
gap: 8px;
|
||||
border: 1px solid #eef2f7;
|
||||
border-radius: 8px;
|
||||
background: #fbfcff;
|
||||
padding: 14px;
|
||||
}
|
||||
|
||||
.record-main strong {
|
||||
color: #1b2559;
|
||||
font-size: 15px;
|
||||
}
|
||||
|
||||
.record-meta {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
|
||||
gap: 6px 12px;
|
||||
color: #52616f;
|
||||
font-size: 12px;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
.record-item p {
|
||||
margin: 0;
|
||||
color: #52616f;
|
||||
line-height: 1.6;
|
||||
white-space: pre-wrap;
|
||||
}
|
||||
|
||||
.danger-text {
|
||||
color: #dc2626;
|
||||
}
|
||||
|
||||
@media (max-width: 640px) {
|
||||
.panel-heading,
|
||||
.record-main {
|
||||
flex-direction: column;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
<script setup lang="ts">
|
||||
import type { AdminPayment } from '@/features/admin/api/adminPayments'
|
||||
import { formatCentWithSymbol } from '@/shared/utils/money'
|
||||
import { formatDateTime } from '@/shared/utils/time'
|
||||
|
||||
import {
|
||||
paymentBizTypeLabel,
|
||||
paymentPaidAt,
|
||||
paymentStatusLabel,
|
||||
paymentStatusType,
|
||||
} from '../utils/adminOrderPresentation'
|
||||
|
||||
defineProps<{ records: AdminPayment[] }>()
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<section class="dashboard-panel detail-panel order-wide-panel">
|
||||
<div class="panel-heading">
|
||||
<h2>支付与退款流水</h2>
|
||||
<span class="panel-subtitle">共 {{ records.length }} 条</span>
|
||||
</div>
|
||||
<el-empty v-if="records.length === 0" description="暂无支付流水" />
|
||||
<div v-else class="record-list">
|
||||
<article v-for="record in records" :key="record.id" class="record-item">
|
||||
<div class="record-main">
|
||||
<strong>
|
||||
{{ paymentBizTypeLabel(record.biz_type) }} ·
|
||||
{{ formatCentWithSymbol(record.amount_cent) }}
|
||||
</strong>
|
||||
<el-tag :type="paymentStatusType(record.status)" size="small" effect="light">
|
||||
{{ paymentStatusLabel(record.status) }}
|
||||
</el-tag>
|
||||
</div>
|
||||
<div class="record-meta">
|
||||
<span>流水号:{{ record.payment_no }}</span>
|
||||
<span>用户:{{ record.user_phone || record.user_id }}</span>
|
||||
<span>渠道:{{ record.provider || '-' }}</span>
|
||||
<span>商户:{{ record.merchant_id || '-' }}</span>
|
||||
<span>三方单号:{{ record.third_order_id || '-' }}</span>
|
||||
<span>渠道单号:{{ record.provider_order_id || '-' }}</span>
|
||||
<span>创建:{{ formatDateTime(record.created_at) }}</span>
|
||||
<span>完成:{{ formatDateTime(paymentPaidAt(record), '-') }}</span>
|
||||
</div>
|
||||
<p v-if="record.error_message" class="danger-text">
|
||||
{{ record.error_code }} {{ record.error_message }}
|
||||
</p>
|
||||
</article>
|
||||
</div>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
<style scoped src="./AdminOrderPaymentRecords.css"></style>
|
||||
Reference in New Issue
Block a user