|
@@ -17,7 +17,7 @@ import { Link, useSearchParams } from "react-router";
|
|
|
import { Button } from "../components/ui/button";
|
|
import { Button } from "../components/ui/button";
|
|
|
import { FilterSelect } from "../components/ui/filter-select";
|
|
import { FilterSelect } from "../components/ui/filter-select";
|
|
|
import { FieldHint } from "../components/ui/field-hint";
|
|
import { FieldHint } from "../components/ui/field-hint";
|
|
|
-import { OpsDrawer, OpsNotice } from "../components/OperationsKit";
|
|
|
|
|
|
|
+import { OpsDialog, OpsNotice } from "../components/OperationsKit";
|
|
|
import { WorkspaceEmpty, WorkspaceHeading } from "../components/RoleWorkspaceKit";
|
|
import { WorkspaceEmpty, WorkspaceHeading } from "../components/RoleWorkspaceKit";
|
|
|
import { SearchInput } from "../components/ui/search-input";
|
|
import { SearchInput } from "../components/ui/search-input";
|
|
|
import { TicketState } from "../components/ticketState";
|
|
import { TicketState } from "../components/ticketState";
|
|
@@ -180,15 +180,25 @@ export function QueueBoard({ teamId, teamName, showTeamColumn = false, canAutoDi
|
|
|
return updated;
|
|
return updated;
|
|
|
}, { replace: true })} />}
|
|
}, { replace: true })} />}
|
|
|
</section>
|
|
</section>
|
|
|
- {action && <OpsDrawer title={action === "auto" ? "确认自动平均分派" : "指定接单成员"} subtitle={teamName ?? "权限范围内"} onClose={() => setAction(null)}>
|
|
|
|
|
|
|
+ {action && <OpsDialog title={action === "auto" ? "确认自动平均分派" : "指定接单成员"} subtitle={teamName ?? "权限范围内"} onClose={() => { if (!submit.busy) setAction(null); }}>
|
|
|
<div className="workspace-form">
|
|
<div className="workspace-form">
|
|
|
{action === "auto" ? <>
|
|
{action === "auto" ? <>
|
|
|
- <Shuffle size={28} className="text-primary" />
|
|
|
|
|
- <h3>分派本团队的待分派工单</h3>
|
|
|
|
|
- <p className="text-sm leading-7 text-muted-foreground">服务端每张选择符合类型与可派条件的成员,优先分给未完成工单最少者;没有合适成员的工单留在队列。若团队分派方式不是「自动平均分派」,服务端会拒绝并说明原因。</p>
|
|
|
|
|
|
|
+ <div className="work-order-queue-dialog-context">
|
|
|
|
|
+ <Shuffle size={18} aria-hidden="true" />
|
|
|
|
|
+ <div>
|
|
|
|
|
+ <h3>分派本团队的待分派工单</h3>
|
|
|
|
|
+ <p>工单优先分给未完成工单最少的合适成员。没有合适成员的工单会留在队列。团队须启用自动平均分派。</p>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
{summary && <p className="text-sm leading-7">上轮回执:分派 {summary.dispatched.length} 张 / 扫描 {summary.scanned} 张 / 跳过 {summary.skipped.length} 张。</p>}
|
|
{summary && <p className="text-sm leading-7">上轮回执:分派 {summary.dispatched.length} 张 / 扫描 {summary.scanned} 张 / 跳过 {summary.skipped.length} 张。</p>}
|
|
|
</> : <>
|
|
</> : <>
|
|
|
- <p className="text-sm leading-7">{action.ticket_no ?? "未编号"}<br />{action.customer_name ?? "-"} · {typeLabel(action.ticket_type)}</p>
|
|
|
|
|
|
|
+ <div className="work-order-queue-dialog-context">
|
|
|
|
|
+ <ClipboardList size={18} aria-hidden="true" />
|
|
|
|
|
+ <div>
|
|
|
|
|
+ <h3>{action.ticket_no ?? "未编号"}</h3>
|
|
|
|
|
+ <p>{action.customer_name ?? "—"} · {typeLabel(action.ticket_type)}</p>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
{candLoading && <p className="text-sm text-muted-foreground">正在按工单类型与负责范围计算候选人…</p>}
|
|
{candLoading && <p className="text-sm text-muted-foreground">正在按工单类型与负责范围计算候选人…</p>}
|
|
|
<label className="workspace-field"><span>接单成员 <em>*</em><FieldHint label="接单成员说明">{candidates.length ? "名单由服务端按工单类型、成员负责范围与账号状态过滤(运营账号按客户负责范围入池),不支持指派名单之外的成员。" : candLoading ? "正在计算…" : "没有符合条件的成员,请先在成员与负责范围中配置后重试。"}</FieldHint></span>
|
|
<label className="workspace-field"><span>接单成员 <em>*</em><FieldHint label="接单成员说明">{candidates.length ? "名单由服务端按工单类型、成员负责范围与账号状态过滤(运营账号按客户负责范围入池),不支持指派名单之外的成员。" : candLoading ? "正在计算…" : "没有符合条件的成员,请先在成员与负责范围中配置后重试。"}</FieldHint></span>
|
|
|
<select value={memberId} onChange={(event) => setMemberId(event.target.value)} disabled={candLoading}>
|
|
<select value={memberId} onChange={(event) => setMemberId(event.target.value)} disabled={candLoading}>
|
|
@@ -202,7 +212,7 @@ export function QueueBoard({ teamId, teamName, showTeamColumn = false, canAutoDi
|
|
|
{submit.busy && <p className="text-sm text-muted-foreground">提交中…</p>}
|
|
{submit.busy && <p className="text-sm text-muted-foreground">提交中…</p>}
|
|
|
<footer><Button variant="outline" type="button" disabled={submit.busy} onClick={() => setAction(null)}>取消</Button><Button type="button" disabled={submit.busy || candLoading || (action !== "auto" && !memberId)} onClick={confirm}><Check size={16} />确认分派</Button></footer>
|
|
<footer><Button variant="outline" type="button" disabled={submit.busy} onClick={() => setAction(null)}>取消</Button><Button type="button" disabled={submit.busy || candLoading || (action !== "auto" && !memberId)} onClick={confirm}><Check size={16} />确认分派</Button></footer>
|
|
|
</div>
|
|
</div>
|
|
|
- </OpsDrawer>}
|
|
|
|
|
|
|
+ </OpsDialog>}
|
|
|
{notice && <OpsNotice key={notice} message={notice} onClose={() => setNotice("")} />}
|
|
{notice && <OpsNotice key={notice} message={notice} onClose={() => setNotice("")} />}
|
|
|
</>;
|
|
</>;
|
|
|
}
|
|
}
|