|
@@ -7,7 +7,7 @@ import { Button } from "../components/ui/button";
|
|
|
import { Input } from "../components/ui/input";
|
|
import { Input } from "../components/ui/input";
|
|
|
import { FieldHint } from "../components/ui/field-hint";
|
|
import { FieldHint } from "../components/ui/field-hint";
|
|
|
import { FieldLabel } from "../components/ui/field-label";
|
|
import { FieldLabel } from "../components/ui/field-label";
|
|
|
-import { Navigate, useLocation, useNavigate, useParams, useSearchParams } from "react-router";
|
|
|
|
|
|
|
+import { Link, Navigate, useLocation, useNavigate, useParams, useSearchParams } from "react-router";
|
|
|
import { opsTeamGetList, rowsOf, subAccountGetList } from "../lib/api/bos";
|
|
import { opsTeamGetList, rowsOf, subAccountGetList } from "../lib/api/bos";
|
|
|
import { fetchAllPages } from "../lib/fetch-all-pages";
|
|
import { fetchAllPages } from "../lib/fetch-all-pages";
|
|
|
import { LIST_PAGE_SIZE } from "../lib/list-paging";
|
|
import { LIST_PAGE_SIZE } from "../lib/list-paging";
|
|
@@ -1164,7 +1164,8 @@ export function WorkOrderRecordPage() {
|
|
|
|
|
|
|
|
if (!id) return <Navigate to={back.to} replace />;
|
|
if (!id) return <Navigate to={back.to} replace />;
|
|
|
if (detail.loading) return <section className="ops-record-page"><div className="work-order-empty"><Info size={27} /><h3>正在读取工单详情…</h3></div></section>;
|
|
if (detail.loading) return <section className="ops-record-page"><div className="work-order-empty"><Info size={27} /><h3>正在读取工单详情…</h3></div></section>;
|
|
|
- if (fail || !d) return <section className="ops-record-page"><Button variant="outline" onClick={goBack}><ArrowLeft size={16} />{back.label}</Button>{fail && <TicketState fail={fail} onRetry={detail.reload} />}</section>;
|
|
|
|
|
|
|
+ const backLink = <Link to={back.to} state={back.state} className="ops-back-link"><ArrowLeft size={16} />{back.label}</Link>;
|
|
|
|
|
+ if (fail || !d) return <section className="ops-record-page">{backLink}{fail && <TicketState fail={fail} onRetry={detail.reload} />}</section>;
|
|
|
|
|
|
|
|
const t = d.ticket;
|
|
const t = d.ticket;
|
|
|
const can = d.actions;
|
|
const can = d.actions;
|
|
@@ -1401,7 +1402,7 @@ export function WorkOrderRecordPage() {
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
return <section className={`ops-record-page${clientView ? " customer-record-view" : ""}`}>
|
|
return <section className={`ops-record-page${clientView ? " customer-record-view" : ""}`}>
|
|
|
- <Button className="ops-record-back" variant="ghost" size="sm" onClick={goBack}><ArrowLeft size={16} />{back.label}</Button>
|
|
|
|
|
|
|
+ {backLink}
|
|
|
{notice && <OpsNotice message={notice} onClose={() => setNotice("")} />}
|
|
{notice && <OpsNotice message={notice} onClose={() => setNotice("")} />}
|
|
|
<header className="work-order-head">
|
|
<header className="work-order-head">
|
|
|
<div className="work-order-head-top">
|
|
<div className="work-order-head-top">
|