feat: refine web analytics and history views

This commit is contained in:
Wyndham ARR
2026-08-02 12:56:22 +08:00
parent a891c0ae7a
commit 7e7470821b
37 changed files with 2088 additions and 361 deletions

View File

@@ -6,6 +6,7 @@
<meta name="theme-color" content="#f5f7fb" />
<title>ARR Report</title>
<link rel="stylesheet" href="/assets/styles.css" />
<script src="/assets/i18n.js" defer></script>
<script src="/assets/app.js" defer></script>
</head>
<body>
@@ -16,9 +17,17 @@
<span class="brand-name">ARR Report</span>
</a>
<div class="header-meta">
<label class="locale-switcher">
<span class="sr-only">语言</span>
<select data-arr-locale-selector aria-label="语言">
<option value="zh-CN">中文</option>
<option value="en">English</option>
<option value="th">ไทย</option>
</select>
</label>
<span class="system-status" id="system-status"><i></i><span>正在连接数据服务</span></span>
<button class="task-log-trigger" id="task-log-trigger" type="button" aria-haspopup="dialog" aria-controls="task-log-dialog">任务日志</button>
<button class="logout-button" id="logout-button" type="button" disabled hidden>退出登录</button>
<a class="task-log-link" id="task-log-trigger" href="#task-log-dialog" aria-haspopup="dialog" aria-controls="task-log-dialog">任务日志</a>
<a class="logout-link" id="logout-button" href="#logout" hidden>退出登录</a>
</div>
</div>
</header>
@@ -87,7 +96,16 @@
<div>
<h2 id="daily-history-title">Daily Report</h2>
</div>
<button class="text-button" id="refresh-jobs" type="button">刷新</button>
<div class="history-heading-actions">
<div class="history-month-control" data-history-scope="jobs">
<span class="history-month-label">业务月份</span>
<button class="history-month-step" id="jobs-month-previous" type="button" aria-label="上一个月" title="上一个月"></button>
<label class="history-month-field" for="jobs-history-month"><span class="sr-only">业务月份</span><input id="jobs-history-month" type="month" min="2020-01" max="2099-12" autocomplete="off" aria-label="业务月份" /></label>
<button class="history-month-step" id="jobs-month-next" type="button" aria-label="下一个月" title="下一个月"></button>
<button class="history-month-current" id="jobs-month-current" type="button">本月</button>
</div>
<button class="text-button" id="refresh-jobs" type="button">刷新</button>
</div>
</div>
<div class="table-scroll">
<table>
@@ -110,7 +128,16 @@
<section class="panel table-panel monthly-history-panel" aria-labelledby="monthly-processing-title">
<div class="monthly-panel-toolbar">
<h2 class="monthly-panel-title" id="monthly-processing-title">月报处理</h2>
<span class="trace-live-state is-live" id="monthly-live-state" role="status" aria-live="polite">自动更新 · 4 秒</span>
<div class="history-heading-actions">
<div class="history-month-control" data-history-scope="monthly">
<span class="history-month-label">查看月份</span>
<button class="history-month-step" id="monthly-month-previous" type="button" aria-label="上一个月" title="上一个月"></button>
<label class="history-month-field" for="monthly-history-month"><span class="sr-only">查看月份</span><input id="monthly-history-month" type="month" min="2020-01" max="2099-12" autocomplete="off" aria-label="查看月份" /></label>
<button class="history-month-step" id="monthly-month-next" type="button" aria-label="下一个月" title="下一个月"></button>
<button class="history-month-current" id="monthly-month-current" type="button">本月</button>
</div>
<span class="trace-live-state is-live" id="monthly-live-state" role="status" aria-live="polite">自动更新 · 4 秒</span>
</div>
</div>
<div class="table-scroll">
<table class="monthly-table">
@@ -130,18 +157,13 @@
</section>
<section class="tabpanel" id="panel-bi" role="tabpanel" data-panel="bi" hidden>
<div class="section-heading split-heading">
<div>
<p class="eyebrow">CHANNEL PERFORMANCE</p>
<h1>渠道BI</h1>
<p id="bi-subtitle">基于已发布月报快照。</p>
</div>
<div class="section-heading bi-heading">
<label class="month-picker"><span>查看月份</span><select id="bi-month" aria-label="查看月份"></select></label>
</div>
<section class="metric-grid bi-metrics" aria-label="本月核心指标">
<article class="metric-card"><span>售出房数</span><strong id="bi-rooms"></strong><small>NO. OF ROOM 合计</small></article>
<article class="metric-card accent-card"><span>销售金额</span><strong id="bi-revenue"></strong><small>TOTAL PRICE 合计</small></article>
<article class="metric-card accent-card"><span>销售金额</span><strong id="bi-revenue"></strong><small>销售金额合计</small></article>
<article class="metric-card"><span>间夜</span><strong id="bi-nights"></strong><small>房数 × 入住晚数</small></article>
<article class="metric-card"><span>公司数</span><strong id="bi-channels"></strong><small>月报子表数量</small></article>
</section>
@@ -149,8 +171,8 @@
<section class="panel chart-panel" aria-labelledby="company-sales-title">
<div class="panel-heading">
<div>
<span class="step-label">TOTAL PRICE</span>
<h2 id="company-sales-title">各公司本月销售情况</h2>
<p class="chart-data-range" id="bi-data-range">数据范围:—</p>
</div>
</div>
<div class="company-chart-grid">
@@ -192,8 +214,8 @@
<div class="company-setup-heading">
<h2>生成报表</h2>
<label class="company-month-field" for="company-report-month">
<span class="sr-only">报表月份</span>
<input id="company-report-month" type="month" min="2020-01" max="2099-12" autocomplete="off" aria-label="报表月份" title="选择 C/O 所属报表月份,并筛选下方生成记录" />
<span>生成月份</span>
<input id="company-report-month" type="month" min="2020-01" max="2099-12" autocomplete="off" aria-label="生成月份" title="选择 C/O 所属的生成月份" />
</label>
</div>
@@ -331,7 +353,16 @@
<div>
<h2 id="company-history-title">生成记录</h2>
</div>
<span class="company-history-count">每页 50 条</span>
<div class="history-heading-actions">
<div class="history-month-control" data-history-scope="company">
<span class="history-month-label">查看月份</span>
<button class="history-month-step" id="company-month-previous" type="button" aria-label="上一个月" title="上一个月"></button>
<label class="history-month-field" for="company-history-month"><span class="sr-only">查看月份</span><input id="company-history-month" type="month" min="2020-01" max="2099-12" autocomplete="off" aria-label="查看月份" /></label>
<button class="history-month-step" id="company-month-next" type="button" aria-label="下一个月" title="下一个月"></button>
<button class="history-month-current" id="company-month-current" type="button">本月</button>
</div>
<span class="company-history-count">每页 50 条</span>
</div>
</div>
<div class="table-scroll">
<table class="company-history-table">