Compare commits

..

2 Commits

20 changed files with 4993 additions and 0 deletions
+91
View File
@@ -0,0 +1,91 @@
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>证书核验详情</title>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@400;500;600;700&family=Orbitron:wght@500;700&display=swap" rel="stylesheet">
<link rel="stylesheet" href="../css/tech-query.css">
<link rel="stylesheet" href="../css/notice-banner.css">
<script src="https://cdn.jsdelivr.net/npm/@supabase/supabase-js@2"></script>
</head>
<body class="query-skeuo">
<main class="detail-shell">
<div class="top-actions">
<a href="javascript:history.back()" class="tech-link-button secondary">返回查询</a>
<div class="top-actions-group">
<button type="button" class="tech-button secondary" onclick="loadCertificateImage()">加载证书图片</button>
<button type="button" class="tech-button" onclick="printCertificate()">打印证书与明细</button>
</div>
</div>
<section class="detail-grid">
<section class="preview-panel">
<div class="section-kicker">Certificate Preview</div>
<h1 class="section-heading">证书原件预览</h1>
<p class="section-copy">点击下方预览区域或使用顶部按钮,即可加载对应证书原件图片。</p>
<div id="cert-viewport" class="certificate-stage" onclick="loadCertificateImage()">
<img id="cert-img" alt="证书原件">
<div class="certificate-hint" id="click-hint">
<span class="hint-orb"></span>
<strong>点击加载证书图片</strong>
<span>原件图片将从当前证书编号对应的 `img/*.svg` 文件中读取。</span>
</div>
</div>
</section>
<aside class="summary-panel">
<div class="section-kicker">Verify Status</div>
<h2 class="section-heading">核验摘要</h2>
<p class="section-copy">证书基础信息与系统核验状态会在这里同步展示。</p>
<div class="summary-stack">
<div class="summary-tile">
<span class="summary-label">证书编号</span>
<div class="summary-value emphasis" id="summary-cert-number">-</div>
</div>
<div class="summary-tile">
<span class="summary-label">持有人</span>
<div class="summary-value" id="summary-holder-name">-</div>
</div>
<div class="summary-tile">
<span class="summary-label">核验状态</span>
<div id="display-status"><span class="status-pill pending">待核验</span></div>
</div>
<div class="summary-tile">
<span class="summary-label">最近核验时间</span>
<div class="summary-value" id="summary-verify-time">-</div>
</div>
</div>
</aside>
</section>
<section class="detail-panel is-hidden mt-18" id="info-card">
<div class="section-kicker">Certificate Detail</div>
<h2 class="section-heading">证书明细信息</h2>
<p class="section-copy">以下信息由证书数据库实时读取,用于核验与归档展示。</p>
<div class="info-table-shell">
<table class="info-table">
<tr><th>证书编号</th><td id="d-cert-number">-</td></tr>
<tr><th>持有人姓名</th><td id="d-holder-name">-</td></tr>
<tr><th>荣誉名称</th><td id="d-honor-title">-</td></tr>
<tr><th>颁发日期</th><td id="d-issue-date">-</td></tr>
<tr><th>颁发机构</th><td id="d-issuer">-</td></tr>
<tr><th>详细描述</th><td id="d-desc">-</td></tr>
<tr><th>系统备注</th><td id="d-remarks">-</td></tr>
<tr><th>核验时间</th><td id="d-verify-time">-</td></tr>
</table>
</div>
</section>
</main>
<footer class="page-footer">
<p>© 2026 BI Intelligent Query Interface</p>
</footer>
<script src="../js/certs-certificate.js"></script>
<script src="https://cdn.jsdmirror.cn/gh/bishshi/wechat-detect@main/wechat-detect.js"></script>
<script src="../js/notice-banner.js"></script>
</body>
</html>
+96
View File
@@ -0,0 +1,96 @@
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>证书查询系统</title>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@400;500;600;700&family=Orbitron:wght@500;700&display=swap" rel="stylesheet">
<link rel="stylesheet" href="../css/tech-query.css">
<link rel="stylesheet" href="../css/notice-banner.css">
<script src="https://cdn.jsdelivr.net/npm/@supabase/supabase-js@2"></script>
<script src="https://unpkg.com/html5-qrcode"></script>
</head>
<body class="query-skeuo">
<main class="page-shell">
<section class="page-header">
<div class="hero-card">
<span class="eyebrow">Certificate Search</span>
<h1>荣誉证书智能核验平台</h1>
<p>支持按证书编号、持有人姓名与奖项名进行检索,也可以直接扫码快速定位证书记录。</p>
<div class="hero-meta">
<span class="meta-chip">数据范围:2024 年 10 月至今</span>
<span class="meta-chip">查询方式:文本检索 / 条形码扫描</span>
</div>
</div>
<aside class="stat-card">
<div>
<div class="stat-label">Module</div>
<div class="stat-value">CERT</div>
</div>
<p></p>
</aside>
</section>
<section class="panel-card">
<div class="panel-title-row">
<div>
<h2 class="panel-title">检索条件</h2>
<div class="panel-subtitle">输入编号、姓名或奖项名后即可开始查询</div>
</div>
</div>
<div class="search-grid">
<div class="form-group">
<label class="form-label" for="searchTerm">编号 / 姓名 / 奖项名</label>
<div class="input-with-action">
<input type="text" id="searchTerm" class="tech-input" placeholder="输入编号、姓名或奖项名,或点击右侧扫条形码">
<button type="button" class="icon-action" id="startScanBtn" title="扫条形码查询" aria-label="扫条形码查询">
<svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M3 7V5a2 2 0 0 1 2-2h2"></path><path d="M17 3h2a2 2 0 0 1 2 2v2"></path><path d="M21 17v2a2 2 0 0 1-2 2h-2"></path><path d="M7 21H5a2 2 0 0 1-2-2v-2"></path><rect x="7" y="7" width="10" height="10"></rect></svg>
</button>
</div>
</div>
<div class="form-group">
<label class="form-label" for="dateStart">开始日期</label>
<input type="date" id="dateStart" class="tech-input">
</div>
<div class="form-group">
<label class="form-label" for="dateEnd">结束日期</label>
<input type="date" id="dateEnd" class="tech-input">
</div>
<button id="searchBtn" class="tech-button">执行查询</button>
</div>
</section>
<section class="panel-card results-card">
<div class="panel-title-row">
<div>
<h2 class="panel-title">查询结果</h2>
<div class="panel-subtitle">点击“查看详情”进入证书详情页</div>
</div>
</div>
<div id="resultsArea" class="results-shell">
<div class="empty-state">请输入查询条件,或使用扫码功能快速检索证书。</div>
</div>
</section>
</main>
<div id="scanner-overlay" class="scanner-overlay">
<div class="scanner-frame">
<div id="reader"></div>
<div class="scanner-line"></div>
</div>
<div class="scanner-text">请将条形码置于识别框内</div>
<button class="tech-button secondary" id="stopScanBtn" type="button">退出扫描</button>
</div>
<footer class="page-footer">
<p>© 2026 BI Intelligent Query Interface</p>
</footer>
<script src="../js/certs-index.js"></script>
<script src="https://cdn.jsdmirror.cn/gh/bishshi/wechat-detect@main/wechat-detect.js"></script>
<script src="../js/notice-banner.js"></script>
</body>
</html>
+177
View File
@@ -0,0 +1,177 @@
.notice-banner {
position: fixed;
top: 0;
left: 0;
right: 0;
z-index: 9999;
display: none;
justify-content: center;
padding: 10px 14px;
color: #102033;
font-family: "Noto Sans SC", "Microsoft YaHei", Arial, sans-serif;
background: linear-gradient(90deg, #fff7d6, #dff7ff);
border-bottom: 1px solid rgba(16, 32, 51, 0.14);
box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
}
.notice-banner.is-visible {
display: flex;
}
.notice-banner__inner {
width: min(100%, 1120px);
display: grid;
grid-template-columns: auto 1fr auto auto;
align-items: center;
gap: 10px;
}
.notice-banner__badge {
min-width: 40px;
padding: 4px 9px;
border-radius: 999px;
color: #ffffff;
background: #2563eb;
font-size: 12px;
font-weight: 700;
text-align: center;
line-height: 1.2;
}
.notice-banner[data-level="warning"] .notice-banner__badge {
background: #b45309;
}
.notice-banner[data-level="error"] .notice-banner__badge {
background: #be123c;
}
.notice-banner[data-level="success"] .notice-banner__badge {
background: #047857;
}
.notice-banner__content {
min-width: 0;
font-size: 14px;
line-height: 1.45;
}
.notice-banner__title {
margin-right: 6px;
font-weight: 700;
}
.notice-banner__message {
color: rgba(16, 32, 51, 0.84);
}
.notice-banner__link {
display: inline-flex;
align-items: center;
justify-content: center;
min-height: 30px;
padding: 0 12px;
border-radius: 999px;
color: #ffffff;
background: #075985;
font-size: 14px;
font-weight: 700;
text-decoration: none;
white-space: nowrap;
}
.notice-banner__link:hover {
background: #0369a1;
text-decoration: none;
}
.notice-banner__close {
width: 30px;
height: 30px;
border: 0;
border-radius: 50%;
color: #102033;
background: rgba(16, 32, 51, 0.08);
font-size: 20px;
line-height: 1;
cursor: pointer;
}
.notice-banner__close:hover {
background: rgba(16, 32, 51, 0.14);
}
body.query-skeuo .notice-banner,
body.notice-skeuo .notice-banner,
body.print-skeuo .notice-banner {
color: #243247;
background: linear-gradient(#fffdf8, #ece5d7);
border-bottom: 1px solid #9aa8b8;
box-shadow: 0 10px 22px rgba(68, 55, 34, 0.18), inset 0 1px 0 #ffffff;
}
body.query-skeuo .notice-banner__badge,
body.notice-skeuo .notice-banner__badge,
body.print-skeuo .notice-banner__badge,
body.query-skeuo .notice-banner__link,
body.notice-skeuo .notice-banner__link,
body.print-skeuo .notice-banner__link {
border: 1px solid #174b83;
border-radius: 5px;
background:
linear-gradient(180deg, rgba(255, 255, 255, 0.36), transparent 48%),
linear-gradient(#3e8ddd, #1d65a9 52%, #174f8b);
color: #ffffff;
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.45);
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.58), 0 1px 2px rgba(47, 66, 90, 0.2);
}
body.query-skeuo .notice-banner__message,
body.notice-skeuo .notice-banner__message,
body.print-skeuo .notice-banner__message {
color: #647086;
}
body.query-skeuo .notice-banner__close,
body.notice-skeuo .notice-banner__close,
body.print-skeuo .notice-banner__close {
border: 1px solid #9aa8b8;
border-radius: 5px;
background: linear-gradient(#ffffff, #d8e1eb);
color: #2d405a;
box-shadow: inset 0 1px 0 #ffffff;
}
body.has-notice-banner {
padding-top: calc(var(--notice-body-pad-top, 0px) + var(--notice-banner-height, 0px) + 12px) !important;
}
@media (max-width: 640px) {
.notice-banner {
padding: 9px 10px;
}
.notice-banner__inner {
grid-template-columns: auto 1fr auto;
gap: 8px;
}
.notice-banner__link {
grid-column: 2 / 3;
justify-self: start;
}
.notice-banner__content {
font-size: 13px;
}
}
@media print {
.notice-banner {
display: none !important;
}
body.has-notice-banner {
padding-top: var(--notice-body-pad-top, 0px) !important;
}
}
+720
View File
@@ -0,0 +1,720 @@
:root {
--bg: #07111f;
--panel: rgba(9, 20, 40, 0.78);
--panel-strong: rgba(10, 24, 46, 0.94);
--line: rgba(103, 213, 255, 0.22);
--line-strong: rgba(103, 213, 255, 0.48);
--text: #edf7ff;
--muted: #96b2d1;
--accent: #67d5ff;
--accent-strong: #2de2a6;
--warning: #ffcc66;
--font-display: "Orbitron", "Segoe UI", sans-serif;
--font-body: "Noto Sans SC", "Microsoft YaHei", sans-serif;
}
* {
box-sizing: border-box;
}
html {
color-scheme: dark;
}
body {
margin: 0;
min-height: 100vh;
color: var(--text);
font-family: var(--font-body);
background:
linear-gradient(135deg, rgba(7, 17, 31, 0.96), rgba(10, 28, 54, 0.96)),
repeating-linear-gradient(90deg, rgba(103, 213, 255, 0.055) 0 1px, transparent 1px 72px),
repeating-linear-gradient(0deg, rgba(103, 213, 255, 0.045) 0 1px, transparent 1px 72px);
}
a {
color: inherit;
}
.notice-page {
width: min(calc(100% - 32px), 1120px);
margin: 0 auto;
padding: 28px 0 56px;
}
.topbar {
display: flex;
align-items: center;
justify-content: space-between;
gap: 16px;
margin-bottom: 34px;
}
.brand,
.back-link,
.primary-action {
display: inline-flex;
align-items: center;
min-height: 40px;
border-radius: 999px;
text-decoration: none;
}
.brand {
gap: 10px;
color: var(--text);
font-weight: 700;
}
.brand-mark {
display: inline-grid;
place-items: center;
width: 40px;
height: 40px;
border: 1px solid var(--line-strong);
border-radius: 12px;
color: var(--accent);
font-family: var(--font-display);
background: rgba(103, 213, 255, 0.08);
}
.back-link {
padding: 0 16px;
border: 1px solid var(--line);
color: var(--muted);
background: rgba(255, 255, 255, 0.04);
}
.back-link:hover,
.primary-action:hover {
border-color: var(--line-strong);
color: var(--text);
}
.notice-hero {
display: grid;
grid-template-columns: minmax(0, 1fr) 280px;
gap: 22px;
align-items: stretch;
margin-bottom: 22px;
}
.hero-copy,
.status-panel,
.notice-card,
.side-card {
border: 1px solid var(--line);
background: var(--panel);
box-shadow: 0 28px 60px rgba(0, 0, 0, 0.32);
backdrop-filter: blur(18px);
}
.hero-copy {
padding: clamp(28px, 5vw, 54px);
border-radius: 24px;
}
.eyebrow {
display: inline-block;
margin-bottom: 14px;
color: var(--accent);
font-family: var(--font-display);
font-size: 12px;
font-weight: 700;
letter-spacing: 0.08em;
text-transform: uppercase;
}
h1,
h2,
p {
margin-top: 0;
}
h1 {
margin-bottom: 16px;
font-size: clamp(34px, 6vw, 64px);
line-height: 1.05;
}
.hero-copy p {
max-width: 760px;
margin-bottom: 0;
color: var(--muted);
font-size: 17px;
line-height: 1.8;
}
.status-panel {
display: flex;
min-height: 240px;
flex-direction: column;
justify-content: space-between;
padding: 24px;
border-radius: 24px;
}
.status-badge {
width: max-content;
padding: 7px 12px;
border-radius: 999px;
color: #06111f;
background: var(--warning);
font-size: 13px;
font-weight: 800;
}
.status-code {
color: var(--accent);
font-family: var(--font-display);
font-size: 44px;
font-weight: 700;
}
.status-panel p {
margin-bottom: 0;
color: var(--muted);
}
.notice-layout {
display: grid;
grid-template-columns: minmax(0, 1fr) 320px;
gap: 22px;
align-items: start;
}
.notice-card,
.side-card {
border-radius: 20px;
}
.notice-card {
padding: clamp(24px, 4vw, 40px);
}
.notice-meta {
display: flex;
flex-wrap: wrap;
gap: 10px;
margin-bottom: 22px;
}
.notice-meta span,
.info-label {
color: var(--muted);
font-size: 13px;
}
.notice-meta span {
padding: 6px 10px;
border: 1px solid var(--line);
border-radius: 999px;
background: rgba(255, 255, 255, 0.04);
}
.notice-card h2,
.side-card h2 {
margin-bottom: 12px;
font-size: 24px;
}
.notice-card p,
.side-card p {
color: var(--muted);
line-height: 1.8;
}
.info-grid {
display: grid;
grid-template-columns: repeat(3, minmax(0, 1fr));
gap: 12px;
margin-top: 30px;
}
.info-grid div {
min-height: 92px;
padding: 16px;
border: 1px solid var(--line);
border-radius: 16px;
background: rgba(255, 255, 255, 0.04);
}
.info-grid strong {
display: block;
margin-top: 8px;
font-size: 16px;
}
.side-card {
padding: 24px;
}
code {
color: var(--accent);
font-family: Consolas, "Courier New", monospace;
}
.primary-action {
justify-content: center;
width: 100%;
margin-top: 14px;
padding: 0 18px;
border: 1px solid rgba(45, 226, 166, 0.5);
color: #06111f;
background: linear-gradient(135deg, var(--accent), var(--accent-strong));
font-weight: 800;
}
@media (max-width: 840px) {
.notice-hero,
.notice-layout {
grid-template-columns: 1fr;
}
.status-panel {
min-height: 180px;
}
.info-grid {
grid-template-columns: 1fr;
}
}
/* Light visual refresh for notice detail */
html {
color-scheme: light;
}
body {
color: #172033;
background:
linear-gradient(135deg, rgba(236, 248, 255, 0.92), rgba(255, 255, 255, 0.96) 48%, rgba(245, 250, 255, 0.94)),
linear-gradient(90deg, rgba(37, 99, 235, 0.045) 1px, transparent 1px),
linear-gradient(0deg, rgba(20, 184, 166, 0.035) 1px, transparent 1px);
background-size: auto, 52px 52px, 52px 52px;
}
.brand {
color: #172033;
}
.brand-mark {
color: #2563eb;
background: rgba(37, 99, 235, 0.07);
border-color: rgba(37, 99, 235, 0.2);
}
.back-link {
color: #66758a;
background: #ffffff;
border-color: rgba(120, 144, 176, 0.24);
}
.back-link:hover,
.primary-action:hover {
color: #172033;
border-color: rgba(37, 99, 235, 0.36);
}
.hero-copy,
.status-panel,
.notice-card,
.side-card {
background: rgba(255, 255, 255, 0.84);
border-color: rgba(120, 144, 176, 0.24);
box-shadow: 0 18px 44px rgba(47, 74, 112, 0.12);
backdrop-filter: blur(16px);
}
.eyebrow,
.status-code,
code {
color: #2563eb;
}
h1,
h2,
.info-grid strong {
color: #172033;
}
.hero-copy p,
.status-panel p,
.notice-card p,
.side-card p,
.notice-meta span,
.info-label {
color: #66758a;
}
.status-badge {
color: #854d0e;
background: #fef3c7;
}
.notice-meta span,
.info-grid div {
background: rgba(248, 251, 255, 0.86);
border-color: rgba(120, 144, 176, 0.2);
}
.primary-action {
color: #ffffff;
background: linear-gradient(135deg, #2563eb, #0891b2);
border-color: rgba(37, 99, 235, 0.16);
box-shadow: 0 12px 24px rgba(37, 99, 235, 0.16);
}
/* Youthful unified layout refresh */
:root {
--joy-blue: #2563eb;
--joy-cyan: #06b6d4;
--joy-mint: #10b981;
--joy-coral: #fb7185;
--joy-yellow: #facc15;
--joy-ink: #172033;
--joy-muted: #627187;
--joy-line: rgba(96, 116, 148, 0.18);
--joy-card: rgba(255, 255, 255, 0.9);
}
body {
background:
linear-gradient(128deg, rgba(255, 255, 255, 0.96) 0 34%, rgba(232, 249, 255, 0.9) 34% 58%, rgba(255, 246, 249, 0.92) 58% 100%),
linear-gradient(90deg, rgba(37, 99, 235, 0.04) 1px, transparent 1px),
linear-gradient(0deg, rgba(16, 185, 129, 0.035) 1px, transparent 1px);
background-size: auto, 44px 44px, 44px 44px;
}
.notice-page {
padding-top: 24px;
}
.topbar {
margin-bottom: 22px;
}
.brand-mark {
border-radius: 10px;
color: #ffffff;
background: linear-gradient(135deg, var(--joy-blue), var(--joy-coral));
border-color: transparent;
}
.back-link {
min-height: 38px;
border-radius: 12px;
}
.notice-hero {
grid-template-columns: minmax(0, 1fr) minmax(220px, 0.28fr);
gap: 16px;
margin-bottom: 16px;
}
.notice-layout {
grid-template-columns: minmax(0, 1fr) minmax(260px, 0.34fr);
gap: 16px;
}
.hero-copy,
.status-panel,
.notice-card,
.side-card {
border-radius: 18px;
border-color: var(--joy-line);
background: var(--joy-card);
box-shadow: 0 16px 34px rgba(37, 63, 101, 0.1);
}
.hero-copy {
min-height: 250px;
display: grid;
align-content: center;
padding: clamp(26px, 5vw, 48px);
}
.hero-copy,
.notice-card,
.side-card,
.status-panel {
position: relative;
overflow: hidden;
}
.hero-copy::after,
.notice-card::after,
.side-card::after,
.status-panel::after {
content: "";
position: absolute;
left: 0;
right: 0;
bottom: 0;
height: 4px;
background: linear-gradient(90deg, var(--joy-blue), var(--joy-cyan), var(--joy-mint), var(--joy-coral));
pointer-events: none;
}
.eyebrow {
width: max-content;
padding: 8px 14px;
border-radius: 999px;
background: linear-gradient(135deg, rgba(37, 99, 235, 0.11), rgba(6, 182, 212, 0.11));
color: var(--joy-blue);
letter-spacing: 0.12em;
}
h1 {
letter-spacing: 0;
}
.status-panel {
position: relative;
min-height: 250px;
justify-content: center;
gap: 22px;
border-top: 5px solid var(--joy-coral);
}
.status-code {
color: var(--joy-coral);
font-size: clamp(34px, 4vw, 44px);
}
.status-badge,
.notice-meta span {
border: 0;
}
.status-badge {
color: #8a4b05;
background: #fff2bf;
}
.notice-meta span,
.info-grid div {
border-radius: 14px;
background: #f8fbff;
border-color: rgba(96, 116, 148, 0.12);
}
.notice-card,
.side-card {
padding: clamp(22px, 4vw, 34px);
}
.info-grid {
gap: 10px;
margin-top: 24px;
}
.primary-action {
min-height: 46px;
border-radius: 12px;
background: linear-gradient(135deg, var(--joy-blue), var(--joy-cyan));
}
@media (max-width: 520px) {
.notice-page {
width: min(calc(100% - 20px), 1120px);
padding-top: 16px;
}
.topbar {
align-items: flex-start;
flex-direction: column;
margin-bottom: 22px;
}
.hero-copy,
.status-panel,
.notice-card,
.side-card {
border-radius: 16px;
}
}
/* 2010s skeuomorphic notice page */
html {
color-scheme: light;
}
body.notice-skeuo {
--bg: #eee7d7;
--panel: #eef2f7;
--panel-strong: #e3e8ef;
--line: #9aa8b8;
--line-strong: #6687aa;
--text: #243247;
--muted: #647086;
--accent: #2d74bf;
--accent-strong: #4b9a67;
--warning: #d5942d;
color: var(--text);
background:
linear-gradient(90deg, rgba(255, 255, 255, 0.23) 1px, transparent 1px),
linear-gradient(0deg, rgba(60, 47, 27, 0.07) 1px, transparent 1px),
radial-gradient(circle at 18% 6%, rgba(255, 255, 255, 0.75), transparent 30%),
linear-gradient(135deg, #d8cbae 0%, #eee7d7 38%, #c3cfda 100%);
background-size: 24px 24px, 24px 24px, auto, auto;
}
body.notice-skeuo .notice-page {
width: min(calc(100% - 28px), 1120px);
padding-top: 26px;
}
body.notice-skeuo .topbar {
margin-bottom: 18px;
padding: 12px;
border: 1px solid #8d9bae;
border-radius: 8px;
background: linear-gradient(#fdfefe, #dfe7f0);
box-shadow: 0 10px 22px rgba(68, 55, 34, 0.14), inset 0 1px 0 #ffffff;
}
body.notice-skeuo .brand-mark {
border-color: #174b83;
border-radius: 5px;
background:
linear-gradient(180deg, rgba(255, 255, 255, 0.36), transparent 48%),
linear-gradient(#3e8ddd, #1d65a9 52%, #174f8b);
color: #ffffff;
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.45);
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.58), 0 2px 4px rgba(47, 66, 90, 0.26);
}
body.notice-skeuo .back-link,
body.notice-skeuo .primary-action {
border: 1px solid #174b83;
border-radius: 5px;
background:
linear-gradient(180deg, rgba(255, 255, 255, 0.36), transparent 48%),
linear-gradient(#3e8ddd, #1d65a9 52%, #174f8b);
color: #ffffff;
font-weight: 800;
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.45);
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.58), 0 2px 4px rgba(47, 66, 90, 0.26);
}
body.notice-skeuo .notice-hero {
gap: 0;
border: 1px solid #8998aa;
border-radius: 8px;
background: linear-gradient(#eef4fb, #cfd9e6 48%, #b6c4d5 49%, #e7edf4 100%);
box-shadow: 0 18px 34px rgba(68, 55, 34, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.95);
overflow: hidden;
}
body.notice-skeuo .hero-copy,
body.notice-skeuo .status-panel,
body.notice-skeuo .notice-card,
body.notice-skeuo .side-card {
border: 0;
border-radius: 0;
background: transparent;
box-shadow: none;
backdrop-filter: none;
}
body.notice-skeuo .hero-copy {
background:
linear-gradient(180deg, rgba(255, 255, 255, 0.44), transparent 52%),
linear-gradient(135deg, #f8fbff, #d7e2ef 58%, #c7d3e2);
border-right: 1px solid rgba(101, 116, 135, 0.45);
}
body.notice-skeuo h1,
body.notice-skeuo .notice-card h2,
body.notice-skeuo .side-card h2 {
color: #223049;
font-family: Georgia, "Times New Roman", "Noto Serif SC", serif;
text-shadow: 0 1px 0 #ffffff, 0 2px 3px rgba(60, 74, 92, 0.18);
}
body.notice-skeuo .eyebrow {
padding: 7px 13px;
border: 1px solid #8fa6be;
border-radius: 4px;
background: linear-gradient(#fefefe, #d5e1ef);
color: #315d8d;
font-family: "Noto Sans SC", "Microsoft YaHei", sans-serif;
box-shadow: inset 0 1px 0 #ffffff, 0 1px 2px rgba(58, 73, 92, 0.12);
}
body.notice-skeuo .hero-copy p,
body.notice-skeuo .status-panel p,
body.notice-skeuo .notice-card p,
body.notice-skeuo .side-card p,
body.notice-skeuo .notice-meta span,
body.notice-skeuo .info-label {
color: var(--muted);
text-shadow: 0 1px 0 rgba(255, 255, 255, 0.72);
}
body.notice-skeuo .status-panel {
background:
linear-gradient(180deg, rgba(255, 255, 255, 0.54), transparent 42%),
linear-gradient(#ccd8e5, #aebdd0);
}
body.notice-skeuo .status-badge,
body.notice-skeuo .notice-meta span {
border: 1px solid #bcc7d2;
border-radius: 5px;
background: linear-gradient(#fffdf8, #ece5d7);
color: #536174;
box-shadow: inset 0 1px 0 #ffffff, 0 1px 2px rgba(76, 67, 47, 0.12);
}
body.notice-skeuo .status-code {
padding: 15px 10px;
border: 1px solid #7d8da0;
border-radius: 6px;
background:
linear-gradient(180deg, rgba(255, 255, 255, 0.4), transparent 45%),
linear-gradient(#495f7b, #22364f);
color: #f7fbff;
text-align: center;
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.58), 0 1px 8px rgba(182, 220, 255, 0.28);
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.34), inset 0 -14px 22px rgba(0, 0, 0, 0.18), 0 2px 5px rgba(51, 62, 78, 0.22);
}
body.notice-skeuo .notice-layout {
gap: 16px;
}
body.notice-skeuo .notice-card,
body.notice-skeuo .side-card {
border: 1px solid #8d9bae;
border-radius: 8px;
background: linear-gradient(#fdfefe, #e3e8ef);
box-shadow: 0 14px 28px rgba(68, 55, 34, 0.18), inset 0 1px 0 #ffffff;
}
body.notice-skeuo .info-grid div {
border: 1px solid #b7c3d1;
border-radius: 6px;
background:
linear-gradient(180deg, rgba(255, 255, 255, 0.78), transparent 42%),
linear-gradient(#fffdf8, #eee7d8);
box-shadow: inset 0 1px 0 #ffffff, 0 1px 2px rgba(64, 78, 96, 0.1);
}
body.notice-skeuo code {
color: var(--accent);
}
@media (max-width: 760px) {
body.notice-skeuo .notice-hero,
body.notice-skeuo .notice-layout,
body.notice-skeuo .info-grid {
grid-template-columns: 1fr;
}
body.notice-skeuo .hero-copy {
border-right: 0;
border-bottom: 1px solid rgba(101, 116, 135, 0.45);
}
}
+186
View File
@@ -0,0 +1,186 @@
/* ===========================================
1. 通用响应式底座 (所有样式均需依赖)
=========================================== */
:root {
--text-color: #333;
--paper-bg: #fff;
--wish-color: #333;
--border-color: #ddd;
--font-family-base: "Noto Serif SC", serif;
--font-family-sig: "Noto Serif SC", serif; /* 默认署名字体 */
}
body {
margin: 0;
padding: 20px;
background-color: #f6f6f6; /* 默认外背景 */
font-family: var(--font-family-base);
color: var(--text-color);
display: flex;
justify-content: center;
transition: background 0.3s;
}
/* 自适应容器 */
.letter-container {
width: 100%;
max-width: 800px;
min-height: 85vh;
padding: 5% 7%;
box-sizing: border-box;
position: relative;
box-shadow: 0 4px 15px rgba(0,0,0,0.05);
background-color: var(--paper-bg);
border: 1px solid var(--border-color);
transition: all 0.3s ease;
}
/* 手机端适配 */
@media (max-width: 600px) {
body { padding: 10px; }
.letter-container { padding: 35px 20px; }
}
/* 传统书信格式公共逻辑 */
.salutation {
font-size: 1.2rem;
margin-top: 0;
margin-bottom: 1.5rem;
font-weight: bold;
}
.content p {
text-indent: 2em; /* 首行缩进 */
line-height: 1.8;
text-align: justify;
margin-bottom: 1rem;
}
.closing { margin-top: 2.5rem; }
.wish-prefix { text-indent: 2em; margin: 0; color: var(--wish-color); }
.wish-suffix { font-weight: bold; margin-top: 5px; color: var(--wish-color); }
.footer {
text-align: right;
margin-top: 4rem;
line-height: 1.6;
}
.signature {
font-size: 1.1em;
font-family: var(--font-family-sig);
}
.text-right {
text-align: right;
}
/* ===========================================
2. 原始场景皮肤 (Modern, Traditional, Vintage)
=========================================== */
/* ... (保留你之前的定义,此处略以节省空间,直接写新的) ... */
.theme-modern { --paper-bg: #fff; border-top: 4px solid #333; }
.theme-traditional { --paper-bg: #fdfaf2; writing-mode: vertical-rl; height: 650px; }
@media (max-width: 600px) { .theme-traditional { writing-mode: horizontal-tb; height: auto; } }
.theme-vintage { --paper-bg: #fff; border: 2px solid #b71c1c; background-image: repeating-linear-gradient(transparent, transparent 31px, rgba(183, 28, 28, 0.1) 31px, rgba(183, 28, 28, 0.1) 32px); line-height: 32px; --text-color: #b71c1c; --wish-color: #b71c1c; }
/* ===========================================
3. [新增] 青春与多样场景皮肤
=========================================== */
/* --- A. 青春派对 (Youthful) --- */
/* 特点:明亮多彩、活力、柔和 */
.theme-youth {
--paper-bg: #fff;
--text-color: #4a4a4a;
--wish-color: #ff6b6b; /* 鲜艳的颜色 */
--border-color: #ffe0e0;
font-family: "PingFang SC", "Microsoft YaHei", sans-serif; /* 使用现代无衬线字体 */
border-radius: 15px; /* 圆角增加亲和力 */
border: 3px solid #ffe0e0;
}
/* 装饰:顶部和底部加点彩色条纹 */
.theme-youth::before {
content: "";
position: absolute;
top: 0; left: 0; right: 0; height: 8px;
background: linear-gradient(90deg, #ff6b6b, #feca57, #48dbfb, #ff9f43);
border-radius: 15px 15px 0 0;
}
.theme-youth .salutation { color: #222; }
.theme-youth .content p { text-indent: 0; text-align: left; background-color: #fcfcfc; padding: 10px; border-radius: 8px; margin-bottom: 1.2rem; } /* 类似气泡感 */
.theme-youth .wish-prefix { text-indent: 0; padding-left: 1rem; } /* 青春风不一定强制缩进 */
.theme-youth .wish-suffix { font-weight: 800; font-size: 1.1rem; }
.theme-youth .footer { color: #888; }
.theme-youth .signature { color: #333; font-weight: bold; }
/* --- B. 青葱校园 (Campus) --- */
/* 特点:数学格子纸、怀旧、清爽蓝调 */
.theme-campus {
--paper-bg: #fdfdfd;
--text-color: #3e3e3e;
--wish-color: #2980b9; /* 校园蓝 */
--border-color: #87ceeb;
font-family: "SimSun", serif; /* 怀旧宋体 */
/* 模拟蓝格子纸 */
background-image:
linear-gradient(rgba(135, 206, 235, 0.3) 1px, transparent 1px),
linear-gradient(90deg, rgba(135, 206, 235, 0.3) 1px, transparent 1px);
background-size: 25px 25px; /* 格子大小 */
}
/* 顶部加一个类似书签或校徽的圆 */
.theme-campus::after {
content: "CAMPUS";
position: absolute;
top: -15px; right: 30px;
background-color: #2980b9;
color: white;
padding: 5px 15px;
border-radius: 20px;
font-size: 0.8rem;
font-family: sans-serif;
}
.theme-campus .content p { line-height: 1.6; text-indent: 2em; }
.theme-campus .closing { border-top: 1px dashed rgba(135, 206, 235, 0.5); padding-top: 1rem; }
.theme-campus .footer .date { color: #888; }
/* --- C. 极简和风 (Wabi-Sabi / Minimalist) --- */
/* 特点:淡雅、素净、极低对比度、高端商务或长辈 */
.theme-wabi {
--paper-bg: #fafafa;
--text-color: #555;
--wish-color: #777;
--border-color: transparent; /* 无边框 */
font-family: "Source Han Serif SC", serif; /* 高质量宋体 */
background-color: #fff;
padding: 8% 10%; /* 更宽松的内边距 */
border-radius: 0;
box-shadow: none; /* 去掉阴影,极度扁平 */
}
/* 手机端去掉过于宽松的内边距 */
@media (max-width: 600px) {
.theme-wabi { padding: 40px 20px; }
}
/* 装饰:只在底部加一条极淡的灰线 */
.theme-wabi .footer {
text-align: right;
border-top: 1px solid #f0f0f0;
padding-top: 1.5rem;
}
.theme-wabi .salutation { font-weight: normal; font-size: 1.2rem; color: #333; }
.theme-wabi .content p { text-indent: 2em; line-height: 2; color: #666; font-size: 0.95rem; }
.theme-wabi .wish-suffix { font-weight: normal; color: #777; }
.theme-wabi .signature { font-family: "Zhi Mang Xing", cursive; font-size: 1.8rem; color: #333; } /* 使用Google Font书法字体 */
File diff suppressed because it is too large Load Diff
+154
View File
@@ -0,0 +1,154 @@
body {
font-family: Arial, "Microsoft YaHei";
margin: 0;
color: #172033;
background:
linear-gradient(128deg, rgba(255, 255, 255, 0.96) 0 34%, rgba(232, 249, 255, 0.9) 34% 58%, rgba(255, 246, 249, 0.92) 58% 100%);
}
body.print-skeuo {
color: #243247;
background:
linear-gradient(90deg, rgba(255, 255, 255, 0.23) 1px, transparent 1px),
linear-gradient(0deg, rgba(60, 47, 27, 0.07) 1px, transparent 1px),
radial-gradient(circle at 18% 6%, rgba(255, 255, 255, 0.75), transparent 30%),
linear-gradient(135deg, #d8cbae 0%, #eee7d7 38%, #c3cfda 100%);
background-size: 24px 24px, 24px 24px, auto, auto;
}
/* ===== A4 容器 ===== */
.page {
width: 210mm;
min-height: 297mm;
margin: 18px auto;
padding: 20mm;
position: relative;
background: white;
box-shadow: 0 18px 44px rgba(47, 74, 112, 0.12);
border-top: 5px solid #2563eb;
}
body.print-skeuo .page {
border: 1px solid #8d9bae;
border-radius: 8px;
background:
linear-gradient(90deg, rgba(128, 105, 68, 0.035) 1px, transparent 1px),
linear-gradient(0deg, rgba(128, 105, 68, 0.035) 1px, transparent 1px),
linear-gradient(#fffdf8, #f4eee3);
background-size: 22px 22px, 22px 22px, auto;
box-shadow: 0 18px 34px rgba(68, 55, 34, 0.22), inset 0 1px 0 #ffffff;
}
/* ===== 水印 ===== */
.watermark {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%) rotate(-30deg);
font-size: 50px;
color: rgba(0, 0, 0, 0.08);
white-space: nowrap;
pointer-events: none;
z-index: 0;
text-align: center;
}
/* ===== 标题 ===== */
.title {
text-align: center;
font-size: 22px;
font-weight: bold;
margin-bottom: 20px;
color: #172033;
letter-spacing: 0.04em;
}
body.print-skeuo .title {
margin: -8mm -8mm 18px;
padding: 14px;
border: 1px solid #8998aa;
border-radius: 6px;
background: linear-gradient(#eef4fb, #cfd9e6 48%, #b6c4d5 49%, #e7edf4 100%);
color: #223049;
font-family: Georgia, "Times New Roman", "Noto Serif SC", serif;
text-shadow: 0 1px 0 #ffffff, 0 2px 3px rgba(60, 74, 92, 0.18);
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95);
}
/* ===== 信息表格 ===== */
.table {
width: 100%;
border-collapse: collapse;
margin-top: 10px;
position: relative;
z-index: 1;
}
.table td {
border: 1px solid #dbe4ef;
padding: 11px 12px;
font-size: 14px;
}
body.print-skeuo .table td {
border-color: #d7d0c2;
background: linear-gradient(#fffdf8, #f3ecdf);
color: #2c3544;
}
.label {
width: 25%;
color: #66758a;
background: linear-gradient(135deg, #f3f8ff, #f8fbff);
font-weight: 700;
}
body.print-skeuo .label {
color: #45566d;
background: linear-gradient(#e9f0f8, #c7d3e0);
text-shadow: 0 1px 0 rgba(255, 255, 255, 0.72);
}
/* ===== 页脚 ===== */
.footer {
position: absolute;
bottom: 20mm;
left: 20mm;
right: 20mm;
font-size: 12px;
color: #666;
display: flex;
justify-content: space-between;
}
/* ===== 打印优化 ===== */
@media print {
.no-print {
display: none;
}
body {
margin: 0;
background: #ffffff;
}
.page {
margin: auto;
box-shadow: none;
border-top: 0;
}
body.print-skeuo .page {
border: 0;
border-radius: 0;
background: #ffffff;
box-shadow: none;
}
body.print-skeuo .title {
margin: 0 0 20px;
border: 0;
background: transparent;
box-shadow: none;
}
}
+119
View File
@@ -0,0 +1,119 @@
const SUPABASE_URL = 'https://chixssrphfgxvqqigkzo.supabase.co';
const SUPABASE_ANON_KEY = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImNoaXhzc3JwaGZneHZxcWlna3pvIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NzQ2OTE0OTEsImV4cCI6MjA5MDI2NzQ5MX0.Az_Ew2J2zdOMcSV0UNAjBS-LPqGpqhsaN4IyZ5R7iqU';
const sbClient = supabase.createClient(SUPABASE_URL, SUPABASE_ANON_KEY);
async function loadData() {
const id = new URLSearchParams(window.location.search).get('id');
if (!id) return;
try {
const { data, error } = await sbClient
.from('certificates')
.select('*')
.eq('id', id)
.single();
if (error || !data) throw error || new Error('未找到证书信息');
const verifyTime = new Date().toLocaleString('zh-CN');
document.getElementById('info-card').style.display = 'block';
document.getElementById('d-cert-number').innerText = data.cert_number || '-';
document.getElementById('d-holder-name').innerText = data.holder_name || '-';
document.getElementById('d-honor-title').innerText = data.honor_title || '-';
document.getElementById('d-issue-date').innerText = data.issue_date || '-';
document.getElementById('d-issuer').innerText = data.issuer || '官方授权机构';
document.getElementById('d-desc').innerText = data.description || '官方荣誉认证';
document.getElementById('d-remarks').innerText = data.remarks || '无';
document.getElementById('d-verify-time').innerText = verifyTime;
document.getElementById('summary-cert-number').innerText = data.cert_number || '-';
document.getElementById('summary-holder-name').innerText = data.holder_name || '-';
document.getElementById('summary-verify-time').innerText = verifyTime;
if (data.status === 'valid') {
document.getElementById('display-status').innerHTML = '<span class="status-pill done">有效</span>';
} else if (data.status === 'invalid') {
document.getElementById('display-status').innerHTML = '<span class="status-pill pending">无效</span>';
} else {
document.getElementById('display-status').innerHTML = '<span class="status-pill pending">待核验</span>';
}
window.currentCertNumber = data.cert_number;
} catch (e) {
console.error('加载失败:', e);
alert('证书信息检索失败。');
}
}
function loadCertificateImage() {
const certNumber = window.currentCertNumber;
if (!certNumber) return;
const img = document.getElementById('cert-img');
const hint = document.getElementById('click-hint');
if (img.src && img.complete && img.naturalWidth > 0) {
img.style.display = 'block';
if (hint) hint.style.display = 'none';
return;
}
if (hint) {
hint.innerHTML = '<span class="hint-orb">载</span><strong>图片加载中</strong><span>正在读取证书原件,请稍候。</span>';
}
img.src = `https://s3.biss.click/CERTS/${encodeURIComponent(certNumber)}.svg`;
img.onload = () => {
img.style.display = 'block';
if (hint) hint.style.display = 'none';
};
img.onerror = () => {
if (hint) {
hint.innerHTML = '<span class="hint-orb">!</span><strong>图片加载失败</strong><span>未找到对应证书图片文件</span>';
}
};
}
async function ensureCertificateImageLoaded() {
const certNumber = window.currentCertNumber;
const img = document.getElementById('cert-img');
const hint = document.getElementById('click-hint');
if (!certNumber) {
throw new Error('未找到证书编号');
}
if (img.src && img.complete && img.naturalWidth > 0) {
img.style.display = 'block';
if (hint) hint.style.display = 'none';
return;
}
if (hint) {
hint.innerHTML = '<span class="hint-orb">载</span><strong>图片加载中</strong><span>正在为打印准备证书原件,请稍候。</span>';
}
await new Promise((resolve, reject) => {
img.onload = () => {
img.style.display = 'block';
if (hint) hint.style.display = 'none';
resolve();
};
img.onerror = () => {
reject(new Error('证书图片加载失败'));
};
img.src = `https://s3.biss.click/CERTS/${encodeURIComponent(certNumber)}.svg`;
});
}
async function printCertificate() {
try {
await ensureCertificateImageLoaded();
window.print();
} catch (error) {
console.error('打印前加载证书失败:', error);
alert('证书原件加载失败,无法打印。');
}
}
loadData();
+246
View File
@@ -0,0 +1,246 @@
const SUPABASE_URL = 'https://chixssrphfgxvqqigkzo.supabase.co';
const SUPABASE_ANON_KEY = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImNoaXhzc3JwaGZneHZxcWlna3pvIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NzQ2OTE0OTEsImV4cCI6MjA5MDI2NzQ5MX0.Az_Ew2J2zdOMcSV0UNAjBS-LPqGpqhsaN4IyZ5R7iqU';
const sbClient = supabase.createClient(SUPABASE_URL, SUPABASE_ANON_KEY);
const html5QrCode = new Html5Qrcode("reader");
const scannerOverlay = document.getElementById('scanner-overlay');
document.getElementById('startScanBtn').addEventListener('click', async () => {
scannerOverlay.style.display = 'flex';
const config = {
fps: 15,
qrbox: { width: 320, height: 140 },
aspectRatio: 1.0
};
if (typeof Html5QrcodeSupportedFormats !== 'undefined') {
config.formatsToSupport = [
Html5QrcodeSupportedFormats.CODE_128,
Html5QrcodeSupportedFormats.CODE_39,
Html5QrcodeSupportedFormats.CODE_93,
Html5QrcodeSupportedFormats.EAN_13,
Html5QrcodeSupportedFormats.EAN_8,
Html5QrcodeSupportedFormats.UPC_A,
Html5QrcodeSupportedFormats.UPC_E,
Html5QrcodeSupportedFormats.ITF,
Html5QrcodeSupportedFormats.CODABAR
];
}
try {
await html5QrCode.start(
{ facingMode: "environment" },
config,
(decodedText) => {
document.getElementById('searchTerm').value = decodedText;
closeScanner();
handleSearch();
},
() => {}
);
} catch (err) {
alert("无法启动摄像头,请检查 HTTPS 权限或设备连接。");
scannerOverlay.style.display = 'none';
}
});
async function closeScanner() {
if (html5QrCode.isScanning) {
await html5QrCode.stop();
}
scannerOverlay.style.display = 'none';
}
document.getElementById('stopScanBtn').addEventListener('click', closeScanner);
async function handleSearch() {
const term = document.getElementById('searchTerm').value.trim();
const start = document.getElementById('dateStart').value;
const end = document.getElementById('dateEnd').value;
const display = document.getElementById('resultsArea');
if (!term) {
alert("请输入证书编号、持有人姓名或奖项名。");
return;
}
display.innerHTML = '<div class="loading-state">正在连接证书数据库并执行检索...</div>';
try {
let query = sbClient.from('certificates').select('*');
query = query.or(`cert_number.ilike.%${term}%,holder_name.ilike.%${term}%,honor_title.ilike.%${term}%`);
if (start) query = query.gte('issue_date', start);
if (end) query = query.lte('issue_date', end);
const { data, error } = await query.order('issue_date', { ascending: false });
if (error) throw error;
const awardRecipientCounts = await loadAwardRecipientCounts(data);
renderResults(data, awardRecipientCounts);
} catch (err) {
display.innerHTML = `<div class="error-state">检索失败:${err.message}</div>`;
}
}
async function loadAwardRecipientCounts(data) {
const awardTitles = [...new Set((data || []).map(item => item.honor_title).filter(Boolean))];
if (awardTitles.length === 0) return {};
const countPairs = await Promise.all(awardTitles.map(async title => {
const { count, error } = await sbClient
.from('certificates')
.select('id', { count: 'exact', head: true })
.eq('honor_title', title);
if (error) throw error;
return [title, count || 0];
}));
return Object.fromEntries(countPairs);
}
function escapeHtml(value) {
return String(value ?? '').replace(/[&<>"']/g, char => ({
'&': '&amp;',
'<': '&lt;',
'>': '&gt;',
'"': '&quot;',
"'": '&#39;'
}[char]));
}
function renderAwardStats(data, awardRecipientCounts) {
const holderCounts = (data || []).reduce((counts, item) => {
const holderName = item.holder_name || '未填写';
counts[holderName] = (counts[holderName] || 0) + 1;
return counts;
}, {});
const holderStats = Object.entries(holderCounts)
.sort((a, b) => b[1] - a[1] || a[0].localeCompare(b[0], 'zh-CN'));
const maxHolderCount = Math.max(...holderStats.map(([, count]) => count), 1);
const awardStats = [...new Set((data || []).map(item => item.honor_title).filter(Boolean))]
.map(title => ({
title,
count: awardRecipientCounts[title] || 0
}))
.sort((a, b) => b.count - a.count || a.title.localeCompare(b.title, 'zh-CN'));
const holderBars = holderStats.map(([name, count]) => `
<div class="chart-row">
<div class="chart-row-label" title="${escapeHtml(name)}">${escapeHtml(name)}</div>
<div class="chart-bar-track">
<div class="chart-bar-fill" style="width: ${Math.max((count / maxHolderCount) * 100, 6)}%;"></div>
</div>
<div class="chart-row-value">${count} 项</div>
</div>
`).join('');
const awardChips = awardStats.map(item => `
<div class="award-count-chip">
<span class="award-count-title" title="${escapeHtml(item.title)}">${escapeHtml(item.title)}</span>
<strong>${item.count}</strong>
<span>人获得</span>
</div>
`).join('');
return `
<div class="results-summary">
<div class="summary-stat-tile">
<span>查询结果</span>
<strong>${data.length}</strong>
</div>
<div class="summary-stat-tile">
<span>涉及人员</span>
<strong>${holderStats.length}</strong>
</div>
<div class="summary-stat-tile">
<span>奖项种类</span>
<strong>${awardStats.length}</strong>
</div>
</div>
<div class="stats-grid">
<section class="stats-panel">
<div class="stats-panel-title">个人奖项数量</div>
<div class="bar-chart">${holderBars}</div>
</section>
<section class="stats-panel">
<div class="stats-panel-title">查询奖项获得人数</div>
<div class="award-count-grid">${awardChips || '<div class="muted-note">暂无奖项名称</div>'}</div>
</section>
</div>
`;
}
function renderResults(data, awardRecipientCounts = {}) {
const display = document.getElementById('resultsArea');
if (!data || data.length === 0) {
display.innerHTML = '<div class="empty-state">未找到匹配的证书记录。</div>';
return;
}
let html = `
${renderAwardStats(data, awardRecipientCounts)}
<div class="table-wrapper">
<table class="result-table">
<thead>
<tr>
<th>证书编号</th>
<th>持有人</th>
<th>荣誉标题</th>
<th>颁发日期</th>
<th>操作</th>
</tr>
</thead>
<tbody>
`;
data.forEach(item => {
html += `
<tr>
<td class="table-highlight">${escapeHtml(item.cert_number || '-')}</td>
<td>${escapeHtml(item.holder_name || '-')}</td>
<td>${escapeHtml(item.honor_title || '-')}</td>
<td>${escapeHtml(item.issue_date || '-')}</td>
<td><button class="tech-link-button secondary" type="button" onclick="goToDetail('${item.id}')">查看详情</button></td>
</tr>
`;
});
html += '</tbody></table></div>';
display.innerHTML = html;
}
function goToDetail(id) {
window.location.href = `certificate.html?id=${id}`;
}
function initializeSearchTermFromUrl() {
const params = new URLSearchParams(window.location.search);
const presetTerm =
params.get('searchTerm') ||
params.get('term') ||
params.get('keyword') ||
params.get('cert_number') ||
params.get('certNumber') ||
params.get('number') ||
params.get('awardName') ||
params.get('honor_title') ||
params.get('honorTitle') ||
params.get('award') ||
params.get('q') ||
'';
if (presetTerm) {
document.getElementById('searchTerm').value = presetTerm;
}
}
document.getElementById('searchBtn').addEventListener('click', handleSearch);
document.getElementById('searchTerm').addEventListener('keypress', e => {
if (e.key === 'Enter') handleSearch();
});
initializeSearchTermFromUrl();
+175
View File
@@ -0,0 +1,175 @@
(function () {
var currentScript = document.currentScript;
var source = currentScript && currentScript.getAttribute("data-notice-src");
if (!source && currentScript && currentScript.src) {
source = currentScript.src.replace(/js\/notice-banner\.js(?:\?.*)?$/, "notices.json");
}
if (!source) {
source = "notices.json";
}
var cacheKey = Math.floor(Date.now() / (5 * 60 * 1000));
var joiner = source.indexOf("?") === -1 ? "?" : "&";
fetch(source + joiner + "v=" + cacheKey, { cache: "no-store" })
.then(function (response) {
if (!response.ok) {
throw new Error("Notice source unavailable");
}
return response.json();
})
.then(function (payload) {
var notice = selectNotice(payload);
if (notice) {
renderNotice(notice);
}
})
.catch(function () {
// The page should stay quiet when the optional notice source is missing.
});
function selectNotice(payload) {
var notices = Array.isArray(payload) ? payload : payload && payload.notices;
if (!Array.isArray(notices)) {
return null;
}
var now = Date.now();
var path = normalizePath(window.location.pathname);
return notices.find(function (notice) {
if (!notice || notice.enabled === false) {
return false;
}
if (notice.startsAt && Date.parse(notice.startsAt) > now) {
return false;
}
if (notice.endsAt && Date.parse(notice.endsAt) < now) {
return false;
}
if (notice.pages && notice.pages.length) {
return notice.pages.some(function (page) {
return pathMatches(path, normalizePath(page));
});
}
return true;
});
}
function renderNotice(notice) {
var dismissedId = window.localStorage.getItem("dismissedNoticeId");
var noticeId = String(notice.id || "");
if (notice.dismissible !== false && noticeId && dismissedId === noticeId) {
return;
}
var body = document.body;
var originalPadding = window.getComputedStyle(body).paddingTop || "0px";
body.style.setProperty("--notice-body-pad-top", originalPadding);
var banner = document.createElement("div");
banner.className = "notice-banner";
banner.setAttribute("role", "status");
banner.setAttribute("aria-live", "polite");
banner.dataset.level = notice.level || "info";
var inner = document.createElement("div");
inner.className = "notice-banner__inner";
var badge = document.createElement("span");
badge.className = "notice-banner__badge";
badge.textContent = notice.badge || levelLabel(notice.level);
var content = document.createElement("div");
content.className = "notice-banner__content";
if (notice.title) {
var title = document.createElement("span");
title.className = "notice-banner__title";
title.textContent = notice.title;
content.appendChild(title);
}
var message = document.createElement("span");
message.className = "notice-banner__message";
message.textContent = notice.message || "";
content.appendChild(message);
inner.appendChild(badge);
inner.appendChild(content);
if (notice.url) {
var link = document.createElement("a");
link.className = "notice-banner__link";
link.href = resolveUrl(notice.url, source);
link.textContent = notice.linkText || "查看详情";
inner.appendChild(link);
}
var close = document.createElement("button");
close.className = "notice-banner__close";
close.type = "button";
close.setAttribute("aria-label", "关闭通知");
close.textContent = "×";
close.addEventListener("click", function () {
if (notice.dismissible !== false && noticeId) {
window.localStorage.setItem("dismissedNoticeId", noticeId);
}
banner.remove();
body.classList.remove("has-notice-banner");
body.style.removeProperty("--notice-banner-height");
});
inner.appendChild(close);
banner.appendChild(inner);
body.insertBefore(banner, body.firstChild);
requestAnimationFrame(function () {
banner.classList.add("is-visible");
body.style.setProperty("--notice-banner-height", banner.offsetHeight + "px");
body.classList.add("has-notice-banner");
});
}
function levelLabel(level) {
var labels = {
warning: "提醒",
error: "紧急",
success: "完成"
};
return labels[level] || "通知";
}
function normalizePath(path) {
return String(path || "").replace(/\\/g, "/").replace(/^.*?:\/\/[^/]+/, "");
}
function resolveUrl(url, base) {
try {
return new URL(url, new URL(base, window.location.href)).href;
} catch (error) {
return url;
}
}
function pathMatches(path, pattern) {
if (!pattern || pattern === "*") {
return true;
}
if (pattern.charAt(pattern.length - 1) === "*") {
return path.indexOf(pattern.slice(0, -1)) === 0;
}
return path === pattern || path.endsWith(pattern);
}
})();
+70
View File
@@ -0,0 +1,70 @@
(function () {
fetch("../notices.json?v=" + Math.floor(Date.now() / 300000), { cache: "no-store" })
.then(function (response) {
if (!response.ok) {
throw new Error("notice source unavailable");
}
return response.json();
})
.then(function (payload) {
var notices = Array.isArray(payload) ? payload : payload.notices;
var notice = Array.isArray(notices) && notices.find(function (item) {
return item && item.enabled !== false;
});
if (notice) {
renderNotice(notice);
}
})
.catch(function () {});
function renderNotice(notice) {
setText("noticeTitle", notice.title || "重要通知");
setText("noticeSummary", notice.message || "");
setText("noticeBadge", notice.badge || "通知");
setText("noticeLevel", String(notice.level || "info").toUpperCase());
setText("articleTitle", notice.title || "重要通知");
setText("articleMessage", notice.message || "");
setText("noticeDate", formatDate(notice.startsAt) || "未设置开始时间");
setText("noticeWindow", formatWindow(notice.startsAt, notice.endsAt));
}
function setText(id, text) {
var node = document.getElementById(id);
if (node) {
node.textContent = text;
}
}
function formatDate(value) {
if (!value) {
return "";
}
var date = new Date(value);
if (Number.isNaN(date.getTime())) {
return "";
}
return date.toLocaleDateString("zh-CN", {
year: "numeric",
month: "2-digit",
day: "2-digit"
});
}
function formatWindow(start, end) {
var startText = formatDate(start);
var endText = formatDate(end);
if (startText && endText) {
return startText + " 至 " + endText;
}
if (startText) {
return startText + " 起生效";
}
return "长期有效";
}
})();
+100
View File
@@ -0,0 +1,100 @@
const SUPABASE_URL = 'https://chixssrphfgxvqqigkzo.supabase.co';
const SUPABASE_ANON_KEY = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImNoaXhzc3JwaGZneHZxcWlna3pvIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NzQ2OTE0OTEsImV4cCI6MjA5MDI2NzQ5MX0.Az_Ew2J2zdOMcSV0UNAjBS-LPqGpqhsaN4IyZ5R7iqU';
if (!window._sbClient) {
window._sbClient = window.supabase.createClient(SUPABASE_URL, SUPABASE_ANON_KEY);
}
const sbClient = window._sbClient;
async function loadTicketDetail() {
const urlParams = new URLSearchParams(window.location.search);
const ticketId = urlParams.get('id');
if (!ticketId) {
showError('未提供单据 ID。');
return;
}
try {
const { data: ticket, error } = await sbClient
.from('tickets')
.select('*')
.eq('id', ticketId)
.single();
if (error) throw error;
if (!ticket) {
showError('未找到该单据。');
return;
}
displayTicketDetail(ticket);
} catch (error) {
showError(error.message || '加载失败');
}
}
function displayTicketDetail(ticket) {
const el = document.getElementById('detailContent');
const processedLabel = ticket.processed ? '已处理' : '未处理';
const completionLabel = ticket.status ? '已办结' : '未办结';
const amount = Number(ticket.amount || 0).toLocaleString('zh-CN', {
style: 'currency',
currency: 'CNY'
});
el.classList.remove('feedback-card');
el.innerHTML = `
<div class="ticket-header">
<div>
<div class="section-kicker">Ticket Detail</div>
<h1 class="ticket-title">${ticket.ticket_number || '-'} / ${ticket.customer_name || '-'}</h1>
<p class="ticket-subtitle">单据全量信息处理状态与打印操作在此统一展示</p>
</div>
<div class="top-actions-group">
<span class="status-pill ${ticket.processed ? 'done' : 'pending'}">${processedLabel}</span>
<span class="status-pill ${ticket.status ? 'done' : 'pending'}">${completionLabel}</span>
</div>
</div>
<div class="ticket-detail-grid">
${item('编号', ticket.ticket_number)}
${item('姓名', ticket.customer_name)}
${item('事由', ticket.reason)}
${item('处理结果', ticket.result)}
${item('金额', amount, 'money')}
${item('开具人', ticket.issuer)}
${item('创建时间', formatDate(ticket.created_at))}
${item('办结日期', formatDate(ticket.processed_at))}
${item('处理状态', `<span class="status-pill ${ticket.processed ? 'done' : 'pending'}">${processedLabel}</span>`, '', true)}
${item('办结状态', `<span class="status-pill ${ticket.status ? 'done' : 'pending'}">${completionLabel}</span>`, '', true)}
${item('备注', ticket.remarks || '无', '', false, true)}
</div>
`;
}
function item(label, value, extraClass = '', isHTML = false, isWide = false) {
return `
<div class="detail-item${isWide ? ' wide' : ''}">
<span class="detail-label">${label}</span>
<div class="detail-value${extraClass ? ` ${extraClass}` : ''}">${isHTML ? value : (value || '无')}</div>
</div>
`;
}
function goPrint() {
window.open(`print.html?id=${new URLSearchParams(location.search).get('id')}`, '_blank');
}
function formatDate(dateString) {
if (!dateString) return '暂无';
return new Date(dateString).toLocaleString('zh-CN');
}
function showError(msg) {
const el = document.getElementById('detailContent');
el.classList.add('feedback-card');
el.innerHTML = `<div class="error-state">${msg}</div>`;
}
document.addEventListener('DOMContentLoaded', loadTicketDetail);
+132
View File
@@ -0,0 +1,132 @@
const SUPABASE_URL = 'https://chixssrphfgxvqqigkzo.supabase.co';
const SUPABASE_ANON_KEY = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImNoaXhzc3JwaGZneHZxcWlna3pvIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NzQ2OTE0OTEsImV4cCI6MjA5MDI2NzQ5MX0.Az_Ew2J2zdOMcSV0UNAjBS-LPqGpqhsaN4IyZ5R7iqU';
const sbClient = supabase.createClient(SUPABASE_URL, SUPABASE_ANON_KEY);
let html5QrCode = null;
document.getElementById('startScanBtn').addEventListener('click', async () => {
document.getElementById('scanner-overlay').style.display = 'flex';
if (html5QrCode) {
try {
await html5QrCode.stop();
} catch (e) {}
}
html5QrCode = new Html5Qrcode("reader");
const config = { fps: 15, qrbox: { width: 250, height: 250 }, aspectRatio: 1.0 };
try {
await html5QrCode.start({ facingMode: "environment" }, config, (text) => {
document.getElementById('searchTerm').value = text;
closeScanner();
handleSearch();
});
} catch (err) {
alert("摄像头启动失败。");
closeScanner();
}
});
async function closeScanner() {
if (html5QrCode && html5QrCode.isScanning) {
await html5QrCode.stop();
}
document.getElementById('scanner-overlay').style.display = 'none';
}
document.getElementById('stopScanBtn').addEventListener('click', closeScanner);
async function handleSearch() {
const searchTerm = document.getElementById('searchTerm').value.trim();
const dateFrom = document.getElementById('dateFrom').value;
const dateTo = document.getElementById('dateTo').value;
const resultsDiv = document.getElementById('searchResults');
resultsDiv.innerHTML = '<div class="loading-state">正在连接单据数据库并执行检索...</div>';
try {
let query = sbClient.from('tickets').select('*');
if (searchTerm) {
query = query.or(`ticket_number.ilike.%${searchTerm}%,customer_name.ilike.%${searchTerm}%`);
}
if (dateFrom) query = query.gte('created_at', dateFrom);
if (dateTo) query = query.lte('created_at', dateTo);
const { data, error } = await query.order('created_at', { ascending: false });
if (error) throw error;
displayResults(data);
} catch (error) {
resultsDiv.innerHTML = `<div class="error-state">查询失败:${error.message}</div>`;
}
}
function displayResults(tickets) {
const resultsDiv = document.getElementById('searchResults');
if (!tickets || tickets.length === 0) {
resultsDiv.innerHTML = '<div class="empty-state">未找到符合条件的单据记录。</div>';
return;
}
let html = `
<div class="table-wrapper">
<table class="result-table">
<thead>
<tr>
<th>编号</th>
<th>姓名</th>
<th>事由</th>
<th>金额</th>
<th>日期</th>
<th>状态</th>
<th>操作</th>
</tr>
</thead>
<tbody>
`;
tickets.forEach(ticket => {
const amount = (ticket.amount || 0).toLocaleString('zh-CN', { style: 'currency', currency: 'CNY' });
const reason = ticket.reason || '';
const displayReason = reason.length > 18
? `<span class="text-truncate" title="${reason}">${reason}</span>`
: reason;
html += `
<tr>
<td class="table-highlight">${ticket.ticket_number || ''}</td>
<td>${ticket.customer_name || ''}</td>
<td>${displayReason}</td>
<td class="table-highlight">${amount}</td>
<td>${ticket.created_at ? new Date(ticket.created_at).toLocaleDateString('zh-CN') : '-'}</td>
<td>
<span class="status-pill ${ticket.processed ? 'done' : 'pending'}">
${ticket.processed ? '已处理' : '未处理'}
</span>
</td>
<td><button class="tech-link-button secondary" type="button" onclick="location.href='detail.html?id=${ticket.id}'">查看详情</button></td>
</tr>
`;
});
html += '</tbody></table></div>';
resultsDiv.innerHTML = html;
}
function initializeSearchTermFromUrl() {
const params = new URLSearchParams(window.location.search);
const presetTerm =
params.get('searchTerm') ||
params.get('term') ||
params.get('keyword') ||
params.get('ticket_number') ||
params.get('ticketNumber') ||
params.get('number') ||
params.get('q') ||
'';
if (presetTerm) {
document.getElementById('searchTerm').value = presetTerm;
}
}
document.getElementById('searchBtn').addEventListener('click', handleSearch);
initializeSearchTermFromUrl();
+47
View File
@@ -0,0 +1,47 @@
const SUPABASE_URL = 'https://chixssrphfgxvqqigkzo.supabase.co';
const SUPABASE_ANON_KEY = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImNoaXhzc3JwaGZneHZxcWlna3pvIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NzQ2OTE0OTEsImV4cCI6MjA5MDI2NzQ5MX0.Az_Ew2J2zdOMcSV0UNAjBS-LPqGpqhsaN4IyZ5R7iqU';
const sb = window.supabase.createClient(SUPABASE_URL, SUPABASE_ANON_KEY);
function formatDate(d){
return new Date(d).toLocaleString('zh-CN');
}
function updateWatermark(customerName) {
const now = new Date().toLocaleString('zh-CN');
const watermarkText = `BISS · ${customerName || 'Unknown'} · ${now}`;
document.getElementById('watermark').innerText = watermarkText;
}
async function load() {
const id = new URLSearchParams(location.search).get('id');
const { data } = await sb.from('tickets').select('*').eq('id', id).single();
if (!data) return;
document.getElementById('ticket_number').innerText = data.ticket_number || '';
document.getElementById('customer_name').innerText = data.customer_name || '';
document.getElementById('reason').innerText = data.reason || '';
document.getElementById('amount').innerText = '¥' + (data.amount || 0).toFixed(2);
document.getElementById('issuer').innerText = data.issuer || '';
document.getElementById('created_at').innerText = formatDate(data.created_at);
document.getElementById('processed').innerText = data.processed ? '已办结' : '未办结';
document.getElementById('processed_at').innerText = data.processed_at ? formatDate(data.processed_at) : '暂无';
document.getElementById('remarks').innerText = data.remarks || '无';
// 打印时间
document.getElementById('print_time').innerText =
new Date().toLocaleString('zh-CN');
updateWatermark(data.customer_name);
// 自动打印
setTimeout(() => {
window.print();
}, 300);
}
load();
+73
View File
@@ -0,0 +1,73 @@
const SUPABASE_URL = 'https://chixssrphfgxvqqigkzo.supabase.co';
const SUPABASE_ANON_KEY = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImNoaXhzc3JwaGZneHZxcWlna3pvIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NzQ2OTE0OTEsImV4cCI6MjA5MDI2NzQ5MX0.Az_Ew2J2zdOMcSV0UNAjBS-LPqGpqhsaN4IyZ5R7iqU';
const sb = supabase.createClient(SUPABASE_URL, SUPABASE_ANON_KEY);
async function handleSearch() {
const recipientTerm = document.getElementById('recipientTerm').value.trim();
const contentTerm = document.getElementById('searchTerm').value.trim();
const from = document.getElementById('dateFrom').value;
const to = document.getElementById('dateTo').value;
const out = document.getElementById('searchResults');
out.innerHTML = '<div class="loading-state">正在连接信函数据库并执行检索...</div>';
let q = sb.from('xinhan').select('*');
if (recipientTerm) q = q.ilike('recipient', `%${recipientTerm}%`);
if (contentTerm) q = q.ilike('content', `%${contentTerm}%`);
if (from) q = q.gte('sent_date', from);
if (to) q = q.lte('sent_date', to);
const { data, error } = await q.order('sent_date', { ascending: false });
if (error) {
out.innerHTML = `<div class="error-state">查询失败:${error.message}</div>`;
return;
}
renderResults(data || []);
}
function renderResults(rows) {
const container = document.getElementById('searchResults');
if (!rows.length) {
container.innerHTML = '<div class="empty-state">未找到符合条件的信函记录。</div>';
return;
}
let html = `
<div class="table-wrapper">
<table class="result-table">
<thead>
<tr>
<th>ID</th>
<th>收件人</th>
<th>目的地</th>
<th>寄出日期</th>
<th>寄达日期</th>
<th>内容摘要</th>
</tr>
</thead>
<tbody>
`;
rows.forEach(row => {
const content = row.content || '';
const summary = content.length > 60
? `<span class="text-truncate" title="${content}">${content}</span>`
: content;
html += `
<tr>
<td class="table-highlight">${row.id}</td>
<td>${row.recipient || ''}</td>
<td>${row.destination || ''}</td>
<td>${row.sent_date || ''}</td>
<td>${row.arrival_date || ''}</td>
<td>${summary}</td>
</tr>
`;
});
html += '</tbody></table></div>';
container.innerHTML = html;
}
document.getElementById('searchBtn').addEventListener('click', handleSearch);
+70
View File
@@ -0,0 +1,70 @@
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>通知详情</title>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@400;500;600;700&family=Orbitron:wght@500;700&display=swap" rel="stylesheet">
<link rel="stylesheet" href="../css/notice-page.css">
</head>
<body class="notice-skeuo">
<main class="notice-page">
<nav class="topbar" aria-label="页面导航">
<a class="brand" href="../index.html">
<span class="brand-mark">BI</span>
<span>通知中心</span>
</a>
<a class="back-link" href="../index.html">返回首页</a>
</nav>
<section class="notice-hero">
<div class="hero-copy">
<span class="eyebrow">Notice Center</span>
<h1 id="noticeTitle">重要通知</h1>
<p id="noticeSummary">2026 年上半年 4 月数据已完成更新。请按需进入相关查询页面查看最新记录。</p>
</div>
<div class="status-panel" aria-label="通知状态">
<span class="status-badge" id="noticeBadge">通知</span>
<div class="status-code" id="noticeLevel">INFO</div>
<p id="noticeWindow">长期有效</p>
</div>
</section>
<section class="notice-layout">
<article class="notice-card">
<div class="notice-meta">
<span id="noticeDate">2026-05-01</span>
<span id="noticeState">当前生效</span>
</div>
<h2 id="articleTitle">重要通知</h2>
<p id="articleMessage">2026 年上半年 4 月数据已完成更新。请按需进入相关查询页面查看最新记录。</p>
<div class="info-grid">
<div>
<span class="info-label">适用范围</span>
<strong>证书、信函与单据查询</strong>
</div>
<div>
<span class="info-label">提醒类型</span>
<strong>服务公告与使用提示</strong>
</div>
<div>
<span class="info-label">查看方式</span>
<strong>页面顶部通知横幅</strong>
</div>
</div>
</article>
<aside class="side-card">
<h2>温馨提示</h2>
<p>如通知涉及查询范围、开放时间或数据更新,请以本页展示内容为准。完成阅读后,可返回首页继续使用相关查询服务。</p>
<a class="primary-action" href="../index.html">返回查询入口</a>
</aside>
</section>
</main>
<script src="../js/notice-index.js"></script>
</body>
</html>
+37
View File
@@ -0,0 +1,37 @@
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>单据详情</title>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@400;500;600;700&family=Orbitron:wght@500;700&display=swap" rel="stylesheet">
<link rel="stylesheet" href="../css/tech-query.css">
<link rel="stylesheet" href="../css/notice-banner.css">
<script src="https://cdn.jsdelivr.net/npm/@supabase/supabase-js@2"></script>
</head>
<body class="query-skeuo">
<main class="detail-shell">
<div class="top-actions">
<a href="./index.html" class="tech-link-button secondary">返回查询页</a>
<div class="top-actions-group">
<button class="tech-button secondary" type="button" onclick="history.back()">返回上一页</button>
<button class="tech-button" type="button" onclick="goPrint()">打印单据</button>
</div>
</div>
<div id="detailContent" class="detail-panel feedback-card">
正在加载单据详情...
</div>
</main>
<footer class="page-footer">
<p>© 2026 BI Intelligent Query Interface</p>
</footer>
<script src="../js/ticket-detail.js"></script>
<script src="https://cdn.jsdmirror.cn/gh/bishshi/wechat-detect@main/wechat-detect.js"></script>
<script src="../js/notice-banner.js"></script>
</body>
</html>
+96
View File
@@ -0,0 +1,96 @@
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<title>单据查询系统</title>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@400;500;600;700&family=Orbitron:wght@500;700&display=swap" rel="stylesheet">
<link rel="stylesheet" href="../css/tech-query.css">
<link rel="stylesheet" href="../css/notice-banner.css">
<script src="https://cdn.jsdmirror.cn/gh/bishshi/wechat-detect@main/wechat-detect.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@supabase/supabase-js@2"></script>
<script src="https://unpkg.com/html5-qrcode"></script>
</head>
<body class="query-skeuo">
<main class="page-shell">
<section class="page-header">
<div class="hero-card">
<span class="eyebrow">Ticket Search</span>
<h1>单据状态追踪中心</h1>
<p>支持按单据编号、姓名和时间范围查询,扫码可直接识别单据信息并进入检索流程。</p>
<div class="hero-meta">
<span class="meta-chip">覆盖范围:2024 年至今</span>
<span class="meta-chip">输出内容:金额 / 状态 / 详情入口</span>
</div>
</div>
<aside class="stat-card">
<div>
<div class="stat-label">Module</div>
<div class="stat-value">TICKET</div>
</div>
<p></p>
</aside>
</section>
<section class="panel-card">
<div class="panel-title-row">
<div>
<h2 class="panel-title">检索条件</h2>
<div class="panel-subtitle">支持文本检索与扫码录入</div>
</div>
</div>
<div class="search-grid">
<div class="form-group">
<label class="form-label" for="searchTerm">编号 / 姓名</label>
<div class="input-with-action">
<input type="text" id="searchTerm" class="tech-input" placeholder="请输入单据编号或姓名">
<button type="button" class="icon-action" id="startScanBtn" title="扫码查询" aria-label="扫码查询">
<svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M3 7V5a2 2 0 0 1 2-2h2m10 0h2a2 2 0 0 1 2 2v2m0 10v2a2 2 0 0 1-2 2h-2M7 21H5a2 2 0 0 1-2-2v-2M7 7h10v10H7z"/></svg>
</button>
</div>
</div>
<div class="form-group">
<label class="form-label" for="dateFrom">开始日期</label>
<input type="date" id="dateFrom" class="tech-input">
</div>
<div class="form-group">
<label class="form-label" for="dateTo">结束日期</label>
<input type="date" id="dateTo" class="tech-input">
</div>
<button id="searchBtn" class="tech-button">执行查询</button>
</div>
</section>
<section class="panel-card results-card">
<div class="panel-title-row">
<div>
<h2 class="panel-title">查询结果</h2>
<div class="panel-subtitle">金额、状态与详情一屏展示</div>
</div>
</div>
<div id="searchResults" class="results-shell">
<div class="empty-state">输入查询条件后开始检索,或使用扫码功能快速定位单据。</div>
</div>
</section>
</main>
<div id="scanner-overlay" class="scanner-overlay">
<div class="scanner-frame">
<div id="reader"></div>
<div class="scanner-line"></div>
</div>
<div class="scanner-text">请将二维码保持在扫描框内</div>
<button class="tech-button secondary" id="stopScanBtn" type="button">退出扫描</button>
</div>
<footer class="page-footer">
<p>© 2026 BI Intelligent Query Interface</p>
</footer>
<script src="../js/ticket-index.js"></script>
<script src="../js/notice-banner.js"></script>
</body>
</html>
+46
View File
@@ -0,0 +1,46 @@
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<title>打印单据</title>
<link rel="stylesheet" href="../css/notice-banner.css">
<link rel="stylesheet" href="../css/ticket-print.css">
</head>
<body class="print-skeuo">
<div class="page" id="content">
<!-- 水印 -->
<div class="watermark" id="watermark"></div>
<div class="title">单据详情</div>
<table class="table">
<tr><td class="label">编号</td><td id="ticket_number"></td></tr>
<tr><td class="label">姓名</td><td id="customer_name"></td></tr>
<tr><td class="label">事由</td><td id="reason"></td></tr>
<tr><td class="label">金额</td><td id="amount"></td></tr>
<tr><td class="label">开具人</td><td id="issuer"></td></tr>
<tr><td class="label">日期</td><td id="created_at"></td></tr>
<tr><td class="label">办结否</td><td id="processed"></td></tr>
<tr><td class="label">办结日期</td><td id="processed_at"></td></tr>
<tr><td class="label">备注</td><td id="remarks"></td></tr>
</table>
<!-- 页脚 -->
<div class="footer">
<div>打印时间:<span id="print_time"></span></div>
<div>系统自动生成</div>
</div>
</div>
<script src="https://cdn.jsdelivr.net/npm/@supabase/supabase-js@2"></script>
<script src="../js/ticket-print.js"></script>
<script src="https://cdn.jsdmirror.cn/gh/bishshi/wechat-detect@main/wechat-detect.js"></script>
<script src="../js/notice-banner.js"></script>
</body>
</html>
+84
View File
@@ -0,0 +1,84 @@
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>信函查询系统</title>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@400;500;600;700&family=Orbitron:wght@500;700&display=swap" rel="stylesheet">
<link rel="stylesheet" href="../css/tech-query.css">
<link rel="stylesheet" href="../css/notice-banner.css">
<script src="https://cdn.jsdelivr.net/npm/@supabase/supabase-js@2"></script>
</head>
<body class="query-skeuo">
<main class="page-shell">
<section class="page-header">
<div class="hero-card">
<span class="eyebrow">Letter Search</span>
<h1>信函流转查询台</h1>
<p>可按收件人、关键字与寄送时间进行检索,统一展示寄达信息与内容摘要,方便快速确认记录。</p>
<div class="hero-meta">
<span class="meta-chip">检索字段:收件人 / 内容关键字</span>
<span class="meta-chip">输出内容:目的地 / 时间 / 摘要</span>
</div>
</div>
<aside class="stat-card">
<div>
<div class="stat-label">Module</div>
<div class="stat-value">LETTER</div>
</div>
<p></p>
</aside>
</section>
<section class="panel-card">
<div class="panel-title-row">
<div>
<h2 class="panel-title">检索条件</h2>
<div class="panel-subtitle">多字段组合查询,快速过滤信函记录</div>
</div>
</div>
<div class="search-grid compact">
<div class="form-group">
<label class="form-label" for="recipientTerm">收件人</label>
<input id="recipientTerm" class="tech-input" placeholder="输入收件人姓名">
</div>
<div class="form-group">
<label class="form-label" for="searchTerm">编号 / 关键字</label>
<input id="searchTerm" class="tech-input" placeholder="输入内容关键字">
</div>
<div class="form-group">
<label class="form-label" for="dateFrom">开始日期</label>
<input id="dateFrom" type="date" class="tech-input">
</div>
<div class="form-group">
<label class="form-label" for="dateTo">结束日期</label>
<input id="dateTo" type="date" class="tech-input">
</div>
<button id="searchBtn" class="tech-button">执行查询</button>
</div>
</section>
<section class="panel-card results-card">
<div class="panel-title-row">
<div>
<h2 class="panel-title">查询结果</h2>
<div class="panel-subtitle">寄送路径与摘要信息集中展示</div>
</div>
</div>
<div id="searchResults" class="results-shell">
<div class="empty-state">设置检索条件后即可查询信函流转记录。</div>
</div>
</section>
</main>
<footer class="page-footer">
<p>© 2026 BI Intelligent Query Interface</p>
</footer>
<script src="../js/xinhan-index.js"></script>
<script src="../js/notice-banner.js"></script>
</body>
</html>