|
@@ -1,7 +1,7 @@
|
|
|
import { Fragment, useEffect, useRef, useState, type FormEvent, type ReactNode } from "react";
|
|
import { Fragment, useEffect, useRef, useState, type FormEvent, type ReactNode } from "react";
|
|
|
import {
|
|
import {
|
|
|
- ArrowLeft, ArrowRight, Check, ChevronDown, CircleAlert, FolderOpen,
|
|
|
|
|
- Info, Link2, Plus, RefreshCcw, ShieldAlert, Ticket, TriangleAlert, X,
|
|
|
|
|
|
|
+ ArrowLeft, ArrowRight, Check, ChevronDown, CircleAlert, ClipboardCheck, FolderOpen,
|
|
|
|
|
+ Image, Info, Link2, Plus, RefreshCcw, ShieldAlert, Ticket, TriangleAlert, X,
|
|
|
} from "lucide-react";
|
|
} from "lucide-react";
|
|
|
import { Button } from "../components/ui/button";
|
|
import { Button } from "../components/ui/button";
|
|
|
import { Input } from "../components/ui/input";
|
|
import { Input } from "../components/ui/input";
|
|
@@ -133,11 +133,8 @@ function gapTarget(gap: string, can: TicketDetail["actions"]): GapTarget | null
|
|
|
if (can.backfill && route.includes(gap)) return { action: "backfill", focus: "routes", label: "去回填线路" };
|
|
if (can.backfill && route.includes(gap)) return { action: "backfill", focus: "routes", label: "去回填线路" };
|
|
|
if (can.backfill && ip.includes(gap)) return { action: "backfill", focus: "ips", label: "去登记 IP" };
|
|
if (can.backfill && ip.includes(gap)) return { action: "backfill", focus: "ips", label: "去登记 IP" };
|
|
|
if (can.backfill && conclusion.includes(gap)) return { action: "backfill", focus: "conclusion", label: "去登记结论" };
|
|
if (can.backfill && conclusion.includes(gap)) return { action: "backfill", focus: "conclusion", label: "去登记结论" };
|
|
|
- if (can.check_done && trio.includes(gap)) return { action: "check_done", focus: "checklist", label: "去核对条目" };
|
|
|
|
|
- if (note.includes(gap)) {
|
|
|
|
|
- if (can.check_done) return { action: "check_done", focus: "note", label: "去登记记录" };
|
|
|
|
|
- if (can.mark_done) return { action: "mark_done", focus: "note", label: "去登记记录" };
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ if (can.check_done && (trio.includes(gap) || note.includes(gap))) return { action: "check_done", focus: "checklist", label: "去核对条目" };
|
|
|
|
|
+ if (can.mark_done && note.includes(gap)) return { action: "mark_done", focus: "note", label: "去补处理记录" };
|
|
|
return null;
|
|
return null;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -440,7 +437,10 @@ export function TicketActionSheet({ action, detail, onClose, onDone, focus, onRe
|
|
|
});
|
|
});
|
|
|
const [evidence, setEvidence] = useState(() => serverDraft?.evidence_text || "");
|
|
const [evidence, setEvidence] = useState(() => serverDraft?.evidence_text || "");
|
|
|
const [evidencePhotos, setEvidencePhotos] = useState<EvidencePhoto[]>(() =>
|
|
const [evidencePhotos, setEvidencePhotos] = useState<EvidencePhoto[]>(() =>
|
|
|
- (serverDraft?.evidence_material_ids ?? []).map((id) => ({ material_id: id, file_name: id })));
|
|
|
|
|
|
|
+ (serverDraft?.evidence_material_ids ?? []).map((id) => ({
|
|
|
|
|
+ material_id: id, file_name: detail.materials.find((material) => material.material_id === id)?.file_name || id,
|
|
|
|
|
+ })));
|
|
|
|
|
+ const [uploadingEvidence, setUploadingEvidence] = useState(false);
|
|
|
const [draftVersion, setDraftVersion] = useState(() => Number(detail.backfill_draft?.row_version ?? 0));
|
|
const [draftVersion, setDraftVersion] = useState(() => Number(detail.backfill_draft?.row_version ?? 0));
|
|
|
/** 已自动载入草稿时只提示 PIN 需重填,⛔ 再要求点「恢复」才把字段刷出来。 */
|
|
/** 已自动载入草稿时只提示 PIN 需重填,⛔ 再要求点「恢复」才把字段刷出来。 */
|
|
|
const [draftHint, setDraftHint] = useState(() => Boolean(serverDraft));
|
|
const [draftHint, setDraftHint] = useState(() => Boolean(serverDraft));
|
|
@@ -647,6 +647,7 @@ export function TicketActionSheet({ action, detail, onClose, onDone, focus, onRe
|
|
|
|
|
|
|
|
function submitForm(e: FormEvent<HTMLFormElement>) {
|
|
function submitForm(e: FormEvent<HTMLFormElement>) {
|
|
|
e.preventDefault();
|
|
e.preventDefault();
|
|
|
|
|
+ if (uploadingEvidence || submit.busy) return;
|
|
|
setGapGroups([]);
|
|
setGapGroups([]);
|
|
|
if (action === "assign") {
|
|
if (action === "assign") {
|
|
|
if (!assignee) { setTip("请选择处理人。"); return; }
|
|
if (!assignee) { setTip("请选择处理人。"); return; }
|
|
@@ -765,13 +766,12 @@ export function TicketActionSheet({ action, detail, onClose, onDone, focus, onRe
|
|
|
{action === "assign" && !candidates.length && <p className="work-order-detail-footnote"><CircleAlert size={15} />候选人来自「待分派队列」:名单为空说明本团队没有具备该工单类型接单资质的成员、也没有负责范围覆盖该客户的运营账号,请先配置工单类型或运营团队负责范围。</p>}
|
|
{action === "assign" && !candidates.length && <p className="work-order-detail-footnote"><CircleAlert size={15} />候选人来自「待分派队列」:名单为空说明本团队没有具备该工单类型接单资质的成员、也没有负责范围覆盖该客户的运营账号,请先配置工单类型或运营团队负责范围。</p>}
|
|
|
{action === "delegate" && <label className="wide">代管人(承接团队在册成员)<select value={trustee} onChange={(e) => setTrustee(e.target.value)}><option value="">请选择</option>{members.map((m) => <option key={m.user_id} value={m.user_id}>{m.display_name ?? m.username ?? m.user_id}</option>)}</select></label>}
|
|
{action === "delegate" && <label className="wide">代管人(承接团队在册成员)<select value={trustee} onChange={(e) => setTrustee(e.target.value)}><option value="">请选择</option>{members.map((m) => <option key={m.user_id} value={m.user_id}>{m.display_name ?? m.username ?? m.user_id}</option>)}</select></label>}
|
|
|
{action === "check_done" && <div className="wide work-order-gap-anchor" data-gap-focus="checklist">
|
|
{action === "check_done" && <div className="wide work-order-gap-anchor" data-gap-focus="checklist">
|
|
|
- {dialogView && <h3 className="wide work-order-action-section-title">服务清单与开通日期</h3>}
|
|
|
|
|
<div className="wide work-order-checklist">{detail.service_items.map((item) => <label key={item.item_id}><input type="checkbox" disabled={item.check_result !== "pending"} checked={item.check_result === "done" || pickedItems.includes(item.item_id)} onChange={(e) => setPickedItems((prev) => e.target.checked ? [...prev, item.item_id] : prev.filter((id) => id !== item.item_id))} /><span>{item.item_name ?? item.item_id}{item.check_result === "done" && <small> 已核对</small>}{item.check_result === "absent" && <small> 缺项</small>}</span></label>)}</div>
|
|
<div className="wide work-order-checklist">{detail.service_items.map((item) => <label key={item.item_id}><input type="checkbox" disabled={item.check_result !== "pending"} checked={item.check_result === "done" || pickedItems.includes(item.item_id)} onChange={(e) => setPickedItems((prev) => e.target.checked ? [...prev, item.item_id] : prev.filter((id) => id !== item.item_id))} /><span>{item.item_name ?? item.item_id}{item.check_result === "done" && <small> 已核对</small>}{item.check_result === "absent" && <small> 缺项</small>}</span></label>)}</div>
|
|
|
<label className="wide">实际开通日期 <em>*</em><Input type="date" value={mainDate} min={execNotBefore ?? undefined} max={todayStr} onChange={(e) => setMainDate(e.target.value)} /></label>
|
|
<label className="wide">实际开通日期 <em>*</em><Input type="date" value={mainDate} min={execNotBefore ?? undefined} max={todayStr} onChange={(e) => setMainDate(e.target.value)} /></label>
|
|
|
<TicketExtForm ref={extFormRef} ext={extMeta} values={extValues} onChange={setExtValues} enforceRequired />
|
|
<TicketExtForm ref={extFormRef} ext={extMeta} values={extValues} onChange={setExtValues} enforceRequired />
|
|
|
</div>}
|
|
</div>}
|
|
|
{action === "check_done" && execLocked && <p className="work-order-detail-footnote wide"><CircleAlert size={15} />本单计划执行日(服务开始日)为 {execNotBefore ? fmtDate(execNotBefore) : "待定"},未到该日不可核对竣工;实际开通日也⛔ 早于该日。</p>}
|
|
{action === "check_done" && execLocked && <p className="work-order-detail-footnote wide"><CircleAlert size={15} />本单计划执行日(服务开始日)为 {execNotBefore ? fmtDate(execNotBefore) : "待定"},未到该日不可核对竣工;实际开通日也⛔ 早于该日。</p>}
|
|
|
- {action === "check_done" && !dialogView && <p className="work-order-detail-footnote wide"><Info size={15} />三件套=服务清单全部核对 ∧ 实际开通日不晚于当天 ∧ 处理记录非空。服务开通单没有「施工回填」口(扩展字段随本核对口提交);变更协议单可另走结论区回填,实际开通日亦可随本次核对登记并回写该条订阅。</p>}
|
|
|
|
|
|
|
+ {action === "check_done" && <p className="work-order-detail-footnote wide"><Info size={15} />三件套=服务清单全部核对 ∧ 实际开通日不晚于当天 ∧ 处理记录非空。服务开通单没有「施工回填」口(扩展字段随本核对口提交);变更协议单可另走结论区回填,实际开通日亦可随本次核对登记并回写该条订阅。</p>}
|
|
|
{action === "backfill" && <>
|
|
{action === "backfill" && <>
|
|
|
{execLocked && <p className="work-order-detail-footnote wide"><CircleAlert size={15} />本单计划执行日(服务开始日)为 {execNotBefore ? fmtDate(execNotBefore) : "待定"},未到该日不可回填;实际开通日也⛔ 早于该日。</p>}
|
|
{execLocked && <p className="work-order-detail-footnote wide"><CircleAlert size={15} />本单计划执行日(服务开始日)为 {execNotBefore ? fmtDate(execNotBefore) : "待定"},未到该日不可回填;实际开通日也⛔ 早于该日。</p>}
|
|
|
{draftHint && (
|
|
{draftHint && (
|
|
@@ -796,18 +796,33 @@ export function TicketActionSheet({ action, detail, onClose, onDone, focus, onRe
|
|
|
<div className="wide work-order-checklist">{detail.service_items.map((item) => <label key={item.item_id}><input type="checkbox" disabled={item.check_result !== "pending"} checked={item.check_result === "done" || pickedItems.includes(item.item_id)} onChange={(e) => setPickedItems((prev) => e.target.checked ? [...prev, item.item_id] : prev.filter((id) => id !== item.item_id))} /><span>{item.item_name ?? item.item_id}{item.spec_before || item.spec_after ? <small> {item.spec_before ?? "—"} → {item.spec_after ?? item.spec_text ?? "—"}</small> : null}{item.check_result === "done" && <small> 已核对</small>}</span></label>)}</div>
|
|
<div className="wide work-order-checklist">{detail.service_items.map((item) => <label key={item.item_id}><input type="checkbox" disabled={item.check_result !== "pending"} checked={item.check_result === "done" || pickedItems.includes(item.item_id)} onChange={(e) => setPickedItems((prev) => e.target.checked ? [...prev, item.item_id] : prev.filter((id) => id !== item.item_id))} /><span>{item.item_name ?? item.item_id}{item.spec_before || item.spec_after ? <small> {item.spec_before ?? "—"} → {item.spec_after ?? item.spec_text ?? "—"}</small> : null}{item.check_result === "done" && <small> 已核对</small>}</span></label>)}</div>
|
|
|
<label className="wide">核对处理记录 <em>*</em><textarea rows={2} maxLength={500} value={note} onChange={(e) => setNote(e.target.value)} /></label>
|
|
<label className="wide">核对处理记录 <em>*</em><textarea rows={2} maxLength={500} value={note} onChange={(e) => setNote(e.target.value)} /></label>
|
|
|
</div>}
|
|
</div>}
|
|
|
- <div className="wide work-order-gap-anchor" data-gap-focus="conclusion">
|
|
|
|
|
- {dialogView && <h3 className="wide work-order-action-section-title">执行结论与凭证</h3>}
|
|
|
|
|
- <label>执行结论 <em>*</em><select value={conclusion} onChange={(e) => setConclusion(e.target.value)}>{isStop
|
|
|
|
|
- ? <><option value="success">成功</option><option value="fail">失败</option></>
|
|
|
|
|
- : <><option value="success">成功</option><option value="partial">部分成功</option><option value="fail">失败</option></>}</select></label>
|
|
|
|
|
- <label>{isStop ? "实际停机完成日期" : "实际开通日期"} <em>*</em><Input type="date" value={mainDate} min={isStop ? undefined : execNotBefore ?? undefined} max={todayStr} onChange={(e) => setMainDate(e.target.value)} /></label>
|
|
|
|
|
- <label className="wide">结论说明<textarea rows={3} maxLength={500} value={conclusionNote} onChange={(e) => setConclusionNote(e.target.value)} /></label>
|
|
|
|
|
- <label className="wide">凭证与佐证(文本)
|
|
|
|
|
- <FieldHint label="凭证与佐证说明">可写文档名清单;现场照片请用下方拍照/相册上传。截图不得含明文 PIN。</FieldHint>
|
|
|
|
|
- <textarea rows={2} maxLength={1000} value={evidence} onChange={(e) => setEvidence(e.target.value)} />
|
|
|
|
|
- </label>
|
|
|
|
|
- <EvidencePhotoField ticketId={t.ticket_id} photos={evidencePhotos} onChange={setEvidencePhotos} />
|
|
|
|
|
|
|
+ <div className="wide wo-backfill-result" data-gap-focus="conclusion">
|
|
|
|
|
+ <section className="wo-backfill-panel">
|
|
|
|
|
+ <h3><ClipboardCheck size={16} aria-hidden="true" />执行信息</h3>
|
|
|
|
|
+ <div className="wo-backfill-execution">
|
|
|
|
|
+ <FieldLabel label="执行结论" required>
|
|
|
|
|
+ <select value={conclusion} onChange={(e) => setConclusion(e.target.value)}>
|
|
|
|
|
+ <option value="success">成功</option>
|
|
|
|
|
+ {!isStop && <option value="partial">部分成功</option>}
|
|
|
|
|
+ <option value="fail">失败</option>
|
|
|
|
|
+ </select>
|
|
|
|
|
+ </FieldLabel>
|
|
|
|
|
+ <FieldLabel label={isStop ? "实际停机完成日期" : "实际开通日期"} required>
|
|
|
|
|
+ <Input type="date" value={mainDate} min={isStop ? undefined : execNotBefore ?? undefined} max={todayStr} onChange={(e) => setMainDate(e.target.value)} />
|
|
|
|
|
+ </FieldLabel>
|
|
|
|
|
+ <FieldLabel className="wide" label="结论说明">
|
|
|
|
|
+ <textarea rows={3} maxLength={500} value={conclusionNote} placeholder="填写执行结果或异常原因" onChange={(e) => setConclusionNote(e.target.value)} />
|
|
|
|
|
+ </FieldLabel>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </section>
|
|
|
|
|
+ <section className="wo-backfill-panel">
|
|
|
|
|
+ <h3><Image size={16} aria-hidden="true" />现场凭证</h3>
|
|
|
|
|
+ <EvidencePhotoField ticketId={t.ticket_id} photos={evidencePhotos} onChange={setEvidencePhotos}
|
|
|
|
|
+ busy={uploadingEvidence} onBusyChange={setUploadingEvidence} />
|
|
|
|
|
+ <FieldLabel label="凭证说明">
|
|
|
|
|
+ <textarea rows={2} maxLength={1000} value={evidence} placeholder="填写文档名称或补充说明" onChange={(e) => setEvidence(e.target.value)} />
|
|
|
|
|
+ </FieldLabel>
|
|
|
|
|
+ </section>
|
|
|
</div>
|
|
</div>
|
|
|
<TicketExtForm ref={extFormRef} ext={extMeta} values={extValues} onChange={setExtValues} enforceRequired={conclusion === "success"} />
|
|
<TicketExtForm ref={extFormRef} ext={extMeta} values={extValues} onChange={setExtValues} enforceRequired={conclusion === "success"} />
|
|
|
{showRouteIp && seats.length > 0 && <datalist id="bos-seat-accounts">{seats.map((s) => <option key={s.sub_account_id} value={s.sub_account_id}>{`${s.display_name ?? s.username ?? ""}${s.net_account ? ` · ${s.net_account}` : ""}(${label(ACCT_STATUS, s.status)})`}</option>)}</datalist>}
|
|
{showRouteIp && seats.length > 0 && <datalist id="bos-seat-accounts">{seats.map((s) => <option key={s.sub_account_id} value={s.sub_account_id}>{`${s.display_name ?? s.username ?? ""}${s.net_account ? ` · ${s.net_account}` : ""}(${label(ACCT_STATUS, s.status)})`}</option>)}</datalist>}
|
|
@@ -968,15 +983,7 @@ export function TicketActionSheet({ action, detail, onClose, onDone, focus, onRe
|
|
|
{(action === "close" || action === "withdraw" || action === "revert") && <label className="wide">原因 <em>*</em><textarea rows={3} maxLength={500} value={reason} onChange={(e) => setReason(e.target.value)} /></label>}
|
|
{(action === "close" || action === "withdraw" || action === "revert") && <label className="wide">原因 <em>*</em><textarea rows={3} maxLength={500} value={reason} onChange={(e) => setReason(e.target.value)} /></label>}
|
|
|
{/* 客户确认闭环:与列表页弹框同口径(门户册 9 §7.5.1,7 天未确认由系统自动关闭)。 */}
|
|
{/* 客户确认闭环:与列表页弹框同口径(门户册 9 §7.5.1,7 天未确认由系统自动关闭)。 */}
|
|
|
{action === "confirm_close" && <p className="work-order-detail-footnote wide"><Info size={15} />运维已标记完成,确认后工单立即关闭并形成服务闭环;7 天内未确认由系统自动关闭。该动作与列表页「确认完成,关闭工单」是同一个(`ticket/confirm_close@v1`)。</p>}
|
|
{action === "confirm_close" && <p className="work-order-detail-footnote wide"><Info size={15} />运维已标记完成,确认后工单立即关闭并形成服务闭环;7 天内未确认由系统自动关闭。该动作与列表页「确认完成,关闭工单」是同一个(`ticket/confirm_close@v1`)。</p>}
|
|
|
- {dialogView && (action === "check_done" || action === "mark_done") ? <div className="wide work-order-action-note" data-gap-focus="note">
|
|
|
|
|
- <label>处理记录{action === "check_done" && <em> *</em>}
|
|
|
|
|
- <textarea rows={5} maxLength={500} value={note} aria-required={action === "check_done" || undefined} placeholder="填写处理经过和结果" onChange={(e) => setNote(e.target.value)} />
|
|
|
|
|
- </label>
|
|
|
|
|
- <div className="work-order-action-note-meta">
|
|
|
|
|
- {action === "mark_done" && <p>提交后工单标记为完成,等待客户确认。</p>}
|
|
|
|
|
- <span>{note.length} / 500</span>
|
|
|
|
|
- </div>
|
|
|
|
|
- </div> : (action === "check_done" || action === "mark_done" || action === "confirm_receipt") && <label className="wide" data-gap-focus={action === "mark_done" ? "note" : undefined}>备注<textarea rows={3} maxLength={500} value={note} onChange={(e) => setNote(e.target.value)} /></label>}
|
|
|
|
|
|
|
+ {(action === "check_done" || action === "mark_done" || action === "confirm_receipt") && <label className="wide" data-gap-focus={action === "mark_done" ? "note" : undefined}>备注<textarea rows={3} maxLength={500} value={note} onChange={(e) => setNote(e.target.value)} /></label>}
|
|
|
{(action === "defer_open_stop" || action === "defer_ticket") && <p className="work-order-detail-footnote wide"><Info size={15} />延期只顺延提醒期限,不改变账户状态或计费;期限由服务端按超期天数推进。</p>}
|
|
{(action === "defer_open_stop" || action === "defer_ticket") && <p className="work-order-detail-footnote wide"><Info size={15} />延期只顺延提醒期限,不改变账户状态或计费;期限由服务端按超期天数推进。</p>}
|
|
|
</div>;
|
|
</div>;
|
|
|
|
|
|
|
@@ -992,12 +999,10 @@ export function TicketActionSheet({ action, detail, onClose, onDone, focus, onRe
|
|
|
backfill: isUpdown ? ["核对并回填", "清单核对与执行结论同批"] : ["施工回填", "执行结论与日期"],
|
|
backfill: isUpdown ? ["核对并回填", "清单核对与执行结论同批"] : ["施工回填", "执行结论与日期"],
|
|
|
};
|
|
};
|
|
|
const [title, subtitle] = titles[action] ?? ["处理工单", ""];
|
|
const [title, subtitle] = titles[action] ?? ["处理工单", ""];
|
|
|
- const dialogTitle = action === "mark_done" ? "登记处理记录" : action === "check_done" ? "核对并登记记录" : title;
|
|
|
|
|
- const submitLabel = dialogView
|
|
|
|
|
- ? action === "mark_done" ? "登记并完成" : action === "check_done" ? "提交核对结果" : "提交回填"
|
|
|
|
|
- : "提交";
|
|
|
|
|
|
|
+ const dialogTitle = focus === "conclusion" ? "登记执行结论" : title;
|
|
|
|
|
|
|
|
async function saveDraft() {
|
|
async function saveDraft() {
|
|
|
|
|
+ if (uploadingEvidence || submit.busy) return;
|
|
|
setTip("");
|
|
setTip("");
|
|
|
setDraftSavedNote("");
|
|
setDraftSavedNote("");
|
|
|
setGapGroups([]);
|
|
setGapGroups([]);
|
|
@@ -1069,13 +1074,13 @@ export function TicketActionSheet({ action, detail, onClose, onDone, focus, onRe
|
|
|
<footer>
|
|
<footer>
|
|
|
<Button variant="outline" type="button" onClick={onClose}>取消</Button>
|
|
<Button variant="outline" type="button" onClick={onClose}>取消</Button>
|
|
|
{action === "backfill" && (
|
|
{action === "backfill" && (
|
|
|
- <Button variant="outline" type="button" disabled={submit.busy} onClick={() => void saveDraft()}>暂存草稿</Button>
|
|
|
|
|
|
|
+ <Button variant="outline" type="button" disabled={submit.busy || uploadingEvidence} onClick={() => void saveDraft()}>暂存草稿</Button>
|
|
|
)}
|
|
)}
|
|
|
- <Button type="submit" disabled={submit.busy}><Check size={16} />{submitLabel}</Button>
|
|
|
|
|
|
|
+ <Button type="submit" disabled={submit.busy || uploadingEvidence}><Check size={16} />{dialogView ? "提交回填" : "提交"}</Button>
|
|
|
</footer>
|
|
</footer>
|
|
|
</form>;
|
|
</form>;
|
|
|
if (presentation === "dialog") return <OpsDialog title={dialogTitle} subtitle={[t.ticket_no, t.title].filter(Boolean).join(" · ")}
|
|
if (presentation === "dialog") return <OpsDialog title={dialogTitle} subtitle={[t.ticket_no, t.title].filter(Boolean).join(" · ")}
|
|
|
- className={`work-order-action-dialog${action === "mark_done" ? "" : " is-wide"}`} onClose={onClose}>
|
|
|
|
|
|
|
+ className="work-order-action-dialog" onClose={onClose}>
|
|
|
{editor}
|
|
{editor}
|
|
|
</OpsDialog>;
|
|
</OpsDialog>;
|
|
|
return <Sheet title={title} subtitle={subtitle} onClose={onClose} presentation={presentation}>{editor}</Sheet>;
|
|
return <Sheet title={title} subtitle={subtitle} onClose={onClose} presentation={presentation}>{editor}</Sheet>;
|
|
@@ -1386,7 +1391,7 @@ export function WorkOrderRecordPage() {
|
|
|
<div className="work-order-gaps-head"><strong>闭环还缺 {d.gaps.length} 项</strong><span>缺口由服务端判定,不可人工放行竣工</span></div>
|
|
<div className="work-order-gaps-head"><strong>闭环还缺 {d.gaps.length} 项</strong><span>缺口由服务端判定,不可人工放行竣工</span></div>
|
|
|
<ul>{d.gaps.map((g) => {
|
|
<ul>{d.gaps.map((g) => {
|
|
|
const target = gapTarget(g, can);
|
|
const target = gapTarget(g, can);
|
|
|
- const usesSoftButton = target?.focus === "routes" || target?.focus === "note";
|
|
|
|
|
|
|
+ const usesSoftButton = target?.focus === "routes" || target?.focus === "conclusion";
|
|
|
return <li key={g}><div><b>{groupLabel(g)}</b><p>{gapHint(g)}</p></div>
|
|
return <li key={g}><div><b>{groupLabel(g)}</b><p>{gapHint(g)}</p></div>
|
|
|
{target && !viewerReadOnly && <Button size="sm" variant={usesSoftButton ? "ghost" : "outline"}
|
|
{target && !viewerReadOnly && <Button size="sm" variant={usesSoftButton ? "ghost" : "outline"}
|
|
|
className={usesSoftButton ? "org-button org-button-compact org-button-scope" : undefined}
|
|
className={usesSoftButton ? "org-button org-button-compact org-button-scope" : undefined}
|
|
@@ -1777,7 +1782,7 @@ export function WorkOrderRecordPage() {
|
|
|
{nextStep && !viewerReadOnly && <div className="work-order-sticky-bar"><Button variant="outline" onClick={goBack}><ArrowLeft size={16} />返回</Button><Button className="work-order-sticky-next" onClick={runNextStep}><ArrowRight size={16} />{nextStep.label}</Button></div>}
|
|
{nextStep && !viewerReadOnly && <div className="work-order-sticky-bar"><Button variant="outline" onClick={goBack}><ArrowLeft size={16} />返回</Button><Button className="work-order-sticky-next" onClick={runNextStep}><ArrowRight size={16} />{nextStep.label}</Button></div>}
|
|
|
{materialOpen && <Sheet title="补充过程材料" subtitle="现场照片、处理截图等过程留痕" onClose={() => setMaterialOpen(false)}><MaterialForm ticketId={t.ticket_id} onDone={(m) => { setMaterialOpen(false); setNotice(m); detail.reload(); }} /></Sheet>}
|
|
{materialOpen && <Sheet title="补充过程材料" subtitle="现场照片、处理截图等过程留痕" onClose={() => setMaterialOpen(false)}><MaterialForm ticketId={t.ticket_id} onDone={(m) => { setMaterialOpen(false); setNotice(m); detail.reload(); }} /></Sheet>}
|
|
|
{sheet && <ActionSheet action={sheet} detail={d} focus={sheetFocus}
|
|
{sheet && <ActionSheet action={sheet} detail={d} focus={sheetFocus}
|
|
|
- presentation={sheet === "backfill" || sheet === "mark_done" || sheetFocus === "note" ? "dialog" : "drawer"}
|
|
|
|
|
|
|
+ presentation={sheet === "backfill" ? "dialog" : "drawer"}
|
|
|
onReload={detail.reload} onClose={() => { setSheet(null); setSheetFocus(undefined); if (sheet === "backfill") detail.reload(); }} onDone={(message) => { setSheet(null); setSheetFocus(undefined); setNotice(message); detail.reload(); }} />}
|
|
onReload={detail.reload} onClose={() => { setSheet(null); setSheetFocus(undefined); if (sheet === "backfill") detail.reload(); }} onDone={(message) => { setSheet(null); setSheetFocus(undefined); setNotice(message); detail.reload(); }} />}
|
|
|
{refStack.length > 0 && <ReferenceDrawer stack={refStack} onPush={openRef} onBack={() => setRefStack((stack) => stack.slice(0, -1))} onClose={() => setRefStack([])} />}
|
|
{refStack.length > 0 && <ReferenceDrawer stack={refStack} onPush={openRef} onBack={() => setRefStack((stack) => stack.slice(0, -1))} onClose={() => setRefStack([])} />}
|
|
|
</section>;
|
|
</section>;
|