|
|
@@ -38,6 +38,24 @@
|
|
|
</el-form>
|
|
|
</el-card>
|
|
|
|
|
|
+ <!-- 统计数据 -->
|
|
|
+ <el-card class="stats-card" v-if="statsData">
|
|
|
+ <el-row :gutter="20" justify="space-between">
|
|
|
+ <el-col :span="12">
|
|
|
+ <div class="stat-item pay-success">
|
|
|
+ <div class="stat-label">支付成功总额</div>
|
|
|
+ <div class="stat-value">¥{{ statsData.pay_success_amount }}</div>
|
|
|
+ </div>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="12">
|
|
|
+ <div class="stat-item confirm-success">
|
|
|
+ <div class="stat-label">确认收货总额</div>
|
|
|
+ <div class="stat-value">¥{{ statsData.confirm_success_amount }}</div>
|
|
|
+ </div>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </el-card>
|
|
|
+
|
|
|
<!-- 列表数据 -->
|
|
|
<el-card class="table-card">
|
|
|
<template #header>
|
|
|
@@ -181,6 +199,7 @@ export default {
|
|
|
{ label: '商品订单支付', value: 1 }
|
|
|
],
|
|
|
tableData: [],
|
|
|
+ statsData: null,
|
|
|
pagination: {
|
|
|
page: 1,
|
|
|
limit: 10,
|
|
|
@@ -271,6 +290,13 @@ export default {
|
|
|
this.tableData = res.page.data
|
|
|
this.pagination.total = res.page.total
|
|
|
this.pagination.limit = res.page.per_page
|
|
|
+
|
|
|
+ // 获取统计数据
|
|
|
+ if (res.data?.stats) {
|
|
|
+ this.statsData = res.data.stats;
|
|
|
+ } else {
|
|
|
+ this.statsData = null;
|
|
|
+ }
|
|
|
} else {
|
|
|
this.$message.error(res.msg || res.message || '获取数据失败')
|
|
|
}
|
|
|
@@ -369,6 +395,52 @@ export default {
|
|
|
margin-bottom: 20px;
|
|
|
}
|
|
|
|
|
|
+.stats-card {
|
|
|
+ margin-bottom: 20px;
|
|
|
+ box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
|
|
|
+ border-radius: 8px;
|
|
|
+ background: linear-gradient(120deg, #e0f7fa 0%, #bbdefb 100%);
|
|
|
+}
|
|
|
+
|
|
|
+.stat-item {
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: center;
|
|
|
+ padding: 25px 0;
|
|
|
+ text-align: center;
|
|
|
+ border-radius: 8px;
|
|
|
+ transition: all 0.3s ease;
|
|
|
+}
|
|
|
+
|
|
|
+.stat-item:hover {
|
|
|
+ transform: translateY(-5px);
|
|
|
+ box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
|
|
|
+}
|
|
|
+
|
|
|
+.stat-item.pay-success {
|
|
|
+ background: linear-gradient(135deg, #8eefe8 0%, #4db6ac 100%);
|
|
|
+}
|
|
|
+
|
|
|
+.stat-item.confirm-success {
|
|
|
+ background: linear-gradient(135deg, #ffd54f 0%, #ffb300 100%);
|
|
|
+}
|
|
|
+
|
|
|
+.stat-label {
|
|
|
+ font-size: 16px;
|
|
|
+ font-weight: 500;
|
|
|
+ color: #ffffff;
|
|
|
+ margin-bottom: 10px;
|
|
|
+ text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
|
|
|
+}
|
|
|
+
|
|
|
+.stat-value {
|
|
|
+ font-size: 24px;
|
|
|
+ font-weight: 600;
|
|
|
+ color: #ffffff;
|
|
|
+ text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
|
|
|
+}
|
|
|
+
|
|
|
.table-card {
|
|
|
margin-bottom: 20px;
|
|
|
}
|