最终定稿版 2026-05-22
模板文件:
- PC 版:~/sietadata/templates/sales-analysis-template.html
→ https://sieta.vip/sietadata/templates/sales-analysis-template.html
- H5 手机版:~/sietadata/templates/sales-analysis-mobile-template.html
→ https://sieta.vip/sietadata/templates/sales-analysis-mobile-template.html
Neo-brutalism — 粗边框、硬阴影、粗体字、高饱和配色。
#FFFDF5(米白)border:4px solid #000 + box-shadow:6px 6px 0 #000border:3px solid #000-apple-system, BlinkMacSystemFont, "Noto Sans SC", sans-serif2026/05/20 – 2026/05/21 (2天)border-bottom:4px solid #000| 按钮 | 功能 |
|---|---|
| 日期选择器(从/到) | 选择起止日期 |
| 本月 | 当月1日 → 今日(clamp 到有数据的日期) |
| 本周 | 当周周一 → 今日(clamp 到有数据的日期) |
| REFRESH | 重新加载(disabled 状态=正在加载或无有效范围) |
width:140px; height:34px#FFD93D,hover 变白,active 偏移 (1,1)grid-template-columns:repeat(5,1fr)
| 卡片 | 数据来源 | 子文本 |
|---|---|---|
| 销售额 | k.amt |
日均 ¥xxx |
| 销售双数 | k.qty |
日均 xxx |
| 毛利 | k.profit |
毛利率 xx% |
| 店铺均价 | 排除 STA108 后的均价 | 无 |
| 商场均价 | 仅 STA108 均价 | 无 |
font-size:1.8em; font-weight:900两列布局:grid-template-columns:1fr 1fr; gap:16px
type:'bar', indexAxis:'y'border:2px solid #000#FF6B6B#C4B5FDborderWidth:2, borderColor:'#000'barPercentage:1.0(0 间隙,边框重叠为 4px)categoryPercentage:0.78anchor:'end' align:'end',¥ 前缀,字号 13,粗体anchor:'start' align:'end',双 后缀,字号 11,粗体最大双数 × 1.5,保证金额柱始终更长type:'doughnut', cutout:'2%'weight:7):实心色块,黑色边框 3pxweight:1):不可见分隔层weight:2):半透明色(色值 + '88'),黑色边框 3px| 品牌 | 颜色 | 色值 |
|---|---|---|
| 依歌尔诗 | 淡紫色 | #C4B5FD |
| 娇娅媚妮 | 粉色 | #F472B6 |
| 是她 | 深红色 | #DC2626 |
| 迷人角色 | 绿色系 | #4ADE80 |
| 其他 | 灰色 | #94A3B8 |
| 未匹配品牌 | 按序取 fallback | #FF6B6B → #FFD93D → #4361ee |
anchor:'center',字号 15,¥ 前缀anchor:'end' align:'start' offset:2,字号 12,双 后缀background:#fff(默认白底)table-layout:fixed,width:25% 四等分text-align:right,数值 rounded 为整数,不带 ¥ 前缀background:#f0f2ff,18pxbackground:#FFD93D(黄色底)#FFD93D!important(覆盖默认蓝色)/api/sietadata/available-dates → 可用日期列表sales-range?start_date=&end_date= → 范围数据(含 stores/brands/staff/daily/kpi)< 800px:KPI 改为 3 列,图表改为单列,日期选择器占满宽单独文件 sales_analysis_mobile.html,与 PC 版同 API、同逻辑,仅 UI 差异化。
| 模块 | PC 版 | H5 版 |
|---|---|---|
| 头部时间显示 | 标题下方显示日期范围 | 删除,只保留标题 |
| 日期选择器 | 一行,固定宽度 | 一行 flex:1 平分宽度,字号 16px 居中 |
| 按钮 | 与日期同行 | 单独一行,靠右对齐 |
| KPI 卡片 | 5 列网格,上下结构 | 单列,左右结构(左两排文字 + 右金额大字) |
| 图表 | 两列并排 | 单列堆叠,高度 560px |
| 卡片阴影 | 6px 6px 0 |
4px 4px 0 |
| 表格列宽 | table-layout:fixed 四等分 |
table-layout:auto 自适应,外套横向滚动容器 |
| 字体 | 大 | 等比缩小约 10-20% |
560px(窄屏450px)height:36px; font-size:16px; text-align:center; flex:1font-size:1.6emfont-size:14px; 左对齐12px 14pxheight:32px; font-size:11pxconst C=["#FF6B6B","#C4B5FD","#FFD93D","#C4B5FD"]; // 主题色
js/chart.umd.min.jsjs/chartjs-plugin-datalabels.min.js