|
|
@@ -19,7 +19,7 @@ import { ConstructionGuidePanel } from "../components/work-order/ConstructionGui
|
|
|
import { ScanFieldButton } from "../components/work-order/ScanFieldButton";
|
|
|
import { EvidencePhotoField, type EvidencePhoto } from "../components/work-order/EvidencePhotoField";
|
|
|
import { ApprovedExitSelect, alignApprovedExit } from "../components/work-order/ApprovedExitSelect";
|
|
|
-import { OpsNotice } from "../components/OperationsKit";
|
|
|
+import { OpsNotice, OpsStatus } from "../components/OperationsKit";
|
|
|
import { RecordTabs } from "../components/RecordTabs";
|
|
|
import {
|
|
|
completionGenerate, completionReceipt, completionReject, isYes, messageConfirmConflict, ticketAssign, ticketBackfill,
|
|
|
@@ -319,13 +319,17 @@ function FactSeg({ title, summary, badge, tone, open, children }: {
|
|
|
<summary>
|
|
|
<span className="work-order-seg-title">{title}</span>
|
|
|
<span className="work-order-seg-summary">{summary}</span>
|
|
|
- <span className={`work-order-seg-badge${tone ? ` ${tone}` : ""}`}>{badge}</span>
|
|
|
+ <span className="work-order-seg-badge"><OpsStatus tone={tone === "ok" ? "success" : tone === "warn" ? "warning" : "neutral"}>{badge}</OpsStatus></span>
|
|
|
<ChevronDown className="work-order-seg-chev" size={16} />
|
|
|
</summary>
|
|
|
<div className="work-order-seg-body">{children}</div>
|
|
|
</details>;
|
|
|
}
|
|
|
|
|
|
+function recordValue(value: string | number | null | undefined, empty = "—") {
|
|
|
+ return value == null || value === "" || value === "-" ? <span className="table-placeholder">{empty}</span> : value;
|
|
|
+}
|
|
|
+
|
|
|
/**
|
|
|
* 一组已登记材料的清单(原型 v3:材料跟着产生它的流程段走,⛔ 再单开一张「过程材料」卡)。
|
|
|
*
|
|
|
@@ -350,14 +354,14 @@ function MaterialList({ ticketId, items, empty, allowDownload = true }: {
|
|
|
}
|
|
|
};
|
|
|
return <>
|
|
|
- <div className="work-order-table-wrap compact"><table>
|
|
|
+ <div className="work-order-table-wrap compact" role="region" aria-label="工单材料清单" tabIndex={0}><table>
|
|
|
<thead><tr><th>文件名</th><th>类型</th><th>大小</th><th>登记人</th><th>登记时间</th>{allowDownload && <th><span className="sr-only">操作</span></th>}</tr></thead>
|
|
|
<tbody>{items.map((m) => <tr key={m.material_id}>
|
|
|
- <td>{m.file_name ?? m.material_id}</td>
|
|
|
+ <td className="table-wrap-text"><span className="table-cell-title">{m.file_name ?? m.material_id}</span></td>
|
|
|
<td>{materialKindName(m.kind)}</td>
|
|
|
- <td>{numText(m.size_bytes, " B")}</td>
|
|
|
- <td>{m.uploaded_by ?? "-"}</td>
|
|
|
- <td>{fmtTime(m.uploaded_at)}</td>
|
|
|
+ <td>{recordValue(numText(m.size_bytes, " B"))}</td>
|
|
|
+ <td>{recordValue(m.uploaded_by)}</td>
|
|
|
+ <td>{recordValue(fmtTime(m.uploaded_at))}</td>
|
|
|
{allowDownload && <td><Button variant="ghost" size="sm" type="button" disabled={busy === m.material_id} onClick={() => void download(m)}>下载</Button></td>}
|
|
|
</tr>)}</tbody>
|
|
|
</table></div>
|
|
|
@@ -1461,7 +1465,13 @@ export function WorkOrderRecordPage() {
|
|
|
<section className="record-tab-panel work-order-record-panel work-order-overview-panel" id="work-order-panel-overview"
|
|
|
role="tabpanel" aria-labelledby="work-order-tab-overview" hidden={activeTab !== "overview"} tabIndex={0}>
|
|
|
<p className="work-order-ticket-lead" data-empty={!t.detail || undefined}>{t.detail || "建单时未填写详细描述。"}</p>
|
|
|
- <div className="work-order-summary-grid"><div><span>建单来源</span><strong>{t.submitter_type === "customer" ? "客户侧提交" : t.submitter_type === "reporter" ? "报障人提交" : "运营侧代报"}</strong></div><div><span>外部单号</span><strong>{t.carrier_order_no ?? "无"}</strong></div><div><span>关联订阅</span><strong>{t.subscription_id ? <button type="button" className="work-order-trace-link" onClick={() => openRef({ kind: "order", id: t.subscription_id!, name: refOrder?.plan_name })}>{t.subscription_id}</button> : "无"}{refOrder?.plan_name ? ` · ${refOrder.plan_name}` : ""}</strong></div>{t.deferred_until && <div><span>延期至</span><strong>{fmtDate(t.deferred_until)}</strong></div>}{t.confirm_deadline && <div><span>闭环确认期限</span><strong>{fmtDate(t.confirm_deadline)}</strong></div>}</div>
|
|
|
+ <div className="work-order-summary-grid">
|
|
|
+ <div><span>建单来源</span><strong>{t.submitter_type === "customer" ? "客户侧提交" : t.submitter_type === "reporter" ? "报障人提交" : "运营侧代报"}</strong></div>
|
|
|
+ <div><span>外部单号</span><strong>{recordValue(t.carrier_order_no, "无")}</strong></div>
|
|
|
+ <div><span>关联订阅</span><strong>{t.subscription_id ? <button type="button" className="work-order-trace-link" onClick={() => openRef({ kind: "order", id: t.subscription_id!, name: refOrder?.plan_name })}>{t.subscription_id}</button> : recordValue(null, "无")}{refOrder?.plan_name ? ` · ${refOrder.plan_name}` : ""}</strong></div>
|
|
|
+ {t.deferred_until && <div><span>延期至</span><strong>{fmtDate(t.deferred_until)}</strong></div>}
|
|
|
+ {t.confirm_deadline && <div><span>闭环确认期限</span><strong>{fmtDate(t.confirm_deadline)}</strong></div>}
|
|
|
+ </div>
|
|
|
{/* 客户建单时上传的图片/语音随建单同事务登记(`submit_evidence`),就放在建单来源这一屏。 */}
|
|
|
{submitMaterials.length > 0 && <div className="work-order-submit-materials">
|
|
|
<h4 className="work-order-subhead">客户提交材料</h4>
|
|
|
@@ -1482,10 +1492,41 @@ export function WorkOrderRecordPage() {
|
|
|
summary={d.backfill?.backfill_id ? `${CONCLUSION_NAMES[d.backfill.exec_conclusion ?? ""] ?? d.backfill.exec_conclusion ?? "—"} · 实际开通 ${d.backfill.actual_opened_date ? fmtDate(d.backfill.actual_opened_date) : "—"} · 线路 ${d.backfill.routes?.length ?? 0} 条 / 境外 IP ${d.backfill.ips?.length ?? 0} 条` : "尚未回填 · 缺 线路与路由、执行结论与凭证"}
|
|
|
badge={d.backfill?.backfill_id ? "已回填" : "待回填"} tone={d.backfill?.backfill_id ? "ok" : "warn"}>
|
|
|
{d.backfill?.backfill_id ? <>
|
|
|
- <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>
|
|
|
+ <div className="work-order-summary-grid">
|
|
|
+ <div><span>执行结论</span><strong>{recordValue(CONCLUSION_NAMES[d.backfill.exec_conclusion ?? ""] ?? d.backfill.exec_conclusion)}</strong></div>
|
|
|
+ <div><span>实际开通日期</span><strong>{recordValue(fmtDate(d.backfill.actual_opened_date))}</strong></div>
|
|
|
+ <div><span>停机完成日期</span><strong>{recordValue(fmtDate(d.backfill.stop_done_date))}</strong></div>
|
|
|
+ <div><span>回填次数</span><strong>{recordValue(numText(d.backfill.attempt_count, " 次"))}</strong></div>
|
|
|
+ <div className="wide"><span>结论说明</span><strong>{recordValue(d.backfill.conclusion_note)}</strong></div>
|
|
|
+ <div className="wide"><span>凭证与佐证</span><strong>{recordValue(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) ? "✓" : <span className="table-placeholder">—</span>} / CPID {isYes(r.cpid_registered) ? "✓" : <span className="table-placeholder">—</span>}</td></tr>)}</tbody></table></div></>}
|
|
|
+ {(d.backfill.routes?.length ?? 0) > 0 && <>
|
|
|
+ <h4 className="work-order-subhead">网络线路</h4>
|
|
|
+ <div className="work-order-table-wrap compact" role="region" aria-label="网络线路清单" tabIndex={0}><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><span className="table-cell-title">{recordValue(r.network_account_name)}</span></td>
|
|
|
+ <td>{recordValue([r.intranet_ip, r.subnet_mask].filter(Boolean).join(" / "))}</td>
|
|
|
+ <td>{recordValue(r.src_endpoint)} → {recordValue(r.dst_endpoint)}</td>
|
|
|
+ <td>{recordValue(r.egress_pop)}</td>
|
|
|
+ <td>{recordValue([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" role="region" aria-label="境外出口 IP 清单" tabIndex={0}><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>{recordValue(r.egress)}</td>
|
|
|
+ <td><span className="table-cell-title">{recordValue(r.overseas_ip)}</span></td>
|
|
|
+ <td>{recordValue(r.ip_type)}</td>
|
|
|
+ <td>{recordValue(numText(r.bandwidth_mbps, "M"))}</td>
|
|
|
+ <td>PIN {recordValue(isYes(r.pin_registered) ? "✓" : null)} / CPID {recordValue(isYes(r.cpid_registered) ? "✓" : null)}</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>
|
|
|
@@ -1504,19 +1545,48 @@ export function WorkOrderRecordPage() {
|
|
|
tone={checklistGated ? (checklistAllDone ? "ok" : "warn") : undefined}>
|
|
|
{/* 变更协议单的「原值 → 新值」并成一列(原型 v3),⛔ 再单独渲染一张参数对照表。
|
|
|
核对两列只对门槛类型渲染:非门槛类型没有核对动作,`pending` 不是缺口。 */}
|
|
|
- <div className="work-order-table-wrap compact"><table><thead><tr><th>序号</th><th>条目</th>{t.ticket_type === "updown" ? <th>原值 → 新值</th> : <th>规格</th>}<th>数量</th>{checklistGated && <><th>核对结果</th><th>核对时间</th></>}</tr></thead><tbody>{d.service_items.map((item) => <tr key={item.item_id}><td>{item.seq_no}</td><td><strong>{item.item_name ?? "-"}</strong></td>{t.ticket_type === "updown" ? <td>{item.spec_before ?? "-"} → {item.spec_after ?? "-"}</td> : <td>{item.spec_text ?? "-"}</td>}<td>{numText(item.expect_qty)}</td>{checklistGated && <><td>{item.check_result === "done" ? <span className="ops-state tone-valid">已核对</span> : item.check_result === "absent" ? <span className="ops-state tone-invalid">缺项</span> : <span className="ops-state tone-invalid">未核对</span>}</td><td>{fmtTime(item.checked_at)}</td></>}</tr>)}</tbody></table></div>
|
|
|
+ <div className="work-order-table-wrap compact" role="region" aria-label="服务清单" tabIndex={0}><table>
|
|
|
+ <thead><tr><th>序号</th><th>条目</th><th>{t.ticket_type === "updown" ? "原值 → 新值" : "规格"}</th><th>数量</th>{checklistGated && <><th>核对结果</th><th>核对时间</th></>}</tr></thead>
|
|
|
+ <tbody>{d.service_items.map((item) => <tr key={item.item_id}>
|
|
|
+ <td>{item.seq_no}</td>
|
|
|
+ <td><span className="table-cell-title">{recordValue(item.item_name)}</span></td>
|
|
|
+ <td className="table-wrap-text">{t.ticket_type === "updown" ? <>{recordValue(item.spec_before)} → {recordValue(item.spec_after)}</> : recordValue(item.spec_text)}</td>
|
|
|
+ <td>{item.expect_qty != null && item.expect_qty !== "" ? <span className="table-number">{numText(item.expect_qty)}</span> : recordValue(null)}</td>
|
|
|
+ {checklistGated && <>
|
|
|
+ <td><OpsStatus tone={item.check_result === "done" ? "success" : "neutral"}>{item.check_result === "done" ? "已核对" : item.check_result === "absent" ? "缺项" : "未核对"}</OpsStatus></td>
|
|
|
+ <td>{recordValue(fmtTime(item.checked_at))}</td>
|
|
|
+ </>}
|
|
|
+ </tr>)}</tbody>
|
|
|
+ </table></div>
|
|
|
<p className="work-order-seg-foot">{checklistNote}</p>
|
|
|
</FactSeg>}
|
|
|
{(d.open_stop?.accounts.length ?? 0) > 0 && <FactSeg title="账号清单" open={openSeg === "accounts"}
|
|
|
summary={`${d.open_stop!.accounts.length} 个账号 · ${d.open_stop!.preview ? "待停预览" : d.open_stop!.exec_status === "pending" ? "待生效" : "已生效"}`}
|
|
|
badge={d.open_stop!.preview ? "预览" : d.open_stop!.exec_status === "pending" ? "待生效" : "已生效"} tone={d.open_stop!.preview || d.open_stop!.exec_status === "pending" ? "warn" : "ok"}>
|
|
|
- <div className="work-order-table-wrap compact"><table><thead><tr><th>显示名</th><th>网络账户名</th><th>停机前 → 生效后</th><th>生效日</th><th>来源</th></tr></thead><tbody>{d.open_stop!.accounts.map((a) => <tr key={a.id ?? a.sub_account_id ?? `${a.display_name}-${a.net_account}`}><td>{a.display_name ?? "-"}</td><td>{a.net_account ?? "-"}</td><td>{label(ACCT_STATUS, a.before_status) || "-"} → {label(ACCT_STATUS, a.after_status) || (a.source === "preview" ? "待停" : "-")}</td><td>{a.effective_date ? fmtDate(a.effective_date) : "-"}</td><td>{a.source ?? "-"}</td></tr>)}</tbody></table></div>
|
|
|
+ <div className="work-order-table-wrap compact" role="region" aria-label="账号清单" tabIndex={0}><table>
|
|
|
+ <thead><tr><th>显示名</th><th>网络账户名</th><th>停机前 → 生效后</th><th>生效日</th><th>来源</th></tr></thead>
|
|
|
+ <tbody>{d.open_stop!.accounts.map((a) => <tr key={a.id ?? a.sub_account_id ?? `${a.display_name}-${a.net_account}`}>
|
|
|
+ <td><span className="table-cell-title">{recordValue(a.display_name)}</span></td>
|
|
|
+ <td>{recordValue(a.net_account)}</td>
|
|
|
+ <td>{recordValue(label(ACCT_STATUS, a.before_status))} → {recordValue(label(ACCT_STATUS, a.after_status) || (a.source === "preview" ? "待停" : null))}</td>
|
|
|
+ <td>{recordValue(fmtDate(a.effective_date))}</td>
|
|
|
+ <td>{recordValue(a.source)}</td>
|
|
|
+ </tr>)}</tbody>
|
|
|
+ </table></div>
|
|
|
{d.open_stop && <p className="work-order-seg-foot">{d.open_stop.preview ? `待停账号预览 ${numText(d.open_stop.effective_account_count)} 个(回填前供现场核对)。` : <>开停记录:{d.open_stop.action ? (OPEN_STOP_ACTION_NAMES[d.open_stop.action] ?? d.open_stop.action) : "-"} / {d.open_stop.exec_status ? (EXEC_STATUS_NAMES[d.open_stop.exec_status] ?? d.open_stop.exec_status) : "-"} / 生效账号 {numText(d.open_stop.effective_account_count)} 个{d.open_stop.exec_status === "pending" ? "(待生效)" : ""}{isYes(d.open_stop.closed_flag) ? " · 已随工单关闭" : ""}。</>}</p>}
|
|
|
</FactSeg>}
|
|
|
{showCompletion && <FactSeg title="竣工与回执" open={openSeg === "completion"}
|
|
|
summary={d.completion ? `${d.completion.completion_no ?? "—"} · ${receiptState.text}` : "未生成 · 缺口齐备后可生成"}
|
|
|
badge={receiptState.text} tone={receiptState.tone}>
|
|
|
- {d.completion ? <div className="work-order-summary-grid"><div><span>竣工单号</span><strong>{d.completion.completion_no ?? "-"}</strong></div><div><span>动作</span><strong>{d.completion.action ? (OPEN_STOP_ACTION_NAMES[d.completion.action] ?? d.completion.action) : "-"}</strong></div><div><span>执行结论</span><strong>{d.completion.exec_conclusion ? (CONCLUSION_NAMES[d.completion.exec_conclusion] ?? d.completion.exec_conclusion) : "-"}</strong></div><div><span>回传方式</span><strong>{d.completion.mode === "auto" ? "自动" : "手工"}</strong></div><div><span>回传时间</span><strong>{fmtTime(d.completion.pushed_at)}</strong></div><div><span>回执时间</span><strong>{fmtTime(d.completion.receipt_at)}</strong></div><div className="wide"><span>回执说明</span><strong>{d.completion.receipt_remark ?? "-"}</strong></div></div> : <p className="work-order-seg-foot">{d.gaps.length ? `缺口未清,竣工暂不可生成:${d.gaps.map(groupLabel).join(" / ")}` : conclusionBlocksCompletion(d.backfill?.exec_conclusion) ? "回填结论为失败,须重新回填成功/部分成功后才可生成竣工并回传。" : "缺口已齐,可生成竣工并回传。"}</p>}
|
|
|
+ {d.completion ? <div className="work-order-summary-grid">
|
|
|
+ <div><span>竣工单号</span><strong>{recordValue(d.completion.completion_no)}</strong></div>
|
|
|
+ <div><span>动作</span><strong>{recordValue(OPEN_STOP_ACTION_NAMES[d.completion.action ?? ""] ?? d.completion.action)}</strong></div>
|
|
|
+ <div><span>执行结论</span><strong>{recordValue(CONCLUSION_NAMES[d.completion.exec_conclusion ?? ""] ?? d.completion.exec_conclusion)}</strong></div>
|
|
|
+ <div><span>回传方式</span><strong>{d.completion.mode === "auto" ? "自动" : "手工"}</strong></div>
|
|
|
+ <div><span>回传时间</span><strong>{recordValue(fmtTime(d.completion.pushed_at))}</strong></div>
|
|
|
+ <div><span>回执时间</span><strong>{recordValue(fmtTime(d.completion.receipt_at))}</strong></div>
|
|
|
+ <div className="wide"><span>回执说明</span><strong>{recordValue(d.completion.receipt_remark)}</strong></div>
|
|
|
+ </div> : <p className="work-order-seg-foot">{d.gaps.length ? `缺口未清,竣工暂不可生成:${d.gaps.map(groupLabel).join(" / ")}` : conclusionBlocksCompletion(d.backfill?.exec_conclusion) ? "回填结论为失败,须重新回填成功/部分成功后才可生成竣工并回传。" : "缺口已齐,可生成竣工并回传。"}</p>}
|
|
|
{/* 等待回执:出口是回执确认;权限不足时说明谁可执行——⛔ 给一个点了会被服务端拒的按钮。 */}
|
|
|
{d.completion && !d.completion.receipt_at && t.status !== "rejected" && (viewerReadOnly || !can.confirm_receipt
|
|
|
? <p className="work-order-seg-foot"><ShieldAlert size={15} />回执确认仅总运营与该团队主账号可执行。</p>
|
|
|
@@ -1525,7 +1595,15 @@ export function WorkOrderRecordPage() {
|
|
|
"待补充资料后重新提交"),且出参本身就没有 `external_reject_no` 这一列。 */}
|
|
|
{!clientView && !!d.completion_rejects?.length && <>
|
|
|
<h4 className="work-order-subhead">驳回历史({d.completion_rejects.length} 次{d.reject_pending ? " · 外部等待中" : ""})</h4>
|
|
|
- <div className="work-order-table-wrap compact"><table><thead><tr><th>次数</th><th>件号</th><th>理由</th><th>时间</th></tr></thead><tbody>{d.completion_rejects.map((r) => <tr key={r.reject_seq}><td>第 {r.reject_seq} 次</td><td>{r.completion_no}</td><td>{rejectReasonNames(r.reason_codes)}{r.reason_text ? `:${r.reason_text}` : ""}</td><td>{fmtTime(r.rejected_at)} · {r.channel === "human" ? "人工登记" : r.channel}{r.pushed_at ? ` · 回传于 ${fmtDate(r.pushed_at)}` : ""}</td></tr>)}</tbody></table></div>
|
|
|
+ <div className="work-order-table-wrap compact" role="region" aria-label="驳回历史" tabIndex={0}><table>
|
|
|
+ <thead><tr><th>次数</th><th>件号</th><th>理由</th><th>时间</th></tr></thead>
|
|
|
+ <tbody>{d.completion_rejects.map((r) => <tr key={r.reject_seq}>
|
|
|
+ <td>第 {r.reject_seq} 次</td>
|
|
|
+ <td><span className="table-cell-title">{recordValue(r.completion_no)}</span></td>
|
|
|
+ <td className="table-wrap-text">{rejectReasonNames(r.reason_codes)}{r.reason_text ? `:${r.reason_text}` : ""}</td>
|
|
|
+ <td>{recordValue(fmtTime(r.rejected_at))}{r.channel ? ` · ${r.channel === "human" ? "人工登记" : r.channel}` : ""}{r.pushed_at && <small>回传于 {fmtDate(r.pushed_at)}</small>}</td>
|
|
|
+ </tr>)}</tbody>
|
|
|
+ </table></div>
|
|
|
<p className="work-order-seg-foot">驳回期间期限日不重置,超期判定扣掉这段外部等待;出口=同号覆盖重推(驳回态即可执行)或退回重办(总运营/本团队主账号)后再改回填。</p>
|
|
|
</>}
|
|
|
<p className="work-order-seg-foot">回执确认后完成日改写为当天;开停记录的执行日不变。</p>
|
|
|
@@ -1536,7 +1614,18 @@ export function WorkOrderRecordPage() {
|
|
|
|
|
|
{d.messages.length > 0 && <FactSeg title="关联报文" open={openSeg === "messages"}
|
|
|
summary={`${d.messages.length} 条 · 运营商报文与处置状态`} badge={`${d.messages.length} 条`}>
|
|
|
- <div className="work-order-table-wrap compact"><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>{d.messages.map((m) => <tr key={m.message_id}><td>{m.carrier_order_no ?? "-"}</td><td>{m.action ?? "-"}</td><td>{m.status ?? "-"}</td><td>{fmtTime(m.received_at)}</td><td>{fmtTime(m.effective_at)}</td><td>{m.conflict_note ?? m.void_reason ?? "-"}</td><td>{m.status === "conflict" && !clientView && <Button variant="ghost" size="sm" onClick={() => void (async () => { const ok = await submit.run(() => messageConfirmConflict({ message_id: m.message_id, disposition: "as_is" })); if (ok) { setNotice("冲突已按现状归档。"); detail.reload(); } })()}>按现状归档</Button>}</td></tr>)}</tbody></table></div>
|
|
|
+ <div className="work-order-table-wrap compact" role="region" aria-label="关联报文列表" tabIndex={0}><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>{d.messages.map((m) => <tr key={m.message_id}>
|
|
|
+ <td><span className="table-cell-title">{recordValue(m.carrier_order_no)}</span></td>
|
|
|
+ <td>{recordValue(m.action)}</td>
|
|
|
+ <td>{recordValue(m.status)}</td>
|
|
|
+ <td>{recordValue(fmtTime(m.received_at))}</td>
|
|
|
+ <td>{recordValue(fmtTime(m.effective_at))}</td>
|
|
|
+ <td className="table-wrap-text">{recordValue(m.conflict_note ?? m.void_reason)}</td>
|
|
|
+ <td>{m.status === "conflict" && !clientView && <Button variant="ghost" size="sm" onClick={() => void (async () => { const ok = await submit.run(() => messageConfirmConflict({ message_id: m.message_id, disposition: "as_is" })); if (ok) { setNotice("冲突已按现状归档。"); detail.reload(); } })()}>按现状归档</Button>}</td>
|
|
|
+ </tr>)}</tbody>
|
|
|
+ </table></div>
|
|
|
</FactSeg>}
|
|
|
{/* 非主线单(故障/售后)没有施工回填段 ⇒ 过程材料单独成段:这些单上它就是主证据,不是某段的补充。
|
|
|
⚠️ 空清单不给 warn 色调:照片明确定义为「不是完成门槛」(需求 §7.5),不能读成缺项。 */}
|
|
|
@@ -1557,23 +1646,23 @@ export function WorkOrderRecordPage() {
|
|
|
{refCustomer ? <>
|
|
|
<div className="work-order-trace"><span>客户名称</span><strong>{refCustomer.customer_name
|
|
|
? <button type="button" className="work-order-trace-link" onClick={() => openRef({ kind: "customer", id: refCustomer.customer_id, name: refCustomer.customer_name })}>{refCustomer.customer_name}</button>
|
|
|
- : "-"}</strong></div>
|
|
|
+ : recordValue(null)}</strong></div>
|
|
|
<div className="work-order-trace"><span>客户编号</span><strong>{refCustomer.customer_code || refCustomer.customer_id
|
|
|
? <button type="button" className="work-order-trace-link" onClick={() => openRef({ kind: "customer", id: refCustomer.customer_id, name: refCustomer.customer_name })}>{refCustomer.customer_code ?? refCustomer.customer_id}</button>
|
|
|
- : "-"}</strong></div>
|
|
|
+ : recordValue(null)}</strong></div>
|
|
|
<div className="work-order-trace"><span>联系人 / 电话</span><strong>{
|
|
|
refCustomer.contact_name_missing && refCustomer.contact_mobile_missing
|
|
|
? "资料缺失"
|
|
|
- : [
|
|
|
+ : recordValue([
|
|
|
refCustomer.contact_name_missing ? "联系人资料缺失" : refCustomer.contact_name,
|
|
|
refCustomer.contact_mobile_missing
|
|
|
? "电话资料缺失"
|
|
|
: (refCustomer.contact_mobile_full || refCustomer.contact_mobile),
|
|
|
- ].filter(Boolean).join(" / ") || "-"
|
|
|
+ ].filter(Boolean).join(" / "))
|
|
|
}</strong></div>
|
|
|
<div className="work-order-trace"><span>通信地址</span><strong>{refCustomer.address_missing
|
|
|
? <button type="button" className="work-order-trace-link work-order-trace-missing" onClick={() => openRef({ kind: "customer", id: refCustomer.customer_id, name: refCustomer.customer_name })}>资料缺失,需补充</button>
|
|
|
- : (refCustomer.address ?? "-")}</strong></div>
|
|
|
+ : recordValue(refCustomer.address)}</strong></div>
|
|
|
</> : <p className="work-order-reference-empty">该单未关联客户档案。</p>}
|
|
|
{refOrder && <div className="work-order-trace"><span>关联订阅</span><strong><button type="button" className="work-order-trace-link" onClick={() => openRef({ kind: "order", id: refOrder.subscription_id, name: refOrder.plan_name })}>{refOrder.plan_name ?? refOrder.subscription_id}</button></strong><small>{[refOrder.subscription_id, label(PLAN_KIND, refOrder.plan_kind), label(PLAN_FAMILY, refOrder.plan_family), label(ORDER_STATUS, refOrder.status), refOrder.actual_opened_at ? `实际开通 ${fmtDate(refOrder.actual_opened_at)}` : null].filter(Boolean).join(" · ")}</small>{refOrder.parent_subscription_id && <small className="order-parent-mark">叠加于 {refOrder.parent_subscription_id}</small>}</div>}
|
|
|
{/* P1(D-2/D-7):并单成员订阅**平铺**列出,附加成员只标「叠加于 SUB-xxx」,⛔ 折叠成树。 */}
|