Quellcode durchsuchen

按参考截图收紧客户详情页首布局

sy vor 3 Stunden
Ursprung
Commit
11f8b2c7b5

+ 13 - 11
web-scaffold/src/pages/CustomerWorkspacePage.tsx

@@ -526,32 +526,34 @@ export function CustomerWorkspacePage() {
     return labelText === "生效中";
   });
   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-navigation">
+      <Link to={back.to} state={back.state} className="ops-back-link"><ArrowLeft size={16} />{back.label}</Link>
+      <Button variant="ghost" size="sm" onClick={detail.reload}><RefreshCcw size={15} />刷新</Button>
+    </div>
     <header className="customer-record-masthead">
       <div className="customer-hero-symbol" aria-hidden="true"><Building2 size={26} /></div>
       <div className="customer-hero-copy">
-        <p className="customer-record-id">客户档案 <span>{no}</span></p>
+        <p className="customer-record-id">CUSTOMER <span aria-hidden="true">·</span> <span>{no}</span></p>
         <h1 className="customer-record-title">{displayName}</h1>
         <div className="customer-record-tags">
           {subjectText && <OpsTag tone="brand">{subjectText}</OpsTag>}
           <AcctCell raw={customer?.acct_status} />
+          <span className="customer-record-region"><MapPin size={14} aria-hidden="true" /><TextCell value={mountedRegionPath} note="未取到该客户的区域挂载信息" /></span>
         </div>
       </div>
-      <div className="ops-hero-actions customer-record-actions">
+      {writable && <div className="ops-hero-actions customer-record-actions">
         {/* D-11:手册「客户/订阅详情页」均可发起服务停用;停用挂具体订阅(工单§3.2.1)。 */}
-        {writable && heroStopSub ? <CustomerServiceStopAction
+        {heroStopSub ? <CustomerServiceStopAction
           customerId={no || ""}
           customerName={displayName}
           orderId={heroStopSub.subscription_id}
           orderLabel={heroStopSub.status_display?.label ?? orderView(heroStopSub).statusLabel}
         /> : null}
-        <Button variant="outline" onClick={detail.reload}><RefreshCcw size={15} />刷新</Button>
-      </div>
-      <dl className="customer-record-context">
-        <div><dt><MapPin size={14} aria-hidden="true" />所属区域</dt><dd><TextCell value={mountedRegionPath} note="未取到该客户的区域挂载信息" /></dd></div>
-        <div><dt>运营商</dt><dd><TextCell value={customer?.operator_name} /></dd></div>
-        <div><dt>运维团队</dt><dd><TextCell value={teamNames.join("、")} />{staleTeamHint && <Tri tone="fail" text="需改派单支" title={staleTeamHint} />}</dd></div>
-      </dl>
+        <Button variant="outline" size="sm" disabled={!form || busy} onClick={() => {
+          setTab("profile");
+          startField("name");
+        }}>编辑档案</Button>
+      </div>}
     </header>
 
     <dl className="customer-record-metrics" aria-label="客户业务摘要">

+ 40 - 30
web-scaffold/src/styles/record-detail.css

@@ -10,16 +10,29 @@
   box-shadow: var(--shadow-card);
 }
 
+.customer-record-navigation {
+  display: flex;
+  flex-wrap: wrap;
+  align-items: center;
+  justify-content: space-between;
+  gap: 8px;
+  margin-bottom: 10px;
+}
+
+.customer-record-navigation .ops-back-link {
+  margin-bottom: 0;
+}
+
 .customer-record-masthead {
   display: grid;
   grid-template-columns: auto minmax(0, 1fr) auto;
   align-items: center;
-  gap: 16px;
-  padding: 20px 24px 16px;
-  margin-bottom: 12px;
+  gap: 18px;
+  padding: 22px 26px;
+  margin-bottom: 16px;
   border: 1px solid var(--border);
   border-radius: var(--radius-card);
-  background: linear-gradient(110deg, var(--card) 54%, var(--primary-soft));
+  background: linear-gradient(110deg, var(--card) 61%, var(--primary-soft));
   box-shadow: var(--shadow-card);
 }
 
@@ -29,8 +42,10 @@
   align-items: baseline;
   gap: 4px 8px;
   margin: 0;
-  color: var(--text-secondary);
-  font-size: var(--type-meta);
+  color: var(--primary-soft-foreground);
+  font-size: var(--type-support);
+  font-weight: 700;
+  letter-spacing: .08em;
 }
 
 .customer-record-id span {
@@ -55,17 +70,20 @@
   gap: 6px;
 }
 
-.customer-record-context {
-  grid-column: 1 / -1;
-  display: grid;
-  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr) minmax(0, 1fr);
-  gap: 10px 20px;
-  margin: 0;
-  padding-top: 12px;
-  border-top: 1px solid var(--border);
+.customer-record-region {
+  display: inline-flex;
+  align-items: center;
+  gap: 5px;
+  min-width: 0;
+  color: var(--text-secondary);
+  font-size: var(--type-support);
+  overflow-wrap: anywhere;
+}
+
+.customer-record-region svg {
+  flex: none;
 }
 
-.customer-record-context dt,
 .customer-record-metrics dt {
   display: flex;
   align-items: center;
@@ -74,30 +92,24 @@
   font-size: var(--type-support);
 }
 
-.customer-record-context dd {
-  margin: 3px 0 0;
-  color: var(--foreground);
-  font-size: var(--type-body);
-  overflow-wrap: anywhere;
-}
-
 .customer-record-metrics {
   display: grid;
   grid-template-columns: repeat(4, minmax(0, 1fr));
-  gap: 10px;
+  gap: 1px;
   margin: 0 0 16px;
+  overflow: hidden;
+  border: 1px solid var(--border);
+  border-radius: var(--radius-card);
+  background: var(--border-subtle);
 }
 
 .customer-record-metrics > div {
   min-width: 0;
-  padding: 12px 16px;
-  border: 1px solid var(--border);
-  border-radius: var(--radius-card);
+  padding: 13px 20px;
   background: var(--card);
 }
 
-.customer-record-metrics dt svg,
-.customer-record-context dt svg {
+.customer-record-metrics dt svg {
   flex: none;
   color: var(--primary-soft-foreground);
 }
@@ -268,8 +280,6 @@
 }
 
 @media (max-width: 600px) {
-  .customer-record-context { grid-template-columns: repeat(2, minmax(0, 1fr)); }
-  .customer-record-context > :first-child { grid-column: 1 / -1; }
   .customer-record-metrics > div { padding-inline: 12px; }
   .record-detail .customer-workspace-panel > .ops-record-summary,
   .record-detail .customer-panel-grid { grid-template-columns: minmax(0, 1fr); }