Browse Source

merge(web): 合并最近的前端改动

sy 3 days ago
parent
commit
f6371ca7f4
34 changed files with 503 additions and 291 deletions
  1. 1 1
      web-scaffold/index.html
  2. 3 0
      web-scaffold/rsbuild.config.ts
  3. 10 10
      web-scaffold/src/components/DeliveryStatusTable.tsx
  4. 15 15
      web-scaffold/src/components/work-order/ConstructionGuidePanel.tsx
  5. 1 1
      web-scaffold/src/components/work-order/FormTemplateAdminCard.tsx
  6. 1 1
      web-scaffold/src/components/work-order/MessageInboxPanel.tsx
  7. 112 0
      web-scaffold/src/components/work-order/WorkOrderLedgerList.tsx
  8. 2 0
      web-scaffold/src/lib/work-order-counts.ts
  9. 1 1
      web-scaffold/src/pages/AuditLogPage.tsx
  10. 2 2
      web-scaffold/src/pages/ContractManagementPage.tsx
  11. 1 1
      web-scaffold/src/pages/ContractRecordPage.tsx
  12. 1 1
      web-scaffold/src/pages/CustomerManagementPages.tsx
  13. 3 3
      web-scaffold/src/pages/CustomerRecordsPages.tsx
  14. 4 4
      web-scaffold/src/pages/CustomerSelfServicePages.tsx
  15. 2 2
      web-scaffold/src/pages/CustomerTicketPages.tsx
  16. 4 4
      web-scaffold/src/pages/FinanceReferencePages.tsx
  17. 5 5
      web-scaffold/src/pages/JobRunsDialog.tsx
  18. 2 2
      web-scaffold/src/pages/OrderManagementPage.tsx
  19. 4 4
      web-scaffold/src/pages/OrderRecordPage.tsx
  20. 3 3
      web-scaffold/src/pages/OrganizationPages.tsx
  21. 13 13
      web-scaffold/src/pages/PartyViewPages.tsx
  22. 3 3
      web-scaffold/src/pages/ScheduledJobManagementPage.tsx
  23. 3 3
      web-scaffold/src/pages/SettlementPages.tsx
  24. 7 7
      web-scaffold/src/pages/SettlementRecordPages.tsx
  25. 1 1
      web-scaffold/src/pages/TeamQueuePage.tsx
  26. 1 1
      web-scaffold/src/pages/TeamWorkspacePages.tsx
  27. 2 2
      web-scaffold/src/pages/WorkOrderDeliveryPage.tsx
  28. 73 82
      web-scaffold/src/pages/WorkOrderManagementPage.tsx
  29. 91 115
      web-scaffold/src/pages/WorkOrderOverviewPage.tsx
  30. 1 1
      web-scaffold/src/pages/WorkOrderRecordPage.tsx
  31. 1 1
      web-scaffold/src/styles/globals.css
  32. 1 2
      web-scaffold/src/styles/record-detail.css
  33. 85 0
      web-scaffold/src/styles/work-order-ledger.css
  34. 44 0
      web-scaffold/src/styles/work-order-overview.css

+ 1 - 1
web-scaffold/index.html

@@ -8,7 +8,7 @@
       name="description"
       content="运营支撑系统前端登录入口"
     />
-    <title>运营支撑系统</title>
+    <title>运营管理系统</title>
   </head>
   <body>
     <div id="root"></div>

+ 3 - 0
web-scaffold/rsbuild.config.ts

@@ -38,6 +38,9 @@ function seoCtx() {
 
 export default defineConfig({
   plugins: [pluginReact(), pluginTailwindcss()],
+  html: {
+    template: "./index.html",
+  },
   source: {
     entry: {
       index: "./src/main.tsx",

+ 10 - 10
web-scaffold/src/components/DeliveryStatusTable.tsx

@@ -174,21 +174,21 @@ export function DeliveryStatusTable({ customerId, subscriptionId, compact = fals
                     {row.parent_subscription_id ? <><br /><span className="ops-muted">叠加于 {row.parent_subscription_id}</span></> : null}
                     {row.username && row.display_name ? <><br /><span className="ops-muted">{row.username}</span></> : null}
                   </td>
-                  <td>{row.net_account?.trim() ? row.net_account : <span className="ops-muted">未登记</span>}</td>
-                  {!compact && <td>{row.plan_name ?? "-"}{row.plan_family ? <><br /><span className="ops-muted">{PLAN_FAMILY_LABEL[row.plan_family] ?? row.plan_family}</span></> : null}</td>}
+                  <td>{row.net_account?.trim() ? row.net_account : <span className="table-placeholder">未登记</span>}</td>
+                  {!compact && <td>{row.plan_name ?? <span className="table-placeholder">-</span>}{row.plan_family ? <><br /><span className="ops-muted">{PLAN_FAMILY_LABEL[row.plan_family] ?? row.plan_family}</span></> : null}</td>}
                   <td>{row.account_status ? <OpsStatus tone={row.account_status === "active" || row.account_status === "in_use" ? "success" : row.account_status === "stopped" || row.account_status === "disabled" ? "danger" : "neutral"}>{row.account_status}</OpsStatus> : <Tri tone="missing" text={MISSING} title={MISSING + ":sub_account.status"} />}</td>
                   <td>{row.opened_at ?? <span className="ops-muted table-placeholder">—(未开通)</span>}</td>
                   <td>{row.sub_end_date ?? <span className="ops-muted">长期有效</span>}</td>
                   <td>{exitText(row.contract_exits) || <Tri tone="missing" text={MISSING} title={MISSING + ":subscription.line_exits"} />}</td>
-                  <td className={mismatch ? "ops-delivery-mismatch-cell" : undefined}>{row.measured_egress ?? <span className="ops-muted" title="该账号没有成功的开通回填,无实测值">无实测</span>}
+                  <td className={mismatch ? "ops-delivery-mismatch-cell" : undefined}>{row.measured_egress ?? <span className="ops-muted table-placeholder" title="该账号没有成功的开通回填,无实测值">无实测</span>}
                     {mismatch ? <><br /><span className="ops-muted">不在合同出口集合内</span></> : null}</td>
-                  <td>{row.intranet_ip ?? <span className="ops-muted">无实测</span>}</td>
-                  <td>{declared ? <span className="table-number">{declared}</span> : <span className="ops-muted">—</span>}</td>
-                  <td>{measured ? <span className="table-number">{measured}</span> : <span className="ops-muted">无实测</span>}</td>
-                  <td>{row.overseas_ip ?? <span className="ops-muted">—(已释放)</span>}</td>
-                  <td>{row.ip_egress ?? <span className="ops-muted">—(已释放)</span>}</td>
-                  <td>{row.ip_type ? IP_TYPE_LABEL[row.ip_type] ?? row.ip_type : <span className="ops-muted">—</span>}</td>
-                  <td>{row.source_ticket_no ?? <span className="ops-muted">—</span>}</td>
+                  <td>{row.intranet_ip ?? <span className="ops-muted table-placeholder">无实测</span>}</td>
+                  <td>{declared ? <span className="table-number">{declared}</span> : <span className="table-placeholder">—</span>}</td>
+                  <td>{measured ? <span className="table-number">{measured}</span> : <span className="ops-muted table-placeholder">无实测</span>}</td>
+                  <td>{row.overseas_ip ?? <span className="ops-muted table-placeholder">—(已释放)</span>}</td>
+                  <td>{row.ip_egress ?? <span className="ops-muted table-placeholder">—(已释放)</span>}</td>
+                  <td>{row.ip_type ? IP_TYPE_LABEL[row.ip_type] ?? row.ip_type : <span className="table-placeholder">—</span>}</td>
+                  <td>{row.source_ticket_no ?? <span className="table-placeholder">—</span>}</td>
                   <td><OpsStatus tone={stateTone(row.state)}>{STATE_LABEL[row.state] ?? row.state}</OpsStatus>
                     {row.state === "released" ? <><br /><span className="ops-muted">{row.released_at ?? "释放日未下发"}{row.release_reason ? ` · ${RELEASE_REASON_LABEL[row.release_reason] ?? row.release_reason}` : ""}</span></> : null}
                     {row.state === "pending_release" ? <><br /><span className="ops-muted">订阅已到期、资源未回收(待停机单生效)</span></> : null}

+ 15 - 15
web-scaffold/src/components/work-order/ConstructionGuidePanel.tsx

@@ -60,12 +60,12 @@ function PriorBlock({ prior }: { prior: PriorActivation }) {
             <tbody>
               {prior.routes!.map((r) => (
                 <tr key={r.id}>
-                  <td>{r.sub_account_id ?? "—"}</td>
-                  <td>{r.network_account_name ?? "—"}</td>
-                  <td>{[r.intranet_ip, r.subnet_mask].filter(Boolean).join(" / ") || "—"}</td>
-                  <td>{[r.vlan, r.vni].filter(Boolean).join(" / ") || "—"}</td>
-                  <td>{r.egress_pop ?? "—"}</td>
-                  <td>{[r.down_mbps && `↓${r.down_mbps}`, r.up_mbps && `↑${r.up_mbps}`].filter(Boolean).join(" / ") || "—"}</td>
+                  <td>{r.sub_account_id ?? <span className="table-placeholder">—</span>}</td>
+                  <td>{r.network_account_name ?? <span className="table-placeholder">—</span>}</td>
+                  <td>{[r.intranet_ip, r.subnet_mask].filter(Boolean).join(" / ") || <span className="table-placeholder">—</span>}</td>
+                  <td>{[r.vlan, r.vni].filter(Boolean).join(" / ") || <span className="table-placeholder">—</span>}</td>
+                  <td>{r.egress_pop ?? <span className="table-placeholder">—</span>}</td>
+                  <td>{[r.down_mbps && `↓${r.down_mbps}`, r.up_mbps && `↑${r.up_mbps}`].filter(Boolean).join(" / ") || <span className="table-placeholder">—</span>}</td>
                 </tr>
               ))}
             </tbody>
@@ -79,11 +79,11 @@ function PriorBlock({ prior }: { prior: PriorActivation }) {
             <tbody>
               {prior.ips!.map((r) => (
                 <tr key={r.id}>
-                  <td>{r.egress ?? "—"}</td>
-                  <td>{r.overseas_ip ?? "—"}</td>
-                  <td>{r.ip_type ?? "—"}</td>
-                  <td>{r.bandwidth_mbps ?? "—"}</td>
-                  <td>PIN {r.pin_registered === "true" ? "✓" : "—"} / CPID {r.cpid_registered === "true" ? "✓" : "—"}</td>
+                  <td>{r.egress ?? <span className="table-placeholder">—</span>}</td>
+                  <td>{r.overseas_ip ?? <span className="table-placeholder">—</span>}</td>
+                  <td>{r.ip_type ?? <span className="table-placeholder">—</span>}</td>
+                  <td>{r.bandwidth_mbps ?? <span className="table-placeholder">—</span>}</td>
+                  <td>PIN {r.pin_registered === "true" ? "✓" : <span className="table-placeholder">—</span>} / CPID {r.cpid_registered === "true" ? "✓" : <span className="table-placeholder">—</span>}</td>
                 </tr>
               ))}
             </tbody>
@@ -137,10 +137,10 @@ export function ConstructionGuidePanel({ guide }: { guide: ConstructionGuide | n
               <tbody>
                 {pending.map((a) => (
                   <tr key={a.sub_account_id ?? a.display_name ?? Math.random()}>
-                    <td>{a.sub_account_id ?? "—"}</td>
-                    <td>{a.display_name ?? "—"}</td>
-                    <td>{a.net_account ?? "—"}</td>
-                    <td>{a.before_status ?? "—"}</td>
+                    <td>{a.sub_account_id ?? <span className="table-placeholder">—</span>}</td>
+                    <td>{a.display_name ?? <span className="table-placeholder">—</span>}</td>
+                    <td>{a.net_account ?? <span className="table-placeholder">—</span>}</td>
+                    <td>{a.before_status ?? <span className="table-placeholder">—</span>}</td>
                   </tr>
                 ))}
               </tbody>

+ 1 - 1
web-scaffold/src/components/work-order/FormTemplateAdminCard.tsx

@@ -1009,7 +1009,7 @@ export function FormTemplateAdminCard({ canEdit }: { canEdit: boolean }) {
                         <td>v{v.version}</td>
                         <td>{v.status}</td>
                         <td className="table-number">{v.schema?.fields?.length ?? 0}</td>
-                        <td>{v.published_at ? v.published_at.slice(0, 19).replace("T", " ") : "—"}</td>
+                        <td>{v.published_at ? v.published_at.slice(0, 19).replace("T", " ") : <span className="table-placeholder">—</span>}</td>
                       </tr>
                     ))}
                   </tbody>

+ 1 - 1
web-scaffold/src/components/work-order/MessageInboxPanel.tsx

@@ -87,7 +87,7 @@ export function MessageInboxPanel({ canDispose, onChanged }: { canDispose: boole
         <td><strong>{m.carrier_order_no ?? "(无单号)"}</strong>{m.reported_ticket_no && <small>受理单号 {m.reported_ticket_no}</small>}</td>
         <td>{m.action ?? "-"}</td>
         <td><span className={`work-order-status status-${m.status === "conflict" ? "pending" : "doing"}`}><i />{m.status === "conflict" ? "冲突" : "未匹配"}</span>{m.conflict_note && <small>{m.conflict_note}</small>}</td>
-        <td><strong>{m.customer_name ?? "未识别客户"}</strong><small>{[m.contact_name, m.contact_phone, m.network_account_name].filter(Boolean).join(" · ") || "报文未带要素"}</small></td>
+        <td><strong>{m.customer_name ?? <span className="table-placeholder">未识别客户</span>}</strong><small>{[m.contact_name, m.contact_phone, m.network_account_name].filter(Boolean).join(" · ") || <span className="table-placeholder">报文未带要素</span>}</small></td>
         <td><strong className="work-order-date">{fmtTime(m.received_at)}</strong></td>
         {canDispose && <td><Button variant="ghost" size="sm" onClick={() => { setOpenId(openId === m.message_id ? null : m.message_id); setTip(""); setTicketNo(""); setReason(""); }}>{openId === m.message_id ? "收起" : "处置"}</Button></td>}
       </tr>)}

+ 112 - 0
web-scaffold/src/components/work-order/WorkOrderLedgerList.tsx

@@ -0,0 +1,112 @@
+import type { ReactNode } from "react";
+import { ArrowRight } from "lucide-react";
+import { Link } from "react-router";
+import { OpsTableColumns } from "../OperationsKit";
+import { TicketStatusTag, TicketTypeTag } from "./TicketBadges";
+import type { TicketListItem } from "../../lib/api/ticket";
+import { fmtTime } from "../../lib/ticket";
+import { useHorizontalOverflow } from "../../lib/use-horizontal-overflow";
+import { nextStepOf } from "../../lib/work-order-next-step";
+import { todoRowDueOn } from "../../lib/work-order-todo-row";
+
+function TicketLedgerRow({ item, from, clientView, mobile = false }: {
+  item: TicketListItem;
+  from: string;
+  clientView: boolean;
+  mobile?: boolean;
+}) {
+  const step = clientView ? null : nextStepOf(item);
+  const href = `/work-orders/${encodeURIComponent(item.ticket_id)}`;
+  const state = { from };
+  const due = todoRowDueOn(item);
+  const number = item.ticket_no || item.ticket_id;
+  const title = item.title?.trim();
+  const customer = item.customer_name?.trim();
+  const customerName = customer || <span className="table-placeholder">未关联客户</span>;
+  const owner = item.assignee_name || <span className="table-placeholder">待分派</span>;
+  const team = item.team_name || <span className="table-placeholder">未分派团队</span>;
+  const deadline = due ? due.replaceAll("-", ".") : <span className="table-placeholder">—</span>;
+  const createdAt = item.created_at ? fmtTime(item.created_at) : <span className="table-placeholder">—</span>;
+  const status = <TicketStatusTag status={item.status} type={item.ticket_type} />;
+  const type = <TicketTypeTag type={item.ticket_type} />;
+  const action = step?.label
+    ? <Link className={`work-order-next-step tone-${step.tone}`} to={step.action ? `${href}?act=${step.action}` : href} state={state}>{step.label}</Link>
+    : <span className="table-placeholder">—</span>;
+  const detail = <Link className="ops-table-action" to={href} state={state} aria-label={`查看工单 ${number} 详情`}>详情<ArrowRight size={14} aria-hidden="true" /></Link>;
+
+  if (mobile) {
+    return (
+      <article className="order-mobile-card work-order-ledger-mobile-card">
+        <div className="work-order-ledger-mobile-meta"><small>{number}</small>{status}</div>
+        <h3>{customerName}</h3>
+        <p>{title || <span className="table-placeholder">未填写标题</span>}</p>
+        <dl>
+          <div><dt>工单类型</dt><dd>{type}</dd></div>
+          {!clientView && <div><dt>责任人 / 团队</dt><dd>{owner}<small>{team}</small></dd></div>}
+          <div><dt>截止日期</dt><dd>{deadline}{item.deferred_until && <small>已延期</small>}{item.overdue_7d && <small className="work-order-overdue-text">超期/临期</small>}</dd></div>
+          <div><dt>创建时间</dt><dd>{createdAt}</dd></div>
+          {step && <div><dt>下一步</dt><dd>{action}<small>{step.hint}</small></dd></div>}
+        </dl>
+        <div className="ops-inline-actions">{detail}</div>
+      </article>
+    );
+  }
+
+  return (
+    <tr>
+      <td><strong className="table-cell-title" title={customer}>{customerName}</strong><small title={number}>{number}</small></td>
+      <td>
+        <strong className="table-cell-title" title={title}>{title || <span className="table-placeholder">未填写标题</span>}</strong>
+        <div className="work-order-ledger-type">{type}</div>
+      </td>
+      {!clientView && <td><strong className="table-cell-title" title={item.assignee_name || undefined}>{owner}</strong><small title={item.team_name || undefined}>{team}</small></td>}
+      <td>
+        <strong className="order-date">{deadline}</strong>
+        {item.deferred_until && <small title={`原期限 ${item.expected_done_date?.slice(0, 10) ?? "—"}`}>已延期</small>}
+        {item.overdue_7d && <small className="work-order-overdue-text">超期/临期</small>}
+      </td>
+      <td className="order-date" title={item.created_at || undefined}>{createdAt}</td>
+      {step && <td>{action}<small title={step.hint}>{step.hint}</small></td>}
+      <td>{status}</td>
+      <td><div className="ops-inline-actions">{detail}</div></td>
+    </tr>
+  );
+}
+
+export function WorkOrderLedgerList({ rows, from, label, fallback, clientView = false }: {
+  rows: readonly TicketListItem[];
+  from: string;
+  label: string;
+  fallback?: ReactNode;
+  clientView?: boolean;
+}) {
+  const tableOverflow = useHorizontalOverflow();
+  const columns = clientView
+    ? ["客户 / 工单编号", "工单标题 / 类型", "截止日期", "创建时间", "状态", "操作"]
+    : ["客户 / 工单编号", "工单标题 / 类型", "责任人 / 团队", "截止日期", "创建时间", "下一步", "状态", "操作"];
+  const bodyWidth = Math.max(clientView ? 980 : 1280, tableOverflow.width) - 232;
+  const columnWidths = (clientView ? [.31, .33, .16, .20] : [.18, .24, .16, .12, .14, .16]).map((weight) => bodyWidth * weight).concat(140, 92);
+  return (
+    <>
+      <div
+        ref={tableOverflow.ref}
+        className={`measured-table-scroll order-table-wrap order-ledger-scroll work-order-ledger-scroll${tableOverflow.overflow ? " has-horizontal-overflow" : ""}${tableOverflow.canScrollLeft ? " can-scroll-left" : ""}${tableOverflow.canScrollRight ? " can-scroll-right" : ""}`}
+        role="region"
+        aria-label={`${label},可横向滚动查看字段`}
+        tabIndex={0}
+      >
+        {fallback}
+        <table hidden={Boolean(fallback)} className={`order-table order-ledger${clientView ? " is-client-view" : ""}`}>
+          <OpsTableColumns widths={columnWidths} />
+          <thead><tr>{columns.map((column) => <th key={column} scope="col">{column}</th>)}</tr></thead>
+          <tbody>
+            {!fallback && rows.map((item) => <TicketLedgerRow key={item.ticket_id} item={item} from={from} clientView={clientView} />)}
+          </tbody>
+        </table>
+      </div>
+      <div className="order-mobile-list" aria-label={label}>
+        {fallback || rows.map((item) => <TicketLedgerRow key={item.ticket_id} item={item} from={from} clientView={clientView} mobile />)}
+      </div>
+    </>
+  );
+}

+ 2 - 0
web-scaffold/src/lib/work-order-counts.ts

@@ -52,6 +52,8 @@ export function useTicketStatusCounts(statuses: readonly string[]) {
     }
     const totals = raw as Record<string, unknown>;
     const out: StatusCounts = {};
+    // 该请求没有列表筛选,total 是当前账号可见的全部工单数。
+    if (Number.isSafeInteger(r.total) && r.total >= 0) out.total = r.total;
     for (const status of wanted) {
       const n = parseStatusTotal(Object.prototype.hasOwnProperty.call(totals, status) ? totals[status] : undefined);
       // D-04:非法值不写入 ⇒ Partial 保持 undefined ⇒ KPI「—」;合法/缺键照常。

+ 1 - 1
web-scaffold/src/pages/AuditLogPage.tsx

@@ -344,7 +344,7 @@ export function AuditLogPage({ pageTitle = "审计日志" }: { pageTitle?: strin
                   <td>
                     <TimeCell at={item.occurred_at} />
                   </td>
-                  <td>{item.actor.username ?? item.actor.user_id ?? "—"}</td>
+                  <td>{item.actor.username ?? item.actor.user_id ?? <span className="table-placeholder">—</span>}</td>
                   <td>
                     <ActionCell action={item.action} />
                   </td>

+ 2 - 2
web-scaffold/src/pages/ContractManagementPage.tsx

@@ -153,9 +153,9 @@ export function ContractManagementPage() {
         const renewContractId = item.contractId ?? "";
         return <tr key={item.contractId || item.no} tabIndex={0} aria-label={`查看合同 ${item.no}`} onClick={() => navigate(`/contracts/${link}`, { state: { from: location.pathname + location.search } })} onKeyDown={(event) => { if (event.key === "Enter" && event.target === event.currentTarget) navigate(`/contracts/${link}`, { state: { from: location.pathname + location.search } }); }}>
           <td><strong className="table-cell-title" title={item.no}><TableValueText>{item.no || WORD_UNCONFIGURED}</TableValueText></strong><small title={`${item.customer} · ${item.source ?? ""}`}><TableValueText>{item.customer || WORD_UNCONFIGURED}</TableValueText> · {item.contractType || "新建"} · {item.source === undefined ? <Tri tone="missing" text={WORD_NOT_PROVIDED} title="后端合同读口未返回 source 列(服务版本落后于 20261115000002 迁移)——如实标未下发,不填 manual 冒充" /> : textCell(item.source)}</small></td>
-          <td title={item.extNo || undefined}>{item.extNo ? <span className="ops-mono">{item.extNo}</span> : "—"}</td>
+          <td title={item.extNo || undefined}>{item.extNo ? <span className="ops-mono">{item.extNo}</span> : <span className="table-placeholder">—</span>}</td>
           <td>{state ? <OpsStatus tone={contractStatusTone[state]}>{state}</OpsStatus> : <Tri tone={item.periodState === "fail" ? "fail" : "missing"} text={item.periodState === "fail" ? WORD_FETCH_FAILED : WORD_UNCONFIGURED} title="缺少生效日或结束日,状态不可判" />}{expiringRow && <OpsStatus tone="warning">快到期 · {expiringLabel(item.end)}</OpsStatus>}<small>{item.periodState === "val" ? `${d(item.start)} 至 ${d(item.end)}` : <Tri tone={item.periodState === "fail" ? "fail" : "missing"} text={item.periodState === "fail" ? WORD_FETCH_FAILED : WORD_UNCONFIGURED} />}</small></td>
-          <td>{item.opened === undefined || item.opened === null ? <Tri tone={item.opened === undefined ? "fail" : "missing"} text={item.opened === undefined ? WORD_FETCH_FAILED : WORD_UNCONFIGURED} title="是否已开通取关联工单回填,取数失败只坏本列" /> : <OpsStatus tone={item.opened ? "success" : "warning"}>{item.opened ? "已开通" : "未开通"}</OpsStatus>}<small>实际开通日 {item.openedOn ? d(item.openedOn) : "未回填"}</small></td>
+          <td>{item.opened === undefined || item.opened === null ? <Tri tone={item.opened === undefined ? "fail" : "missing"} text={item.opened === undefined ? WORD_FETCH_FAILED : WORD_UNCONFIGURED} title="是否已开通取关联工单回填,取数失败只坏本列" /> : <OpsStatus tone={item.opened ? "success" : "warning"}>{item.opened ? "已开通" : "未开通"}</OpsStatus>}<small>实际开通日 {item.openedOn ? d(item.openedOn) : <span className="table-placeholder">未回填</span>}</small></td>
           <td>{item.amountState === "val" ? <span className="ops-money">¥{item.amount.toLocaleString("zh-CN")}</span> : <Tri tone={item.amountState === "fail" ? "fail" : "missing"} text={item.amountState === "fail" ? WORD_FETCH_FAILED : WORD_UNCONFIGURED} />}<small>{item.serviceMonthsState === "val" ? `服务期 ${item.serviceMonths} 个月` : <Tri tone={item.serviceMonthsState === "fail" ? "fail" : "missing"} text={item.serviceMonthsState === "fail" ? WORD_FETCH_FAILED : WORD_UNCONFIGURED} />}</small></td>
           <td><strong><TableValueText>{item.agent || WORD_UNCONFIGURED}</TableValueText></strong><small><TableValueText>{item.agentPhone || WORD_UNCONFIGURED}</TableValueText></small></td>
 <td><div className="ops-inline-actions"><button type="button" onClick={(event) => { event.stopPropagation(); navigate(`/contracts/${link}`, { state: { from: location.pathname + location.search } }); }}>详情</button>{!view.readOnly && <OpsResponsiveActions expanded={expandedActions} items={[

+ 1 - 1
web-scaffold/src/pages/ContractRecordPage.tsx

@@ -717,7 +717,7 @@ export function ContractRecordPage() {
                   <td>{family ? label(ITEM_FAMILY, family) : <Tri tone="missing" text={WORD_UNCONFIGURED} />}</td>
                   <td className="table-number">{item.quantity}</td>
                   <td>{accounts === null ? <Tri tone="missing" text={WORD_UNCONFIGURED} title="目录档位额度未下发" /> : <span className="table-number">{accounts}</span>}</td>
-                  <td>{item.exits.join("、") || "—"}</td>
+                  <td>{item.exits.join("、") || <span className="table-placeholder">—</span>}</td>
                   {billingWritable && <td className="contract-item-actions-col"><div className="contract-item-row-actions">
                     <InlineEditButton label={`编辑条目 ${index + 1}`} text="编辑" onClick={() => { setEditingField(null); setEditingItem(index); }} />
                     {/* D-7:叠加服务只从链路节点下新增,页面上⛔ 平级「新增叠加服务」入口。 */}

+ 1 - 1
web-scaffold/src/pages/CustomerManagementPages.tsx

@@ -169,7 +169,7 @@ export function CustomerManagementPage() {
       <div className="ops-table-wrap"><table className="ops-table"><thead><tr><th>客户</th><th>所属区域</th><th>运营商 / 合伙人</th><th>套餐与分账号</th><th>建档时间</th><th>状态</th><th><span className="sr-only">操作</span></th></tr></thead><tbody>{filtered.map((item) => <tr key={item.id}>
         <td><strong>{item.name ?? <Tri tone="missing" text={MISSING} />}</strong><small>{item.id}{item.subject ? ` · ${item.subject}` : ""}{item.opsTeamNames.length ? ` · ${item.opsTeamNames.join(" / ")}` : ""}{item.opsTeamNames.length > 1 ? " · 历史脏数据,需改派为单支" : ""}</small></td>
         <td>{item.regionPath ? item.regionPath : <Tri tone="missing" text={MISSING} title={REGION_NOTE} />}</td>
-        <td><strong>{item.operator ?? <Tri tone="missing" text={MISSING} />}</strong><small>{item.partner ?? "未绑定合伙人"}</small></td>
+        <td><strong>{item.operator ?? <Tri tone="missing" text={MISSING} />}</strong><small>{item.partner ?? <span className="table-placeholder">未绑定合伙人</span>}</small></td>
         <td><strong>{item.planNames.length ? item.planNames.join(" / ") : "无在用订阅"}</strong><small>分账号 {item.subAccounts ?? 0}</small></td>
         <td><span className="ops-money">{item.activatedAt ? d(item.activatedAt) : <Tri tone="missing" text={MISSING} />}</span></td>
         <td><StatusCell status={item.status} tone="missing" /></td>

+ 3 - 3
web-scaffold/src/pages/CustomerRecordsPages.tsx

@@ -263,11 +263,11 @@ export function CustomerListPage() {
             </strong>
             <small title={item.id}>{item.id}</small>
           </td>
-          <td><span title={item.subject ?? undefined}>{item.subject ?? <Tri tone="missing" text={MISSING} />}</span>{item.identityNo ? <small title={IDENTITY_NOTE}>{item.identityNo}</small> : <small title={IDENTITY_NOTE}>未登记识别号</small>}</td>
+          <td><span title={item.subject ?? undefined}>{item.subject ?? <Tri tone="missing" text={MISSING} />}</span>{item.identityNo ? <small title={IDENTITY_NOTE}>{item.identityNo}</small> : <small className="table-placeholder" title={IDENTITY_NOTE}>未登记识别号</small>}</td>
           <td>{item.regionPath ? <span title={item.regionPath}>{item.regionPath}</span> : <Tri tone="missing" text={MISSING} title={REGION_NOTE} />}</td>
           <td>{item.operator ? <span title={item.operator}>{item.operator}</span> : <Tri tone="missing" text={MISSING} />}</td>
-          <td>{item.partner ? <span title={item.partner}>{mask(item.partner)}</span> : <span title="客户未绑定合伙人">未绑定合伙人</span>}</td>
-          <td>{item.opsTeamNames.length ? <div className="customer-teams">{item.opsTeamNames.map((team) => <span key={team} title={team}>{team}</span>)}{item.opsTeamNames.length > 1 && <span title="历史脏数据:后端当期回显多支运维团队,按单支定案需改派为 1 支">历史脏数据,需改派为单支</span>}</div> : <span title="客户未分配运维团队">未分配团队</span>}</td>
+          <td>{item.partner ? <span title={item.partner}>{mask(item.partner)}</span> : <span className="table-placeholder" title="客户未绑定合伙人">未绑定合伙人</span>}</td>
+          <td>{item.opsTeamNames.length ? <div className="customer-teams">{item.opsTeamNames.map((team) => <span key={team} title={team}>{team}</span>)}{item.opsTeamNames.length > 1 && <span title="历史脏数据:后端当期回显多支运维团队,按单支定案需改派为 1 支">历史脏数据,需改派为单支</span>}</div> : <span className="table-placeholder" title="客户未分配运维团队">未分配团队</span>}</td>
           <td>{item.status ? <OpsStatus tone={tone}>{item.status}</OpsStatus> : <Tri tone="missing" text={MISSING} />}</td>
           <td><div className="ops-inline-actions"><button type="button" onClick={() => navigate(`/customers/${encodeURIComponent(item.id)}`, { state: listState })}>详情</button>{canDeleteCustomer && <button type="button" className="is-danger" disabled={!item.name} title={item.name ? "删除客户(仅总运营/运营主账号;引用拦截由服务端前置检查判定)" : `${MISSING}:未取到客户名称`} onClick={() => { setDeleteId(item.id); setDeleteName(""); }}><Trash2 size={14} />删除</button>}</div></td>
         </tr>;

+ 4 - 4
web-scaffold/src/pages/CustomerSelfServicePages.tsx

@@ -40,7 +40,7 @@ function money(cents: number | null): string {
 
 /** 线路出口列:数组逐项一行,空集 ⇒「—」。 */
 function exits(exitsValue: string[] | null) {
-  if (!exitsValue || exitsValue.length === 0) return <span className="opacity-60">—</span>;
+  if (!exitsValue || exitsValue.length === 0) return <span className="table-placeholder">—</span>;
   return <>{exitsValue.map((e) => <div key={e}>{e}</div>)}</>;
 }
 
@@ -85,15 +85,15 @@ export function CustomerPlanPage() {
           {rows.map((row) => <tr key={row.subscription_id}>
             <td>
               <strong>{row.plan_name}</strong>
-              <div className="ops-muted">{row.contract_no ?? "—"}</div>
+              <div className="ops-muted">{row.contract_no ?? <span className="table-placeholder">—</span>}</div>
               {/* 交付现状摘要(第 9 册 §4.3 行内摘要):台账口径,只读;⛔ 不占列、不开详情口 */}
               {row.ip_summary && <div className="ops-muted">在册 {row.ip_summary.live_ip_count} 个 IP · {row.ip_summary.live_account_count} 个在用账号{row.ip_summary.released_ip_count > 0 ? `(已回收 ${row.ip_summary.released_ip_count})` : ""}</div>}
             </td>
             <td>{data.party.operator_name ?? <Tri tone="missing" text={MISSING} title="客户档案未挂运营商:合同签订方一列无值,非取数失败" />}</td>
             <td className="table-number">{money(row.contract_amount_cents)}</td>
-            <td>{row.plan_family ? label(PLAN_FAMILY, row.plan_family) : "—"}</td>
+            <td>{row.plan_family ? label(PLAN_FAMILY, row.plan_family) : <span className="table-placeholder">—</span>}</td>
             <td>{exits(row.line_exits)}</td>
-            <td>{row.start_date ?? "—"} 至 {row.end_date ?? "—"}</td>
+            <td>{row.start_date ?? <span className="table-placeholder">—</span>} 至 {row.end_date ?? <span className="table-placeholder">—</span>}</td>
             <td><OpsStatus tone={row.status.key === "active" ? "success" : row.status.key === "pending" ? "warning" : "neutral"}>{row.status.label}</OpsStatus></td>
           </tr>)}
           {!rows.length && <OpsTableEmpty colSpan={7}>{empty}</OpsTableEmpty>}

+ 2 - 2
web-scaffold/src/pages/CustomerTicketPages.tsx

@@ -179,8 +179,8 @@ export function CustomerTicketProgressPage() {
             <td>{typeLabel(item.ticket_type)}</td>
             <td><span title={item.title ?? undefined}>{item.title}</span></td>
             <td><CustomerStatusTag status={item.status} type={item.ticket_type} /></td>
-            <td>{submitterType ? SUBMITTER_NAMES[submitterType] ?? submitterType : <span title="列表未回提交方,需要确认时点「办理」查看该单详情">未回传</span>}</td>
-            <td>{item.expected_done_date ? item.expected_done_date.slice(0, 10) : "—"}</td>
+            <td>{submitterType ? SUBMITTER_NAMES[submitterType] ?? submitterType : <span className="table-placeholder" title="列表未回提交方,需要确认时点「办理」查看该单详情">未回传</span>}</td>
+            <td>{item.expected_done_date ? item.expected_done_date.slice(0, 10) : <span className="table-placeholder">—</span>}</td>
             <td>{fmtTime(item.completed_at)}</td>
             <td>{fmtTime(item.created_at)}</td>
             <td className="work-order-row-actions">

+ 4 - 4
web-scaffold/src/pages/FinanceReferencePages.tsx

@@ -605,7 +605,7 @@ export function CostManagementPage() {
           <td><Tri tone={item.calc.pending ? "missing" : "val"} text={item.calc.text} title={item.calc.pending ? "该历史行 billing_unit 未灌值(同上)" : `后端 billing_unit=${item.billingUnitKey ?? ""}`} /></td>
           <td><Tri tone={item.cycle.pending ? "missing" : "val"} text={item.cycle.text} title={item.cycle.pending ? "该历史行 cycle 未灌值(20261115000005 补列前的存量行)" : `后端 cycle=${item.cycleKey ?? ""}(设计册 分成§2.1:一期恒 monthly)`} />{expanded && item.remark ? <small className="ops-muted"> {item.remark}</small> : null}</td>
           <td>{noCycle ? <Tri tone="missing" text={WORD_NOT_PROVIDED} title="该历史行 is_amortized 未灌值 ⇒ 不折算「否」" /> : <OpsStatus tone={item.amortized ? "success" : "neutral"}>{item.amortized ? "是" : "否"}</OpsStatus>}</td>
-          <td>{noCycle ? <Tri tone="missing" text={WORD_NOT_PROVIDED} title="该历史行 amortization_months 未灌值" /> : <span>{item.amortized ? (item.amortizationMonths === null ? "每月摊销(不结束)" : <span className="ops-mono table-number">{item.amortizationMonths} 个月</span>) : "—"}</span>}</td>
+          <td>{noCycle ? <Tri tone="missing" text={WORD_NOT_PROVIDED} title="该历史行 amortization_months 未灌值" /> : <span>{item.amortized ? (item.amortizationMonths === null ? "每月摊销(不结束)" : <span className="ops-mono table-number">{item.amortizationMonths} 个月</span>) : <span className="table-placeholder">—</span>}</span>}</td>
           <td>{deduct.pending ? <Tri tone="missing" text={deduct.text} title="该历史行 deduct_from_base 未灌值 ⇒ 不折算成「否」" /> : <OpsStatus tone={item.deduct ? "success" : "neutral"}>{deduct.text}</OpsStatus>}</td>
           <td>{item.configuredComboCount === null
             ? <Tri tone="missing" text={WORD_NOT_PROVIDED} title="后端未下发「已配组合数/月度合计」概况列" />
@@ -817,9 +817,9 @@ export function CorrectionNotesPage() {
           <tbody>{(list.data?.items ?? []).map((item) => <tr key={item.correction_id}>
             <td title={item.created_at}>{localTime(item.created_at)}</td>
             {/* 自然月不落库、现推;取不到 ⇒「—」(⛔ 相似度推测)。 */}
-            <td>{item.period ?? "—"}</td>
-            <td><strong className="correction-object-text table-cell-title" title={item.ref_label}>{item.ref_label || "—"}</strong>{!item.matched && <OpsTag tone="warning">{CORRECTION_UNMATCHED_TAG}</OpsTag>}</td>
-            <td>{item.region_label ?? regionNames.get(item.region_node_id ?? "") ?? "—"}</td>
+            <td>{item.period ?? <span className="table-placeholder">—</span>}</td>
+            <td><strong className="correction-object-text table-cell-title" title={item.ref_label}>{item.ref_label || <span className="table-placeholder">—</span>}</strong>{!item.matched && <OpsTag tone="warning">{CORRECTION_UNMATCHED_TAG}</OpsTag>}</td>
+            <td>{item.region_label ?? regionNames.get(item.region_node_id ?? "") ?? <span className="table-placeholder">—</span>}</td>
             {/* 列表只放摘要(后端截断),全文只在详情,⛔ 复制第二份。 */}
             <td><span title={item.error_excerpt} className="correction-notes-excerpt">{item.error_excerpt}</span></td>
             <td>{item.operator_name}</td>

+ 5 - 5
web-scaffold/src/pages/JobRunsDialog.tsx

@@ -210,7 +210,7 @@ function RunCell({ label, children }: { label: string; children: ReactNode }) {
 }
 
 function RunText({ children }: { children: string }) {
-  return <span className="job-run-text" title={children}>{children}</span>;
+  return <span className={children === "—" ? "job-run-text table-placeholder" : "job-run-text"} title={children}>{children}</span>;
 }
 
 function RunRow({ run, rows, onDetail, onGoto }: { run: JobRunRow; rows: JobListRow[]; onDetail: () => void; onGoto: (page: string) => void }) {
@@ -300,10 +300,10 @@ function RoundDialog({ run, rows, onClose }: { run: JobRunRow; rows: JobListRow[
               <tbody>
                 {detail.map((item, idx) => (
                   <tr key={`${item.object_id ?? item.object_type ?? "row"}-${idx}`}>
-                    <td>{item.object_type ?? "—"}</td>
-                    <td className="ops-mono">{item.object_name ?? item.object_id ?? "—"}</td>
-                    <td>{item.disposition ?? "—"}</td>
-                    <td>{item.reason ?? "—"}</td>
+                    <td>{item.object_type ?? <span className="table-placeholder">—</span>}</td>
+                    <td className="ops-mono">{item.object_name ?? item.object_id ?? <span className="table-placeholder">—</span>}</td>
+                    <td>{item.disposition ?? <span className="table-placeholder">—</span>}</td>
+                    <td>{item.reason ?? <span className="table-placeholder">—</span>}</td>
                   </tr>
                 ))}
               </tbody>

+ 2 - 2
web-scaffold/src/pages/OrderManagementPage.tsx

@@ -165,11 +165,11 @@ export function OrderManagementPage() {
           return <tr key={item.no}>
           <td><strong className="table-cell-title" title={item.customer}>{cell(item.customer)}</strong><small title={item.no}>{cell(item.no)}</small>{item.parentSubscriptionId && <small className="order-parent-mark">叠加于 {item.parentSubscriptionId}</small>}</td>
           <td><div className="order-plan-line"><strong className="table-cell-title" title={item.planName ?? ""}>{cell(item.planName)}</strong>{item.planKindLabel && <OpsStatus tone={item.planKindLabel === "自定义套餐" ? "brand" : "neutral"} title={`套餐类型:${item.planKindLabel}(「套餐类型筛选」的行内依据)`}>{item.planKindLabel}</OpsStatus>}</div><small title={`${item.contractNo ?? ""} · ${item.modeLabel}`}>{item.contractNo === undefined ? <Tri tone="missing" text={WORD_NOT_PROVIDED} title="全部订阅接口不下发 contract_no 口径" /> : cell(item.contractNo)}{item.modeLabel ? ` · ${item.modeLabel}` : ""}</small></td>
-          <td title={item.orderNo ?? "订单号=保存时冻结合同外部单号;合同未填则空"}>{item.orderNo ? cell(item.orderNo) : "—"}</td>
+          <td title={item.orderNo ?? "订单号=保存时冻结合同外部单号;合同未填则空"}>{item.orderNo ? cell(item.orderNo) : <span className="table-placeholder">—</span>}</td>
           <td title={exitsOf(item).join("、")}>{item.exits === undefined ? <Tri tone="missing" text={WORD_NOT_PROVIDED} title="全部订阅接口不下发 line_exits 口径" /> : item.exits === null ? <Tri tone="missing" text={WORD_UNCONFIGURED} /> : exitsOf(item).length ? exitsOf(item).join("、") : <Tri tone="missing" text={WORD_UNCONFIGURED} />}</td>
           <td><strong className="order-row-price">{moneyCell(item.annual, true)}</strong><small title="由套餐配置价带出">{moneyCell(item.settle)} / 月结算</small></td>
           <td><strong className="order-date">{dateCell(item.start)}</strong><small>至 {dateCell(item.end)}{isExpiringSoon(item.end) ? `(快到期 · ${expiringLabel(item.end)})` : ""}</small></td>
-          <td><strong className="order-date">{dateCell(item.openedOn, WORD_NOT_OPENED)}</strong><small>{item.openedOn ? "计费取较晚日期" : "暂无计费起点"}</small></td>
+          <td><strong className="order-date">{dateCell(item.openedOn, WORD_NOT_OPENED)}</strong><small>{item.openedOn ? "计费取较晚日期" : <span className="table-placeholder">暂无计费起点</span>}</small></td>
           <td><StatusPill record={item} /></td>
           <td><div className="ops-inline-actions">
             <button type="button" className="ops-table-action" onClick={() => navigate(`/orders/${encodeURIComponent(item.no)}`)} aria-label={`查看${item.customer}订阅详情`}>详情</button>

+ 4 - 4
web-scaffold/src/pages/OrderRecordPage.tsx

@@ -213,12 +213,12 @@ export function OrderRecordPage() {
     <section className="order-record-section" aria-labelledby="order-service-title">
       <div className="order-record-section-title"><h2 id="order-service-title">本条订阅</h2></div>
       <div className="order-record-detail-wrap"><table className="order-record-detail"><tbody>
-        <tr><th scope="row">套餐档</th><td>{cell(item.planName)}{plan ? <span className="order-record-inline-note"> · {label(PLAN_FAMILY, plan.plan_family) || "形态未填"} · 目录年价 <span className={plan.annual_price_cents == null ? undefined : "table-annual-price"}>{moneyCell(plan.annual_price_cents).text}</span> / 月标准 <span className={plan.monthly_settle_cents == null ? undefined : "table-number"}>{moneyCell(plan.monthly_settle_cents).text}</span> · 额度 <TableValueText>{plan.sub_account_quota ?? WORD_UNCONFIGURED}</TableValueText></span> : <span className="order-record-inline-note"> · {catalog.error ? `目录档位取数失败:${catalog.error.message}` : "目录档位未取到,本条按冻结价继续计费"}</span>}</td></tr>
+        <tr><th scope="row">套餐档</th><td>{cell(item.planName)}{plan ? <span className="order-record-inline-note"> · {label(PLAN_FAMILY, plan.plan_family) || <span className="table-placeholder">形态未填</span>} · 目录年价 <span className={plan.annual_price_cents == null ? undefined : "table-annual-price"}>{moneyCell(plan.annual_price_cents).text}</span> / 月标准 <span className={plan.monthly_settle_cents == null ? undefined : "table-number"}>{moneyCell(plan.monthly_settle_cents).text}</span> · 额度 <TableValueText>{plan.sub_account_quota ?? WORD_UNCONFIGURED}</TableValueText></span> : <span className="order-record-inline-note"> · {catalog.error ? `目录档位取数失败:${catalog.error.message}` : "目录档位未取到,本条按冻结价继续计费"}</span>}</td></tr>
         <tr><th scope="row">冻结价格</th><td>年订阅价格 {moneyCellView(item.annual, true)} · 月结算标准 {moneyCellView(item.settle)}<span className="order-record-inline-note">({plan ? catalogMatches ? "与当前目录价一致" : "与当前目录价不同,以本条冻结值为准" : "目录档位未取到,以本条冻结值为准"})</span></td></tr>
-        <tr><th scope="row">订阅方式</th><td><TableValueText>{item.modeLabel || WORD_UNCONFIGURED}</TableValueText><span className="order-record-inline-note"> · 交付形态({item.familyLabel || WORD_UNCONFIGURED}){catalogMode}</span>{item.original && <> · 替换 <Link to={`/orders/${encodeURIComponent(item.original.subscription_id)}`} state={outgoingState}>{item.original.subscription_id}</Link></>}{item.replacedBy && <> · 已被 <Link to={`/orders/${encodeURIComponent(item.replacedBy.subscription_id)}`} state={outgoingState}>{item.replacedBy.subscription_id}</Link> 替换</>}</td></tr>
+        <tr><th scope="row">订阅方式</th><td><TableValueText>{item.modeLabel || WORD_UNCONFIGURED}</TableValueText><span className="order-record-inline-note"> · 交付形态({item.familyLabel || <span className="table-placeholder">{WORD_UNCONFIGURED}</span>}){catalogMode}</span>{item.original && <> · 替换 <Link to={`/orders/${encodeURIComponent(item.original.subscription_id)}`} state={outgoingState}>{item.original.subscription_id}</Link></>}{item.replacedBy && <> · 已被 <Link to={`/orders/${encodeURIComponent(item.replacedBy.subscription_id)}`} state={outgoingState}>{item.replacedBy.subscription_id}</Link> 替换</>}</td></tr>
         <tr><th scope="row">订阅状态</th><td>{item.statusLabel ? <OpsStatus tone={statusTone(item.statusLabel)}>{item.statusLabel}</OpsStatus> : <Tri tone="fail" text={WORD_FETCH_FAILED} />}{item.statusCode !== "expired" && item.statusLabel !== "已到期" && item.reason && <span className="order-record-inline-note"> · 办理说明:{item.reason}</span>}</td></tr>
         <tr><th scope="row">起止时间</th><td>{cell(item.start)} 至 {cell(item.end)}<span className="order-record-inline-note"> · 应收从实际开通日与合同生效日的较晚者起算{billableStart ? `(${billableStart})` : "(尚未开通)"}</span></td></tr>
-        {item.trialMonths ? <tr><th scope="row">试用优惠</th><td>{item.trialMonths} 个月 · {item.trialDiscount === undefined ? <Tri tone="fail" text={WORD_FETCH_FAILED} /> : item.trialDiscount === null ? "优惠金额未填写" : `${moneyCell(item.trialDiscount).text} / 月`}</td></tr> : null}
+        {item.trialMonths ? <tr><th scope="row">试用优惠</th><td>{item.trialMonths} 个月 · {item.trialDiscount === undefined ? <Tri tone="fail" text={WORD_FETCH_FAILED} /> : item.trialDiscount === null ? <span className="table-placeholder">优惠金额未填写</span> : `${moneyCell(item.trialDiscount).text} / 月`}</td></tr> : null}
         <tr><th scope="row">线路出口</th><td>{item.exits === undefined ? <Tri tone="fail" text={WORD_FETCH_FAILED} /> : item.exits === null ? <Tri tone="missing" text={WORD_UNCONFIGURED} /> : item.exits.length ? item.exits.join("、") : <Tri tone="missing" text={WORD_UNCONFIGURED} />}<span className="order-record-inline-note"> · 随合同服务构成条目带出,保存时冻结</span></td></tr>
         <tr><th scope="row">合同编号</th><td>{cell(item.contractNo)}{contract.error ? <span className="order-record-inline-note">(合同记录取数失败:{contract.error.message})</span> : contract.loading ? <span className="order-record-inline-note">(正在读取合同…)</span> : contractRow ? <> · <TableValueText>{contractRow.start_date ?? WORD_UNCONFIGURED}</TableValueText> 至 <TableValueText>{contractRow.end_date ?? WORD_UNCONFIGURED}</TableValueText> · 合同状态 <TableValueText>{contractState ?? WORD_UNCONFIGURED}</TableValueText> · 合同总额 {moneyCell(contractRow.amount_cents).text} <Link to={`/contracts/${encodeURIComponent(contractRow.contract_id)}`} state={outgoingState}>查看合同 <ArrowRight size={14} /></Link></> : <span className="order-record-inline-note">(合同记录不存在或未下发 contract_id)</span>}</td></tr>
         <tr><th scope="row">订单号</th><td>{cell(item.orderNo, "无运营商订单号")}<span className="order-record-inline-note"> · 保存时从合同外部单号冻结;订阅写入方在第4册{!view.readOnly && item.orderNo && <> · <Link to={`/orders?order=${encodeURIComponent(item.orderNo)}`}>按该单查询</Link></>}</span></td></tr>
@@ -308,7 +308,7 @@ export function OrderRecordPage() {
         <tr><th scope="row">客户主体</th><td><TableValueText>{item.customerId || WORD_UNCONFIGURED}</TableValueText> · {cell(custRow?.customer_name ?? item.customer)}({custRow ? label(SUBJECT_TYPE, custRow.subject_type) : custCell("主体类型")} · 识别号 {custText(custRow?.identity_no_masked, "未登记", "识别号")})</td></tr>
         <tr><th scope="row">账户状态</th><td>{custRow ? <OpsStatus tone={statusTone(label(ACCT_STATUS, custRow.acct_status))}>{label(ACCT_STATUS, custRow.acct_status)}</OpsStatus> : custCell("账户状态")}<span className="order-record-inline-note"> · 所属区域 {regionText} · 运营商 {custText(custRow?.operator_name, "未关联", "运营商")} / 合伙人 {custText(custRow?.partner_name, "无", "合伙人")}</span></td></tr>
         <tr><th scope="row">经办联系人</th><td>{custText(custRow?.contact_name, "未填", "经办联系人")} / {custText(custRow?.contact_mobile, "未填", "经办联系电话")}<span className="order-record-inline-note"> · 地址 {custText(custRow?.address, "未填", "装机地址")}</span></td></tr>
-        <tr><th scope="row">分账号</th><td>{accounts.error ? <Tri tone="fail" text={WORD_FETCH_FAILED} title={`分账号取数失败:${accounts.error.message}`} /> : accounts.loading ? <Tri tone="missing" text="读取中…" title="分账号读取中" /> : <>共 {accounts.data?.total ?? 0} 个 / 额度 {custText(custRow?.quota_cents, WORD_UNCONFIGURED, "分账号额度")}<span className="order-record-inline-note"> · 本条订阅计入额度 {item.quotaSlots === undefined ? WORD_FETCH_FAILED : item.quotaSlots === null ? WORD_UNCONFIGURED : item.quotaSlots}(未到期订阅按档位额度累加)</span></>}</td></tr>
+        <tr><th scope="row">分账号</th><td>{accounts.error ? <Tri tone="fail" text={WORD_FETCH_FAILED} title={`分账号取数失败:${accounts.error.message}`} /> : accounts.loading ? <Tri tone="missing" text="读取中…" title="分账号读取中" /> : <>共 {accounts.data?.total ?? 0} 个 / 额度 {custText(custRow?.quota_cents, WORD_UNCONFIGURED, "分账号额度")}<span className="order-record-inline-note"> · 本条订阅计入额度 {item.quotaSlots === undefined ? WORD_FETCH_FAILED : item.quotaSlots === null ? <span className="table-placeholder">{WORD_UNCONFIGURED}</span> : item.quotaSlots}(未到期订阅按档位额度累加)</span></>}</td></tr>
         <tr><th scope="row">该客户订阅</th><td>{customerSubProbe.error || customerActiveProbe.error
           ? <Tri tone="fail" text={WORD_FETCH_FAILED} title={(customerSubProbe.error ?? customerActiveProbe.error)?.message} />
           : customerSubProbe.loading || customerActiveProbe.loading

+ 3 - 3
web-scaffold/src/pages/OrganizationPages.tsx

@@ -1251,12 +1251,12 @@ export function PartnerManagementPage() {
                 >
                   <td className="org-directory-identity">
                     <span className="org-directory-name table-cell-title" title={p.name}>{p.name}</span>
-                    <small title={p.title || undefined}>{p.title || "未填写渠道说明"}</small>
+                    <small title={p.title || undefined}>{p.title || <span className="table-placeholder">未填写渠道说明</span>}</small>
                   </td>
                   <td title={regionName}>{regionName}</td>
                   <td>
                     <OrganizationAccountStatus status={p.account} />
-                    <small title={p.login || undefined}>{p.login || "尚未设置登录名"}</small>
+                    <small title={p.login || undefined}>{p.login || <span className="table-placeholder">尚未设置登录名</span>}</small>
                   </td>
                   <td>{p.shareMode}</td>
                   <td title={p.sharePending ? undefined : shareText(p)}>
@@ -1345,7 +1345,7 @@ export function OperationsTeamManagementPage() {
     <div className="org-maintenance-ledger-shell list-shell-fill">
       <div className="ops-toolbar"><SearchBox onChange={(value) => { setQuery(value); paging.resetPage(); }} placeholder="搜索团队名称、说明或负责范围" value={query} /><RegionSelect all data={data} onChange={(value) => { setRegionFilter(value); paging.resetPage(); }} value={regionFilter} />{(query || regionFilter) && <FilterResetButton variant="ghost" size="sm" onClick={() => { setQuery(""); setRegionFilter(""); paging.resetPage(); }}>重置筛选</FilterResetButton>}<FilterResetButton variant="ghost" size="sm" disabled={!teams.length} onClick={exportRows}><Download size={14} /> 导出 CSV</FilterResetButton></div>
       <div ref={tableOverflow.ref} tabIndex={0} role="region" aria-label="运营团队台账,可横向滚动查看字段" className={`measured-table-scroll org-table-wrap org-team-table-scroll${tableOverflow.overflow ? " has-horizontal-overflow" : ""}${tableOverflow.canScrollLeft ? " can-scroll-left" : ""}${tableOverflow.canScrollRight ? " can-scroll-right" : ""}`}><table className="org-table org-operations-ledger-table org-team-ledger"><OpsTableColumns widths={columnWidths} /><thead><tr><th className="sortable" aria-sort={sortAria("name")} onClick={() => toggleSort("name")}>团队 / 说明</th><th className="sortable" aria-sort={sortAria("region")} onClick={() => toggleSort("region")}>所属区域</th><th>分成规则</th><th>负责范围</th><th className="sortable" aria-sort={sortAria("coverage")} onClick={() => toggleSort("coverage")}>覆盖客户</th><th className="sortable" aria-sort={sortAria("members")} onClick={() => toggleSort("members")}>成员账号</th><th className="org-table-actions-heading">操作</th></tr></thead><tbody>{pageTeams.map((team) => {
-        return <tr key={team.id}><td><div className="org-operations-team-name"><strong className="table-cell-title" title={team.name}>{team.name}</strong>{team.hq && <OpsTag tone="brand">总部内置</OpsTag>}</div><small title={team.desc || "尚未填写团队说明"}>{team.desc || "尚未填写团队说明"}</small></td><td>{team.hq ? "总部 · 不限区域" : operationsRegionLabel(data, team.region)}</td><td className="org-maintenance-share"><strong>{shareText(team)}</strong><small>{team.shareMode}</small></td><td className="org-maintenance-scope-cell" title={scopeSummary(data, team.scope)}><TableValueText>{scopeSummary(data, team.scope)}</TableValueText></td><td className="org-directory-customer-count"><Count v={team.coverageCustomers} />{typeof team.coverageCustomers === "number" ? " 家" : null}</td><td className="org-directory-customer-count">{team.members.length || (team.memberCount ?? 0) > 0 ? <span className="org-member-count" title={team.membersPending || undefined}><span><Count v={team.memberCount} />{typeof team.memberCount === "number" ? " 个" : null}</span>{team.membersPending ? <span aria-label={team.membersPending} className="org-member-count-hint" role="img" title={team.membersPending}><Info aria-hidden="true" size={13} /></span> : null}</span> : <OrganizationAccountStatus status="未开通" />}</td><td className="org-table-actions-cell"><div className="org-table-actions is-icons"><Link className="org-maintenance-account-link" to={`/organization/operations-teams/${encodeURIComponent(team.id)}/accounts`}><UserRound size={15} />账号</Link>{!teamReadOnly && <OpsResponsiveActions expanded={expandedActions} items={[
+        return <tr key={team.id}><td><div className="org-operations-team-name"><strong className="table-cell-title" title={team.name}>{team.name}</strong>{team.hq && <OpsTag tone="brand">总部内置</OpsTag>}</div><small title={team.desc || "尚未填写团队说明"}>{team.desc || <span className="table-placeholder">尚未填写团队说明</span>}</small></td><td>{team.hq ? "总部 · 不限区域" : operationsRegionLabel(data, team.region)}</td><td className="org-maintenance-share"><strong>{shareText(team)}</strong><small>{team.shareMode}</small></td><td className="org-maintenance-scope-cell" title={scopeSummary(data, team.scope)}><TableValueText>{scopeSummary(data, team.scope)}</TableValueText></td><td className="org-directory-customer-count"><Count v={team.coverageCustomers} />{typeof team.coverageCustomers === "number" ? " 家" : null}</td><td className="org-directory-customer-count">{team.members.length || (team.memberCount ?? 0) > 0 ? <span className="org-member-count" title={team.membersPending || undefined}><span><Count v={team.memberCount} />{typeof team.memberCount === "number" ? " 个" : null}</span>{team.membersPending ? <span aria-label={team.membersPending} className="org-member-count-hint" role="img" title={team.membersPending}><Info aria-hidden="true" size={13} /></span> : null}</span> : <OrganizationAccountStatus status="未开通" />}</td><td className="org-table-actions-cell"><div className="org-table-actions is-icons"><Link className="org-maintenance-account-link" to={`/organization/operations-teams/${encodeURIComponent(team.id)}/accounts`}><UserRound size={15} />账号</Link>{!teamReadOnly && <OpsResponsiveActions expanded={expandedActions} items={[
           { label: "编辑团队", shortLabel: "编辑", icon: <PencilLine size={15} />, onSelect: () => setEditor({ kind: "operations", id: team.id }) },
           ...(!team.hq ? [{ label: "删除团队", shortLabel: "删除", danger: true, icon: <Trash2 size={15} />, onSelect: () => setDeleteId(team.id) }] : []),
         ]} />}</div></td></tr>;

+ 13 - 13
web-scaffold/src/pages/PartyViewPages.tsx

@@ -843,7 +843,7 @@ export function PartyContractListPage({ kind }: { kind: "partner" | "operator" }
                     <td className="ops-mono">{row.contract_no}</td>
                     <td>{contractNameOf(row)}</td>
                     <td>{row.customer_name ?? <Tri tone="missing" text={WORD_NOT_PROVIDED} />}</td>
-                    <td>{row.start_date ?? "—"} ~ {row.end_date ?? "—"}</td>
+                    <td>{row.start_date ?? <span className="table-placeholder">—</span>} ~ {row.end_date ?? <span className="table-placeholder">—</span>}</td>
                     <td><OpsTag tone="neutral">{row.status}</OpsTag></td>
                     <td><Link className="workspace-link" to={`${prefix}/contract/${encodeURIComponent(row.contract_id)}`}>查看</Link></td>
                   </tr>
@@ -901,10 +901,10 @@ export function PartyCustomerDetailPage({ kind }: { kind: "partner" | "operator"
               <tr><th>客户名称</th><td>{data.customer.customer_name}</td></tr>
               <tr><th>主体类型</th><td>{label(SUBJECT_TYPE, data.customer.subject_type)}</td></tr>
               <tr><th>服务开通状态</th><td>{label(ACCT_STATUS, data.customer.acct_status)}</td></tr>
-              <tr><th>归属运营商</th><td>{data.customer.operator_name ?? "—"}</td></tr>
-              <tr><th>归属合伙人</th><td>{data.customer.partner_name ?? "—"}</td></tr>
+              <tr><th>归属运营商</th><td>{data.customer.operator_name ?? <span className="table-placeholder">—</span>}</td></tr>
+              <tr><th>归属合伙人</th><td>{data.customer.partner_name ?? <span className="table-placeholder">—</span>}</td></tr>
               <tr><th>下属分账号</th><td className="table-number">{data.sub_account_count}</td></tr>
-              <tr><th>建档时间</th><td>{data.customer.created_at ?? "—"}</td></tr>
+              <tr><th>建档时间</th><td>{data.customer.created_at ?? <span className="table-placeholder">—</span>}</td></tr>
             </tbody>
           </table>
         </div>
@@ -929,12 +929,12 @@ export function PartyContractDetailPage({ kind }: { kind: "partner" | "operator"
           <table className="ops-table">
             <tbody>
               <tr><th>合同编号</th><td className="ops-mono">{data.contract_no}</td></tr>
-              <tr><th>客户名称</th><td>{data.customer_name ?? "—"}</td></tr>
-              <tr><th>合同期间</th><td>{data.start_date ?? "—"} ~ {data.end_date ?? "—"}</td></tr>
+              <tr><th>客户名称</th><td>{data.customer_name ?? <span className="table-placeholder">—</span>}</td></tr>
+              <tr><th>合同期间</th><td>{data.start_date ?? <span className="table-placeholder">—</span>} ~ {data.end_date ?? <span className="table-placeholder">—</span>}</td></tr>
               <tr><th>状态</th><td>{data.status}</td></tr>
-              <tr><th>合同类型</th><td>{data.contract_type ? (CONTRACT_TYPE_LABEL[data.contract_type] ?? data.contract_type) : "—"}</td></tr>
-              <tr><th>签署日期</th><td>{data.sign_date ?? "—"}</td></tr>
-              <tr><th>服务期(月)</th><td>{data.service_months ?? "—"}</td></tr>
+              <tr><th>合同类型</th><td>{data.contract_type ? (CONTRACT_TYPE_LABEL[data.contract_type] ?? data.contract_type) : <span className="table-placeholder">—</span>}</td></tr>
+              <tr><th>签署日期</th><td>{data.sign_date ?? <span className="table-placeholder">—</span>}</td></tr>
+              <tr><th>服务期(月)</th><td>{data.service_months ?? <span className="table-placeholder">—</span>}</td></tr>
               <tr><th>合同金额</th><td className="table-number">{moneyFromCents(data.contract_amount_cents)}</td></tr>
             </tbody>
           </table>
@@ -978,12 +978,12 @@ export function PartyBillDetailPage({ kind }: { kind: ViewKind }) {
               <tr><th>客户名称</th><td>{data.customer_name}</td></tr>
               <tr><th>套餐</th><td>{data.subscription_label}</td></tr>
               {/* ① 尾月对齐前后两值同屏 */}
-              <tr><th>计费标准单价</th><td className="table-number">{data.settle_std_cents == null ? "—" : moneyFromCents(data.settle_std_cents)}</td></tr>
-              <tr><th>订阅份数</th><td className="table-number">{data.quantity == null ? "—" : data.quantity}</td></tr>
+              <tr><th>计费标准单价</th><td className="table-number">{data.settle_std_cents == null ? <span className="table-placeholder">—</span> : moneyFromCents(data.settle_std_cents)}</td></tr>
+              <tr><th>订阅份数</th><td className="table-number">{data.quantity == null ? <span className="table-placeholder">—</span> : data.quantity}</td></tr>
               <tr><th>尾月对齐前</th><td className="table-number">{moneyFromCents(data.pre_align_cents)}</td></tr>
               <tr><th>应结金额(对齐后)</th><td><strong className="table-number">{moneyFromCents(data.receivable_cents)}</strong></td></tr>
               {/* ② 计费区间与天数 */}
-              <tr><th>计费区间</th><td>{(data.bill_from || data.bill_to) ? `${data.bill_from || "—"} ~ ${data.bill_to || "—"}` : "—"}({data.billing_days} 天{data.month_days != null ? `/${data.month_days}` : ""}{data.partial_month ? ",不满月" : ""})</td></tr>
+              <tr><th>计费区间</th><td>{(data.bill_from || data.bill_to) ? `${data.bill_from || "—"} ~ ${data.bill_to || "—"}` : <span className="table-placeholder">—</span>}({data.billing_days} 天{data.month_days != null ? `/${data.month_days}` : ""}{data.partial_month ? ",不满月" : ""})</td></tr>
               <tr><th>成本实扣</th><td>{moneyFromCents(data.cost_deduct_cents ?? (data.receivable_cents - data.share_base_cents))}{(data.cost_should_deduct_cents != null && data.cost_deduct_cents != null && data.cost_should_deduct_cents > data.cost_deduct_cents) || data.base_floor_protected ? "(已按应收封顶)" : ""}</td></tr>
               {/* ④ 分成基数 */}
               <tr><th>分成基数</th><td><span className="table-number">{moneyFromCents(data.share_base_cents)}</span>{data.base_floor_protected ? "(已按下限保护取 0)" : ""}</td></tr>
@@ -1001,7 +1001,7 @@ export function PartyBillDetailPage({ kind }: { kind: ViewKind }) {
                       ? WORD_NOT_PROVIDED
                       : data.account_days.length
                         ? data.account_days.map((a) => `${a.sub_account_label} ${a.in_period_days} 天`).join(";")
-                        : "—"}
+                        : <span className="table-placeholder">—</span>}
                 </td>
               </tr>
             </tbody>

+ 3 - 3
web-scaffold/src/pages/ScheduledJobManagementPage.tsx

@@ -425,16 +425,16 @@ export function ScheduledJobManagementPage() {
           )}
         </td>
         <td>
-          {row.annotation ? "—" : row.lastRunAt ? (
+          {row.annotation ? <span className="table-placeholder">—</span> : row.lastRunAt ? (
             <>
               <time dateTime={row.lastRunAt} className="job-ledger-time">{lastRun.date} {lastRun.time}</time>
               <small>耗时 {fmtDurationMs(row.lastDurationMs)}</small>
             </>
           ) : NEVER_RUN}
         </td>
-        <td>{row.lastStatus && !row.annotation ? <RunStatus row={row} /> : "—"}</td>
+        <td>{row.lastStatus && !row.annotation ? <RunStatus row={row} /> : <span className="table-placeholder">—</span>}</td>
         <td>
-          {row.annotation ? "—" : counts ? (
+          {row.annotation ? <span className="table-placeholder">—</span> : counts ? (
             <span className="job-ledger-counts ops-mono table-number">
               {counts.scanned}{" / "}{counts.matched}{" / "}{counts.succeeded}{" / "}{counts.skipped}{" / "}
               <span className={counts.failed > 0 ? "is-failed" : undefined}>{counts.failed}</span>

+ 3 - 3
web-scaffold/src/pages/SettlementPages.tsx

@@ -157,10 +157,10 @@ export function ShareRulePage() {
       <div ref={tableOverflow.ref} tabIndex={0} role="region" aria-label="分成方台账,可横向滚动查看字段" className={`measured-table-scroll ops-table-wrap share-ledger-scroll${tableOverflow.overflow ? " has-horizontal-overflow" : ""}${tableOverflow.width >= 640 ? " can-pin-identity" : ""}${tableOverflow.canScrollLeft ? " can-scroll-left" : ""}${tableOverflow.canScrollRight ? " can-scroll-right" : ""}`}><table className="ops-table share-ledger"><OpsTableColumns widths={columnWidths} /><thead><tr><th>序号</th><th>分成方</th><th>所属区域</th><th>分成方类型</th><th>分成规则</th><th>状态</th><th>分成客户</th><th>操作</th></tr></thead><tbody>{pageRows.map((row, index) => <tr key={row.id}>
           <td><span className="ops-mono table-number">{String(paging.safePage * paging.pageSize + index + 1).padStart(2, "0")}</span></td>
           <td><strong className="table-cell-title" title={row.displayName}>{row.displayName}</strong><small title={row.note}>{row.note}</small></td>
-          <td><span title={row.regionLabel}>{row.regionLabel || "—"}</span></td>
+          <td><span title={row.regionLabel}>{row.regionLabel || <span className="table-placeholder">—</span>}</span></td>
           <td><OpsTag tone={row.type === "合伙人" ? "brand" : row.type === "运营商" ? "info" : "neutral"}>{row.type}</OpsTag></td>
           <td title={termsTitle(row)}>{termsCell(row)}</td>
-          <td>{rowConfigured(row) ? <OpsStatus tone="success">已配分成</OpsStatus> : <small>未配分成</small>}</td>
+          <td>{rowConfigured(row) ? <OpsStatus tone="success">已配分成</OpsStatus> : <small className="table-placeholder">未配分成</small>}</td>
           <td><span className="ops-money">{row.customerCount}</span></td>
           <td><button type="button" className="ops-table-action" onClick={() => setDetail(row)} title="契约 14.2:弹窗出四卡+取值摘要(只读),配置分成请点弹窗里的「去档案里配置分成」">分成金额 <ArrowRight size={14} /></button></td>
         </tr>)}{!filtered.length && <OpsTableEmpty colSpan={8}>{rows.length ? "没有符合筛选条件的分成方,可重置四组筛选" : "第 1 册档案里还没有运营商/合伙人/运维团队(分成方行源为空)"}</OpsTableEmpty>}</tbody></table></div>
@@ -490,7 +490,7 @@ function BillingOperatorRow({ row, defaultDay, canSave, onSave }: {
   const rowWritable = Boolean(row.brand && row.region_node_id);
   return (
     <tr>
-      <td><strong className="table-cell-title" title={row.name}>{row.name}</strong><small title={row.region_label ?? ""}>{row.region_label ?? "—"}</small></td>
+      <td><strong className="table-cell-title" title={row.name}>{row.name}</strong><small title={row.region_label ?? ""}>{row.region_label ?? <span className="table-placeholder">—</span>}</small></td>
       <td>
         <label className="billing-field">
           <span className="sr-only">{row.name}对账日</span>

+ 7 - 7
web-scaffold/src/pages/SettlementRecordPages.tsx

@@ -388,11 +388,11 @@ export function SettlementStatementListPage() {
                   {data.progress.items.map((item) => (
                     <tr key={`${item.holder_type}-${item.holder_id}`}>
                       <td><OpsTag tone={holderTone[item.holder_type]}>{HOLDER_TYPE_TEXT[item.holder_type]}</OpsTag> {item.holder_name}</td>
-                      <td>{item.region_label ?? "—"}</td>
+                      <td>{item.region_label ?? <span className="table-placeholder">—</span>}</td>
                       <td>{item.recon_day} 日</td>
                       <td>{item.expected_date}</td>
                       <td>{item.status}</td>
-                      <td className="ops-mono">{item.batch_no ?? "—"}</td>
+                      <td className="ops-mono">{item.batch_no ?? <span className="table-placeholder">—</span>}</td>
                     </tr>
                   ))}
                 </tbody>
@@ -713,7 +713,7 @@ function BatchDetailBody({ d, isAdmin, onRerun, onExport, onCorrect, lineState }
                   <td className="table-number">{settleTextFromSnapshot(line.share_mode, line.share_value)}</td>
                   <td><strong className="reconcile-money">{moneyFromCents(line.share_amount_cents)}</strong></td>
                   {/* zero_note 如实展示并解释为什么是 0(⛔ 隐藏 0 金额行)。 */}
-                  <td>{line.zero_note ? ZERO_NOTE_TEXT[line.zero_note] : "—"}</td>
+                  <td>{line.zero_note ? ZERO_NOTE_TEXT[line.zero_note] : <span className="table-placeholder">—</span>}</td>
                   <td>
                     <Link className="ops-table-action" to={`/settlement-bills/${encodeURIComponent(line.bill_detail_id)}`} state={lineState}>
                       详情
@@ -942,9 +942,9 @@ export function SettlementBillRecordPage() {
                       return (
                       <tr key={`${cost.item_name}-${i}`}>
                         <td>{cost.item_name}{!cost.configured && <OpsTag tone="warning">未配置</OpsTag>}</td>
-                        <td><span className="ops-money table-number">{price == null ? "—" : moneyFromCents(price)}</span></td>
-                        <td>{cost.multiplier == null ? "—" : <span className="table-number">{cost.multiplier}</span>}</td>
-                        <td><span className="ops-money table-number">{should == null ? "—" : moneyFromCents(should)}</span></td>
+                        <td><span className="ops-money table-number">{price == null ? <span className="table-placeholder">—</span> : moneyFromCents(price)}</span></td>
+                        <td>{cost.multiplier == null ? <span className="table-placeholder">—</span> : <span className="table-number">{cost.multiplier}</span>}</td>
+                        <td><span className="ops-money table-number">{should == null ? <span className="table-placeholder">—</span> : moneyFromCents(should)}</span></td>
                       </tr>
                       );
                     })}
@@ -1003,7 +1003,7 @@ export function SettlementBillRecordPage() {
                               {p.batch_no} <ArrowRight size={14} />
                             </Link>
                           ) : (
-                            <span className="ops-mono">{p.batch_no ?? "—"}</span>
+                            <span className="ops-mono">{p.batch_no ?? <span className="table-placeholder">—</span>}</span>
                           )}
                         </td>
                       </tr>

+ 1 - 1
web-scaffold/src/pages/TeamQueuePage.tsx

@@ -150,7 +150,7 @@ export function QueueBoard({ teamId, teamName, showTeamColumn = false, canAutoDi
           {rows.map((item) => <tr key={item.ticket_id}>
             <td><Link className="workspace-link" to={`/work-orders/${encodeURIComponent(item.ticket_id)}`} state={{ from: location.pathname + location.search }}>{item.ticket_no ?? "未编号"}</Link><small>{item.customer_name ?? "-"}</small></td>
             <td><OpsTag tone="brand">{typeLabel(item.ticket_type)}</OpsTag><small>{statusLabel(item.status, item.ticket_type)}</small></td>
-            {showTeamColumn && <td>{item.team_name ?? "未分派团队"}</td>}
+            {showTeamColumn && <td>{item.team_name ?? <span className="table-placeholder">未分派团队</span>}</td>}
             <td className="wrap"><span>{item.title ?? "-"}</span>{item.overdue_7d && <small className="workspace-danger">超期/临期(7 日内)</small>}</td>
             <td>{fmtTime(item.created_at)}</td>
             <td><div className="workspace-actions"><button className="workspace-link" onClick={() => void openAssign(item)}><UserRoundCheck size={15} />指定成员</button><Link className="workspace-link" to={`/work-orders/${encodeURIComponent(item.ticket_id)}`} state={{ from: location.pathname + location.search }}>详情</Link></div></td>

+ 1 - 1
web-scaffold/src/pages/TeamWorkspacePages.tsx

@@ -32,7 +32,7 @@ export function TeamMembersPage() {
     <div className="workspace-metrics"><div className="workspace-metric"><span>团队成员</span><strong>{team.members.length}</strong></div><div className="workspace-metric"><span>团队覆盖客户</span><strong>{covered.length}</strong></div><div className="workspace-metric"><span>分派方式</span><strong className="!text-xl">{team.mode}</strong></div></div>
     <WorkspacePanel className="list-shell-fill" title="团队成员" description="跟着团队走、指定区域、点客户清单三种负责范围在成员编辑中配置。" aside={<span className="workspace-link">点「编辑成员」配置负责范围(团队长自助)</span>}>
       <div className="workspace-toolbar"><WorkspaceSearch placeholder="搜索成员、工单类型或负责客户" value={query} onChange={(value) => { setQuery(value); paging.resetPage(); }} />{query && <Button variant="ghost" size="sm" onClick={() => { setQuery(""); paging.resetPage(); }}>重置筛选</Button>}</div>
-      <div className="workspace-table-wrap measured-table-scroll"><table className="workspace-table"><thead><tr><th>成员</th><th>可处理工单类型</th><th>负责范围</th><th>未完成工单</th><th>操作</th></tr></thead><tbody>{pageRows.map((member) => { const coveredCount = memberCoveredIndexes(organization, team, member).length; return <tr key={member.id}><td><strong>{member.name}</strong><small>{member.login || "尚未开通"}</small></td><td className="wrap">{(member.ticketTypes ?? []).map(typeLabel).join("、") || "未配置"}</td><td className="wrap"><strong>{member.scopeMode === "follow_team" ? "跟着团队走" : member.scopeMode === "region" ? "指定区域" : "点客户清单"} · {coveredCount} 家</strong></td><td>{member.openTickets === null ? <Tri tone="fail" text="取数失败" title="成员未完成工单取数失败(ops_team/get_list@v1 的 member_load_pending)" /> : member.openTickets === undefined ? <Tri tone="missing" text="后端未下发" title="该版本 ops_team/get_list@v1 未下发成员级 open_tickets" /> : `${member.openTickets} 张`}</td><td><Button variant="ghost" size="sm" onClick={() => setEditMemberId(member.id)}>编辑成员<ArrowRight size={14} /></Button></td></tr>; })}</tbody></table>{!filtered.length && <WorkspaceEmpty title="没有匹配的成员" />}</div>
+      <div className="workspace-table-wrap measured-table-scroll"><table className="workspace-table"><thead><tr><th>成员</th><th>可处理工单类型</th><th>负责范围</th><th>未完成工单</th><th>操作</th></tr></thead><tbody>{pageRows.map((member) => { const coveredCount = memberCoveredIndexes(organization, team, member).length; return <tr key={member.id}><td><strong>{member.name}</strong><small>{member.login || <span className="table-placeholder">尚未开通</span>}</small></td><td className="wrap">{(member.ticketTypes ?? []).map(typeLabel).join("、") || <span className="table-placeholder">未配置</span>}</td><td className="wrap"><strong>{member.scopeMode === "follow_team" ? "跟着团队走" : member.scopeMode === "region" ? "指定区域" : "点客户清单"} · {coveredCount} 家</strong></td><td>{member.openTickets === null ? <Tri tone="fail" text="取数失败" title="成员未完成工单取数失败(ops_team/get_list@v1 的 member_load_pending)" /> : member.openTickets === undefined ? <Tri tone="missing" text="后端未下发" title="该版本 ops_team/get_list@v1 未下发成员级 open_tickets" /> : `${member.openTickets} 张`}</td><td><Button variant="ghost" size="sm" onClick={() => setEditMemberId(member.id)}>编辑成员<ArrowRight size={14} /></Button></td></tr>; })}</tbody></table>{!filtered.length && <WorkspaceEmpty title="没有匹配的成员" />}</div>
       <ListPager total={filtered.length} page={paging.safePage} pageSize={paging.pageSize} onPageChange={paging.setPage} unit="人" />
     </WorkspacePanel>
     {editMemberId && (() => { const member = team.members.find((item) => item.id === editMemberId); return member ? <MemberEditDialog team={team} member={member} onClose={() => setEditMemberId(null)} /> : null; })()}

+ 2 - 2
web-scaffold/src/pages/WorkOrderDeliveryPage.tsx

@@ -118,9 +118,9 @@ function DeliveryList({ tab, page, onPageChange }: { tab: Exclude<DeliveryTab, "
         <td><Link className="work-order-ticket-link" to={`/work-orders/${encodeURIComponent(row.ticket_id)}`} state={{ from: `/work-orders/delivery?tab=${tab}` }}>{row.ticket_no ?? "-"}</Link><small>{row.customer_name ?? "-"}</small></td>
         <td><TicketTypeTag type={row.ticket_type} /></td>
         <td>{row.assignee_name ?? "待分派"}</td>
-        <td>{row.team_name ?? "未分派团队"}</td>
+        <td>{row.team_name ?? <span className="table-placeholder">未分派团队</span>}</td>
         <td>{fmtTime(row.completed_at)}</td>
-        <td><span>{row.expected_done_date ? row.expected_done_date.slice(0, 10) : "—"}</span>{row.overdue_7d && <small className="work-order-overdue-text">超期/临期</small>}</td>
+        <td><span>{row.expected_done_date ? row.expected_done_date.slice(0, 10) : <span className="table-placeholder">—</span>}</span>{row.overdue_7d && <small className="work-order-overdue-text">超期/临期</small>}</td>
         <td>{tab === "receipt" ? (mainline ? "确认后闭环" : "等客户确认") : "同号覆盖重推"}</td>
         <td>{tab === "receipt"
           ? mainline

+ 73 - 82
web-scaffold/src/pages/WorkOrderManagementPage.tsx

@@ -1,13 +1,12 @@
-import { useHorizontalOverflow } from "../lib/use-horizontal-overflow";
 import { PageIntro } from "../components/PageIntro";
-import { OpsNotice, OpsTableColumns } from "../components/OperationsKit";
+import { OpsNotice } from "../components/OperationsKit";
 import { FilterSelect } from "../components/ui/filter-select";
 import { DateRangeFilter } from "../components/ui/date-range-filter";
 import { TicketState } from "../components/ticketState";
-import { TicketStatusTag, TicketTypeTag } from "../components/work-order/TicketBadges";
+import { WorkOrderLedgerList } from "../components/work-order/WorkOrderLedgerList";
 import { useEffect, useRef, useState, type FormEvent, type ReactNode } from "react";
 import {
-  Check, Clock3, Info, Plus, Search, X,
+  ArrowRight, Check, ClipboardCheck, ClipboardList, Clock3, Inbox, Info, Plus, Search, X,
 } from "lucide-react";
 import { Button } from "../components/ui/button";
 import { Input } from "../components/ui/input";
@@ -19,22 +18,20 @@ import {
   ticketCreate,
   TICKET_STATUSES, TICKET_TYPES, typeLabel, statusFilterLabel,
 } from "../lib/api/ticket";
-import { classifyTicketError, fmtTime, TICKET_PAGE_SIZE, useTicketList, useTodoCounts } from "../lib/ticket";
+import { classifyTicketError, TICKET_PAGE_SIZE, useTicketList, useTodoCounts } from "../lib/ticket";
 import { useTicketStatusCounts } from "../lib/work-order-counts";
-import { nextStepOf } from "../lib/work-order-next-step";
-import { todoRowDueOn } from "../lib/work-order-todo-row";
 import { useSubmit } from "../lib/useLoad";
 import { fetchAllPages } from "../lib/fetch-all-pages";
 import { LIST_PAGE_SIZE } from "../lib/list-paging";
 import { useDemoIdentity } from "../lib/demo-session";
-import { ServerListPager } from "../components/ListPager";
+import { ListPager } from "../components/ListPager";
 import "../styles/operations.css";
+import "../styles/orders.css";
 import "../styles/work-orders.css";
+import "../styles/work-order-ledger.css";
 
-/** 状态 Tab 的次序(与参考界面「阶段即导航」一致):终态放最后且不显示计数。 */
+/** 状态页签按处理阶段排列,终态放最后。 */
 const TAB_ORDER = ["unassigned", "pending", "processing", "completed", "rejected", "settled", "terminated"] as const;
-/** 只对「在办 + 待回执」取计数:已办结/已作废数量无运营意义,且会多打两次接口。 */
-const COUNTED_STATUSES = ["unassigned", "pending", "processing", "completed", "rejected"] as const;
 /**
  * `completed` 在跨类型视图(状态 Tab/筛选器/当前视图 chip)里只写短名「待确认」
  * (业主 2026-11-18 二次定案:两半全名拼起来撑破 Tab 行):两类行内叫法
@@ -149,18 +146,6 @@ function multiOf(params: URLSearchParams, key: string): string[] {
 
 /** 全部工单台账(真接口:`/ticket/list@v1` 服务端分页+`/ticket/todo_counts@v1`)。 */
 export function WorkOrderLedgerPage() {
-  const tableOverflow = useHorizontalOverflow();
-  /** 九列:序号、工单/客户、类型、状态、责任人/团队、截止、下一步、创建时间、操作。 */
-  const minimumWidths = [56, 230, 110, 116, 150, 112, 168, 128, 84];
-  const tableWidth = Math.max(1320, tableOverflow.width);
-  const columnAt = (minimum: number, index: number, level: number) => [0, 1, 8].includes(index) ? minimum : Math.max(minimum, level * (index === 1 ? 1.3 : 1));
-  let lower = 0, upper = tableWidth;
-  for (let step = 0; step < 32; step++) {
-    const level = (lower + upper) / 2;
-    if (minimumWidths.reduce((total, minimum, index) => total + columnAt(minimum, index, level), 0) > tableWidth) upper = level;
-    else lower = level;
-  }
-  const columnWidths = minimumWidths.map((minimum, index) => columnAt(minimum, index, lower));
   const identity = useDemoIdentity();
   /**
    * 客户角色(enterprise/sub)在**路由层**就被 `/workspace/progress` 接走(`app/App.tsx`
@@ -208,7 +193,7 @@ export function WorkOrderLedgerPage() {
     return () => window.clearTimeout(t);
   }, []);
   const counts = useTodoCounts(!clientView && deferSecondary);
-  const statusCounts = useTicketStatusCounts(deferSecondary && !clientView ? COUNTED_STATUSES : []);
+  const statusCounts = useTicketStatusCounts(deferSecondary && !clientView ? TAB_ORDER : []);
   const reloadAll = () => { list.reload(); counts.reload(); statusCounts.reload(); };
 
   useEffect(() => {
@@ -216,12 +201,12 @@ export function WorkOrderLedgerPage() {
     if (ticket) navigate(`/work-orders/${encodeURIComponent(ticket)}`, { replace: true, state: { from: location.pathname + location.search } });
   }, [navigate, params, location.pathname]);
 
-  /** 写多值参数:空数组=删键;`keepPage=false` 时回到第 1 页(换筛选必须回首页)。 */
-  function setMulti(key: string, values: string[], keepPage = false) {
+  /** 更新多值筛选并回到第 1 页。 */
+  function setMulti(key: string, values: string[]) {
     const next = new URLSearchParams(params);
     next.delete(key);
     if (values.length) next.set(key, values.join(","));
-    if (!keepPage) next.delete("page");
+    next.delete("page");
     setParams(next);
   }
 
@@ -238,38 +223,72 @@ export function WorkOrderLedgerPage() {
   const pages = Math.max(1, Math.ceil(total / TICKET_PAGE_SIZE));
   const currentPage = Math.min(page, pages);
   const fail = list.error ? classifyTicketError(list.error) : null;
-  const summary = counts.data;
-  const messagePending = summary?.item_4_message_pending ?? 0;
+  const summary = counts.error ? null : counts.data;
+  const visibleCounts = statusCounts.error ? null : statusCounts.data;
+  const overdue = typeof summary?.item_1_pending_exec_overdue === "number" && typeof summary.item_2_service_open_incomplete === "number"
+    ? summary.item_1_pending_exec_overdue + summary.item_2_service_open_incomplete
+    : undefined;
+  const messagePending = summary?.item_4_message_pending;
   const activeTab = statuses.length === 1 ? statuses[0] : "";
   const filtered = Boolean(query || types.length || statuses.length || from || to);
-  const countOf = (status: string) => statusCounts.data?.[status];
+  const fromList = location.pathname + location.search;
+  const numberOf = (value: number | undefined, loading: boolean) =>
+    typeof value === "number" && Number.isSafeInteger(value) && value >= 0
+      ? value.toLocaleString("zh-CN")
+      : loading ? "…" : "—";
+  const allCount = numberOf(visibleCounts?.total, statusCounts.loading);
+  const listState = list.loading ? (
+    <div className="order-empty" role="status">正在读取工单台账…</div>
+  ) : fail ? (
+    <TicketState fail={fail} onRetry={list.reload} />
+  ) : !rows.length ? (
+    <div className="order-empty">
+      <Search size={26} aria-hidden="true" />
+      <h3>{filtered ? "没有匹配的工单" : "暂无工单"}</h3>
+      {filtered && <Button variant="ghost" size="sm" onClick={() => setParams(new URLSearchParams())}>重置筛选</Button>}
+    </div>
+  ) : null;
 
-  return <section className="work-order-page work-order-ledger-page page-fill page-fill-window">
-    <header className="work-order-heading">
-      <div><p className="work-order-eyebrow"><span /> SERVICE OPERATIONS / 业务执行</p><h1>{clientView ? "工单进度" : "全部工单"}</h1><PageIntro>{clientView ? "跟进已提交的服务申请或故障报修,了解处理到了哪一步。" : "从派单到完工,随时查到每张工单由谁处理、进行到了哪一步。"}</PageIntro></div>
+  return <section className="order-page work-order-ledger page-fill page-fill-window">
+    <header className="order-heading">
+      <div><h1>{clientView ? "工单进度" : "全部工单"}</h1><PageIntro>{clientView ? "跟进已提交的服务申请或故障报修,了解处理到了哪一步。" : "查询工单进度、责任团队和处理期限,从列表进入下一步办理。"}</PageIntro></div>
       {!clientView && <Button onClick={() => setEditorOpen(true)}><Plus size={17} />代客建单</Button>}
     </header>
-    {/* 三张卡都是入口:⛔ 只出数字不给去处。报文卡原先开弹窗,现改跳「交付与回执」的报文 Tab。 */}
-    {/* 客户角色不渲染(口径与去处都属运营侧):见 `useTodoCounts(!clientView)` 注释。 */}
-    {!clientView && <div className="work-order-ledger-alerts" aria-label="工单待办计数">
-      <Link className="work-order-alert-link" to="/work-orders/overview" title="开户/到期停机/服务停用/变更协议尚未回填出开停事实,期限日已过(开通类按订阅服务开始日、次日起计;停机类按建单日+7、当天计)"><span>超期未处理完</span><strong>{summary ? summary.item_1_pending_exec_overdue : "—"}</strong><small>开停类逾期未回填 · 去总览</small></Link>
-      <Link className="work-order-alert-link" to="/work-orders?type=service_open&status=unassigned,pending,processing" title="超期的开通单(待派单/待处理/处理中)"><span>服务开通在办</span><strong>{summary ? summary.item_2_service_open_incomplete : "—"}</strong><small>超期开通单 · 去筛选</small></Link>
-      <Link className={`work-order-alert-link${messagePending > 0 ? " is-danger" : ""}`} to="/work-orders/delivery?tab=messages" title={messagePending > 0 ? "有未归属或待确认的运营商报文,去交付与回执处置" : "当前没有待处置报文"}><span>待处置报文</span><strong>{summary ? summary.item_4_message_pending : "—"}</strong><small>{messagePending > 0 ? "未归集或待确认 · 去处置" : "未归集或待确认"}</small></Link>
+    {!clientView && <div className="work-order-ledger-summary" role="group" aria-label="当前账号可见范围内的工单统计">
+      <div className="work-order-metric work-order-metric-total">
+        <span className="work-order-metric-icon"><ClipboardList size={19} aria-hidden="true" /></span>
+        <span className="work-order-metric-body"><span>工单总量</span><strong>{allCount}</strong><small>当前账号可见范围</small></span>
+      </div>
+      <Link className="work-order-metric" to="/work-orders/overview" data-tone={overdue ? "warning" : undefined}>
+        <span className="work-order-metric-icon"><Clock3 size={18} aria-hidden="true" /></span>
+        <span className="work-order-metric-body"><span>超期未完成</span><strong>{numberOf(overdue, counts.loading)}</strong><small>开停未回填及超期开通单</small></span>
+        <ArrowRight className="work-order-metric-arrow" size={14} aria-hidden="true" />
+      </Link>
+      <button className="work-order-metric" type="button" onClick={() => setMulti("status", ["completed"])} aria-pressed={activeTab === "completed"}>
+        <span className="work-order-metric-icon"><ClipboardCheck size={18} aria-hidden="true" /></span>
+        <span className="work-order-metric-body"><span>待确认</span><strong>{numberOf(visibleCounts?.completed, statusCounts.loading)}</strong><small>等运营商回执或提交方确认</small></span>
+        <ArrowRight className="work-order-metric-arrow" size={14} aria-hidden="true" />
+      </button>
+      <Link className="work-order-metric" to="/work-orders/delivery?tab=messages" data-tone={messagePending ? "danger" : undefined}>
+        <span className="work-order-metric-icon"><Inbox size={18} aria-hidden="true" /></span>
+        <span className="work-order-metric-body"><span>待处置报文</span><strong>{numberOf(messagePending, counts.loading)}</strong><small>未归集或待确认</small></span>
+        <ArrowRight className="work-order-metric-arrow" size={14} aria-hidden="true" />
+      </Link>
     </div>}
-    <div className="work-order-list-shell list-shell-fill">
-      {/* 状态=横向 Tab(阶段即导航):点一下就是一次筛选,计数取服务端 total。 */}
-      <div className="work-order-tabs" role="tablist" aria-label="按状态筛选">
-        <button type="button" role="tab" aria-selected={!activeTab} className={!activeTab ? "active" : ""} onClick={() => setMulti("status", [])}>全部</button>
-        {TAB_ORDER.map((status) => {
-          const counted = (COUNTED_STATUSES as readonly string[]).includes(status);
-          const value = counted ? countOf(status) : undefined;
-          return <button key={status} type="button" role="tab" aria-selected={activeTab === status} className={activeTab === status ? "active" : ""} title={status === "completed" ? COMPLETED_SCOPE_HINT : undefined} onClick={() => setMulti("status", activeTab === status ? [] : [status])}>
-            {statusFilterLabel(status)}{value !== undefined && <span>{statusCounts.loading ? "…" : value}</span>}
-          </button>;
-        })}
+    <div className="order-list-shell list-shell-fill">
+      <div className="order-tabs" role="group" aria-label="按工单状态筛选" aria-describedby={clientView ? undefined : "work-order-count-scope"}>
+        {!clientView && <span id="work-order-count-scope" className="sr-only">角标为当前账号可见范围内的工单数,列表筛选结果以分页总数为准。</span>}
+        <button type="button" aria-pressed={!statuses.length} className={!statuses.length ? "active" : ""} onClick={() => setMulti("status", [])}>
+          全部状态{!clientView && <span>{allCount}</span>}
+        </button>
+        {TAB_ORDER.map((status) => (
+          <button key={status} type="button" aria-pressed={activeTab === status} className={activeTab === status ? "active" : ""} title={status === "completed" ? COMPLETED_SCOPE_HINT : undefined} onClick={() => setMulti("status", [status])}>
+            {statusFilterLabel(status)}{!clientView && <span>{numberOf(visibleCounts?.[status], statusCounts.loading)}</span>}
+          </button>
+        ))}
       </div>
-      <div className="work-order-ledger-filters">
-        <label className="work-order-ledger-search"><Search size={17} /><SearchInput aria-label="搜索工单" placeholder="搜索工单号、工单ID、标题或客户" value={query} onCommit={(value) => patchParams("q", [value])} />{query && <button type="button" aria-label="清空搜索" onClick={() => patchParams("q", [])}><X size={15} /></button>}</label>
+      <div className="ops-toolbar order-filters">
+        <label className="ops-search order-search"><Search size={17} /><SearchInput aria-label="搜索工单" placeholder="搜索工单号、工单ID、标题或客户" value={query} onCommit={(value) => patchParams("q", [value])} />{query && <button type="button" aria-label="清空搜索" onClick={() => patchParams("q", [])}><X size={15} /></button>}</label>
         <FilterSelect icon="type" aria-label="工单类型筛选" value={types.length === 1 ? types[0] : ""} onChange={(event) => setMulti("type", event.target.value ? [...new Set([...types, event.target.value])] : [])}>
           <option value="">{types.length > 1 ? `已选 ${types.length} 个类型` : "全部类型"}</option>
           {TICKET_TYPES.map((t) => <option key={t} value={t}>{typeLabel(t)}</option>)}
@@ -288,37 +307,9 @@ export function WorkOrderLedgerPage() {
         {statuses.map((s) => <button key={`s-${s}`} type="button" onClick={() => setMulti("status", statuses.filter((v) => v !== s))}>{statusFilterLabel(s)}<X size={13} /></button>)}
         <button type="button" className="is-clear" onClick={() => { const next = new URLSearchParams(); setParams(next); }}>清除全部</button>
       </div>}
-      <div ref={tableOverflow.ref} className={`measured-table-scroll work-order-table-wrap ticket-ledger-scroll${tableOverflow.overflow ? " has-horizontal-overflow" : ""}${tableOverflow.width >= 640 ? " can-pin-identity" : ""}${tableOverflow.canScrollLeft ? " can-scroll-left" : ""}${tableOverflow.canScrollRight ? " can-scroll-right" : ""}`} role="region" aria-label="工单列表,可横向滚动查看字段" tabIndex={0}><table className="work-order-ledger-table ticket-ledger"><OpsTableColumns widths={columnWidths} /><thead><tr><th>序号</th><th>工单 / 客户</th><th>类型</th><th>状态</th><th>责任人 / 团队</th><th>截止</th><th>下一步</th><th>创建时间</th><th>操作</th></tr></thead><tbody>{rows.map((item, index) => {
-        const step = nextStepOf(item);
-        const late = item.overdue_7d;
-        // 截止列与「我的待办」同源:有延期显示延期后的生效期限(⛔ 原始 `expected_done_date`,
-        // 否则同一张单在两页给出两个日期,而「超期/临期」按服务端真布尔并不亮)。
-        const due = todoRowDueOn(item);
-        const detailHref = `/work-orders/${encodeURIComponent(item.ticket_id)}${step.action ? `?act=${step.action}` : ""}`;
-        return <tr key={item.ticket_id} className={late ? "is-overdue" : undefined}>
-          <td className="table-number">{item.seq_no ?? (currentPage - 1) * TICKET_PAGE_SIZE + index + 1}</td>
-          <td><strong className="work-order-ticket-number" title={item.ticket_no ?? ""}>{item.ticket_no ?? "-"}</strong><small title={item.customer_name ?? ""}>{item.customer_name ?? "-"}</small></td>
-          <td><TicketTypeTag type={item.ticket_type} /></td>
-          <td><TicketStatusTag status={item.status} type={item.ticket_type} /></td>
-          <td><strong title={item.assignee_name ?? "待分派"}>{item.assignee_name ?? "待分派"}</strong><small title={item.team_name ?? "未分派团队"}>{item.team_name ?? "未分派团队"}</small></td>
-          <td><span className={`work-order-date${late ? " is-late" : ""}`}>{due ?? "—"}</span>{item.deferred_until && <small title={`原期限 ${item.expected_done_date?.slice(0, 10) ?? "—"}`}>已延期</small>}{late && <small className="work-order-overdue-text">超期/临期</small>}</td>
-          <td className="work-order-next-step-cell">
-            {step.label
-              ? <Link className={`work-order-next-step tone-${step.tone}`} to={detailHref} state={{ from: location.pathname + location.search }}>{step.label}</Link>
-              : <span className={`work-order-next-step is-passive tone-${step.tone}`}>—</span>}
-            <small>{step.hint}</small>
-          </td>
-          <td>{fmtTime(item.created_at)}</td>
-          <td><Link className="ops-table-action" to={`/work-orders/${encodeURIComponent(item.ticket_id)}`} state={{ from: location.pathname + location.search }}>详情</Link></td>
-        </tr>;
-      })}</tbody></table>
-        {list.loading && <div className="work-order-empty"><Search size={27} /><h3>正在读取工单台账…</h3></div>}
-        {fail && <TicketState fail={fail} onRetry={list.reload} />}
-        {!list.loading && !fail && !rows.length && <div className="work-order-empty"><Search size={27} /><h3>{filtered ? "当前筛选没有匹配的工单" : "还没有工单"}</h3><p>{filtered ? "筛选条件可能过窄:试着只保留状态,或清空其余条件。" : "开户、服务开通、到期停机等由业务动作自动建单;故障与售后可在此代客建单。"}</p>{filtered && <Button variant="ghost" size="sm" onClick={() => setParams(new URLSearchParams())}>清除全部筛选</Button>}</div>}
-      </div>
-      <ServerListPager total={total} page={currentPage} pageSize={TICKET_PAGE_SIZE} unit="张" className="list-pager work-order-ledger-pager" onPageChange={(next) => patchParams("page", [String(next)])} />
+      <WorkOrderLedgerList rows={rows} from={fromList} label="工单列表" fallback={listState} clientView={clientView} />
+      {!list.loading && !fail && <ListPager total={total} page={currentPage - 1} pageSize={TICKET_PAGE_SIZE} unit="张" onPageChange={(next) => patchParams("page", [String(next + 1)])} />}
     </div>
-    {summary && summary.item_1_pending_exec_overdue > 0 && <div className="work-order-reminder"><Clock3 size={19} /><div><strong>{summary.item_1_pending_exec_overdue} 件开户/停机类工单已过期限日仍未回填出开停事实</strong><p>只提醒负责团队,不自动改变账户状态或计费。</p></div></div>}
     {notice && <OpsNotice message={notice} onClose={() => setNotice("")} />}
     {editorOpen && <Editor onClose={() => setEditorOpen(false)} onCreated={(message) => { setEditorOpen(false); setNotice(message); reloadAll(); }} />}
   </section>;

+ 91 - 115
web-scaffold/src/pages/WorkOrderOverviewPage.tsx

@@ -1,31 +1,19 @@
-/**
- * 工单总览(册 5,2026-11-17 界面重构)。
- *
- * 定位=参考界面的「工作总览」:一屏看清**风险**与**该去哪**,⛔ 再放一张全量台账。
- * 每张卡都是一个入口(点一下就去到已带筛选的列表),数字旁边永远写明口径。
- *
- * 读源(全部现成,不新增接口):
- * - `/ticket/todo_counts@v1`:超期未回填、服务开通超期、待处置报文;
- * - `/ticket/list@v1` 的 `total`(count-only):待分派(走队列口更准,见下)、已完成、竣工驳回;
- * - `/ticket/pending_queue@v1`:待分派张数+前 5 张+候选人负荷;
- * - `/ticket/list@v1` 第 1 页 6 行:最近工单。
- *
- * ⚠️ 服务端没有「按状态计数」的口,`useTicketStatusCounts` 逐状态各发一次 count-only 请求;
- * 任一路失败整块显示 `—`,⛔ 折成 0(「查不到」≠「没有」)。
- */
 import { useEffect, useRef, useState, type MouseEvent } from "react";
 import { PageIntro } from "../components/PageIntro";
-import { Link, Navigate } from "react-router";
-import { ArrowRight, ClipboardList, Clock3, Inbox, Info, PackageCheck, RefreshCcw, TriangleAlert, UserRoundCheck } from "lucide-react";
+import { Link, Navigate, useLocation } from "react-router";
+import { ArrowRight, ClipboardList, Clock3, Inbox, Info, PackageCheck, TriangleAlert, UserRoundCheck } from "lucide-react";
 import { FetchError } from "../components/fetchError";
 import { TicketState } from "../components/ticketState";
-import { TicketStatusTag, TicketTypeTag } from "../components/work-order/TicketBadges";
-import { classifyTicketError, fmtDate, fmtTime, usePendingQueue, useTicketList, useTodoCounts } from "../lib/ticket";
+import { TicketTypeTag } from "../components/work-order/TicketBadges";
+import { WorkOrderLedgerList } from "../components/work-order/WorkOrderLedgerList";
+import { classifyTicketError, fmtTime, usePendingQueue, useTicketList, useTodoCounts } from "../lib/ticket";
 import { useTicketStatusCounts } from "../lib/work-order-counts";
-import { nextStepOf } from "../lib/work-order-next-step";
 import { useDemoIdentity } from "../lib/demo-session";
 import "../styles/operations.css";
+import "../styles/orders.css";
 import "../styles/work-orders.css";
+import "../styles/work-order-ledger.css";
+import "../styles/work-order-overview.css";
 
 /** 管理侧三类身份才有全局视角(运维成员是「我的待办」,⛔ 看总览也看不了别人的单)。 */
 const OVERVIEW_ROLES = ["admin", "regAdmin", "teamLead"];
@@ -38,6 +26,8 @@ export function WorkOrderOverviewPage() {
 
 function WorkOrderOverviewInner() {
   const identity = useDemoIdentity();
+  const location = useLocation();
+  const from = location.pathname + location.search;
   /** Wave B:首屏只保留 todo_counts + pending_queue;状态计数/最近列表 idle 后再拉。 */
   const [deferSecondary, setDeferSecondary] = useState(false);
   useEffect(() => {
@@ -57,11 +47,11 @@ function WorkOrderOverviewInner() {
 
   const queueFail = queue.error ? classifyTicketError(queue.error) : null;
   const recentFail = recent.error ? classifyTicketError(recent.error) : null;
-  const todo = counts.data;
+  const todo = counts.error ? null : counts.data;
   const queueRows = queue.data?.rows ?? [];
   const queueTotal = queue.data?.total;
-  const completed = statusCounts.data?.completed;
-  const rejected = statusCounts.data?.rejected;
+  const completed = statusCounts.error ? undefined : statusCounts.data?.completed;
+  const rejected = statusCounts.error ? undefined : statusCounts.data?.rejected;
 
   /** KPI 导航锁:同一次进页只允许一次 push,挡住快速双击/连点把同一目标压进历史两次(D-06)。 */
   const kpiNavLock = useRef(false);
@@ -76,104 +66,90 @@ function WorkOrderOverviewInner() {
   /** 数据范围:服务端已按身份收口,这里只如实说清是哪一档,⛔ 造一个改不了的「范围下拉」。 */
   const scope = identity?.role === "admin" ? "全公司" : identity?.role === "teamLead" ? `本团队 · ${identity.name}` : "负责区域及下级区域";
 
-  return <section className="work-order-page work-order-overview-page">
-    <header className="work-order-heading">
-      <div>
-        <p className="work-order-eyebrow"><span /> WORK ORDER OVERVIEW / 工作总览</p>
-        <h1>工单总览</h1>
-        <PageIntro>先看哪些工单有超期风险、哪些还没人接,再进入对应队列处理。</PageIntro>
-      </div>
-      <span className="work-order-scope" title="数据范围由服务端按身份收口,页面不提供改范围的下拉">{scope}</span>
-    </header>
+  const metrics = [
+    { label: "待分派", value: queueFail ? undefined : queueTotal, loading: queue.loading, note: "尚无责任人", icon: UserRoundCheck, href: "/work-orders/queue" },
+    { label: "超期未回填", value: todo?.item_1_pending_exec_overdue, loading: counts.loading, note: "已过开停期限", icon: Clock3, href: "/work-orders?type=open,expiry_stop,service_stop,updown&status=unassigned,pending,processing", tone: "warning" },
+    { label: "超期开通单", value: todo?.item_2_service_open_incomplete, loading: counts.loading, note: "服务开通仍在办理", icon: ClipboardList, href: "/work-orders?type=service_open&status=unassigned,pending,processing", tone: "warning" },
+    { label: "待确认", value: completed, loading: statusCounts.loading, note: "等待回执或提交方确认", icon: PackageCheck, href: "/work-orders/delivery?tab=receipt" },
+    { label: "竣工驳回", value: rejected, loading: statusCounts.loading, note: "待重推或退回重办", icon: TriangleAlert, href: "/work-orders/delivery?tab=rejected", tone: "danger" },
+    { label: "待处置报文", value: todo?.item_4_message_pending, loading: counts.loading, note: "未归集或待确认", icon: Inbox, href: "/work-orders/delivery?tab=messages", tone: "danger" },
+  ];
+  const recentRows = recent.data?.rows ?? [];
+  const recentState = recent.loading
+    ? <div className="order-empty" role="status">正在读取最近工单…</div>
+    : recentFail
+      ? <TicketState fail={recentFail} onRetry={recent.reload} />
+      : !recentRows.length ? <div className="order-empty">当前范围内暂无工单</div> : null;
 
-    {counts.error && <FetchError message={`/ticket/todo_counts@v1 取数失败:${counts.error.message}`} onRetry={counts.reload} />}
-    {statusCounts.error && <FetchError message={`状态计数取数失败:${statusCounts.error.message}`} onRetry={statusCounts.reload} />}
+  return (
+    <section className="order-page work-order-ledger work-order-overview-page">
+      <header className="order-heading">
+        <div>
+          <h1>工单总览</h1>
+          <PageIntro>查看待分派、超期和待确认工单,跟进最新处理进度。</PageIntro>
+        </div>
+        <span className="work-order-scope">{scope}</span>
+      </header>
 
-    <div className="work-order-kpi-grid" aria-label="工单关键指标">
-      <Link className={`work-order-kpi${(queueTotal ?? 0) > 0 ? " is-attention" : ""}`} to="/work-orders/queue" onClick={guardKpiNav}>
-        <span className="work-order-kpi-label"><UserRoundCheck size={16} />待分派</span>
-        <strong>{queue.loading ? "…" : queueFail ? "—" : queueTotal ?? "—"}</strong>
-        <small>尚无责任人</small>
-        <em>去队列<ArrowRight size={14} /></em>
-      </Link>
-      <Link className={`work-order-kpi${(todo?.item_1_pending_exec_overdue ?? 0) > 0 ? " is-danger" : ""}`} to="/work-orders?type=open,expiry_stop,service_stop&status=unassigned,pending,processing" onClick={guardKpiNav}>
-        <span className="work-order-kpi-label"><Clock3 size={16} />超期未回填</span>
-        <strong>{counts.loading ? "…" : todo ? todo.item_1_pending_exec_overdue : "—"}</strong>
-        <small>开停类超期未回填</small>
-        <em>去筛选<ArrowRight size={14} /></em>
-      </Link>
-      <Link className="work-order-kpi" to="/work-orders?type=service_open&status=unassigned,pending,processing" onClick={guardKpiNav}>
-        <span className="work-order-kpi-label"><ClipboardList size={16} />服务开通在办</span>
-        <strong>{counts.loading ? "…" : todo ? todo.item_2_service_open_incomplete : "—"}</strong>
-        <small>超期开通单在办</small>
-        <em>去筛选<ArrowRight size={14} /></em>
-      </Link>
-      <Link className="work-order-kpi" to="/work-orders/delivery?tab=receipt" onClick={guardKpiNav}>
-        <span className="work-order-kpi-label"><PackageCheck size={16} />待确认待闭环</span>
-        <strong>{statusCounts.loading ? "…" : completed ?? "—"}</strong>
-        <small>已完成待确认(等回执)/已处理待确认(等客户)</small>
-        <em>去交付<ArrowRight size={14} /></em>
-      </Link>
-      <Link className={`work-order-kpi${(rejected ?? 0) > 0 ? " is-danger" : ""}`} to="/work-orders/delivery?tab=rejected" onClick={guardKpiNav}>
-        <span className="work-order-kpi-label"><TriangleAlert size={16} />竣工驳回</span>
-        <strong>{statusCounts.loading ? "…" : rejected ?? "—"}</strong>
-        <small>待重推或退回重办</small>
-        <em>去处置<ArrowRight size={14} /></em>
-      </Link>
-      <Link className={`work-order-kpi${(todo?.item_4_message_pending ?? 0) > 0 ? " is-danger" : ""}`} to="/work-orders/delivery?tab=messages" onClick={guardKpiNav}>
-        <span className="work-order-kpi-label"><Inbox size={16} />待处置报文</span>
-        <strong>{counts.loading ? "…" : todo ? todo.item_4_message_pending : "—"}</strong>
-        <small>未归属或与现状冲突</small>
-        <em>去处置<ArrowRight size={14} /></em>
-      </Link>
-    </div>
-    <p className="work-order-block-note work-order-kpi-note"><Info size={13} />「超期未回填」「服务开通在办」按类型+状态近似筛选(服务端无超期计数口径),超期行在列表里带标记。</p>
+      {counts.error && <FetchError message={`工单统计读取失败 · ${counts.error.message}`} onRetry={counts.reload} />}
+      {statusCounts.error && <FetchError message={`状态计数读取失败 · ${statusCounts.error.message}`} onRetry={statusCounts.reload} />}
 
-    {/* 风险区:只列「有人要动手」的三条,按紧急度固定顺序,⛔ 按数字大小重排(顺序每个月都在变,学不会)。 */}
-    <section className="work-order-overview-block">
-      <header><div><h2>需要处理</h2><p>按紧急度排序,逐条可直达</p></div></header>
-      <div className="work-order-risk-list">
-        <div className="work-order-risk-row"><span><TriangleAlert size={15} />竣工驳回</span><strong>{rejected ?? "—"}</strong><Link to="/work-orders/delivery?tab=rejected">去重推<ArrowRight size={14} /></Link></div>
-        <div className="work-order-risk-row"><span><Clock3 size={15} />超期未回填</span><strong>{todo?.item_1_pending_exec_overdue ?? "—"}</strong><Link to="/work-orders?type=open,expiry_stop,service_stop&status=unassigned,pending,processing">去筛选<ArrowRight size={14} /></Link></div>
-        <div className="work-order-risk-row"><span><Inbox size={15} />待处置报文</span><strong>{todo?.item_4_message_pending ?? "—"}</strong><Link to="/work-orders/delivery?tab=messages">去处置<ArrowRight size={14} /></Link></div>
+      <div className="work-order-ledger-summary work-order-overview-summary" role="group" aria-label="工单关键指标">
+        {metrics.map(({ label, value, loading, note, icon: Icon, href, tone }, index) => (
+          <Link
+            key={label}
+            className={`work-order-metric${index === 0 ? " work-order-metric-total" : ""}`}
+            data-tone={value && value > 0 ? tone : undefined}
+            to={href}
+            onClick={guardKpiNav}
+          >
+            <span className="work-order-metric-icon"><Icon size={18} aria-hidden="true" /></span>
+            <span className="work-order-metric-body">
+              <span>{label}</span>
+              <strong>{loading ? "…" : value?.toLocaleString("zh-CN") ?? "—"}</strong>
+              <small>{note}</small>
+            </span>
+            <ArrowRight size={14} className="work-order-metric-arrow" aria-hidden="true" />
+          </Link>
+        ))}
       </div>
-    </section>
+      <p className="work-order-overview-note"><Info size={14} aria-hidden="true" />两项超期指标的入口会打开同类在办工单,具体期限以列表中的标记为准。</p>
 
-    <div className="work-order-overview-columns">
-      <section className="work-order-overview-block">
-        <header><div><h2>最近工单</h2><p>按创建时间倒序,看下一步就能判断该谁动</p></div><Link className="work-order-block-link" to="/work-orders">查看全部<ArrowRight size={14} /></Link></header>
-        {recent.loading && <p className="work-order-detail-text">正在读取最近工单…</p>}
-        {recentFail && <TicketState fail={recentFail} onRetry={recent.reload} />}
-        {!recent.loading && !recentFail && !(recent.data?.rows.length) && <p className="work-order-detail-text">当前范围内还没有工单。</p>}
-        {!recent.loading && !recentFail && (recent.data?.rows.length ?? 0) > 0 && <div className="work-order-table-wrap compact"><table className="work-order-table work-order-mini-table">
-          <thead><tr><th>工单 / 客户</th><th>类型</th><th>状态</th><th>截止</th><th>下一步</th></tr></thead>
-          <tbody>{recent.data!.rows.map((row) => {
-            const step = nextStepOf(row);
-            return <tr key={row.ticket_id}>
-              <td><Link className="work-order-ticket-link" to={`/work-orders/${encodeURIComponent(row.ticket_id)}`} state={{ from: "/work-orders/overview" }}>{row.ticket_no ?? "-"}</Link><small>{row.customer_name ?? "-"}</small></td>
-              <td><TicketTypeTag type={row.ticket_type} /></td>
-              <td><TicketStatusTag status={row.status} type={row.ticket_type} /></td>
-              <td><span>{fmtDate(row.expected_done_date)}</span>{row.overdue_7d && <small className="work-order-overdue-text">超期/临期</small>}</td>
-              <td className="work-order-next-step-cell">{step.label ? <Link className={`work-order-next-step tone-${step.tone}`} to={`/work-orders/${encodeURIComponent(row.ticket_id)}${step.action ? `?act=${step.action}` : ""}`} state={{ from: "/work-orders/overview" }}>{step.label}</Link> : <span className="work-order-next-step is-passive">—</span>}<small>{step.hint}</small></td>
-            </tr>;
-          })}</tbody>
-        </table></div>}
-        <p className="work-order-block-note">只显示最近 6 张;完整台账与分页在「全部工单」。</p>
+      <section className="order-list-shell work-order-overview-section" aria-labelledby="recent-work-orders">
+        <header className="order-list-heading">
+          <div><h2 id="recent-work-orders">最近工单</h2><p>按创建时间倒序展示最近 6 张工单。</p></div>
+          <Link className="ops-table-action" to="/work-orders">查看全部工单<ArrowRight size={14} aria-hidden="true" /></Link>
+        </header>
+        <WorkOrderLedgerList rows={recentRows} from={from} label="最近工单" fallback={recentState} />
       </section>
 
-      <section className="work-order-overview-block">
-        <header><div><h2>待分派队列</h2><p>服务端已按承接类型与负责范围算好候选人</p></div><Link className="work-order-block-link" to="/work-orders/queue">去分派<ArrowRight size={14} /></Link></header>
-        {queue.loading && <p className="work-order-detail-text">正在读取待分派队列…</p>}
-        {queueFail && <p className="work-order-detail-text">{queueFail.kind === "permission" ? "当前身份无权查看待分派队列。" : queueFail.message}</p>}
-        {!queue.loading && !queueFail && !queueRows.length && <p className="work-order-detail-text">队列已清空。</p>}
-        {!queue.loading && !queueFail && queueRows.length > 0 && <ul className="work-order-queue-brief">
-          {queueRows.map((row) => <li key={row.ticket_id}>
-            <div><strong>{row.ticket_no ?? "未编号"}</strong><small>{row.customer_name ?? "-"} · {fmtTime(row.created_at)}</small></div>
-            <Link className="work-order-next-step tone-todo" to={`/work-orders/${encodeURIComponent(row.ticket_id)}?act=assign`} state={{ from: "/work-orders/overview" }}>分派</Link>
-          </li>)}
-        </ul>}
-        <p className="work-order-block-note"><RefreshCcw size={13} />候选人与接单负荷在「待分派」页点「指定成员」时按工单现算,总览不再预装以免十余次 UDS。</p>
+      <section className="order-list-shell work-order-overview-section" aria-labelledby="pending-work-orders">
+        <header className="order-list-heading">
+          <div><h2 id="pending-work-orders">待分派队列</h2><p>优先查看服务端排序靠前的 5 张待分派工单。</p></div>
+          <Link className="ops-table-action" to="/work-orders/queue">查看待分派队列<ArrowRight size={14} aria-hidden="true" /></Link>
+        </header>
+        {queue.loading ? <div className="order-empty" role="status">正在读取待分派队列…</div>
+          : queueFail ? <TicketState fail={queueFail} onRetry={queue.reload} />
+          : !queueRows.length ? <div className="order-empty">暂无待分派工单</div>
+          : (
+            <div className="work-order-overview-queue-scroll" role="region" aria-label="待分派工单,可横向滚动查看字段" tabIndex={0}>
+              <table className="order-table work-order-overview-queue-table">
+                <thead><tr><th scope="col">客户 / 工单编号</th><th scope="col">类型</th><th scope="col">创建时间</th><th scope="col">操作</th></tr></thead>
+                <tbody>{queueRows.map((row) => {
+                  const number = row.ticket_no || row.ticket_id;
+                  return (
+                    <tr key={row.ticket_id}>
+                      <td><strong className="table-cell-title" title={row.customer_name || undefined}>{row.customer_name || <span className="table-placeholder">未关联客户</span>}</strong><small title={number}>{number}</small></td>
+                      <td><TicketTypeTag type={row.ticket_type} /></td>
+                      <td className="order-date">{row.created_at ? fmtTime(row.created_at) : <span className="table-placeholder">—</span>}</td>
+                      <td><Link className="ops-table-action" to={`/work-orders/${encodeURIComponent(row.ticket_id)}?act=assign`} state={{ from }} aria-label={`分派工单 ${number}`}>分派<ArrowRight size={14} aria-hidden="true" /></Link></td>
+                    </tr>
+                  );
+                })}</tbody>
+              </table>
+            </div>
+          )}
       </section>
-    </div>
-  </section>;
+    </section>
+  );
 }

+ 1 - 1
web-scaffold/src/pages/WorkOrderRecordPage.tsx

@@ -1468,7 +1468,7 @@ export function WorkOrderRecordPage() {
             <div className="work-order-summary-grid"><div><span>执行结论</span><strong>{CONCLUSION_NAMES[d.backfill.exec_conclusion ?? ""] ?? d.backfill.exec_conclusion ?? "-"}</strong></div><div><span>实际开通日期</span><strong>{d.backfill.actual_opened_date ? fmtDate(d.backfill.actual_opened_date) : "-"}</strong></div><div><span>停机完成日期</span><strong>{d.backfill.stop_done_date ? fmtDate(d.backfill.stop_done_date) : "-"}</strong></div><div><span>回填次数</span><strong>{numText(d.backfill.attempt_count)} 次</strong></div><div className="wide"><span>结论说明</span><strong>{d.backfill.conclusion_note ?? "-"}</strong></div><div className="wide"><span>凭证与佐证</span><strong>{d.backfill.evidence_text ?? "-"}</strong></div></div>
             <TicketExtForm ext={d.backfill.ext} readOnly />
             {(d.backfill.routes?.length ?? 0) > 0 && <><h4 className="work-order-subhead">网络线路</h4><div className="work-order-table-wrap compact"><table><thead><tr><th>网络账户名</th><th>内网 IP / 掩码</th><th>端点(源 → 目的)</th><th>出口 PoP</th><th>带宽</th></tr></thead><tbody>{d.backfill.routes.map((r) => <tr key={r.id}><td>{r.network_account_name ?? "-"}</td><td>{[r.intranet_ip, r.subnet_mask].filter(Boolean).join(" / ") || "-"}</td><td>{r.src_endpoint ?? "-"} → {r.dst_endpoint ?? "-"}</td><td>{r.egress_pop ?? "-"}</td><td>{[r.down_mbps && `↓${r.down_mbps}`, r.up_mbps && `↑${r.up_mbps}`].filter(Boolean).join(" / ") || "-"}</td></tr>)}</tbody></table></div></>}
-            {(d.backfill.ips?.length ?? 0) > 0 && <><h4 className="work-order-subhead">境外出口 IP</h4><div className="work-order-table-wrap compact"><table><thead><tr><th>出口</th><th>IP</th><th>类型</th><th>带宽</th><th>凭据</th></tr></thead><tbody>{d.backfill.ips.map((r) => <tr key={r.id}><td>{r.egress ?? "-"}</td><td>{r.overseas_ip ?? "-"}</td><td>{r.ip_type ?? "-"}</td><td>{numText(r.bandwidth_mbps, "M")}</td><td>PIN {isYes(r.pin_registered) ? "✓" : "—"} / CPID {isYes(r.cpid_registered) ? "✓" : "—"}</td></tr>)}</tbody></table></div></>}
+            {(d.backfill.ips?.length ?? 0) > 0 && <><h4 className="work-order-subhead">境外出口 IP</h4><div className="work-order-table-wrap compact"><table><thead><tr><th>出口</th><th>IP</th><th>类型</th><th>带宽</th><th>凭据</th></tr></thead><tbody>{d.backfill.ips.map((r) => <tr key={r.id}><td>{r.egress ?? "-"}</td><td>{r.overseas_ip ?? "-"}</td><td>{r.ip_type ?? "-"}</td><td>{numText(r.bandwidth_mbps, "M")}</td><td>PIN {isYes(r.pin_registered) ? "✓" : <span className="table-placeholder">—</span>} / CPID {isYes(r.cpid_registered) ? "✓" : <span className="table-placeholder">—</span>}</td></tr>)}</tbody></table></div></>}
             <p className="work-order-seg-foot">库内仅存 PIN/CPID 密文,此处只显示「是否登记」;IP 规则 v{d.backfill.ip_rule_version}。</p>
           </> : <>
             <p className="work-order-seg-foot">登记执行结论、实际开通日期、线路与境外 IP;保存即推进工单。</p>

+ 1 - 1
web-scaffold/src/styles/globals.css

@@ -378,7 +378,7 @@ table tbody td .table-cell-title {
   font-weight: 500;
 }
 
-table td .table-placeholder {
+table td :is(.table-placeholder, .oss-tri-missing) {
   color: var(--border-hover);
 }
 

+ 1 - 2
web-scaffold/src/styles/record-detail.css

@@ -214,8 +214,7 @@
   font: 400 var(--type-support)/1.5 var(--font-sans);
   letter-spacing: normal;
 }
-:is(.contract-record, .customer-workspace) :is(.oss-tri-missing, .table-placeholder) { color: var(--muted-foreground); }
-:is(.contract-record, .customer-workspace) td .table-placeholder { color: var(--border-hover); }
+:is(.contract-record, .customer-workspace) :is(.oss-tri-missing, .table-placeholder):not(td *) { color: var(--muted-foreground); }
 .contract-profile-actions { display: flex; justify-content: flex-end; }
 .contract-summary-panel .contract-facts-row-full { grid-column: 1 / -1; }
 .contract-summary-panel .contract-amount-field[aria-invalid="true"] dd { color: var(--destructive); }

+ 85 - 0
web-scaffold/src/styles/work-order-ledger.css

@@ -0,0 +1,85 @@
+.work-order-ledger { min-width: 0; }
+
+.work-order-ledger-summary {
+  display: grid;
+  grid-template-columns: repeat(4, minmax(0, 1fr));
+  gap: 1px;
+  margin-bottom: 12px;
+  overflow: hidden;
+  border: 1px solid var(--border);
+  border-radius: var(--radius-card);
+  background: var(--border-subtle);
+  box-shadow: var(--shadow-card);
+}
+
+.work-order-metric {
+  display: flex;
+  align-items: center;
+  gap: 12px;
+  min-width: 0;
+  padding: 14px 16px;
+  background: var(--card);
+  color: var(--text-secondary);
+  text-align: left;
+}
+
+.work-order-metric-total { background: var(--primary-soft); }
+:is(a, button).work-order-metric { cursor: pointer; transition: background-color .15s; }
+:is(a, button).work-order-metric:hover,
+.work-order-metric[aria-pressed="true"] { background: var(--surface-subtle); }
+.work-order-metric:focus-visible { outline: 2px solid var(--ring); outline-offset: -3px; }
+
+.work-order-metric-icon {
+  display: grid;
+  place-items: center;
+  flex: none;
+  width: 34px;
+  height: 34px;
+  border: 1px solid var(--border);
+  border-radius: var(--radius-control);
+  background: var(--card);
+  color: var(--primary);
+}
+
+.work-order-metric-body { display: grid; gap: 4px; min-width: 0; font-size: var(--type-support); }
+.work-order-metric-body small { color: var(--muted-foreground); font-size: var(--type-meta); }
+.work-order-metric-body strong { color: var(--foreground); font-size: 24px; font-weight: 550; line-height: 1.12; font-variant-numeric: tabular-nums; }
+.work-order-metric-total strong { color: var(--primary); }
+.work-order-metric[data-tone="warning"] :is(strong, .work-order-metric-icon) { color: var(--warning); }
+.work-order-metric[data-tone="danger"] :is(strong, .work-order-metric-icon) { color: var(--destructive); }
+.work-order-metric-arrow { flex: none; margin-left: auto; color: var(--icon); }
+
+.work-order-ledger .order-tabs button:focus-visible { outline: 2px solid var(--ring); outline-offset: -2px; }
+.work-order-ledger .work-order-view-chips { flex: none; }
+.work-order-ledger .order-table.order-ledger { min-width: 1280px; }
+.work-order-ledger .order-table.order-ledger.is-client-view { min-width: 980px; }
+.work-order-ledger .order-ledger :is(th, td):nth-child(5):not(:last-child) { text-align: left; }
+.work-order-ledger .order-ledger .ops-inline-actions { justify-content: flex-end; }
+.work-order-ledger .order-table td small { margin-top: 4px; font-size: var(--type-meta); }
+.work-order-ledger-type { margin-top: 5px; }
+.work-order-ledger :is(.work-order-status, .work-order-type) { padding: 3px 9px; border-radius: 999px; font-size: var(--type-meta); font-weight: 500; line-height: 1.55; }
+.work-order-ledger .work-order-status i { width: 5px; height: 5px; }
+
+@media (max-width: 1150px) {
+  .work-order-ledger-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
+}
+
+@media (max-width: 640px) {
+  .work-order-metric { align-items: flex-start; gap: 8px; padding: 10px; }
+  .work-order-metric-icon { width: 26px; height: 26px; }
+  .work-order-metric-icon svg { width: 15px; height: 15px; }
+  .work-order-metric-body { gap: 3px; }
+  .work-order-metric-body strong { font-size: 20px; }
+  .work-order-metric-arrow { display: none; }
+  .work-order-ledger .order-tabs { gap: 18px; padding-inline: 16px; }
+  .work-order-ledger .order-filters { padding-inline: 16px; }
+  .work-order-ledger > .order-list-shell > .work-order-ledger-scroll { display: none; }
+  .work-order-ledger > .order-list-shell > .order-mobile-list { padding: 12px 16px; }
+  .work-order-ledger-mobile-card { min-width: 0; }
+  .work-order-ledger-mobile-card :is(h3, p, dd, .work-order-ledger-mobile-meta small) { overflow-wrap: anywhere; }
+  .work-order-ledger-mobile-card dt { flex: none; }
+  .work-order-ledger-mobile-card dd small { display: block; margin-top: 3px; color: var(--muted-foreground); font-weight: 400; }
+  .work-order-ledger-mobile-card dd .work-order-overdue-text { color: var(--warning); }
+  .work-order-ledger-mobile-card .table-placeholder { color: var(--border-hover); }
+  .work-order-ledger-mobile-card > .ops-inline-actions { justify-content: flex-end; margin-top: 8px; }
+}

+ 44 - 0
web-scaffold/src/styles/work-order-overview.css

@@ -0,0 +1,44 @@
+.work-order-overview-page {
+  display: grid;
+  grid-template-columns: minmax(0, 1fr);
+  padding-bottom: 24px;
+}
+.work-order-overview-page .order-heading { align-items: flex-start; }
+.work-order-overview-page .work-order-scope { white-space: normal; overflow-wrap: anywhere; }
+.work-order-overview-summary { grid-template-columns: repeat(6, minmax(0, 1fr)); }
+.work-order-overview-summary .work-order-metric-body small { line-height: 1.4; }
+
+.work-order-overview-note {
+  display: flex;
+  align-items: flex-start;
+  gap: 7px;
+  margin: 0 0 14px;
+  color: var(--muted-foreground);
+  font-size: var(--type-meta);
+  line-height: 1.55;
+}
+.work-order-overview-note > svg { flex: none; margin-top: 2px; }
+
+.work-order-overview-section + .work-order-overview-section { margin-top: 16px; }
+.work-order-overview-section > .order-list-heading { align-items: center; border-bottom: 1px solid var(--border-subtle); }
+.work-order-overview-section > .order-list-heading > a { flex: none; }
+.work-order-overview-section :is(.order-empty, .work-order-empty) { padding-block: 32px; }
+
+.work-order-overview-queue-scroll { overflow-x: auto; overscroll-behavior-inline: contain; }
+.work-order-overview-queue-scroll:focus-visible { outline: 2px solid var(--ring); outline-offset: -2px; }
+.work-order-overview-queue-table.order-table { min-width: 540px; }
+.work-order-overview-queue-table :is(th, td):first-child { width: 40%; }
+.work-order-overview-queue-table th:nth-child(2) { width: 22%; }
+.work-order-overview-queue-table th:nth-child(3) { width: 24%; }
+.work-order-overview-queue-table :is(th, td):last-child { width: 14%; padding-right: 20px; text-align: right; }
+.work-order-overview-queue-table td { padding-block: 12px; font-size: var(--type-support); }
+.work-order-overview-queue-table td :is(strong, small) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
+
+@media (max-width: 1450px) {
+  .work-order-overview-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
+}
+
+@media (max-width: 640px) {
+  .work-order-overview-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
+  .work-order-overview-section > .order-list-heading { align-items: flex-start; flex-wrap: wrap; }
+}