mirror of
https://gitee.com/qqtt-ah/ecom-dmb.git
synced 2026-11-24 22:29:19 +08:00
306 lines
17 KiB
HTML
306 lines
17 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="zh-CN">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>全店铺经营看板</title>
|
|
<script src="https://cdn.tailwindcss.com"></script>
|
|
<script src="https://cdn.jsdelivr.net/npm/echarts@5.4.3/dist/echarts.min.js"></script>
|
|
<!-- 引入中文字体优化 -->
|
|
<link href="https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@400;500;700;900&display=swap" rel="stylesheet">
|
|
<style>
|
|
body {
|
|
font-family: 'Noto Sans SC', sans-serif;
|
|
background-color: #f8fafc; /* 参考背景色 */
|
|
color: #0f172a; /* 加深文字颜色提升清晰度 */
|
|
}
|
|
.glass-card {
|
|
background: rgba(255, 255, 255, 0.9); /* 增加不透明度提升识别度 */
|
|
backdrop-filter: blur(10px);
|
|
border: 1px solid #e2e8f0;
|
|
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
|
|
border-radius: 16px;
|
|
}
|
|
/* 表格滚动条 */
|
|
.table-container::-webkit-scrollbar { height: 8px; }
|
|
.table-container::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 10px; }
|
|
.table-container::-webkit-scrollbar-track { background: #f1f5f9; }
|
|
|
|
/* 固定首列颜色 */
|
|
.sticky-col {
|
|
position: sticky;
|
|
left: 0;
|
|
background: #fff;
|
|
z-index: 10;
|
|
border-right: 2px solid #f1f5f9;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body class="p-4 md:p-8">
|
|
|
|
<div class="w-full mx-auto space-y-6">
|
|
|
|
<!-- 头部:标题与筛选 -->
|
|
<header class="flex flex-col lg:flex-row justify-between items-start lg:items-center gap-6">
|
|
<div>
|
|
<h1 class="text-3xl font-black text-slate-900 tracking-tight">全店铺经营概览大盘</h1>
|
|
<p class="text-slate-500 font-bold mt-1 text-sm">数据范围:公司旗下所有店铺汇总统计</p>
|
|
</div>
|
|
|
|
<!-- 时间选择器 -->
|
|
<div class="flex items-center gap-2 bg-slate-200/50 p-1.5 rounded-2xl border border-slate-200">
|
|
<div class="flex gap-1">
|
|
<button class="bg-white px-5 py-2 text-sm font-bold rounded-xl shadow-sm text-blue-600">今日</button>
|
|
<button class="px-5 py-2 text-sm font-bold text-slate-600 hover:bg-white/50 rounded-xl transition">昨日</button>
|
|
<button class="px-5 py-2 text-sm font-bold text-slate-600 hover:bg-white/50 rounded-xl transition">近7日</button>
|
|
<button class="px-5 py-2 text-sm font-bold text-slate-600 hover:bg-white/50 rounded-xl transition">近30日</button>
|
|
</div>
|
|
<div class="w-px h-6 bg-slate-300 mx-2"></div>
|
|
<div class="flex items-center gap-2 px-3">
|
|
<span class="text-xs font-bold text-slate-400">自定义日期</span>
|
|
<input type="date" class="bg-transparent text-sm font-bold outline-none border-none cursor-pointer">
|
|
</div>
|
|
</div>
|
|
</header>
|
|
|
|
<!-- 第一层:核心汇总指标 (适配 Info 接口) -->
|
|
<div class="grid grid-cols-1 sm:grid-cols-2 xl:grid-cols-4 gap-6">
|
|
<!-- 销售额 -->
|
|
<div class="glass-card p-6">
|
|
<div class="flex justify-between items-start mb-4">
|
|
<span class="text-xs font-black text-slate-500">全店总销售额</span>
|
|
<span class="text-xs font-bold text-emerald-600 bg-emerald-50 px-2 py-1 rounded">较上月 +14.2%</span>
|
|
</div>
|
|
<div class="text-4xl font-black text-slate-900 leading-none">¥4,829,400</div>
|
|
<div class="mt-6 pt-4 border-t border-slate-100 flex justify-between items-center">
|
|
<span class="text-xs font-bold text-slate-400">销售额目标达成率</span>
|
|
<span class="text-sm font-black text-blue-600">96.5%</span>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- ROI效率 -->
|
|
<div class="glass-card p-6">
|
|
<div class="text-xs font-black text-slate-500 mb-4">投资回报率 (ROI)</div>
|
|
<div class="text-4xl font-black text-indigo-600 leading-none">4.05</div>
|
|
<div class="mt-6 pt-4 border-t border-slate-100">
|
|
<div class="flex justify-between text-xs font-bold text-slate-400">
|
|
<span>全店平均费比</span>
|
|
<span class="text-slate-900">24.6%</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- 订单达成 -->
|
|
<div class="glass-card p-6">
|
|
<div class="text-xs font-black text-slate-500 mb-4">销量目标达成率 (订单数)</div>
|
|
<div class="text-4xl font-black text-slate-900 leading-none">92.1%</div>
|
|
<div class="w-full bg-slate-100 h-2 mt-6 rounded-full overflow-hidden">
|
|
<div class="bg-indigo-500 h-full" style="width: 92.1%"></div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- 税后利润 -->
|
|
<div class="glass-card p-6 border-l-4 border-l-emerald-500">
|
|
<div class="text-xs font-black text-emerald-600 mb-4">全店总净利润 (税后)</div>
|
|
<div class="text-4xl font-black text-emerald-600 leading-none">¥842,500</div>
|
|
<div class="mt-6 pt-4 border-t border-slate-100 flex justify-between text-[11px] font-bold text-slate-400">
|
|
<span>已扣除预扣税额 (4%)</span>
|
|
<span>¥193,176</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- 第二层:深度分析图表 -->
|
|
<div class="grid grid-cols-1 xl:grid-cols-2 gap-6">
|
|
<!-- 销售占比排行 -->
|
|
<div class="glass-card p-8">
|
|
<h3 class="text-lg font-black text-slate-800 mb-6">各店铺销售贡献排行</h3>
|
|
<div id="salesRatioChart" style="height: 380px;" class="w-full"></div>
|
|
</div>
|
|
<!-- 效率象限图 -->
|
|
<div class="glass-card p-8">
|
|
<h3 class="text-lg font-black text-slate-800 mb-6">店铺经营效率象限 (ROI vs 净利)</h3>
|
|
<div id="efficiencyChart" style="height: 380px;" class="w-full"></div>
|
|
<!-- 象限图中文说明 -->
|
|
<div class="mt-4 flex gap-6 justify-center">
|
|
<div class="flex items-center gap-2 text-xs font-bold text-slate-600"><span class="w-3 h-3 bg-emerald-500 rounded-full"></span> 高产区</div>
|
|
<div class="flex items-center gap-2 text-xs font-bold text-slate-600"><span class="w-3 h-3 bg-blue-500 rounded-full"></span> 潜力区</div>
|
|
<div class="flex items-center gap-2 text-xs font-bold text-slate-600"><span class="w-3 h-3 bg-rose-500 rounded-full"></span> 风险区</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- 第三层:横向对比大表 (适配 16 个维度) -->
|
|
<div class="glass-card overflow-hidden">
|
|
<div class="p-8 border-b border-slate-100 flex flex-col md:flex-row justify-between items-start md:items-center gap-4">
|
|
<div>
|
|
<h3 class="text-xl font-black text-slate-800">各店铺多维度经营明细对比</h3>
|
|
<p class="text-xs text-slate-400 font-bold mt-1">包含:目标达成、规模、成本及最终损益所有维度</p>
|
|
</div>
|
|
<button class="bg-slate-900 text-white px-8 py-3 rounded-2xl text-sm font-bold shadow-xl shadow-slate-200 hover:scale-105 active:scale-95 transition-all">导出财务分析报表</button>
|
|
</div>
|
|
|
|
<div class="table-container overflow-x-auto">
|
|
<table class="w-full text-left text-sm whitespace-nowrap">
|
|
<!-- 表头分组 -->
|
|
<thead class="bg-slate-50 text-[11px] font-black text-slate-500 uppercase">
|
|
<tr>
|
|
<th rowspan="2" class="p-6 border-b sticky-col shadow-sm text-slate-900 text-sm">店铺名称</th>
|
|
<th colspan="4" class="p-3 border-b border-l border-slate-200 text-center bg-blue-50/50 text-blue-700">目标达成维度</th>
|
|
<th colspan="3" class="p-3 border-b border-l border-slate-200 text-center bg-slate-100/50">经营规模维度</th>
|
|
<th colspan="5" class="p-3 border-b border-l border-slate-200 text-center bg-orange-50/50 text-orange-700">成本费用维度</th>
|
|
<th colspan="4" class="p-3 border-b border-l border-slate-200 text-center bg-emerald-50/50 text-emerald-700">盈利分析维度</th>
|
|
</tr>
|
|
<tr class="bg-slate-50/80">
|
|
<!-- 目标 -->
|
|
<th class="px-6 py-4 border-b border-l">目标单量</th>
|
|
<th class="px-6 py-4 border-b text-blue-600">单量达成率</th>
|
|
<th class="px-6 py-4 border-b">目标额</th>
|
|
<th class="px-6 py-4 border-b text-blue-600">销售达成率</th>
|
|
<!-- 规模 -->
|
|
<th class="px-6 py-4 border-b border-l text-slate-900">实际销售额</th>
|
|
<th class="px-6 py-4 border-b">单量</th>
|
|
<th class="px-6 py-4 border-b">客单价</th>
|
|
<!-- 成本 -->
|
|
<th class="px-6 py-4 border-b border-l">成本运费</th>
|
|
<th class="px-6 py-4 border-b text-rose-600">退款金额</th>
|
|
<th class="px-6 py-4 border-b">推广费</th>
|
|
<th class="px-6 py-4 border-b">刷单费用</th>
|
|
<th class="px-6 py-4 border-b">费比 %</th>
|
|
<!-- 盈利 -->
|
|
<th class="px-6 py-4 border-b border-l">税前盈亏</th>
|
|
<th class="px-6 py-4 border-b text-rose-500 italic">4%税额</th>
|
|
<th class="px-6 py-4 border-b font-black text-indigo-700">ROI</th>
|
|
<th class="px-6 py-4 border-b bg-emerald-600 text-white font-black">税后盈亏</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody class="divide-y divide-slate-100">
|
|
<!-- 演示数据 -->
|
|
<tr class="hover:bg-blue-50/50 transition-colors">
|
|
<td class="p-6 font-bold text-slate-900 sticky-col shadow-sm">精品家居旗舰店</td>
|
|
<!-- 目标 -->
|
|
<td class="p-6 font-medium">2,000</td>
|
|
<td class="p-6 font-black text-blue-600">85.4%</td>
|
|
<td class="p-6 font-medium">¥320,000</td>
|
|
<td class="p-6 font-black text-blue-600">92.1%</td>
|
|
<!-- 规模 -->
|
|
<td class="p-6 font-black">¥294,000</td>
|
|
<td class="p-6 font-medium">1,708</td>
|
|
<td class="p-6 font-medium">¥172.1</td>
|
|
<!-- 成本 -->
|
|
<td class="p-6">¥82,400</td>
|
|
<td class="p-6 text-rose-600 font-bold">¥12,400</td>
|
|
<td class="p-6">¥45,000</td>
|
|
<td class="p-6 text-orange-600">¥4,500</td>
|
|
<td class="p-6 text-slate-400">15.3%</td>
|
|
<!-- 盈利 -->
|
|
<td class="p-6 font-bold">¥142,500</td>
|
|
<td class="p-6 text-slate-400 italic">¥11,760</td>
|
|
<td class="p-6 font-black text-indigo-700">4.21</td>
|
|
<td class="p-6 font-black text-emerald-600 bg-emerald-50 text-base">¥124,500</td>
|
|
</tr>
|
|
<!-- 第二行数据 -->
|
|
<tr class="hover:bg-blue-50/50 transition-colors">
|
|
<td class="p-6 font-bold text-slate-900 sticky-col shadow-sm">运动户外品牌店</td>
|
|
<!-- 目标 -->
|
|
<td class="p-6">5,000</td>
|
|
<td class="p-6 font-black text-emerald-600">105.2%</td>
|
|
<td class="p-6">¥1,000,000</td>
|
|
<td class="p-6 font-black text-emerald-600">108.4%</td>
|
|
<!-- 规模 -->
|
|
<td class="p-6 font-black">¥1,084,000</td>
|
|
<td class="p-6">5,210</td>
|
|
<td class="p-6">¥208.1</td>
|
|
<!-- 成本 -->
|
|
<td class="p-6">¥324,000</td>
|
|
<td class="p-6 text-rose-600 font-bold">¥42,100</td>
|
|
<td class="p-6">¥185,000</td>
|
|
<td class="p-6 text-orange-600">¥10,000</td>
|
|
<td class="p-6 text-slate-400">17.1%</td>
|
|
<!-- 盈利 -->
|
|
<td class="p-6 font-bold">¥485,000</td>
|
|
<td class="p-6 text-slate-400 italic">¥43,360</td>
|
|
<td class="p-6 font-black text-indigo-700">5.85</td>
|
|
<td class="p-6 font-black text-emerald-600 bg-emerald-50 text-base">¥441,640</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<script>
|
|
// 1. 各店铺排行 (中文优化)
|
|
const salesChart = echarts.init(document.getElementById('salesRatioChart'));
|
|
salesChart.setOption({
|
|
grid: { left: '3%', right: '12%', bottom: '3%', top: '3%', containLabel: true },
|
|
tooltip: { trigger: 'axis' },
|
|
xAxis: { type: 'value', axisLabel: { show: false }, splitLine: { show: false } },
|
|
yAxis: {
|
|
type: 'category',
|
|
data: ['海外旗舰店', '运动户外店', '潮流男装店', '精品家居店'],
|
|
axisLine: { show: false },
|
|
axisTick: { show: false },
|
|
axisLabel: { fontWeight: 'bold', color: '#1e293b', fontSize: 13 }
|
|
},
|
|
series: [{
|
|
type: 'bar',
|
|
data: [420000, 1084000, 1150000, 1284000],
|
|
barWidth: 20,
|
|
itemStyle: {
|
|
borderRadius: [0, 10, 10, 0],
|
|
color: new echarts.graphic.LinearGradient(1, 0, 0, 0, [
|
|
{ offset: 0, color: '#6366f1' },
|
|
{ offset: 1, color: '#a5b4fc' }
|
|
])
|
|
},
|
|
label: { show: true, position: 'right', formatter: '¥{c}', fontWeight: '900', color: '#0f172a' }
|
|
}]
|
|
});
|
|
|
|
// 2. 效率象限图 (中文标签)
|
|
const efficiencyChart = echarts.init(document.getElementById('efficiencyChart'));
|
|
efficiencyChart.setOption({
|
|
tooltip: {
|
|
formatter: (params) => `<div style="padding:4px font-weight:bold">${params.data[2]}</div><hr/>投资回报率 (ROI): ${params.data[0]}<br/>净利润: ¥${params.data[1]}w`
|
|
},
|
|
xAxis: {
|
|
name: '投资回报率 (ROI)', nameLocation: 'center', nameGap: 35,
|
|
axisLabel: { fontWeight: 'bold' },
|
|
splitLine: { lineStyle: { type: 'dashed' } }
|
|
},
|
|
yAxis: {
|
|
name: '税后净利润 (单位: 万元)',
|
|
axisLabel: { fontWeight: 'bold' },
|
|
splitLine: { lineStyle: { type: 'dashed' } }
|
|
},
|
|
series: [{
|
|
type: 'scatter',
|
|
symbolSize: 45,
|
|
data: [
|
|
[4.21, 12.45, '精品家居店'],
|
|
[5.85, 44.16, '运动户外店'],
|
|
[3.10, 8.20, '潮流男装店'],
|
|
[2.10, -5.40, '海外旗舰店']
|
|
],
|
|
itemStyle: {
|
|
color: (p) => {
|
|
if (p.data[0] >= 3.5 && p.data[1] >= 10) return '#10b981';
|
|
if (p.data[0] < 3 || p.data[1] < 0) return '#f43f5e';
|
|
return '#6366f1';
|
|
},
|
|
shadowBlur: 15,
|
|
shadowColor: 'rgba(0,0,0,0.1)'
|
|
},
|
|
markLine: {
|
|
silent: true,
|
|
lineStyle: { type: 'dashed', color: '#94a3b8' },
|
|
data: [{ xAxis: 3.5 }, { yAxis: 10 }]
|
|
}
|
|
}]
|
|
});
|
|
|
|
window.onresize = () => { salesChart.resize(); efficiencyChart.resize(); };
|
|
</script>
|
|
</body>
|
|
</html> |