|
|
@@ -0,0 +1,871 @@
|
|
|
+<!DOCTYPE html>
|
|
|
+<html lang="zh-CN">
|
|
|
+<head>
|
|
|
+<meta charset="UTF-8" />
|
|
|
+<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
|
+<title>工单详情 · 分区折叠改版原型 v3</title>
|
|
|
+<style>
|
|
|
+ :root {
|
|
|
+ --radius: 12px;
|
|
|
+ --type-meta: 12px;
|
|
|
+ --type-support: 13px;
|
|
|
+ --type-body: 14px;
|
|
|
+ --type-comfort: 15px;
|
|
|
+ --type-section: 16px;
|
|
|
+ --background: #f5f7f8;
|
|
|
+ --foreground: #1f2b32;
|
|
|
+ --card: #ffffff;
|
|
|
+ --surface-subtle: #f0f4f5;
|
|
|
+ --text-secondary: #425863;
|
|
|
+ --muted-foreground: #586b76;
|
|
|
+ --icon: #617783;
|
|
|
+ --border: #d9e2e7;
|
|
|
+ --border-subtle: #e8eef1;
|
|
|
+ --primary: #176b63;
|
|
|
+ --primary-hover: #10564f;
|
|
|
+ --primary-foreground: #ffffff;
|
|
|
+ --primary-soft: #e8f3f1;
|
|
|
+ --primary-border: #c5ded9;
|
|
|
+ --success: #216444;
|
|
|
+ --success-soft: #edf7f0;
|
|
|
+ --success-border: #bddcc8;
|
|
|
+ --warning: #835812;
|
|
|
+ --warning-soft: #fff6e5;
|
|
|
+ --warning-border: #e7d2a8;
|
|
|
+ --info: #315e89;
|
|
|
+ --info-soft: #edf3fa;
|
|
|
+ --info-border: #cbdced;
|
|
|
+ --destructive: #b03b3b;
|
|
|
+ --destructive-soft: #fff1f0;
|
|
|
+ --destructive-border: #e9b9b7;
|
|
|
+ --shadow-card: 0 2px 4px rgb(24 40 48 / 7%);
|
|
|
+ --font-sans: "IBM Plex Sans", "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
|
|
|
+ --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
|
|
|
+ --toolbar-h: 46px;
|
|
|
+ }
|
|
|
+ * { box-sizing: border-box; }
|
|
|
+ html, body { margin: 0; }
|
|
|
+ /* 折叠:关闭的 <details> 只显示 summary(子元素自定义了 display,需显式压掉) */
|
|
|
+ details:not([open]) > :not(summary) { display: none !important; }
|
|
|
+ body {
|
|
|
+ background: var(--background);
|
|
|
+ color: var(--foreground);
|
|
|
+ font: var(--type-body)/1.55 var(--font-sans);
|
|
|
+ -webkit-font-smoothing: antialiased;
|
|
|
+ }
|
|
|
+ b, strong { font-weight: 650; }
|
|
|
+ button { font: inherit; cursor: pointer; }
|
|
|
+ .mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
|
|
|
+
|
|
|
+ /* ── 原型工具条 ───────────────────────────────────────────── */
|
|
|
+ .toolbar {
|
|
|
+ position: sticky; top: 0; z-index: 40;
|
|
|
+ display: flex; align-items: center; flex-wrap: wrap; gap: 14px;
|
|
|
+ padding: 10px 20px;
|
|
|
+ border-bottom: 1px solid var(--border);
|
|
|
+ background: rgb(255 255 255 / 94%);
|
|
|
+ backdrop-filter: blur(8px);
|
|
|
+ }
|
|
|
+ .toolbar .brand { font-weight: 700; font-size: var(--type-support); letter-spacing: .02em; }
|
|
|
+ .toolbar .brand em {
|
|
|
+ margin-left: 8px; padding: 2px 7px; border: 1px solid var(--primary-border); border-radius: 999px;
|
|
|
+ background: var(--primary-soft); color: var(--primary); font-size: var(--type-meta); font-style: normal;
|
|
|
+ }
|
|
|
+ .switcher { display: flex; gap: 4px; padding: 3px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-subtle); }
|
|
|
+ .switcher button {
|
|
|
+ padding: 5px 12px; border: 0; border-radius: 6px; background: transparent;
|
|
|
+ color: var(--text-secondary); font-size: var(--type-support);
|
|
|
+ }
|
|
|
+ .switcher button.on { background: var(--card); color: var(--foreground); box-shadow: var(--shadow-card); font-weight: 650; }
|
|
|
+ .toolbar label { display: inline-flex; align-items: center; gap: 6px; color: var(--text-secondary); font-size: var(--type-support); cursor: pointer; }
|
|
|
+ .toolbar label input { accent-color: var(--primary); }
|
|
|
+ .height-chip { margin-left: auto; color: var(--muted-foreground); font-size: var(--type-support); }
|
|
|
+ .height-chip b { color: var(--foreground); font-family: var(--font-mono); }
|
|
|
+ .height-chip .down { color: var(--success); font-weight: 650; }
|
|
|
+
|
|
|
+ /* ── 页面骨架 ─────────────────────────────────────────────── */
|
|
|
+ /* 底部留 14px,与右栏面板「顶 12 + 底 14」的高度算式咬合:滚到页面最底时
|
|
|
+ 面板正好贴在吸附位上,不会因为父容器到底而被顶上去。 */
|
|
|
+ .page { max-width: 1400px; margin: 0 auto; padding: 18px 22px 14px; }
|
|
|
+ .card {
|
|
|
+ min-width: 0; padding: 18px 20px; border: 1px solid var(--border); border-radius: 10px;
|
|
|
+ background: var(--card); box-shadow: var(--shadow-card);
|
|
|
+ }
|
|
|
+
|
|
|
+ /* ── 工单头:状态/责任人/期限 + 唯一主 CTA ─────────────────── */
|
|
|
+ .wo-head {
|
|
|
+ display: grid; gap: 12px; margin: 0; padding: 18px 20px;
|
|
|
+ background: linear-gradient(110deg, var(--card) 62%, var(--primary-soft) 100%);
|
|
|
+ }
|
|
|
+ .wo-head-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
|
|
|
+ .wo-id { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; min-width: 0; }
|
|
|
+ .wo-no { font: 700 22px/1.2 var(--font-mono); letter-spacing: -.01em; }
|
|
|
+ .tag { display: inline-flex; align-items: center; padding: 2px 8px; border: 1px solid var(--border); border-radius: 5px; font-size: var(--type-meta); font-weight: 650; line-height: 1.5; white-space: nowrap; }
|
|
|
+ .tag.type { background: var(--surface-subtle); color: var(--text-secondary); }
|
|
|
+ .tag.t-processing { border-color: var(--info-border); background: var(--info-soft); color: var(--info); }
|
|
|
+ .tag.t-settled { border-color: var(--success-border); background: var(--success-soft); color: var(--success); }
|
|
|
+ .tag.t-rejected { border-color: var(--destructive-border); background: var(--destructive-soft); color: var(--destructive); }
|
|
|
+ .tag.t-completed { border-color: var(--warning-border); background: var(--warning-soft); color: var(--warning); }
|
|
|
+ .wo-actions { display: flex; align-items: center; flex: none; gap: 8px; }
|
|
|
+ .btn {
|
|
|
+ display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px;
|
|
|
+ border: 1px solid transparent; border-radius: 7px; background: var(--primary); color: var(--primary-foreground);
|
|
|
+ font-size: var(--type-support); font-weight: 650; white-space: nowrap;
|
|
|
+ }
|
|
|
+ .btn:hover { background: var(--primary-hover); }
|
|
|
+ .btn.ghost { border-color: var(--border); background: var(--card); color: var(--foreground); font-weight: 500; }
|
|
|
+ .btn.ghost:hover { border-color: var(--primary-border); background: var(--primary-soft); color: var(--primary); }
|
|
|
+ .btn.sm { padding: 5px 10px; font-size: var(--type-meta); }
|
|
|
+ .more { position: relative; }
|
|
|
+ .more > summary { list-style: none; }
|
|
|
+ .more > summary::-webkit-details-marker { display: none; }
|
|
|
+ .more-menu {
|
|
|
+ position: absolute; top: calc(100% + 6px); right: 0; z-index: 20; display: grid; min-width: 208px; padding: 6px;
|
|
|
+ border: 1px solid var(--border); border-radius: 9px; background: var(--card); box-shadow: 0 12px 30px rgb(24 40 48 / 14%);
|
|
|
+ }
|
|
|
+ .more-menu button {
|
|
|
+ display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%;
|
|
|
+ padding: 8px 10px; border: 0; border-radius: 6px; background: none; color: var(--foreground);
|
|
|
+ font-size: var(--type-support); text-align: left;
|
|
|
+ }
|
|
|
+ .more-menu button:hover { background: var(--primary-soft); }
|
|
|
+ .more-menu button small { color: var(--muted-foreground); font-size: var(--type-meta); }
|
|
|
+ .more-menu hr { margin: 5px 4px; border: 0; border-top: 1px solid var(--border-subtle); }
|
|
|
+ .wo-title { margin: 0; font-size: 20px; line-height: 1.35; font-weight: 650; overflow-wrap: anywhere; }
|
|
|
+ .wo-meta { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; color: var(--text-secondary); font-size: var(--type-support); }
|
|
|
+ .wo-meta span { display: inline-flex; gap: 5px; align-items: baseline; }
|
|
|
+ .wo-meta span b { color: var(--foreground); font-weight: 600; }
|
|
|
+ .wo-meta i { color: var(--border); font-style: normal; }
|
|
|
+ .wo-meta .due b { color: var(--warning); }
|
|
|
+ .wo-meta .due.overdue b { color: var(--destructive); }
|
|
|
+ .wo-hint { display: flex; align-items: center; gap: 7px; color: var(--muted-foreground); font-size: var(--type-support); }
|
|
|
+ .wo-hint::before { content: ""; width: 3px; height: 14px; border-radius: 2px; background: var(--primary); }
|
|
|
+
|
|
|
+ /* 细进度条:从 100px 高的卡片压成一行 */
|
|
|
+ .wo-steps { display: flex; align-items: center; gap: 0; flex-wrap: wrap; padding-top: 4px; border-top: 1px solid var(--border-subtle); }
|
|
|
+ .step { display: inline-flex; align-items: center; gap: 6px; color: var(--muted-foreground); font-size: var(--type-meta); white-space: nowrap; }
|
|
|
+ .step b { display: grid; place-items: center; width: 18px; height: 18px; border: 1px solid var(--border); border-radius: 50%; background: var(--card); font-size: 10px; font-weight: 700; }
|
|
|
+ .step.done { color: var(--text-secondary); }
|
|
|
+ .step.done b { border-color: var(--success-border); background: var(--success-soft); color: var(--success); }
|
|
|
+ .step.cur { color: var(--primary); font-weight: 700; }
|
|
|
+ .step.cur b { border-color: var(--primary); background: var(--primary); color: var(--primary-foreground); }
|
|
|
+ .step i { width: 22px; height: 1px; margin: 0 7px; background: var(--border); }
|
|
|
+
|
|
|
+ /* ── 待办区:只在需要动作时出现 ───────────────────────────── */
|
|
|
+ .todo { display: grid; gap: 12px; }
|
|
|
+ .banner {
|
|
|
+ display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 16px;
|
|
|
+ border: 1px solid var(--warning-border); border-radius: 10px; background: var(--warning-soft);
|
|
|
+ }
|
|
|
+ .banner.danger { border-color: var(--destructive-border); background: var(--destructive-soft); }
|
|
|
+ .banner > div { display: grid; gap: 3px; min-width: 0; }
|
|
|
+ .banner strong { display: flex; align-items: center; gap: 7px; color: var(--warning); font-size: var(--type-body); }
|
|
|
+ .banner.danger strong { color: var(--destructive); }
|
|
|
+ .banner p { margin: 0; color: var(--text-secondary); font-size: var(--type-support); overflow-wrap: anywhere; }
|
|
|
+ .banner small { color: var(--muted-foreground); font-size: var(--type-meta); }
|
|
|
+ .gaps { padding: 15px 17px; border: 1px solid var(--warning-border); border-radius: 10px; background: var(--warning-soft); }
|
|
|
+ .gaps-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
|
|
|
+ .gaps-head strong { color: var(--warning); font-size: var(--type-body); }
|
|
|
+ .gaps-head span { color: var(--text-secondary); font-size: var(--type-meta); }
|
|
|
+ .gaps ul { display: grid; gap: 7px; margin: 0; padding: 0; list-style: none; }
|
|
|
+ .gaps li { display: flex; align-items: center; gap: 10px; padding: 9px 11px; border-radius: 7px; background: var(--card); }
|
|
|
+ .gaps li > div { display: grid; gap: 1px; flex: 1; min-width: 0; }
|
|
|
+ .gaps li b { font-size: var(--type-support); }
|
|
|
+ .gaps li p { margin: 0; color: var(--text-secondary); font-size: var(--type-meta); line-height: 1.5; }
|
|
|
+ .gaps li button { flex: none; }
|
|
|
+ .done-strip {
|
|
|
+ display: flex; align-items: center; gap: 8px; padding: 11px 15px;
|
|
|
+ border: 1px solid var(--success-border); border-radius: 10px; background: var(--success-soft);
|
|
|
+ color: var(--success); font-size: var(--type-support); font-weight: 600;
|
|
|
+ }
|
|
|
+
|
|
|
+ /* ── 两栏:正文 + 右侧处理记录(吸附、随窗口自适应) ────────── */
|
|
|
+ .layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; align-items: start; gap: 12px; }
|
|
|
+ .main { display: grid; gap: 12px; min-width: 0; }
|
|
|
+ .side { position: sticky; top: calc(var(--toolbar-h) + 12px); display: grid; gap: 12px; min-width: 0; }
|
|
|
+
|
|
|
+ /* ── 概览卡 ──────────────────────────────────────────────── */
|
|
|
+ .lead-quote {
|
|
|
+ margin: 0 0 14px; padding: 12px 14px; border-left: 3px solid var(--primary); border-radius: 0 8px 8px 0;
|
|
|
+ background: var(--primary-soft); font-size: var(--type-comfort); line-height: 1.7; overflow-wrap: anywhere;
|
|
|
+ }
|
|
|
+ .kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px 18px; }
|
|
|
+ .kv > div { display: grid; gap: 2px; min-width: 0; }
|
|
|
+ .kv.wide > div.full { grid-column: 1 / -1; }
|
|
|
+ .kv span { color: var(--text-secondary); font-size: var(--type-meta); }
|
|
|
+ .kv b { font-size: var(--type-body); font-weight: 600; overflow-wrap: anywhere; }
|
|
|
+
|
|
|
+ /* ── 交付事实:段头 + 折叠 ───────────────────────────────── */
|
|
|
+ .facts > header { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
|
|
|
+ .facts h2 { margin: 0; font-size: var(--type-section); }
|
|
|
+ .facts > header span { color: var(--muted-foreground); font-size: var(--type-meta); }
|
|
|
+ .seg { border-top: 1px solid var(--border-subtle); }
|
|
|
+ .seg > summary {
|
|
|
+ display: grid; grid-template-columns: auto minmax(0, 1fr) auto 16px; align-items: center; gap: 12px;
|
|
|
+ padding: 13px 2px; list-style: none; cursor: pointer;
|
|
|
+ }
|
|
|
+ .seg > summary::-webkit-details-marker { display: none; }
|
|
|
+ .seg > summary:hover .seg-t { color: var(--primary); }
|
|
|
+ .seg-t { display: flex; align-items: center; gap: 8px; font-size: var(--type-body); font-weight: 650; }
|
|
|
+ .seg-t em { padding: 1px 5px; border: 1px solid var(--border); border-radius: 4px; color: var(--muted-foreground); font-size: 10px; font-style: normal; font-weight: 600; letter-spacing: .04em; }
|
|
|
+ .seg-s { grid-column: 2; justify-self: end; color: var(--text-secondary); font-size: var(--type-support); text-align: right; overflow-wrap: anywhere; }
|
|
|
+ .seg-badge { grid-column: 3; justify-self: end; padding: 2px 7px; border: 1px solid var(--border); border-radius: 5px; background: var(--surface-subtle); color: var(--text-secondary); font-size: var(--type-meta); white-space: nowrap; }
|
|
|
+ .seg-badge.ok { border-color: var(--success-border); background: var(--success-soft); color: var(--success); }
|
|
|
+ .seg-badge.warn { border-color: var(--warning-border); background: var(--warning-soft); color: var(--warning); }
|
|
|
+ .chev { grid-column: 4; width: 16px; height: 16px; color: var(--icon); transition: transform .16s ease; }
|
|
|
+ .seg[open] > summary .chev { transform: rotate(180deg); }
|
|
|
+ .seg-body { display: grid; gap: 12px; padding: 2px 0 16px; }
|
|
|
+ .seg-body > p { margin: 0; color: var(--text-secondary); font-size: var(--type-support); }
|
|
|
+ .seg-foot { margin: 0; color: var(--muted-foreground); font-size: var(--type-meta); line-height: 1.6; }
|
|
|
+ .subhead { margin: 4px 0 0; font-size: var(--type-support); font-weight: 650; }
|
|
|
+
|
|
|
+ /* ── 表格 ────────────────────────────────────────────────── */
|
|
|
+ .tbl-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 8px; }
|
|
|
+ table { width: 100%; min-width: 520px; border-collapse: collapse; text-align: left; }
|
|
|
+ th, td { padding: 9px 11px; border-bottom: 1px solid var(--border-subtle); font-size: var(--type-support); vertical-align: middle; }
|
|
|
+ th { background: var(--surface-subtle); color: var(--text-secondary); font-weight: 650; white-space: nowrap; }
|
|
|
+ tbody tr:last-child td { border-bottom: 0; }
|
|
|
+ td small { display: block; margin-top: 2px; color: var(--muted-foreground); font-size: var(--type-meta); }
|
|
|
+
|
|
|
+ /* ── 留痕:右栏面板(全部条数 + 贴合视口高度 + 面板内滚动) ───── */
|
|
|
+ /* ⚠️ 高度用 dvh:移动端/缩放时 100vh 会算进工具栏,卡片底部被裁掉一截。 */
|
|
|
+ .logs-panel {
|
|
|
+ display: flex; flex-direction: column; min-height: 0; padding: 0; overflow: hidden;
|
|
|
+ height: calc(100vh - var(--toolbar-h) - 26px);
|
|
|
+ height: calc(100dvh - var(--toolbar-h) - 26px);
|
|
|
+ }
|
|
|
+ .logs-panel > header { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex: none; padding: 15px 17px 11px; border-bottom: 1px solid var(--border-subtle); }
|
|
|
+ .logs-panel h2 { margin: 0; font-size: var(--type-section); }
|
|
|
+ .logs-panel > header span { flex: none; color: var(--muted-foreground); font-size: var(--type-meta); }
|
|
|
+ .logs-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 13px 17px 15px; }
|
|
|
+ .tl { position: relative; display: grid; margin: 0; padding: 0; list-style: none; }
|
|
|
+ .tl li { position: relative; padding: 0 0 14px 30px; }
|
|
|
+ .tl li:last-of-type { padding-bottom: 0; }
|
|
|
+ .tl li::before { position: absolute; top: 18px; bottom: 0; left: 8px; width: 2px; background: var(--border-subtle); content: ""; }
|
|
|
+ .tl li:last-of-type::before { display: none; }
|
|
|
+ .tl .dot { position: absolute; top: 3px; left: 1px; width: 16px; height: 16px; border: 1px solid var(--primary-border); border-radius: 50%; background: var(--primary-soft); }
|
|
|
+ .tl li[data-tone="danger"] .dot { border-color: var(--destructive-border); background: var(--destructive-soft); }
|
|
|
+ .tl li[data-tone="warn"] .dot { border-color: var(--warning-border); background: var(--warning-soft); }
|
|
|
+ .tl li[data-tone="done"] .dot { border-color: var(--success-border); background: var(--success-soft); }
|
|
|
+
|
|
|
+ /* 记录方向:光点沿轴自下而上扫过(上=最新,下=最早),带 72px 拖尾 */
|
|
|
+ .tl-flow {
|
|
|
+ position: absolute; z-index: 1; left: 8px; width: 2px; border-radius: 2px;
|
|
|
+ background: linear-gradient(to top, transparent, color-mix(in srgb, var(--primary) 20%, transparent));
|
|
|
+ pointer-events: none;
|
|
|
+ }
|
|
|
+ .tl-comet {
|
|
|
+ position: absolute; top: 0; left: 0; width: 2px; height: 88px; will-change: transform;
|
|
|
+ animation: tl-comet var(--comet-dur, 3s) linear infinite;
|
|
|
+ }
|
|
|
+ .tl-comet::after {
|
|
|
+ position: absolute; inset: 0; border-radius: 2px;
|
|
|
+ background: linear-gradient(to bottom,
|
|
|
+ color-mix(in srgb, var(--primary) 46%, transparent) 0%,
|
|
|
+ color-mix(in srgb, var(--primary) 18%, transparent) 45%,
|
|
|
+ transparent 100%);
|
|
|
+ content: "";
|
|
|
+ }
|
|
|
+ .tl-comet::before {
|
|
|
+ position: absolute; top: -3px; left: 50%; width: 7px; height: 7px; margin-left: -3.5px;
|
|
|
+ border-radius: 50%;
|
|
|
+ background: color-mix(in srgb, var(--primary) 60%, transparent);
|
|
|
+ box-shadow: 0 0 0 2px color-mix(in srgb, var(--primary) 10%, transparent);
|
|
|
+ content: "";
|
|
|
+ }
|
|
|
+ /* --rail-h 由 JS 按首尾节点写入:光点从轴底走到轴顶(=走到最新一条) */
|
|
|
+ @keyframes tl-comet {
|
|
|
+ 0% { transform: translateY(var(--rail-h, 240px)); opacity: 0; }
|
|
|
+ 8% { opacity: 1; }
|
|
|
+ 86% { opacity: 1; }
|
|
|
+ 100% { transform: translateY(0); opacity: 0; }
|
|
|
+ }
|
|
|
+ /* 最新一条(轴顶端)脉冲收口,指明“光点停在这里” */
|
|
|
+ .tl li:first-of-type .dot::after {
|
|
|
+ position: absolute; inset: -2px; border: 1px solid var(--primary-border); border-radius: 50%;
|
|
|
+ content: ""; animation: tl-ping var(--comet-dur, 3s) ease-out infinite;
|
|
|
+ }
|
|
|
+ @keyframes tl-ping {
|
|
|
+ 0% { transform: scale(.9); opacity: .6; }
|
|
|
+ 45%, 100% { transform: scale(1.9); opacity: 0; }
|
|
|
+ }
|
|
|
+ @media (prefers-reduced-motion: reduce) {
|
|
|
+ .tl-comet { display: none; }
|
|
|
+ .tl li:first-of-type .dot::after { animation: none; opacity: .45; }
|
|
|
+ }
|
|
|
+ .tl b { font-size: var(--type-support); }
|
|
|
+ .tl p { margin: 2px 0 0; color: var(--text-secondary); font-size: var(--type-support); overflow-wrap: anywhere; }
|
|
|
+ .tl small { display: block; margin-top: 3px; color: var(--muted-foreground); font-size: var(--type-meta); font-family: var(--font-mono); }
|
|
|
+ .more-link { display: inline-flex; align-items: center; gap: 4px; margin-top: 10px; padding: 0; border: 0; background: none; color: var(--primary); font-size: var(--type-support); font-weight: 650; }
|
|
|
+ .more-link:hover { text-decoration: underline; }
|
|
|
+
|
|
|
+ /* ── 正文底部的参考信息(主列内,宽度与上方卡片天然同宽) ───── */
|
|
|
+ /* 两张卡放在 .main 里而不是 .layout 外面:① 宽度由所在列决定,与「交付事实」等卡
|
|
|
+ 自动对齐,不再靠复制列定义对齐;② .layout 的高度因此覆盖整页,右栏 sticky
|
|
|
+ 才有完整的行程(放在外面时 .layout 只有正文那一段高,滚过就跟着走了)。
|
|
|
+ 2026-11-17 定案:先删「规则说明」卡,再要求参考卡与上方卡片同宽对齐、处理记录常驻。 */
|
|
|
+ .refs { display: grid; gap: 12px; }
|
|
|
+ .refs > section { min-width: 0; }
|
|
|
+ .refs h2 { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 0 0 8px; font-size: var(--type-body); }
|
|
|
+ .refs h2 span { flex: none; color: var(--muted-foreground); font-size: var(--type-meta); font-weight: 500; }
|
|
|
+ .refs .trace { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 4px 14px; align-items: baseline; padding: 7px 0; }
|
|
|
+ .refs .trace small { grid-column: 2; }
|
|
|
+
|
|
|
+ /* ── 右栏参考信息 ────────────────────────────────────────── */
|
|
|
+ .side h2 { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 0 0 8px; font-size: var(--type-body); }
|
|
|
+ .side h2 span { color: var(--muted-foreground); font-size: var(--type-meta); font-weight: 500; }
|
|
|
+ .trace { display: grid; gap: 2px; padding: 8px 0; border-bottom: 1px solid var(--border-subtle); }
|
|
|
+ .trace:first-of-type { padding-top: 0; }
|
|
|
+ .trace:last-child { padding-bottom: 0; border-bottom: 0; }
|
|
|
+ .trace span { color: var(--text-secondary); font-size: var(--type-meta); }
|
|
|
+ .trace b { font-size: var(--type-support); font-weight: 600; overflow-wrap: anywhere; }
|
|
|
+ .trace small { color: var(--muted-foreground); font-size: var(--type-meta); line-height: 1.5; }
|
|
|
+ .trace a { color: var(--primary); font-weight: 650; text-decoration: none; }
|
|
|
+ .trace a:hover { text-decoration: underline; }
|
|
|
+
|
|
|
+ /* ── 改动标注 ────────────────────────────────────────────── */
|
|
|
+ .anno {
|
|
|
+ position: relative; display: inline-grid; place-items: center; width: 17px; height: 17px; flex: none;
|
|
|
+ border: 1px solid var(--primary-border); border-radius: 50%; background: var(--primary-soft);
|
|
|
+ color: var(--primary); font-size: 10px; font-weight: 700; font-style: normal; cursor: help;
|
|
|
+ }
|
|
|
+ .anno::after {
|
|
|
+ position: absolute; bottom: calc(100% + 7px); left: 50%; z-index: 60; width: max-content; max-width: 260px;
|
|
|
+ padding: 6px 9px; border-radius: 6px; background: #263e48; color: #fff; font-size: 11px; font-weight: 500;
|
|
|
+ line-height: 1.5; text-align: left; white-space: normal; transform: translateX(-50%);
|
|
|
+ opacity: 0; pointer-events: none; transition: opacity .12s ease; content: attr(data-tip);
|
|
|
+ }
|
|
|
+ .anno:hover::after { opacity: 1; }
|
|
|
+ body.hide-anno .anno { display: none; }
|
|
|
+
|
|
|
+ /* ── 提示条 ───────────────────────────────────────────────── */
|
|
|
+ .toast {
|
|
|
+ position: fixed; bottom: 24px; left: 50%; z-index: 70; transform: translate(-50%, 12px);
|
|
|
+ padding: 9px 16px; border-radius: 8px; background: #263e48; color: #fff; font-size: var(--type-support);
|
|
|
+ opacity: 0; pointer-events: none; transition: opacity .18s ease, transform .18s ease;
|
|
|
+ }
|
|
|
+ .toast.on { opacity: 1; transform: translate(-50%, 0); }
|
|
|
+
|
|
|
+ /* ⚠️ 断点取 980:1100 会让 1097 这类窗口(13 寸全屏常见宽度)直接丢掉右栏,
|
|
|
+ 处理记录跌到页面最底部、高度退回内容高度——正是“没有与可视高度适配”的表象。 */
|
|
|
+ @media (max-width: 980px) {
|
|
|
+ .layout { grid-template-columns: minmax(0, 1fr); }
|
|
|
+ .side { position: static; }
|
|
|
+ .logs-panel { height: min(62vh, 560px); height: min(62dvh, 560px); }
|
|
|
+ }
|
|
|
+ @media (max-width: 760px) {
|
|
|
+ .page { padding: 14px; }
|
|
|
+ .wo-head-top { flex-direction: column; }
|
|
|
+ .wo-actions { width: 100%; }
|
|
|
+ .wo-actions .btn { flex: 1; justify-content: center; }
|
|
|
+ .wo-actions .more { flex: 1; }
|
|
|
+ .wo-actions .more > summary { justify-content: center; }
|
|
|
+ .seg > summary { grid-template-columns: minmax(0, 1fr) auto; }
|
|
|
+ .seg-s { grid-column: 1 / -1; grid-row: 2; justify-self: start; text-align: left; }
|
|
|
+ .seg-badge { grid-column: 2; grid-row: 1; }
|
|
|
+ .chev { display: none; }
|
|
|
+ .refs { grid-template-columns: minmax(0, 1fr); }
|
|
|
+ .refs .trace { grid-template-columns: 92px minmax(0, 1fr); }
|
|
|
+ }
|
|
|
+</style>
|
|
|
+</head>
|
|
|
+<body>
|
|
|
+<div class="toolbar">
|
|
|
+ <span class="brand">工单详情<em>改版原型 v3 · 分区折叠</em></span>
|
|
|
+ <div class="switcher" role="group" aria-label="切换工单状态">
|
|
|
+ <button data-state="processing" class="on">处理中</button>
|
|
|
+ <button data-state="settled">已闭环</button>
|
|
|
+ <button data-state="rejected">竣工驳回</button>
|
|
|
+ </div>
|
|
|
+ <label><input type="checkbox" id="annoToggle" checked /> 显示改动标注(悬停看说明)</label>
|
|
|
+ <span class="height-chip" id="heightChip"></span>
|
|
|
+</div>
|
|
|
+
|
|
|
+<div class="page" id="root"></div>
|
|
|
+<div class="toast" id="toast"></div>
|
|
|
+
|
|
|
+<script>
|
|
|
+/* ── 原型数据:取自本地真实工单(脱敏后静态化) ───────────── */
|
|
|
+const STATES = {
|
|
|
+ processing: {
|
|
|
+ label: '处理中', statusCls: 't-processing',
|
|
|
+ no: 'T-20261113-9250', type: '开户',
|
|
|
+ title: '【E2E-MAINLINE】跨境办公开通(E2E 自动分派 C)',
|
|
|
+ detail: '【E2E-MAINLINE】订阅册宿主建单回放:主线 E2E 用单。',
|
|
|
+ customer: '海岚跨境电商(上海)', customerCode: 'KL-2026-000023',
|
|
|
+ contact: '陈** / 138****8000', address: '上海市浦东新区世纪大道 100 号',
|
|
|
+ subscriptionId: 'SUB-000023', plan: '跨境办公专线 20M',
|
|
|
+ owner: 'klt_bos_ops', team: '华东运维',
|
|
|
+ created: '2026.11.13 13:50', due: '2026.11.20', dueNote: '剩 3 天',
|
|
|
+ source: '运营侧代报', extNo: '无', messages: [],
|
|
|
+ cta: '登记开通准备资料', hint: '开通准备资料是开户单回填的前置。',
|
|
|
+ stepIdx: 2,
|
|
|
+ gaps: [
|
|
|
+ { name: '线路与路由', hint: '未回填网络线路:至少 1 行「本次开通」且整行填齐', action: '去回填线路' },
|
|
|
+ { name: '执行结论与凭证', hint: '未登记执行结论、实际日期、施工人或凭证', action: '去登记结论' }
|
|
|
+ ],
|
|
|
+ ops: [['转交代管', '换同事代管'], ['工单延期', '顺延提醒'], ['作废工单', '需填原因']],
|
|
|
+ segs: ['prepEmpty', 'backfillEmpty'],
|
|
|
+ logs: [
|
|
|
+ { t: '分派', note: '自动平均分派给 klt_bos_ops', at: '2026.11.13 13:50 · opsMain', tone: 'assign' },
|
|
|
+ { t: '开始处理(阅读工单)', note: '责任人打开详情,工单自动进入处理中', at: '2026.11.17 08:15 · klt_bos_ops', tone: 'work' }
|
|
|
+ ],
|
|
|
+ materials: [], oldH: 1822
|
|
|
+ },
|
|
|
+ settled: {
|
|
|
+ label: '已闭环', statusCls: 't-settled',
|
|
|
+ no: 'T-20261116-20', type: '开户',
|
|
|
+ title: '第6轮多角色交付-G',
|
|
|
+ detail: '第 6 轮多角色交付:开户 → 开通准备资料 → 回填 → 竣工 → 回执全链回放。',
|
|
|
+ customer: '第6轮多角色交付-G', customerCode: 'KL-2026-000086',
|
|
|
+ contact: '周** / 139****2211', address: '上海市闵行区申长路 88 号',
|
|
|
+ subscriptionId: 'SUB-000065', plan: '跨境办公专线 50M',
|
|
|
+ owner: 'klt_bos_ops', team: '华东运维',
|
|
|
+ created: '2026.11.16 10:26', due: '2026.11.23', dueNote: '提前 7 天',
|
|
|
+ settledAt: '2026.11.16 10:26',
|
|
|
+ source: '运营侧代报', extNo: '无', messages: [],
|
|
|
+ cta: '', hint: '本单已闭环,记录保持可追溯,不再提供追加入口。',
|
|
|
+ stepIdx: 5,
|
|
|
+ gaps: [], ops: [['材料下载', '竣工 PDF']],
|
|
|
+ segs: ['prepFilled', 'backfillFilled', 'checklistFilled', 'accountsFilled', 'completionFilled'],
|
|
|
+ logs: [
|
|
|
+ { t: '建单', note: '运营侧代报开户单', at: '2026.11.16 10:26 · klt_bos_ops', tone: 'create' },
|
|
|
+ { t: '分派', note: '自动平均分派给 klt_bos_ops', at: '2026.11.16 10:26 · 系统', tone: 'assign' },
|
|
|
+ { t: '开始处理', note: '责任人打开详情', at: '2026.11.16 10:27 · klt_bos_ops', tone: 'work' },
|
|
|
+ { t: '施工回填', note: '结论成功,线路 1 行 / 境外 IP 2 行', at: '2026.11.16 10:36 · klt_bos_ops', tone: 'done' },
|
|
|
+ { t: '条目核对', note: '清单 1/1 核对通过', at: '2026.11.16 10:38 · klt_bos_ops', tone: 'done' },
|
|
|
+ { t: '竣工回传', note: '生成竣工件并回传运营商', at: '2026.11.16 10:41 · 系统', tone: 'done' },
|
|
|
+ { t: '回执确认', note: '运营商回执,工单闭环', at: '2026.11.16 10:44 · opsMain', tone: 'done' }
|
|
|
+ ],
|
|
|
+ materials: [
|
|
|
+ { name: '开通回单-20261116.pdf', kind: 'backfill_evidence', size: '96 KB', by: 'klt_bos_ops', at: '2026.11.16 10:36' },
|
|
|
+ { name: '现场施工照片.jpg', kind: 'construct_material', size: '1.2 MB', by: 'klt_bos_ops', at: '2026.11.16 10:37' },
|
|
|
+ { name: '竣工交付单.pdf', kind: 'completion_pdf', size: '182 KB', by: 'klt_bos_ops', at: '2026.11.16 10:41' }
|
|
|
+ ],
|
|
|
+ oldH: 3542
|
|
|
+ },
|
|
|
+ rejected: {
|
|
|
+ label: '竣工驳回', statusCls: 't-rejected',
|
|
|
+ no: 'T-20261116-12', type: '开户',
|
|
|
+ title: '第6轮多角色交付-B',
|
|
|
+ detail: '第 6 轮多角色交付:驳回路径回放。',
|
|
|
+ customer: '第6轮多角色交付-B', customerCode: 'KL-2026-000079',
|
|
|
+ contact: '吴** / 137****0099', address: '上海市徐汇区漕溪北路 18 号',
|
|
|
+ subscriptionId: 'SUB-000057', plan: '跨境办公专线 20M',
|
|
|
+ owner: 'klt_bos_ops', team: '华东运维',
|
|
|
+ created: '2026.11.16 10:14', due: '2026.11.23', dueNote: '外部等待中',
|
|
|
+ source: '运营侧代报', extNo: '无', messages: [],
|
|
|
+ cta: '同号覆盖重推', hint: '竣工件已被驳回:按当前回填重新回传,不新发竣工号。',
|
|
|
+ stepIdx: 3,
|
|
|
+ gaps: [], ops: [['改回填', '需先受控回退'], ['竣工件', '查看版本']],
|
|
|
+ reject: {
|
|
|
+ seq: 3, reason: '资料不符', text: '第 6 轮补测:团队长驳回权限确认。',
|
|
|
+ at: '2026.11.16 10:27', channel: '人工登记'
|
|
|
+ },
|
|
|
+ rejects: [
|
|
|
+ { seq: 1, reason: '资料不符', text: '境外 IP 与回填明细不一致。', at: '2026.11.16 09:58', channel: '人工登记' },
|
|
|
+ { seq: 2, reason: '竣工件缺项', text: '回执说明为空。', at: '2026.11.16 10:12', channel: '人工登记' },
|
|
|
+ { seq: 3, reason: '资料不符', text: '第 6 轮补测:团队长驳回权限确认。', at: '2026.11.16 10:27', channel: '人工登记' }
|
|
|
+ ],
|
|
|
+ segs: ['prepFilled', 'backfillFilled', 'checklistFilled', 'accountsFilled', 'completionFilled'],
|
|
|
+ logs: [
|
|
|
+ { t: '竣工回传', note: '生成竣工件并回传运营商', at: '2026.11.16 09:41 · 系统', tone: 'done' },
|
|
|
+ { t: '竣工驳回', note: '资料不符:境外 IP 与回填明细不一致', at: '2026.11.16 09:58 · 运营商', tone: 'danger' },
|
|
|
+ { t: '竣工回传', note: '同号覆盖重推', at: '2026.11.16 10:02 · 系统', tone: 'done' },
|
|
|
+ { t: '竣工驳回', note: '竣工件缺项:回执说明为空', at: '2026.11.16 10:12 · 运营商', tone: 'danger' },
|
|
|
+ { t: '竣工回传', note: '同号覆盖重推', at: '2026.11.16 10:21 · 系统', tone: 'done' },
|
|
|
+ { t: '竣工驳回', note: '资料不符:团队长驳回权限确认', at: '2026.11.16 10:27 · 人工登记', tone: 'danger' }
|
|
|
+ ],
|
|
|
+ materials: [
|
|
|
+ { name: '开通回单-20261116.pdf', kind: 'backfill_evidence', size: '94 KB', by: 'klt_bos_ops', at: '2026.11.16 09:52' },
|
|
|
+ { name: '竣工交付单.pdf', kind: 'completion_pdf', size: '176 KB', by: 'klt_bos_ops', at: '2026.11.16 10:21' }
|
|
|
+ ],
|
|
|
+ oldH: 4346
|
|
|
+ }
|
|
|
+};
|
|
|
+
|
|
|
+const ICON = {
|
|
|
+ chev: '<svg class="chev" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="m6 9 6 6 6-6"/></svg>',
|
|
|
+ right: '<svg viewBox="0 0 24 24" width="14" height="14" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M5 12h14M13 6l6 6-6 6"/></svg>',
|
|
|
+ check: '<svg viewBox="0 0 24 24" width="15" height="15" fill="none" stroke="currentColor" stroke-width="2.4" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M20 6 9 17l-5-5"/></svg>',
|
|
|
+ alert: '<svg viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M12 9v4M12 17h.01"/><path d="M10.3 3.9 1.8 18a2 2 0 0 0 1.7 3h17a2 2 0 0 0 1.7-3L13.7 3.9a2 2 0 0 0-3.4 0Z"/></svg>'
|
|
|
+};
|
|
|
+
|
|
|
+const anno = (n, tip) => `<i class="anno" data-tip="${tip}">${n}</i>`;
|
|
|
+
|
|
|
+/** 材料五类的中文名(与后端 `ticket_material.kind` 的 CHECK 集一一对应)。 */
|
|
|
+const MATERIAL_KIND = {
|
|
|
+ submit_evidence: '客户提交材料',
|
|
|
+ handover: '开通准备资料',
|
|
|
+ backfill_evidence: '回填凭证',
|
|
|
+ completion_pdf: '竣工回传',
|
|
|
+ construct_material: '补充过程材料'
|
|
|
+};
|
|
|
+const materialsOf = (s, kinds) => (s.materials || []).filter(m => kinds.includes(m.kind));
|
|
|
+
|
|
|
+/**
|
|
|
+ * 一段材料的清单(原型 v3:材料跟着产生它的流程段走,⛔ 再单开一张「过程材料」平表)。
|
|
|
+ * `write` 为真时给「补充过程材料」入口——只有 `construct_material` 能从这里新增。
|
|
|
+ */
|
|
|
+function materialBlock(title, items, empty, write) {
|
|
|
+ if (!items.length && !write) return '';
|
|
|
+ const table = items.length ? `<div class="tbl-wrap"><table>
|
|
|
+ <thead><tr><th>文件名</th><th>类型</th><th>大小</th><th>登记人</th><th>登记时间</th><th></th></tr></thead>
|
|
|
+ <tbody>${items.map(m => `<tr><td>${m.name}</td><td>${MATERIAL_KIND[m.kind] || m.kind}</td><td>${m.size}</td><td>${m.by}</td><td class="mono">${m.at}</td><td><button class="btn ghost sm" data-toast="原型:按 material_id 现签并打开下载">下载</button></td></tr>`).join('')}</tbody>
|
|
|
+ </table></div>`
|
|
|
+ : `<p class="seg-foot">${empty}</p>`;
|
|
|
+ const action = write ? `<div style="display:flex;gap:8px;margin-top:10px"><button class="btn ghost sm" data-toast="原型:补充过程材料抽屉(kind 固定 construct_material)">补充过程材料</button></div>` : '';
|
|
|
+ return `<h4 class="subhead">${title}(${items.length} 份)</h4>${table}${action}`;
|
|
|
+}
|
|
|
+
|
|
|
+function steps(s) {
|
|
|
+ const names = ['建单受理', '运维分派', '受理处理', '回填确认', '闭环归档'];
|
|
|
+ return `<div class="wo-steps">${names.map((n, i) => {
|
|
|
+ const cls = i < s.stepIdx && s.stepIdx < 5 ? 'done' : i === s.stepIdx && s.stepIdx < 5 ? 'cur' : i < s.stepIdx ? 'done' : '';
|
|
|
+ return `${i ? '<i></i>' : ''}<span class="step ${cls}"><b>${i + 1}</b>${n}</span>`;
|
|
|
+ }).join('')}</div>`;
|
|
|
+}
|
|
|
+
|
|
|
+/* ── 段:开通准备资料 ──────────────────────────────────────── */
|
|
|
+function prepEmpty(open) {
|
|
|
+ return seg('开通准备资料', '未登记', { text: '待登记', cls: 'warn' },
|
|
|
+ `<div class="kv">
|
|
|
+ <div><span>声明人</span><b>—</b></div>
|
|
|
+ <div><span>声明单位</span><b>—</b></div>
|
|
|
+ <div><span>联系方式</span><b>—</b></div>
|
|
|
+ </div>
|
|
|
+ <p>开通准备资料是开户单回填的前置:声明四项 + 五类应用开通数量,一次登记完成。</p>
|
|
|
+ <p class="seg-foot">重复保存=整体覆盖;提交后转为只读快照。境外 IP 不在此登记。</p>`, open, anno(5, '未登记的段只留一行摘要与“待登记”,不铺 5 个空字段。'));
|
|
|
+}
|
|
|
+function prepFilled(open, s) {
|
|
|
+ return seg('开通准备资料', '陈** · 应用 2 类 / 3 个账号', { text: '已提交', cls: 'ok' },
|
|
|
+ `<div class="kv">
|
|
|
+ <div><span>声明人</span><b>陈**</b></div>
|
|
|
+ <div><span>声明单位</span><b>海岚跨境电商(上海)</b></div>
|
|
|
+ <div><span>联系方式</span><b>139****6621</b></div>
|
|
|
+ <div><span>提交时间</span><b class="mono">2026.11.16 10:31</b></div>
|
|
|
+ <div class="full"><span>合规声明</span><b>本司承诺上述开通应用仅用于跨境业务,不用于境内公众通信服务。</b></div>
|
|
|
+ </div>
|
|
|
+ <h4 class="subhead">开通应用及数量</h4>
|
|
|
+ <div class="tbl-wrap"><table>
|
|
|
+ <thead><tr><th>应用类别</th><th>开通账号数</th></tr></thead>
|
|
|
+ <tbody><tr><td>浏览</td><td>2</td></tr><tr><td>办公</td><td>1</td></tr></tbody>
|
|
|
+ </table></div>
|
|
|
+ <p class="seg-foot">境外 IP 不在本区块登记:实际分配的境外 IP 见「施工回填」的境外出口 IP 明细。</p>
|
|
|
+ ${materialBlock('资料影像', materialsOf(s, ['handover']), '随开通准备资料登记上传,无影像件也可提交。', false)}`, open, anno(7, '已登记的内容默认折叠,摘要行给出“谁 / 几类 / 几个账号”,点开才看明细;境外 IP 表已随预申报退役一并移除。'));
|
|
|
+}
|
|
|
+
|
|
|
+/* ── 段:施工回填 ─────────────────────────────────────────── */
|
|
|
+function backfillEmpty(open) {
|
|
|
+ return seg('施工回填', '尚未回填 · 缺 线路与路由、执行结论与凭证', { text: '待回填', cls: 'warn' },
|
|
|
+ `<p>登记执行结论、实际开通日期、线路与境外 IP;保存即推进工单。</p>
|
|
|
+ <p class="seg-foot">建单人取当前登录身份,无需手填。</p>`, open, anno(5, '空段只留一句业务说明,不再渲染 6 列线路表与 6 列 IP 表。'));
|
|
|
+}
|
|
|
+function backfillFilled(open, s) {
|
|
|
+ return seg('施工回填', '成功 · 实际开通 2026-11-16 · 线路 1 条 / 境外 IP 2 条', { text: '已回填', cls: 'ok' },
|
|
|
+ `<div class="kv">
|
|
|
+ <div><span>执行结论</span><b>成功</b></div>
|
|
|
+ <div><span>实际开通日期</span><b class="mono">2026-11-16</b></div>
|
|
|
+ <div><span>回填次数</span><b>1 次</b></div>
|
|
|
+ <div><span>建单人</span><b>klt_bos_ops</b></div>
|
|
|
+ <div class="full"><span>结论说明</span><b>线路已开通,境外出口按合同核定 PoP 落地。</b></div>
|
|
|
+ <div class="full"><span>凭证与佐证</span><b>见下方「凭证与过程材料」。</b></div>
|
|
|
+ </div>
|
|
|
+ <h4 class="subhead">网络线路</h4>
|
|
|
+ <div class="tbl-wrap"><table>
|
|
|
+ <thead><tr><th>网络账户名</th><th>内网 IP / 掩码</th><th>端点(源 → 目的)</th><th>出口 PoP</th><th>带宽</th></tr></thead>
|
|
|
+ <tbody><tr><td>G-kehu-01</td><td class="mono">10.20.3.11 / 24</td><td>10.20.3.0/24 → HK-POP-1</td><td>HK-POP-1</td><td>↓50 / ↑50</td></tr></tbody>
|
|
|
+ </table></div>
|
|
|
+ <h4 class="subhead">境外出口 IP</h4>
|
|
|
+ <div class="tbl-wrap"><table>
|
|
|
+ <thead><tr><th>出口</th><th>IP</th><th>类型</th><th>带宽</th><th>凭据</th></tr></thead>
|
|
|
+ <tbody>
|
|
|
+ <tr><td>HK-01</td><td class="mono">203.0.113.24</td><td>固定 IP</td><td>10 Mbps</td><td>PIN ✓ CPID ✓</td></tr>
|
|
|
+ <tr><td>HK-01</td><td class="mono">203.0.113.25</td><td>固定 IP</td><td>10 Mbps</td><td>PIN ✓ CPID —</td></tr>
|
|
|
+ </tbody>
|
|
|
+ </table></div>
|
|
|
+ <p class="seg-foot">PIN/CPID 仅存密文,此处只显示是否登记。</p>
|
|
|
+ ${materialBlock('凭证与过程材料', materialsOf(s, ['backfill_evidence', 'construct_material']), '暂无材料:回填保存时凭证清单里的文档名自动归档到这里,现场照片在此补充。', true)}`, open, anno(7, '两张表各删 1 列(源/目的端点合并、行号删除),PIN/CPID 两列并成“凭据”一列。'));
|
|
|
+}
|
|
|
+
|
|
|
+/* ── 段:服务清单 ─────────────────────────────────────────── */
|
|
|
+function checklistFilled(open) {
|
|
|
+ return seg('服务清单', '1 / 1 已核对 · 不阻断本单闭环', { text: '已核对', cls: 'ok' },
|
|
|
+ `<div class="tbl-wrap"><table>
|
|
|
+ <thead><tr><th>序号</th><th>条目</th><th>规格</th><th>数量</th><th>核对结果</th><th>核对时间</th></tr></thead>
|
|
|
+ <tbody><tr><td>1</td><td>跨境办公专线 50M</td><td>50 Mbps 上下行</td><td>1</td><td>已核对</td><td class="mono">2026.11.16 10:38</td></tr></tbody>
|
|
|
+ </table></div>`, open, anno(7, '升降配的“原值 → 新值”合并进本表一列,不再渲染第二张参数对照表。'));
|
|
|
+}
|
|
|
+
|
|
|
+/* ── 段:账号清单 ─────────────────────────────────────────── */
|
|
|
+function accountsFilled(open) {
|
|
|
+ return seg('账号清单', '1 个账号 · 已生效', { text: '已生效', cls: 'ok' },
|
|
|
+ `<div class="tbl-wrap"><table>
|
|
|
+ <thead><tr><th>显示名</th><th>网络账户名</th><th>停机前 → 生效后</th><th>生效日</th></tr></thead>
|
|
|
+ <tbody><tr><td>G-kehu-01</td><td>G-kehu-01</td><td>待开通 → 已启用</td><td class="mono">2026-11-16</td></tr></tbody>
|
|
|
+ </table></div>`, open, anno(5, '0 行时整段不渲染;账号清单不再与回填段的“账号数”重复计数。'));
|
|
|
+}
|
|
|
+
|
|
|
+/* ── 段:竣工与回执 ───────────────────────────────────────── */
|
|
|
+function completionFilled(open, s) {
|
|
|
+ const rejectBlock = s.rejects ? `
|
|
|
+ <div class="banner danger" style="margin-top:4px">
|
|
|
+ <div>
|
|
|
+ <strong>竣工第 ${s.reject.seq} 次被驳回</strong>
|
|
|
+ <p>${s.reject.reason}:${s.reject.text}</p>
|
|
|
+ <small>${s.reject.at} · ${s.reject.channel}</small>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <h4 class="subhead">驳回历史(${s.rejects.length} 次,含本次)</h4>
|
|
|
+ <div class="tbl-wrap"><table>
|
|
|
+ <thead><tr><th>次数</th><th>理由</th><th>说明</th><th>时间</th></tr></thead>
|
|
|
+ <tbody>${s.rejects.map(r => `<tr><td>第 ${r.seq} 次</td><td>${r.reason}</td><td>${r.text}</td><td class="mono">${r.at}</td></tr>`).join('')}</tbody>
|
|
|
+ </table></div>
|
|
|
+ <p class="seg-foot">驳回期间期限日不重置,超期判定扣掉外部等待;出口=同号覆盖重推。</p>` : '';
|
|
|
+ return seg('竣工与回执', s.rejects ? 'KL-COMP-20261116-012 · 第 3 次被驳回 · 待重推' : 'KL-COMP-20261116-020 · 回执已确认',
|
|
|
+ s.rejects ? { text: '竣工驳回', cls: 'warn' } : { text: '回执已确认', cls: 'ok' },
|
|
|
+ `<div class="kv">
|
|
|
+ <div><span>竣工单号</span><b class="mono">${s.rejects ? 'KL-COMP-20261116-012' : 'KL-COMP-20261116-020'}</b></div>
|
|
|
+ <div><span>动作</span><b>开户</b></div>
|
|
|
+ <div><span>执行结论</span><b>成功</b></div>
|
|
|
+ <div><span>回传方式</span><b>手工</b></div>
|
|
|
+ <div><span>回传时间</span><b class="mono">2026.11.16 10:41</b></div>
|
|
|
+ <div><span>回执时间</span><b class="mono">${s.rejects ? '—' : '2026.11.16 10:26'}</b></div>
|
|
|
+ ${s.rejects ? '' : '<div class="full"><span>回执说明</span><b>运营商已回执,交付物验收通过。</b></div>'}
|
|
|
+ </div>
|
|
|
+ ${rejectBlock}
|
|
|
+ <p class="seg-foot">回执确认后完成日改写为当天;开停记录的执行日不变。</p>
|
|
|
+ ${materialBlock('竣工材料', materialsOf(s, ['completion_pdf']), '生成竣工单时自动归档,无需手工上传。', false)}`,
|
|
|
+ open, anno(6, '驳回只在首屏说一次,历史收进竣工段;右栏 500px 的“竣工驳回记录”卡取消。'));
|
|
|
+}
|
|
|
+
|
|
|
+function seg(title, summary, badge, body, open, annoHtml) {
|
|
|
+ return `<details class="seg" ${open ? 'open' : ''}>
|
|
|
+ <summary>
|
|
|
+ <span class="seg-t">${title}${annoHtml || ''}</span>
|
|
|
+ <span class="seg-s">${summary}</span>
|
|
|
+ <span class="seg-badge ${badge.cls || ''}">${badge.text}</span>
|
|
|
+ ${ICON.chev}
|
|
|
+ </summary>
|
|
|
+ <div class="seg-body">${body}</div>
|
|
|
+ </details>`;
|
|
|
+}
|
|
|
+
|
|
|
+/* ── 页面渲染 ─────────────────────────────────────────────── */
|
|
|
+function render(key) {
|
|
|
+ const s = STATES[key];
|
|
|
+ const openSet = {
|
|
|
+ processing: ['开通准备资料'],
|
|
|
+ settled: [],
|
|
|
+ rejected: ['竣工与回执']
|
|
|
+ }[key];
|
|
|
+
|
|
|
+ const segs = s.segs.map(id => {
|
|
|
+ switch (id) {
|
|
|
+ case 'prepEmpty': return prepEmpty(openSet.includes('开通准备资料'));
|
|
|
+ case 'prepFilled': return prepFilled(openSet.includes('开通准备资料'), s);
|
|
|
+ case 'backfillEmpty': return backfillEmpty(openSet.includes('施工回填'));
|
|
|
+ case 'backfillFilled': return backfillFilled(openSet.includes('施工回填'), s);
|
|
|
+ case 'checklistFilled': return checklistFilled(false);
|
|
|
+ case 'accountsFilled': return accountsFilled(false);
|
|
|
+ case 'completionFilled': return completionFilled(openSet.includes('竣工与回执'), s);
|
|
|
+ default: return '';
|
|
|
+ }
|
|
|
+ }).join('');
|
|
|
+
|
|
|
+ const todo = [];
|
|
|
+ if (s.reject) {
|
|
|
+ todo.push(`<div class="banner danger">
|
|
|
+ <div>
|
|
|
+ <strong>${ICON.alert} 竣工第 ${s.reject.seq} 次被驳回 ${anno(6, '驳回横幅全页只保留这一处;右栏重复卡与竣工段内的重复说明已删除。')}</strong>
|
|
|
+ <p>${s.reject.reason}:${s.reject.text}</p>
|
|
|
+ <small>${s.reject.at} · ${s.reject.channel}</small>
|
|
|
+ </div>
|
|
|
+ <button class="btn sm" data-toast="原型不提交写请求;落地时复用现有 ?act= 深链">改回填后同号重推</button>
|
|
|
+ </div>`);
|
|
|
+ }
|
|
|
+ if (s.gaps.length) {
|
|
|
+ todo.push(`<div class="gaps">
|
|
|
+ <div class="gaps-head"><strong>闭环还缺 ${s.gaps.length} 项</strong><span>缺口由服务端判定,不可人工放行竣工</span></div>
|
|
|
+ <ul>${s.gaps.map(g => `<li>
|
|
|
+ <div><b>${g.name}</b><p>${g.hint}</p></div>
|
|
|
+ <button class="btn ghost sm" data-toast="原型:将打开回填抽屉并滚到对应段">${g.action} ${ICON.right}</button>
|
|
|
+ </li>`).join('')}</ul>
|
|
|
+ </div>`);
|
|
|
+ }
|
|
|
+ if (!todo.length && key === 'settled') {
|
|
|
+ todo.push(`<div class="done-strip">${ICON.check} 本单已闭环 · 全程 ${s.logs.length} 条留痕、${s.materials.length} 份材料 · 只读可追溯</div>`);
|
|
|
+ }
|
|
|
+
|
|
|
+ const logItems = [...s.logs].reverse().map(l => `<li data-tone="${l.tone}"><span class="dot"></span><b>${l.t}</b><p>${l.note}</p><small>${l.at}</small></li>`).join('');
|
|
|
+ const html = `
|
|
|
+ <div class="layout">
|
|
|
+ <div class="main">
|
|
|
+ <header class="card wo-head">
|
|
|
+ <div class="wo-head-top">
|
|
|
+ <div class="wo-id">
|
|
|
+ <span class="wo-no">${s.no}</span>
|
|
|
+ <span class="tag type">${s.type}</span>
|
|
|
+ <span class="tag ${s.statusCls}">${s.label}</span>
|
|
|
+ ${anno(1, '状态只在这一行 + 细进度条;原“指标条”5 格并进下面的 meta 行,删掉重复的状态、创建时间、空的闭环时间。')}
|
|
|
+ </div>
|
|
|
+ <div class="wo-actions">
|
|
|
+ ${s.cta ? `<button class="btn" data-toast="原型:打开既有动作抽屉">${s.cta}</button>` : ''}
|
|
|
+ <details class="more">
|
|
|
+ <summary class="btn ghost">更多操作 ${ICON.chev.replace('class="chev"', 'class="chev" style="width:14px;height:14px"')}</summary>
|
|
|
+ <div class="more-menu">
|
|
|
+ ${s.ops.map(([n, d]) => `<button data-toast="原型:${n}"><span>${n}</span><small>${d}</small></button>`).join('')}
|
|
|
+ <hr />
|
|
|
+ <button data-toast="原型:复制本单链接">复制链接</button>
|
|
|
+ </div>
|
|
|
+ </details>
|
|
|
+ ${anno(2, '主 CTA 全页只留 1 个;其余动作收进“更多操作”;桌面不再出现底部固定条。')}
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <h1 class="wo-title">${s.title}</h1>
|
|
|
+ <div class="wo-meta">
|
|
|
+ <span>客户 <b>${s.customer}</b></span><i>·</i>
|
|
|
+ <span>责任人 <b>${s.owner}</b></span><i>·</i>
|
|
|
+ <span>承接团队 <b>${s.team}</b></span><i>·</i>
|
|
|
+ <span>创建 <b class="mono">${s.created}</b></span><i>·</i>
|
|
|
+ <span class="due ${s.dueNote.includes('超期') ? 'overdue' : ''}">期限 <b class="mono">${s.due}</b>(${s.dueNote})</span>
|
|
|
+ ${s.settledAt ? `<i>·</i><span>闭环 <b class="mono">${s.settledAt}</b></span>` : ''}
|
|
|
+ </div>
|
|
|
+ <div class="wo-hint">${s.hint}</div>
|
|
|
+ ${steps(s)}
|
|
|
+ </header>
|
|
|
+
|
|
|
+ ${todo.length ? `<div class="todo">${todo.join('')}</div>` : ''}
|
|
|
+
|
|
|
+ <section class="card">
|
|
|
+ <p class="lead-quote">${s.detail}</p>
|
|
|
+ <div class="kv">
|
|
|
+ <div><span>建单来源</span><b>${s.source}</b></div>
|
|
|
+ <div><span>外部单号</span><b>${s.extNo}</b></div>
|
|
|
+ <div><span>关联订阅</span><b><a href="#" data-toast="原型:打开订阅参考抽屉" style="color:var(--primary);text-decoration:none">${s.subscriptionId}</a> · ${s.plan}</b></div>
|
|
|
+ </div>
|
|
|
+ </section>
|
|
|
+
|
|
|
+ <section class="card facts">
|
|
|
+ <header>
|
|
|
+ <h2>交付事实</h2>
|
|
|
+ <span>${s.segs.length} 段 · 默认只展开与本单状态相关的一段 ${anno(4, '段头摘要行给出关键数字(结论/日期/条数),折叠也不丢信息。')}</span>
|
|
|
+ </header>
|
|
|
+ ${segs}
|
|
|
+ </section>
|
|
|
+
|
|
|
+ <div class="refs">
|
|
|
+ <section class="card">
|
|
|
+ <h2>客户与订阅<span>点击查看详情</span></h2>
|
|
|
+ <div class="trace"><span>客户名称</span><b><a href="#" data-toast="原型:客户参考抽屉">${s.customer}</a></b></div>
|
|
|
+ <div class="trace"><span>客户编号</span><b class="mono">${s.customerCode}</b></div>
|
|
|
+ <div class="trace"><span>联系人 / 电话</span><b>${s.contact}</b></div>
|
|
|
+ <div class="trace"><span>通信地址</span><b>${s.address}</b></div>
|
|
|
+ <div class="trace"><span>关联订阅</span><b><a href="#" data-toast="原型:订阅参考抽屉">${s.subscriptionId}</a></b><small>${s.plan} · 已生效</small></div>
|
|
|
+ ${anno(10, '参考信息不再占右栏(右栏留给人要盯的处理记录),移到正文下方整行铺开,只在需要查档时向下看。')}
|
|
|
+ </section>
|
|
|
+ <section class="card">
|
|
|
+ <h2>追溯与关联</h2>
|
|
|
+ <div class="trace"><span>本单来源</span><b>${s.source}</b></div>
|
|
|
+ <div class="trace"><span>关联报文</span><b>${s.messages.length ? s.messages.join('、') : '无'}</b></div>
|
|
|
+ <div class="trace"><span>关联订单号</span><b class="mono">${s.subscriptionId}</b></div>
|
|
|
+ </section>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <aside class="side">
|
|
|
+ <section class="card logs-panel">
|
|
|
+ <header>
|
|
|
+ <h2>处理记录 ${anno(9, '右栏=处理记录专席:最新在上、全部条目不截断;面板高度随窗口自适应,条数超出时面板内滚动,页面本身不变长。轴上光带自下而上流=时间朝新的方向走,顶部脉冲圆点即最新一条。')}</h2>
|
|
|
+ <span>共 ${s.logs.length} 条 · 最新在上</span>
|
|
|
+ </header>
|
|
|
+ <div class="logs-scroll">
|
|
|
+ <ul class="tl">${logItems}</ul>
|
|
|
+ </div>
|
|
|
+ </section>
|
|
|
+ </aside>
|
|
|
+ </div>
|
|
|
+
|
|
|
+`;
|
|
|
+
|
|
|
+ document.getElementById('root').innerHTML = html;
|
|
|
+ syncTimelineFlow();
|
|
|
+ // 字体/滚动条落位后再量一次:轴长取的是实测几何,早一帧量会偏。
|
|
|
+ requestAnimationFrame(syncTimelineFlow);
|
|
|
+ const h = Math.round(document.querySelector('.page').getBoundingClientRect().height);
|
|
|
+ const pct = Math.round((1 - h / s.oldH) * 100);
|
|
|
+ document.getElementById('heightChip').innerHTML =
|
|
|
+ `本页 <b>${h}</b> px · 改前 <b>${s.oldH}</b> px <span class="down">−${pct}%</span>`;
|
|
|
+}
|
|
|
+
|
|
|
+/* ── 交互 ─────────────────────────────────────────────────── */
|
|
|
+document.querySelectorAll('.switcher button').forEach(btn => {
|
|
|
+ btn.addEventListener('click', () => {
|
|
|
+ document.querySelectorAll('.switcher button').forEach(b => b.classList.toggle('on', b === btn));
|
|
|
+ render(btn.dataset.state);
|
|
|
+ document.querySelector('.more')?.removeAttribute('open');
|
|
|
+ });
|
|
|
+});
|
|
|
+
|
|
|
+document.getElementById('annoToggle').addEventListener('change', (e) => {
|
|
|
+ document.body.classList.toggle('hide-anno', !e.target.checked);
|
|
|
+});
|
|
|
+document.body.classList.add('hide-anno');
|
|
|
+document.getElementById('annoToggle').checked = false;
|
|
|
+
|
|
|
+/* 记录方向动画:光点沿轴自下而上走,收在最新一条。
|
|
|
+ 轴长随状态/窗口变化,故每次渲染后用首尾节点实测,把位移写进 --rail-h。 */
|
|
|
+function syncTimelineFlow() {
|
|
|
+ const tl = document.querySelector('.tl');
|
|
|
+ if (!tl) return;
|
|
|
+ let flow = tl.querySelector('.tl-flow');
|
|
|
+ if (!flow) {
|
|
|
+ flow = document.createElement('span');
|
|
|
+ flow.className = 'tl-flow';
|
|
|
+ flow.setAttribute('aria-hidden', 'true');
|
|
|
+ flow.innerHTML = '<i class="tl-comet"></i>';
|
|
|
+ tl.prepend(flow);
|
|
|
+ }
|
|
|
+ const dots = tl.querySelectorAll('.dot');
|
|
|
+ if (dots.length < 2) { flow.style.display = 'none'; return; }
|
|
|
+ const base = tl.getBoundingClientRect().top;
|
|
|
+ const first = dots[0].getBoundingClientRect();
|
|
|
+ const last = dots[dots.length - 1].getBoundingClientRect();
|
|
|
+ // 轴段=首节点(最新,顶端)下缘到末节点(最早,底端)上缘,避开圆点
|
|
|
+ const top = first.top + 15 - base;
|
|
|
+ const bottom = last.top - 3 - base;
|
|
|
+ const railH = Math.max(0, Math.round(bottom - top));
|
|
|
+ flow.style.display = '';
|
|
|
+ flow.style.top = `${Math.round(top)}px`;
|
|
|
+ flow.style.height = `${railH}px`;
|
|
|
+ flow.style.setProperty('--rail-h', `${railH}px`);
|
|
|
+ // 扫过速度对齐:轴长越长给的时间越多,但夹在 2.2~4.2 s,短轴不会慢得像静止
|
|
|
+ const dur = Math.min(4.2, Math.max(2.2, railH / 150)).toFixed(2);
|
|
|
+ tl.style.setProperty('--comet-dur', `${dur}s`);
|
|
|
+}
|
|
|
+
|
|
|
+/* 工具条高度写进 --toolbar-h:右栏吸附位置与处理记录面板的高度都按它算,
|
|
|
+ 窄屏工具条换行时也要跟着变(否则面板会盖住内容或被裁断)。 */
|
|
|
+function syncToolbarHeight() {
|
|
|
+ const bar = document.querySelector('.toolbar');
|
|
|
+ document.documentElement.style.setProperty('--toolbar-h', `${Math.round(bar.getBoundingClientRect().height)}px`);
|
|
|
+}
|
|
|
+window.addEventListener('resize', () => { syncToolbarHeight(); syncTimelineFlow(); });
|
|
|
+
|
|
|
+let toastTimer;
|
|
|
+document.addEventListener('click', (e) => {
|
|
|
+ const el = e.target.closest('[data-toast]');
|
|
|
+ if (!el) return;
|
|
|
+ e.preventDefault();
|
|
|
+ const toast = document.getElementById('toast');
|
|
|
+ toast.textContent = el.dataset.toast;
|
|
|
+ toast.classList.add('on');
|
|
|
+ clearTimeout(toastTimer);
|
|
|
+ toastTimer = setTimeout(() => toast.classList.remove('on'), 2200);
|
|
|
+});
|
|
|
+
|
|
|
+render('processing');
|
|
|
+syncToolbarHeight();
|
|
|
+</script>
|
|
|
+</body>
|
|
|
+</html>
|