| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325 |
- import { useHorizontalOverflow } from "../lib/use-horizontal-overflow";
- import { PageIntro } from "../components/PageIntro";
- import { OpsNotice, OpsTableColumns } 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 { useEffect, useRef, useState, type FormEvent, type ReactNode } from "react";
- import {
- Check, Clock3, Info, Plus, Search, X,
- } from "lucide-react";
- import { Button } from "../components/ui/button";
- import { Input } from "../components/ui/input";
- import { SearchInput } from "../components/ui/search-input";
- import { FieldHint } from "../components/ui/field-hint";
- import { Link, useLocation, useNavigate, useSearchParams } from "react-router";
- import { customerGetList, orderGetList, rowsOf } from "../lib/api/bos";
- import {
- ticketCreate,
- TICKET_STATUSES, TICKET_TYPES, typeLabel, statusFilterLabel,
- } from "../lib/api/ticket";
- import { classifyTicketError, fmtTime, 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 "../styles/operations.css";
- import "../styles/work-orders.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 行):两类行内叫法
- * 「已完成待确认」(主线,等运营商回执)/「已处理待确认」(故障、售后,等提交方确认)
- * 留在徽标与这行悬停说明里,⛔ 在筛选维度上只写其中一半。
- */
- const COMPLETED_SCOPE_HINT = "同一状态码 completed,两类都不是终态:主线=已完成待确认(等运营商回执);故障/售后=已处理待确认(等提交方确认)";
- function Drawer({ title, subtitle, onClose, children }: { title: string; subtitle: string; onClose: () => void; children: ReactNode }) {
- const ref = useRef<HTMLDialogElement>(null);
- useEffect(() => {
- const dialog = ref.current;
- if (!dialog) return;
- const previous = document.activeElement as HTMLElement | null;
- const overflow = document.body.style.overflow;
- document.body.style.overflow = "hidden";
- dialog.showModal();
- return () => { dialog.close(); document.body.style.overflow = overflow; previous?.focus(); };
- }, []);
- return <dialog ref={ref} className="work-order-drawer" aria-labelledby="work-order-drawer-title" onCancel={onClose} onClick={(event) => { if (event.target === event.currentTarget) onClose(); }}>
- <header><div><p>{subtitle}</p><h2 id="work-order-drawer-title">{title}</h2></div><Button variant="ghost" size="icon" aria-label="关闭抽屉" onClick={onClose}><X size={19} /></Button></header>
- {children}
- </dialog>;
- }
- /**
- * 代客建单(`/ticket/create@v1`)。
- *
- * 客户与订阅都从真接口选(⛔ 手输 ID:建单口的 `customer_id` 要过可见性判定,
- * 手输别人的客户只会拿到 `11104`)。建单口只收故障/售后两类(create.rs `CREATE_TYPES`),
- * 开户/到期停机/服务开通由对应业务动作生成,在此提交会被服务端拒。
- */
- const CREATABLE: ["fault" | "after_sale", string][] = [["fault", "故障报修"], ["after_sale", "售后服务"]];
- function Editor({ onClose, onCreated }: { onClose: () => void; onCreated: (message: string) => void }) {
- const submit = useSubmit();
- const [ticketType, setTicketType] = useState<"fault" | "after_sale">("fault");
- const [keyword, setKeyword] = useState("");
- const [customerId, setCustomerId] = useState("");
- const [orderId, setOrderId] = useState("");
- const [title, setTitle] = useState("");
- const [detail, setDetail] = useState("");
- const [customers, setCustomers] = useState<{ customer_id: string; customer_name: string | null }[]>([]);
- const [orders, setSubs] = useState<{ subscription_id: string; plan_name: string | null; contract_no: string | null }[]>([]);
- const [tip, setTip] = useState("");
- function pickCustomer(id: string) { setCustomerId(id); setOrderId(""); }
- useEffect(() => {
- let alive = true;
- const timer = window.setTimeout(async () => {
- try {
- const r = await customerGetList({ page: 0, page_size: 20, keyword: keyword.trim() || undefined });
- if (alive) setCustomers(rowsOf(r).map((c) => ({ customer_id: c.customer_id, customer_name: c.customer_name })));
- } catch { if (alive) setCustomers([]); }
- }, 300);
- return () => { alive = false; window.clearTimeout(timer); };
- }, [keyword]);
- useEffect(() => {
- if (!customerId) { setSubs([]); return; }
- let alive = true;
- fetchAllPages((page, page_size) => orderGetList({ customer_id: customerId, page, page_size }), { pageSize: LIST_PAGE_SIZE })
- .then((r) => { if (alive) setSubs(rowsOf(r.items).map((s) => ({ subscription_id: s.subscription_id, plan_name: s.plan_name, contract_no: s.contract_no ?? null }))); })
- .catch(() => { if (alive) setSubs([]); });
- return () => { alive = false; };
- }, [customerId]);
- async function submitForm(event: FormEvent<HTMLFormElement>) {
- event.preventDefault();
- setTip("");
- if (!customerId) { setTip("请选择归属客户。"); return; }
- if (title.trim().length < 2) { setTip("请填写事项标题(≥2 字)。"); return; }
- const ok = await submit.run(() => ticketCreate({
- ticket_type: ticketType,
- customer_id: customerId,
- title: title.trim(),
- detail: detail.trim() || undefined,
- subscription_id: orderId || undefined,
- }).then((r) => onCreated(`工单 ${r.ticket_no} 已创建。`)));
- if (ok) return;
- }
- const failure = submit.error ? classifyTicketError(submit.error) : null;
- return <Drawer title="新建工单" subtitle="工单与任务 / 代客建单" onClose={onClose}>
- <form className="work-order-editor" onSubmit={submitForm}>
- <p className="work-order-editor-note"><Info size={17} />此处受理故障报修/售后服务。开户、到期停机、服务开通由对应业务动作生成工单,不得在此独立新建。</p>
- <section><h3><span>01</span>事项类型</h3><div className="work-order-form-grid"><label>工单类型 <em>*</em><select value={ticketType} onChange={(event) => setTicketType(event.target.value as "fault" | "after_sale")}>{CREATABLE.map(([code, name]) => <option key={code} value={code}>{name}</option>)}</select></label></div></section>
- <section><h3><span>02</span>归属客户与订阅</h3>
- <div className="work-order-form-grid">
- <label>客户检索<Input autoFocus maxLength={50} placeholder="输入客户名称或编号" value={keyword} onChange={(event) => setKeyword(event.target.value)} /></label>
- <label>归属客户 <em>*</em><FieldHint label="归属客户说明">候选只含当前身份可见的客户;订阅随客户联动。</FieldHint><select value={customerId} onChange={(event) => pickCustomer(event.target.value)}><option value="">请选择</option>{customers.map((c) => <option key={c.customer_id} value={c.customer_id}>{c.customer_name ?? c.customer_id}</option>)}</select></label>
- <label className="wide">关联订阅 <FieldHint label="关联订阅说明">不关联=通用故障/售后;选择订阅后工单会挂到该订阅,便于按订阅追溯处理。</FieldHint><select value={orderId} onChange={(event) => setOrderId(event.target.value)}><option value="">不关联</option>{orders.map((s) => <option key={s.subscription_id} value={s.subscription_id}>{s.plan_name ?? s.subscription_id}{s.contract_no ? ` · ${s.contract_no}` : ""}</option>)}</select></label>
- </div>
- </section>
- <section><h3><span>03</span>事项内容</h3>
- <label>事项标题 <em>*</em><Input required maxLength={100} placeholder="一句话说明诉求" value={title} onChange={(event) => setTitle(event.target.value)} /></label>
- <label>详细描述<FieldHint label="详细描述说明">现象、影响范围、期望完成时间;建单后进入待分派/待处理,过程材料在详情内直传。</FieldHint><textarea maxLength={1000} rows={5} placeholder="现象、影响范围、期望完成时间" value={detail} onChange={(event) => setDetail(event.target.value)} /></label>
- </section>
- {tip && <p className="work-order-form-error" role="alert">{tip}</p>}
- {failure && <p className="work-order-form-error" role="alert">{failure.message}</p>}
- {submit.busy && <p className="work-order-editor-note">提交中…</p>}
- <footer><Button variant="outline" type="button" onClick={onClose}>取消</Button><Button type="submit" disabled={submit.busy}><Check size={16} />创建工单</Button></footer>
- </form>
- </Drawer>;
- }
- /** 逗号分隔的多值参数(`type`/`status` 支持多选;Tab 与下拉框都写这一份)。 */
- function multiOf(params: URLSearchParams, key: string): string[] {
- return (params.get(key) ?? "").split(",").map((v) => v.trim()).filter(Boolean);
- }
- /** 全部工单台账(真接口:`/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`
- * 的 `CustomerTicketListOnly`):客户的工单列表只有一张,⛔ 在运营台账上再裁一份。
- * 下面的分支是第二道防线(旧深链/守卫被绕过时不把责任人、团队、下一步、待办计数摊给客户)。
- */
- const clientView = identity?.role === "enterprise" || identity?.role === "sub";
- const [params, setParams] = useSearchParams();
- const location = useLocation();
- const navigate = useNavigate();
- const [editorOpen, setEditorOpen] = useState(false);
- const [notice, setNotice] = useState("");
- const query = params.get("q") ?? "";
- const types = multiOf(params, "type");
- const statuses = multiOf(params, "status");
- const from = params.get("from") ?? "";
- const to = params.get("to") ?? "";
- const [startDate, endDate] = from && to && from > to ? [to, from] : [from, to];
- const page = Math.max(1, Number(params.get("page")) || 1);
- const list = useTicketList(
- {
- keyword: query.trim() || undefined,
- ticket_types: types.length ? types : undefined,
- statuses: statuses.length ? statuses : undefined,
- date_from: startDate || undefined,
- date_to: endDate || undefined,
- },
- page,
- );
- /**
- * Wave F:主列表先占 UDS;待办计数/状态 Tab 角标 idle 后再拉(改前=进页并行
- * list+todo_counts+5×status count,争用把单次 list 顶到数百 ms)。
- * 客户角色不发 todo_counts(服务端 60058)。
- */
- const [deferSecondary, setDeferSecondary] = useState(false);
- useEffect(() => {
- const win = window as Window & { requestIdleCallback?: (cb: () => void, opts?: { timeout: number }) => number; cancelIdleCallback?: (id: number) => void };
- if (typeof win.requestIdleCallback === "function") {
- const id = win.requestIdleCallback(() => setDeferSecondary(true), { timeout: 800 });
- return () => win.cancelIdleCallback?.(id);
- }
- const t = window.setTimeout(() => setDeferSecondary(true), 0);
- return () => window.clearTimeout(t);
- }, []);
- const counts = useTodoCounts(!clientView && deferSecondary);
- const statusCounts = useTicketStatusCounts(deferSecondary && !clientView ? COUNTED_STATUSES : []);
- const reloadAll = () => { list.reload(); counts.reload(); statusCounts.reload(); };
- useEffect(() => {
- const ticket = params.get("ticket");
- 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) {
- const next = new URLSearchParams(params);
- next.delete(key);
- if (values.length) next.set(key, values.join(","));
- if (!keepPage) next.delete("page");
- setParams(next);
- }
- function patchParams(key: string, values: string[]) {
- const next = new URLSearchParams(params);
- next.delete(key);
- values.forEach((value) => { if (value) next.append(key, value); });
- if (key !== "page") next.delete("page");
- setParams(next);
- }
- const rows = list.data?.rows ?? [];
- const total = list.data?.total ?? 0;
- 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 activeTab = statuses.length === 1 ? statuses[0] : "";
- const filtered = Boolean(query || types.length || statuses.length || from || to);
- const countOf = (status: string) => statusCounts.data?.[status];
- 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>
- {!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>
- </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>
- <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>
- <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>)}
- </FilterSelect>
- <FilterSelect icon="status" aria-label="工单状态筛选" value={activeTab} onChange={(event) => setMulti("status", event.target.value ? [event.target.value] : [])}>
- <option value="">{statuses.length > 1 ? `已选 ${statuses.length} 个状态` : "全部状态"}</option>
- {TICKET_STATUSES.map((s) => <option key={s} value={s} title={s === "completed" ? COMPLETED_SCOPE_HINT : undefined}>{statusFilterLabel(s)}</option>)}
- </FilterSelect>
- <DateRangeFilter label="创建时间" from={from} to={to} onChange={(key, value) => patchParams(key, [value])} />
- {filtered && <Button variant="ghost" size="sm" onClick={() => setParams(new URLSearchParams())}>重置筛选</Button>}
- </div>
- {/* 多值时下拉框只能显示"已选 N 个",被选中的到底是哪几个必须逐项可见、可单独摘掉。 */}
- {(types.length > 1 || statuses.length > 1) && <div className="work-order-view-chips" aria-label="当前筛选视图">
- <span>当前视图</span>
- {types.map((t) => <button key={`t-${t}`} type="button" onClick={() => setMulti("type", types.filter((v) => v !== t))}>{typeLabel(t)}<X size={13} /></button>)}
- {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)])} />
- </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>;
- }
|