瀏覽代碼

调整客户和合同详情的页签与表格布局

sy 4 小時之前
父節點
當前提交
f7add68b29

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

@@ -155,7 +155,7 @@ export function DeliveryStatusTable({ customerId, subscriptionId, compact = fals
     {exportNotice && <p className="ops-form-note">{exportNotice}</p>}
     {exportError && <p className="ops-form-error" role="alert">{exportError}</p>}
     {load.error ? <div className="ops-empty"><FetchError message={load.error.message} onRetry={load.reload} /></div>
-      : <div className="ops-table-wrap">
+      : <div className="ops-table-wrap record-table-scroll" role="region" aria-label="交付现状列表" tabIndex={0}>
         <table className="ops-table">
           <OpsTableColumns widths={compact ? [110, 120, 90, 100, 100, 110, 110, 120, 110, 140, 120, 100, 90, 120, 110] : [110, 120, 140, 90, 100, 100, 110, 110, 120, 110, 140, 120, 100, 90, 120, 110]} />
           <thead><tr>{columns.map((title, index) => <th key={`${title}-${index}`}>{title}{title === "实测带宽" && measuredOn ? <span className="ops-muted">({measuredOn} 测值)</span> : null}</th>)}</tr></thead>

+ 51 - 0
web-scaffold/src/components/RecordTabs.tsx

@@ -0,0 +1,51 @@
+import type { KeyboardEvent, ReactNode } from "react";
+import "../styles/record-detail.css";
+
+type RecordTab<T extends string> = {
+  id: T;
+  label: string;
+  count?: ReactNode;
+  panelId?: string;
+};
+
+type RecordTabsProps<T extends string> = {
+  prefix: string;
+  label: string;
+  tabs: readonly RecordTab<T>[];
+  active: T;
+  onChange: (tab: T) => void;
+};
+
+export function RecordTabs<T extends string>({ prefix, label, tabs, active, onChange }: RecordTabsProps<T>) {
+  function handleKeyDown(event: KeyboardEvent<HTMLButtonElement>, index: number) {
+    let target: number;
+    switch (event.key) {
+      case "ArrowLeft": target = (index + tabs.length - 1) % tabs.length; break;
+      case "ArrowRight": target = (index + 1) % tabs.length; break;
+      case "Home": target = 0; break;
+      case "End": target = tabs.length - 1; break;
+      default: return;
+    }
+    event.preventDefault();
+    const next = tabs[target];
+    onChange(next.id);
+    document.getElementById(`${prefix}-tab-${next.id}`)?.focus();
+  }
+
+  return <div className="record-tabs" role="tablist" aria-label={label}>
+    {tabs.map((tab, index) => <button
+      key={tab.id}
+      type="button"
+      role="tab"
+      id={`${prefix}-tab-${tab.id}`}
+      aria-selected={active === tab.id}
+      aria-controls={tab.panelId ?? `${prefix}-panel-${tab.id}`}
+      tabIndex={active === tab.id ? 0 : -1}
+      onClick={() => onChange(tab.id)}
+      onKeyDown={(event) => handleKeyDown(event, index)}
+    >
+      {tab.label}
+      {tab.count != null && <span className="record-tab-count">{tab.count}</span>}
+    </button>)}
+  </div>;
+}

File diff suppressed because it is too large
+ 27 - 2
web-scaffold/src/pages/ContractRecordPage.tsx


+ 34 - 36
web-scaffold/src/pages/CustomerWorkspacePage.tsx

@@ -18,13 +18,14 @@
  */
 import { useEffect, useMemo, useRef, useState, type FormEvent, type KeyboardEvent as ReactKeyboardEvent, type ReactNode } from "react";
 import { ArrowLeft, Building2, CalendarPlus, Check, FileText, LoaderCircle, MapPin, PencilLine, RefreshCcw, RefreshCw, Upload, X } from "lucide-react";
-import { Link, useLocation, useNavigate, useParams } from "react-router";
+import { Link, useLocation, useParams } from "react-router";
 import { Button } from "../components/ui/button";
 import { Input } from "../components/ui/input";
 import { OpsMore, OpsNotice, OpsStatus, OpsTableColumns, OpsTableEmpty, type OpsMoreItem } from "../components/OperationsKit";
 import { OrderEditor } from "../components/OrderChangeDialogs";
 import { CustomerServiceStopAction } from "../components/CustomerServiceStopAction";
 import { DeliveryStatusTable } from "../components/DeliveryStatusTable";
+import { RecordTabs } from "../components/RecordTabs";
 import { orderView, type OrderView } from "../lib/order-demo";
 import { FetchError } from "../components/fetchError";
 import { Tri } from "../components/triState";
@@ -165,7 +166,6 @@ type ProfileDraft = {
 export function CustomerWorkspacePage() {
   const { no } = useParams();
   const location = useLocation();
-  const navigate = useNavigate();
   const outgoingState = detailLinkState(location.pathname, location.state);
   const organization = useOrganizationData(["regions", "operators", "partners", "operationsTeams", "maintenanceTeams"]);
   /** 页签=本页唯一的浏览轴(讨论稿 §7.7);`#workspace-service` 仍落在「全部订阅」。 */
@@ -519,16 +519,15 @@ export function CustomerWorkspacePage() {
     const labelText = sub.status_display?.label ?? orderView(sub).statusLabel;
     return labelText === "生效中";
   });
-  return <section className="ops-page ops-record-page customer-workspace">
+  return <section className="ops-page ops-record-page customer-workspace record-detail">
     <Link to={back.to} state={back.state} className="ops-back-link"><ArrowLeft size={16} />{back.label}</Link>
+    <div className="customer-record-masthead">
     <header className="ops-page-hero">
-      <div className="ops-page-hero-copy"><p>客户管理 / {no}</p><h1>{displayName}</h1><div className="ops-hero-meta">
+      <div className="ops-page-hero-copy"><p>客户档案 / {no}</p><div className="customer-record-title"><h1>{displayName}</h1><AcctCell raw={customer?.acct_status} /></div><div className="ops-hero-meta">
         <span><MapPin size={14} /><TextCell value={mountedRegionPath} note={MISSING + ":/customer/get@v1 未回 region_mounts(该客户未挂载区域,或挂载节点在层级真源未定级)"} /></span>
         <span><Building2 size={14} /><TextCell value={customer?.operator_name} /></span>
         <span><TextCell value={subjectText} /></span>
-        <span>分账号 <b>{accounts.error ? <Tri tone="fail" text="取数失败" title={accounts.error.message} /> : accountRows.length}</b> 个</span>
         <span>运维团队 <TextCell value={teamNames.join("、")} note={MISSING + ":/customer/get@v1 的 team_ids 为空或未下发"} />{staleTeamHint && <Tri tone="fail" text="需改派单支" title={staleTeamHint} />}</span>
-        <span><AcctCell raw={customer?.acct_status} /></span>
       </div></div>
       <div className="ops-hero-actions">
         {/* D-11:手册「客户/订阅详情页」均可发起服务停用;停用挂具体订阅(工单§3.2.1)。 */}
@@ -541,23 +540,22 @@ export function CustomerWorkspacePage() {
         <Button variant="outline" onClick={detail.reload}><RefreshCcw size={15} />刷新</Button>
       </div>
     </header>
-    <div className="ops-metric-strip">
-      <div className="ops-metric-card"><em>分账号</em><h2>{accounts.error ? <Tri tone="fail" text="取数失败" title={accounts.error.message} /> : accountRows.length}</h2><small>{accounts.error ? "列表接口未回执" : <>后端下发 <TextCell value={accounts.data?.total} /> 条</>}</small></div>
-      <div className="ops-metric-card"><em>额度</em><h2>{customer?.quota_cents ?? "0"} 个</h2><small>客户额度(分账号席位):按在用订阅的档位额度合计,订阅生效/终止时自动对齐;席位明细请到订阅详情查看</small></div>
-      <div className="ops-metric-card"><em>全部订阅</em><h2>{orders.length}</h2><small>不限状态,含已终止</small></div>
-      <div className="ops-metric-card"><em>关联合同</em><h2>{contracts.length}</h2><small>客户号与订阅关联的合同</small></div>
+    <div className="ops-metric-strip customer-record-metrics" aria-label="客户业务摘要">
+      <div className="ops-metric-card"><em>分账号</em><strong>{accounts.error ? <Tri tone="fail" text="取数失败" title={accounts.error.message} /> : accountRows.length}</strong><small>{accounts.error ? "列表接口未回执" : <>后端下发 <TextCell value={accounts.data?.total} /> 条</>}</small></div>
+      <div className="ops-metric-card"><em>分账号额度</em><strong>{customer?.quota_cents ?? "0"} 个</strong><small>按在用订阅合计</small></div>
+      <div className="ops-metric-card"><em>全部订阅</em><strong>{orders.length}</strong><small>不限状态,含已终止</small></div>
+      <div className="ops-metric-card"><em>关联合同</em><strong>{contracts.length}</strong><small>客户号与订阅关联的合同</small></div>
     </div>
-
-    {/* 页签条:01–07 七个区块逐一成页签,最后是「交付现状」(§7.7 新增)。 */}
-    <div className="ops-tabs customer-workspace-tabs" role="tablist" aria-label="客户工作台视图">
-      {WORKSPACE_TABS.map((item) => <button key={item.id} role="tab" id={`customer-tab-${item.id}`} aria-selected={tab === item.id} aria-controls={`customer-panel-${item.id}`} className={tab === item.id ? "active" : ""} onClick={() => setTab(item.id)}>
-        {item.label}
-        {item.id === "subscriptions" ? <span>{orders.length}</span> : null}
-        {item.id === "subaccounts" ? <span>{accounts.error ? "—" : accountRows.length}</span> : null}
-      </button>)}
     </div>
 
-    <section className="ops-record-card customer-workspace-panel" id="customer-panel-profile" role="tabpanel" aria-labelledby="customer-tab-profile" hidden={tab !== "profile"}><div className="customer-form-section-title"><span>01</span><div><h2>主体资料</h2><p>客户以识别号查重、以客户号关联业务。</p></div></div>
+    <div className="record-tabs-frame">
+    <RecordTabs prefix="customer" label="客户工作台视图" active={tab} onChange={setTab}
+      tabs={WORKSPACE_TABS.map((item) => item.id === "subscriptions"
+        ? { ...item, count: orders.length, panelId: "workspace-service" }
+        : item.id === "subaccounts" ? { ...item, count: accounts.error ? "—" : accountRows.length } : item)}
+    />
+
+    <section className="ops-record-card customer-workspace-panel" id="customer-panel-profile" role="tabpanel" aria-labelledby="customer-tab-profile" hidden={tab !== "profile"}><div className="customer-form-section-title"><div><h2>主体资料</h2></div></div>
       {writable && <p className="customer-record-edit-hint"><PencilLine size={13} />悬停可编辑项显示铅笔,点击即切换编辑状态;改完点对号(或按 Enter)立即保存该项,无需统一提交</p>}
       <dl className="ops-record-summary">
         <div><dt>客户编号</dt><dd>{no}</dd></div>
@@ -576,7 +574,7 @@ export function CustomerWorkspacePage() {
       {subjectRevokesLicense && <p className="customer-form-note">提交后主体类型将改为「{label(SUBJECT_TYPE, form?.subject ?? "")}」,系统会同时撤销该客户已留存的营业执照影像(非企业不采集证件影像),之后如需恢复只能按企业主体重新上传。</p>}
     </section>
 
-    <section className="ops-record-card customer-workspace-panel" id="customer-panel-attribution" role="tabpanel" aria-labelledby="customer-tab-attribution" hidden={tab !== "attribution"}><div className="customer-form-section-title"><span>02</span><div><h2>归属关系</h2><p>客户唯一归属一个运营商;区域与运营商省份须一致。运维团队按客户配置(固定 1 支);运营团队按区域反查、不存档案快照。</p></div></div>
+    <section className="ops-record-card customer-workspace-panel" id="customer-panel-attribution" role="tabpanel" aria-labelledby="customer-tab-attribution" hidden={tab !== "attribution"}><div className="customer-form-section-title"><div><h2>归属关系</h2></div></div>
       <dl className="ops-record-summary">
         <div><dt>所属区域</dt><dd><InlineField id="customer-region" label="所属区域" value={form?.regionId ?? ""} editing={editingField === "regionId"} writable={writable} busy={busy} onStart={() => startField("regionId")} onChange={(value) => patch("regionId", value)} onDone={() => void commitField("regionId")} onCancel={() => cancelField("regionId")} display={draftRegionDisplay || undefined} emptyText={MISSING} editor={<TreeSelect treeData={regionTree} value={form?.regionId ?? ""} onChange={(value) => patch("regionId", value)} ariaLabel="所属区域" placeholder="请选择区域节点" name="customer-region" />} invalid={invalidOf("regionId")} error={errorOf("regionId")} /></dd></div>
         <div><dt>运营商</dt><dd><InlineField id="customer-operator" label="运营商" value={form?.operatorId ?? ""} editing={editingField === "operatorId"} writable={writable} busy={busy} onStart={() => startField("operatorId")} onChange={(value) => patch("operatorId", value)} onDone={() => void commitField("operatorId")} onCancel={() => cancelField("operatorId")} display={draftOperatorName || undefined} emptyText={MISSING} selectOptions={[{ value: "", label: "请选择运营商" }, ...organization.operators.map((item) => ({ value: item.id, label: item.name }))]} invalid={invalidOf("operatorId")} error={errorOf("operatorId")} /></dd></div>
@@ -589,7 +587,7 @@ export function CustomerWorkspacePage() {
     </section>
 
 
-    <section className="ops-record-card customer-workspace-panel" id="customer-panel-primary" role="tabpanel" aria-labelledby="customer-tab-primary" hidden={tab !== "primary"}><div className="customer-form-section-title"><span>03</span><div><h2>客户主账号</h2><p>一个客户一个主账号,不占套餐席位。账号状态与客户状态分列。</p></div></div>
+    <section className="ops-record-card customer-workspace-panel" id="customer-panel-primary" role="tabpanel" aria-labelledby="customer-tab-primary" hidden={tab !== "primary"}><div className="customer-form-section-title"><div><h2>客户主账号</h2><p>一个客户一个主账号,不占套餐席位。账号状态与客户状态分列。</p></div></div>
       <div className="customer-panel-grid">
         <div className="customer-panel"><h3>客户主账号</h3><dl>
           <div><dt>登录名</dt><dd>{primaryAccount ? <TextCell value={primaryAccount.username} /> : <Tri tone={primaryAccountLoad.error ? "fail" : "missing"} text={MISSING} title={primaryAccountMissing} />}</dd></div>
@@ -617,9 +615,9 @@ export function CustomerWorkspacePage() {
       <p className="customer-form-note">账号状态取 <code>bos_user_binding.status</code>(启停),激活状态取 <code>bos_account_ext.status</code>(激活码生命周期),两者正交:账号可用性只决定能否登录。激活码明文仅开通/重置当次回执一次性下发,本页「重置激活码」后的新码同样只在上方回显一次。</p>
     </section>
 
-    <section className="ops-record-card customer-workspace-panel" id="workspace-service" role="tabpanel" aria-labelledby="customer-tab-subscriptions" hidden={tab !== "subscriptions"}><div className="customer-form-section-title"><span>04</span><div><h2>全部订阅</h2><p>客户在本运营商下的套餐订阅记录;同族同出口允许多份并存(I6 已停用),升降配生成替换记录、叠加新建并存订阅。升降配与叠加在生效中订阅行的「更多」里直接办理。</p></div></div>
-      <div className="ops-table-wrap">{ordersLoad.error ? <div className="ops-empty"><FetchError message={ordersLoad.error.message} onRetry={ordersLoad.reload} /></div> :
-      <table className="ops-table"><OpsTableColumns widths={[170, 90, 90, 110, 130, 170, 80, 110, 90, 80]} /><OpsTableHead columns={["套餐", "类型", "变更类型", "关联订阅", "合同", "服务期限", "分账号", "月缴金额", "状态", ""]} />
+    <section className="ops-record-card customer-workspace-panel" id="workspace-service" role="tabpanel" aria-labelledby="customer-tab-subscriptions" hidden={tab !== "subscriptions"}><div className="customer-form-section-title"><div><h2>全部订阅</h2><p>可在生效中订阅的「更多」菜单办理升降配或叠加。</p></div></div>
+      <div className="ops-table-wrap record-table-scroll" role="region" aria-label="全部订阅列表" tabIndex={0}>{ordersLoad.error ? <div className="ops-empty"><FetchError message={ordersLoad.error.message} onRetry={ordersLoad.reload} /></div> :
+      <table className="ops-table record-subscriptions-table"><OpsTableColumns widths={[170, 90, 90, 110, 130, 170, 80, 110, 90, 80]} /><OpsTableHead columns={["套餐", "类型", "变更类型", "关联订阅", "合同", "服务期限", "分账号", "月缴金额", "状态", "操作"]} />
         <tbody>{orders.length ? orders.map((sub: any) => {
         const row = orderView(sub);
         const rowStatus = sub.status_display?.label ?? row.statusLabel;
@@ -630,7 +628,7 @@ export function CustomerWorkspacePage() {
           { label: "叠加", icon: <CalendarPlus size={15} />, onSelect: () => setCreateOpen(true) },
         ] : [];
         return <tr key={sub.subscription_id}>
-          <td>{sub.plan_name ?? sub.plan_id}</td>
+          <td><Link className="contract-ref-link" to={`/orders/${encodeURIComponent(sub.subscription_id)}`} state={outgoingState}>{sub.plan_name ?? sub.plan_id}</Link><small>{sub.subscription_id}</small></td>
           <td>{sub.plan_kind ? label(PLAN_KIND, sub.plan_kind) : "-"}</td>
           <td title="由替换关系派生:有 replaces_subscription_id=升降配,否则新签">{sub.replaces_subscription_id ? "升降配" : "新签"}</td>
           <td title="由替换关系派生:有 replaces_subscription_id=升降配,否则新签">{sub.replaces_subscription_id ? <TextCell value={sub.replaces_subscription_id} /> : <span className="ops-muted">—(新签,无前序订阅)</span>}</td>
@@ -640,7 +638,6 @@ export function CustomerWorkspacePage() {
           <td>{sub.monthly_settle_cents ? money(String(sub.monthly_settle_cents / 100)) : <Tri tone="missing" text={MISSING} title={MISSING + ":monthly_settle_cents 未下发"} />}</td>
           <td><OpsStatus tone={statusTone(sub.status_display?.label ?? sub.status)}>{sub.status_display?.label ?? sub.status ?? MISSING}</OpsStatus>{sub.editable === false && sub.reason ? `(${sub.reason.replace(/([^()]*)$/, "").replace(/[,。;]$/, "")})` : ""}</td>
           <td><div className="ops-inline-actions">
-            <Button variant="ghost" onClick={() => navigate(`/orders/${encodeURIComponent(sub.subscription_id)}`, { state: outgoingState })}>查看</Button>
             {writable && rowStatus === "生效中" ? <CustomerServiceStopAction customerId={no || ""} customerName={displayName} orderId={sub.subscription_id} orderLabel={rowStatus} /> : null}
             <OpsMore items={orderMore} placeholder />
           </div></td>
@@ -649,8 +646,8 @@ export function CustomerWorkspacePage() {
       </table>}</div>
     </section>
 
-    <section className="ops-record-card customer-workspace-panel" id="customer-panel-subaccounts" role="tabpanel" aria-labelledby="customer-tab-subaccounts" hidden={tab !== "subaccounts"}><div className="customer-form-section-title"><span>05</span><div><h2>分账号</h2><p>网络账号由网络开通流程创建,本页只维护展示名与网络侧账号名;主账号不占套餐额度、不在此列出。</p></div></div>
-      <div className="ops-table-wrap"><table className="ops-table"><OpsTableColumns widths={[60, 130, 110, 170, 90, 110, 110, 80]} /><OpsTableHead columns={["序号", "账号名", "姓名", "网络侧账号名", "账号状态", "开通日", "停用日", "操作"]} />
+    <section className="ops-record-card customer-workspace-panel" id="customer-panel-subaccounts" role="tabpanel" aria-labelledby="customer-tab-subaccounts" hidden={tab !== "subaccounts"}><div className="customer-form-section-title"><div><h2>分账号</h2><p>网络账号由网络开通流程创建,本页只维护展示名与网络侧账号名;主账号不占套餐额度、不在此列出。</p></div></div>
+      <div className="ops-table-wrap record-table-scroll" role="region" aria-label="分账号列表" tabIndex={0}><table className="ops-table record-accounts-table"><OpsTableColumns widths={[60, 130, 110, 170, 90, 110, 110, 80]} /><OpsTableHead columns={["序号", "账号名", "姓名", "网络侧账号名", "账号状态", "开通日", "停用日", "操作"]} />
         <tbody>{accounts.error ? <tr><td colSpan={8}><Tri tone="fail" text="取数失败" title={accounts.error.message} /></td></tr>
           : accountRows.length ? accountRows.map((row, index) => <tr key={row.sub_account_id}>
             <td>{index + 1}</td>
@@ -683,7 +680,7 @@ export function CustomerWorkspacePage() {
       <p className="customer-form-note">网络侧账号名由客户提供,仅用于与本系统账号对照,系统不为其做唯一性或格式校验。分账号的开通与停发:{MISSING} —— <code>/sub_account/*</code> 只有读列表与改姓名两个口,无新增与删除路由。</p>
     </section>
 
-    <section className="ops-record-card customer-workspace-panel" id="customer-panel-materials" role="tabpanel" aria-labelledby="customer-tab-materials" hidden={tab !== "materials"}><div className="customer-form-section-title"><span>06</span><div><h2>登记材料与合同文档</h2><p>企业客户营业执照影像由本系统留存备查;个人与个体工商户不适用。</p></div></div>
+    <section className="ops-record-card customer-workspace-panel" id="customer-panel-materials" role="tabpanel" aria-labelledby="customer-tab-materials" hidden={tab !== "materials"}><div className="customer-form-section-title"><div><h2>登记材料与合同文档</h2><p>企业客户营业执照影像由本系统留存备查;个人与个体工商户不适用。</p></div></div>
       <div className="customer-panel"><h3>登记材料 · 营业执照影像</h3>
         {!licenseApplicable ? <p className="ops-muted">不适用(个人与个体工商户不采集证件影像)</p>
           : license?.status === "viewable" ? <div className="customer-file-list"><div><span className="customer-file-thumb"><FileText size={16} /></span><div><strong>{license.file_name ?? MISSING}</strong><p>可查看(签名短时效,仅本次页面有效)</p></div>
@@ -698,8 +695,8 @@ export function CustomerWorkspacePage() {
       <p className="customer-form-note">应备材料(按主体类型):{subjectText ? customerMaterials(subjectText as "企业" | "个体工商户" | "个人") : <Tri tone="missing" text={MISSING} title={MISSING + ":subject_type"} />};合同文档:{CONTRACT_DOC_NOTE}。</p>
     </section>
 
-    <section className="ops-record-card customer-workspace-panel" id="customer-panel-history" role="tabpanel" aria-labelledby="customer-tab-history" hidden={tab !== "history"}><div className="customer-form-section-title"><span>07</span><div><h2>历史记录</h2><p>记录档案与账号的关键变更,只读保留。</p></div></div>
-      <div className="ops-table-wrap"><table className="ops-table"><OpsTableColumns widths={[150, 140, 320, 150]} /><OpsTableHead columns={["时间", "变更项", "变化前 → 变化后", "操作人"]} />
+    <section className="ops-record-card customer-workspace-panel" id="customer-panel-history" role="tabpanel" aria-labelledby="customer-tab-history" hidden={tab !== "history"}><div className="customer-form-section-title"><div><h2>历史记录</h2></div></div>
+      <div className="ops-table-wrap record-table-scroll" role="region" aria-label="客户历史记录列表" tabIndex={0}><table className="ops-table record-history-table"><OpsTableColumns widths={[150, 140, 320, 150]} /><OpsTableHead columns={["时间", "变更项", "变化前 → 变化后", "操作人"]} />
         <tbody>{changes.error ? <tr><td colSpan={4}><Tri tone="fail" text="取数失败" title={changes.error.message} /></td></tr>
           : changeRows.length ? changeRows.map((row, index) => <tr key={`${row.changed_at ?? "h"}-${index}`}>
             <td><TextCell value={row.changed_at} /></td>
@@ -712,10 +709,11 @@ export function CustomerWorkspacePage() {
     </section>
 
     {/* 交付现状(讨论稿 §7.7):按需挂载——不进该页签就不发 `/delivery/list@v1`。 */}
-    {tab === "delivery" && <section className="ops-record-card customer-workspace-panel" id="customer-panel-delivery" role="tabpanel" aria-labelledby="customer-tab-delivery">
-      <div className="customer-form-section-title"><span>08</span><div><h2>交付现状</h2><p>该客户全部在册资源:在册只认交付台账,实测参数取该账号最近一次成功开通回填(列头带测值日期)。</p></div></div>
-      {no ? <DeliveryStatusTable customerId={no} /> : null}
-    </section>}
+    <section className="ops-record-card customer-workspace-panel" id="customer-panel-delivery" role="tabpanel" aria-labelledby="customer-tab-delivery" hidden={tab !== "delivery"}>
+      <div className="customer-form-section-title"><div><h2>交付现状</h2><p>该客户全部在册资源:在册只认交付台账,实测参数取该账号最近一次成功开通回填(列头带测值日期)。</p></div></div>
+      {tab === "delivery" && no ? <DeliveryStatusTable customerId={no} /> : null}
+    </section>
+    </div>
 
     {notice && <OpsNotice message={notice} onClose={() => setNotice("")} />}
 

+ 1 - 10
web-scaffold/src/styles/operations.css

@@ -423,7 +423,6 @@ button.ops-contract-exit.is-active svg { opacity: .7; }
 .contract-record-summary>div:last-child { border-right:0; }
 .contract-record-summary span,.contract-record-summary small { color:var(--text-secondary);font-size:var(--type-support); }
 .contract-record-summary strong { overflow-wrap:anywhere;color:var(--primary);font-size:clamp(20px,1.5vw,26px);font-variant-numeric:tabular-nums; }
-.contract-record-columns { display:grid;grid-template-columns:minmax(0,1fr) 230px;align-items:start;gap:16px; }
 .contract-record-main { display:grid;gap:14px;min-width:0; }
 .contract-record-section { min-width:0;padding:19px 22px 22px;border:1px solid var(--border);border-radius:var(--radius-card);background:var(--card);box-shadow:var(--shadow-card); }
 /* 分区头做成通栏色带(原型 .sec-h):序号块 + 标题 + 右侧动作,底边一条 --border-subtle。 */
@@ -453,11 +452,6 @@ button.ops-contract-exit.is-active svg { opacity: .7; }
 /* 整行字段(合同总额/周期、运营商经办人、录入经办人):facts 是两列网格 ⇒ 跨满两列才不会与邻项并排。 */
 .contract-record-facts>div.contract-facts-row-full { grid-column:1 / -1; }
 .contract-record-note { margin:12px 0 0;color:var(--text-secondary);font-size:var(--type-support);line-height:1.6; }
-.contract-record-side { position:sticky;top:14px;display:grid;gap:12px; }
-.contract-record-side section { display:grid;gap:9px;padding:17px;border:1px solid var(--border);border-radius:var(--radius-card);background:var(--card);box-shadow:var(--shadow-card); }
-.contract-record-side span,.contract-record-side small { color:var(--text-secondary);font-size:var(--type-support); }
-.contract-record-side strong { overflow-wrap:anywhere;font-size:var(--type-body); }
-.contract-record-time-line { width:2px;height:35px;margin-left:5px;background:var(--primary); }
 .contract-record-file { display:flex;align-items:center;gap:8px;color:var(--primary); }
 .contract-record-file { width:100%;padding:8px 0;border:0;background:transparent;text-align:left;cursor:pointer; }
 .contract-record-file:hover strong { text-decoration:underline; }
@@ -512,10 +506,9 @@ button.ops-contract-exit.is-active svg { opacity: .7; }
 .ops-contract-customer-note { margin-top:10px; }
 @media(max-width:900px){.ops-contract-customer-picker{grid-template-columns:1fr}.ops-contract-customer-profile{grid-template-columns:1fr}.ops-contract-customer-identity{padding-right:0;padding-bottom:12px;border-right:0;border-bottom:1px solid var(--border)}}
 @media(max-width:600px){.ops-contract-customer-profile dl{grid-template-columns:1fr}}
-@media(max-width:1150px){.contract-record-columns{grid-template-columns:1fr}.contract-record-side{position:static;grid-template-columns:repeat(2,minmax(0,1fr))}}
 @media(max-width:1450px){.contract-record-summary{grid-template-columns:repeat(3,minmax(0,1fr))}.contract-record-summary>div:nth-child(3){border-right:0}.contract-record-summary>div:nth-child(n+4){border-top:1px solid var(--border)}}
 @media(max-width:750px){.contract-record-summary>div:nth-child(3){border-right:1px solid var(--border)}}
-@media(max-width:750px){.contract-record-hero{flex-direction:column;padding:17px}.contract-record-summary{grid-template-columns:repeat(2,minmax(0,1fr))}.contract-record-summary>div:nth-child(2){border-right:0}.contract-record-summary>div:nth-child(n+3){border-top:1px solid var(--border)}.contract-record-facts,.contract-record-side{grid-template-columns:1fr}.contract-record-facts>div{grid-template-columns:115px minmax(0,1fr)}.contract-record-section{padding:16px}.contract-record-section-title{margin:-16px -16px 16px;padding:12px 14px;flex-wrap:wrap}.contract-record-section-title>.contract-section-amount{margin-left:37px;align-items:flex-start;text-align:left;width:100%}}
+@media(max-width:750px){.contract-record-hero{flex-direction:column;padding:17px}.contract-record-summary{grid-template-columns:repeat(2,minmax(0,1fr))}.contract-record-summary>div:nth-child(2){border-right:0}.contract-record-summary>div:nth-child(n+3){border-top:1px solid var(--border)}.contract-record-facts{grid-template-columns:1fr}.contract-record-facts>div{grid-template-columns:115px minmax(0,1fr)}.contract-record-section{padding:16px}.contract-record-section-title{margin:-16px -16px 16px;padding:12px 14px;flex-wrap:wrap}.contract-record-section-title>.contract-section-amount{margin-left:37px;align-items:flex-start;text-align:left;width:100%}}
 .customer-workspace { padding-bottom: 28px; }
 .customer-hero { display: flex; align-items: center; gap: 18px; padding: 22px 26px; margin: 10px 0 16px; border: 1px solid var(--border); border-radius: var(--radius-card); background: linear-gradient(180deg, #fcfdfe, var(--card)); box-shadow: var(--shadow-card); }
 .customer-hero-symbol { display: grid; place-items: center; width: 54px; height: 54px; flex: none; border-radius: 14px; background: var(--primary); color: var(--primary-foreground); }
@@ -1141,8 +1134,6 @@ button.ops-contract-exit.is-active svg { opacity: .7; }
 .ops-delivery-status tr.ops-delivery-mismatch:hover > td { background:color-mix(in srgb, var(--destructive) 14%, transparent); }
 
 /* ── 客户工作台:顶部七个区块改为页签(讨论稿§7.7:新增「交付现状」页签) ── */
-.customer-workspace-tabs { margin-bottom:4px; }
-.customer-workspace-tabs button span { color:var(--muted-foreground); font-weight:400; }
 .customer-workspace-panel[hidden] { display:none !important; }
 
 /* ═══════════════════════════════════════════════════════════════════════════

+ 206 - 0
web-scaffold/src/styles/record-detail.css

@@ -0,0 +1,206 @@
+.record-detail {
+  min-width: 0;
+}
+
+.customer-record-masthead,
+.record-tabs-frame {
+  min-width: 0;
+  border: 1px solid var(--border);
+  border-radius: var(--radius-card);
+  background: var(--card);
+  box-shadow: var(--shadow-card);
+}
+
+.customer-record-masthead {
+  margin-bottom: 16px;
+  border-top: 3px solid var(--primary);
+}
+
+.customer-record-masthead .ops-page-hero {
+  border: 0;
+  background: transparent;
+  box-shadow: none;
+}
+
+.customer-record-title {
+  display: flex;
+  flex-wrap: wrap;
+  align-items: center;
+  gap: 8px 12px;
+  margin: 6px 0 10px;
+}
+
+.customer-record-title h1 {
+  margin: 0;
+  font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem);
+}
+
+.customer-record-metrics.ops-metric-strip {
+  grid-template-columns: repeat(4, minmax(0, 1fr));
+  margin: 0;
+  border: 0;
+  border-top: 1px solid var(--border-subtle);
+  border-radius: 0 0 calc(var(--radius-card) - 1px) calc(var(--radius-card) - 1px);
+  background: var(--border-subtle);
+}
+
+.customer-record-metrics .ops-metric-card {
+  padding: 12px 20px;
+  background: var(--surface-subtle);
+}
+
+.customer-record-metrics .ops-metric-card strong {
+  color: var(--foreground);
+  font-size: var(--type-section);
+  font-variant-numeric: tabular-nums;
+  overflow-wrap: anywhere;
+}
+
+.record-tabs {
+  display: flex;
+  gap: 4px;
+  padding: 6px 12px 0;
+  overflow-x: auto;
+  scrollbar-width: thin;
+  border-bottom: 1px solid var(--border);
+}
+
+.record-tabs button {
+  display: flex;
+  flex: none;
+  align-items: center;
+  gap: 7px;
+  padding: 0 12px;
+  min-height: 44px;
+  border-bottom: 2px solid transparent;
+  border-radius: var(--radius-control) var(--radius-control) 0 0;
+  color: var(--text-secondary);
+  font-size: var(--type-body);
+  white-space: nowrap;
+  cursor: pointer;
+  transition: color 150ms, background-color 150ms;
+}
+
+.record-tabs button:hover {
+  background: var(--surface-subtle);
+}
+
+.record-tabs button[aria-selected="true"] {
+  border-color: var(--primary);
+  background: var(--primary-soft);
+  color: var(--primary-soft-foreground);
+  font-weight: 650;
+}
+
+.record-tabs button:focus-visible,
+.record-detail .record-table-scroll:focus-visible {
+  outline: 2px solid var(--primary);
+  outline-offset: -3px;
+}
+
+.record-tab-count {
+  min-width: 19px;
+  padding: 1px 5px;
+  border-radius: 5px;
+  background: var(--secondary);
+  color: var(--text-secondary);
+  font: 600 var(--type-meta)/1.4 var(--font-mono);
+  text-align: center;
+}
+
+.record-tabs-frame > :is(.ops-record-card, .contract-record-section),
+.record-tabs-frame .contract-record-main > .contract-record-section {
+  margin: 0;
+  border: 0;
+  border-radius: 0;
+  background: transparent;
+  box-shadow: none;
+}
+
+.record-tabs-frame .contract-record-main {
+  gap: 0;
+}
+
+.record-tabs-frame .contract-record-main > section + section {
+  border-top: 1px solid var(--border);
+}
+
+.record-tabs-frame .record-tab-panel[hidden] {
+  display: none;
+}
+
+.record-detail .record-tabs-frame :is(.customer-form-section-title, .contract-record-section-title) {
+  margin: 0 0 16px;
+  padding: 0;
+  border: 0;
+  border-radius: 0;
+  background: transparent;
+}
+
+.record-detail .record-tabs-frame :is(.customer-form-section-title, .contract-record-section-title) h2 {
+  font-size: var(--type-section);
+}
+
+.record-detail .customer-workspace-panel > .ops-record-summary {
+  grid-template-columns: repeat(2, minmax(0, 1fr));
+  gap: 0 24px;
+}
+
+.record-detail .customer-workspace-panel > .ops-record-summary > div {
+  min-width: 0;
+  padding: 12px 0;
+  border-bottom: 1px solid var(--border-subtle);
+}
+
+.record-detail .customer-workspace-panel > .customer-panel + .customer-panel {
+  margin-top: 12px;
+}
+
+.record-detail .record-table-scroll {
+  max-width: 100%;
+  border: 1px solid var(--border-subtle);
+  border-radius: var(--radius-control);
+}
+
+.record-detail .record-table-scroll th {
+  border-top: 0;
+}
+
+.record-detail .record-subscriptions-table { min-width: 1160px; }
+.record-detail .record-accounts-table { min-width: 900px; }
+.record-detail .record-history-table { min-width: 650px; }
+.record-detail .record-history-table td:nth-child(3) { white-space: normal; overflow-wrap: anywhere; }
+
+.record-detail .contract-log-card > .contract-log-meta {
+  display: block;
+  margin-bottom: 12px;
+  color: var(--text-secondary);
+  font-size: var(--type-support);
+}
+
+.record-detail .contract-log-note {
+  display: block;
+  margin-top: 14px;
+  color: var(--text-secondary);
+}
+
+.record-detail .contract-log-card > button {
+  margin-top: 12px;
+}
+
+@media (max-width: 760px) {
+  .customer-record-metrics.ops-metric-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
+  .customer-record-metrics .ops-metric-card { padding-inline: 16px; }
+  .record-tabs { padding-inline: 6px; }
+  .record-tabs button { padding-inline: 10px; }
+  .record-detail .record-tabs-frame .contract-section-amount { margin-left: 0; }
+}
+
+@media (max-width: 600px) {
+  .record-detail .customer-workspace-panel > .ops-record-summary,
+  .record-detail .customer-panel-grid { grid-template-columns: minmax(0, 1fr); }
+}
+
+@media (prefers-reduced-motion: reduce) {
+  .record-tabs button { transition: none; }
+}

Some files were not shown because too many files changed in this diff