فهرست منبع

移除客户详情页签内的重复标题和编辑提示

sy 2 ساعت پیش
والد
کامیت
b766ea57e0

+ 8 - 10
web-scaffold/src/pages/CustomerWorkspacePage.tsx

@@ -589,8 +589,7 @@ export function CustomerWorkspacePage() {
         : 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>}
+    <section className="ops-record-card customer-workspace-panel" id="customer-panel-profile" role="tabpanel" aria-labelledby="customer-tab-profile" hidden={tab !== "profile"}>
       <dl className="ops-record-summary">
         <div><dt>客户编号</dt><dd>{no}</dd></div>
         <div><dt>客户名称</dt><dd><InlineField id="customer-name" label="客户名称" value={form?.name ?? ""} editing={editingField === "name"} writable={writable} busy={busy} onStart={() => startField("name")} onChange={(value) => patch("name", value)} onDone={() => void commitField("name")} onCancel={() => cancelField("name")} emptyText={MISSING} invalid={invalidOf("name")} error={errorOf("name")} /></dd></div>
@@ -608,7 +607,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"><div><h2>归属关系</h2></div></div>
+    <section className="ops-record-card customer-workspace-panel" id="customer-panel-attribution" role="tabpanel" aria-labelledby="customer-tab-attribution" hidden={tab !== "attribution"}>
       <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>
@@ -621,9 +620,9 @@ 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"><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-panel-grid">
-        <div className="customer-panel"><h3>客户主账号</h3><dl>
+        <div className="customer-panel"><dl>
           <div><dt>登录名</dt><dd>{primaryAccount ? <TextCell value={primaryAccount.username} /> : <Tri tone={primaryAccountLoad.error ? "fail" : "missing"} text={MISSING} title={primaryAccountMissing} />}</dd></div>
           <div><dt>绑定手机号</dt><dd>{primaryAccount ? <OptionalCell value={primaryAccount.mobile} note="该主账号未登记手机号" /> : <Tri tone={primaryAccountLoad.error ? "fail" : "missing"} text={MISSING} title={primaryAccountMissing} />}</dd></div>
           <div><dt>账号状态</dt><dd>{primaryAccount ? <AcctCell raw={primaryAccount.status} /> : <Tri tone={primaryAccountLoad.error ? "fail" : "missing"} text={MISSING} title={primaryAccountMissing} />}</dd></div>
@@ -649,7 +648,7 @@ 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"><div><h2>全部订阅</h2><p>可在生效中订阅的「更多」菜单办理升降配或叠加。</p></div></div>
+    <section className="ops-record-card customer-workspace-panel" id="workspace-service" role="tabpanel" aria-labelledby="customer-tab-subscriptions" hidden={tab !== "subscriptions"}>
       <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) => {
@@ -680,7 +679,7 @@ 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"><div><h2>分账号</h2><p>网络账号由网络开通流程创建,本页只维护展示名与网络侧账号名;主账号不占套餐额度、不在此列出。</p></div></div>
+    <section className="ops-record-card customer-workspace-panel" id="customer-panel-subaccounts" role="tabpanel" aria-labelledby="customer-tab-subaccounts" hidden={tab !== "subaccounts"}>
       <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}>
@@ -714,7 +713,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"><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-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>
@@ -729,7 +728,7 @@ 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"><div><h2>历史记录</h2></div></div>
+    <section className="ops-record-card customer-workspace-panel" id="customer-panel-history" role="tabpanel" aria-labelledby="customer-tab-history" hidden={tab !== "history"}>
       <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}`}>
@@ -744,7 +743,6 @@ export function CustomerWorkspacePage() {
 
     {/* 交付现状(讨论稿 §7.7):按需挂载——不进该页签就不发 `/delivery/list@v1`。 */}
     <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>

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

@@ -1015,7 +1015,7 @@ button.ops-contract-exit.is-active svg { opacity: .7; }
 .customer-teams { display: flex; flex-wrap: wrap; gap: 4px 8px; }
 
 /* ── 合同管理:详情与编辑二合一(悬停显形的行内编辑) ─────────────── */
-.contract-record-edit-hint, .customer-record-edit-hint { display:flex; align-items:center; gap:5px; margin:8px 0 0; color:var(--muted-foreground); font-size:var(--type-meta); }
+.contract-record-edit-hint { display:flex; align-items:center; gap:5px; margin:8px 0 0; color:var(--muted-foreground); font-size:var(--type-meta); }
 .contract-readonly-note { margin-left:6px; color:var(--muted-foreground); font-size:var(--type-meta); font-weight:400; }
 .contract-inline-group { display:flex; flex-wrap:wrap; align-items:center; gap:4px 6px; }
 /* 「机构/姓名/联系方式」三段:标签与值成对,段间留距(合同详情的运营商经办人与录入经办人共用)。 */

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

@@ -198,7 +198,7 @@
   display: none;
 }
 
-.record-detail .record-tabs-frame :is(.customer-form-section-title, .contract-record-section-title) {
+.record-detail .record-tabs-frame .contract-record-section-title {
   margin: 0 0 16px;
   padding: 0;
   border: 0;
@@ -206,7 +206,7 @@
   background: transparent;
 }
 
-.record-detail .record-tabs-frame :is(.customer-form-section-title, .contract-record-section-title) h2 {
+.record-detail .record-tabs-frame .contract-record-section-title h2 {
   font-size: var(--type-section);
 }