fix(assignments): 未分配列表不再混入 CK 失效账号
分配池统一为:持 CK、CK 未判失效、未被停用/归档。新增 assignable_only 参数贯穿账号列表、批量分配与分配概览;前端列表与一键全部分配使用同一口径。
This commit is contained in:
@@ -25,6 +25,7 @@ export const accountApi = {
|
||||
assigned_only?: boolean;
|
||||
assign_status?: string;
|
||||
assigned_user_id?: number;
|
||||
assignable_only?: boolean;
|
||||
tag?: string;
|
||||
has_cookie?: boolean;
|
||||
include_sensitive?: boolean;
|
||||
|
||||
@@ -36,6 +36,8 @@ export interface AccountBulkSelection {
|
||||
assign_status?: string;
|
||||
/** 只看某个客服名下的账号 */
|
||||
assigned_user_id?: number;
|
||||
/** 分配池口径:持 CK 且 CK 未失效(排除停用/归档) */
|
||||
assignable_only?: boolean;
|
||||
has_cookie?: boolean;
|
||||
status?: string;
|
||||
ck_status?: string;
|
||||
|
||||
@@ -72,7 +72,9 @@ export default function AssignmentsPage() {
|
||||
const params: Parameters<typeof accountApi.listPaged>[0] = {
|
||||
page: currentPage,
|
||||
page_size: pageSize,
|
||||
has_cookie: true,
|
||||
// 分配池只收「有 CK 且 CK 未失效」的账号:失效号的下一步是重登/修复,
|
||||
// 不是分配给客服(分过去也跑不了任务)。
|
||||
assignable_only: true,
|
||||
include_sensitive: false,
|
||||
search: searchText.trim() || undefined,
|
||||
tag: filterTag || undefined,
|
||||
@@ -180,6 +182,7 @@ export default function AssignmentsPage() {
|
||||
const res = await accountApi.batchAssignSelection({
|
||||
all_matching: true,
|
||||
assign_status: 'unassigned',
|
||||
assignable_only: true,
|
||||
tag: filterTag || undefined,
|
||||
search: searchText.trim() || undefined,
|
||||
assigned_to: selectedUser.id,
|
||||
@@ -252,7 +255,7 @@ export default function AssignmentsPage() {
|
||||
<Row gutter={12} style={{ flexShrink: 0 }}>
|
||||
<Col span={6}>
|
||||
<Card size="small">
|
||||
<Statistic title="总账号 (持CK)" value={totalAccountCount} prefix={<TeamOutlined />} />
|
||||
<Statistic title="总账号 (CK 有效)" value={totalAccountCount} prefix={<TeamOutlined />} />
|
||||
</Card>
|
||||
</Col>
|
||||
<Col span={6}>
|
||||
|
||||
Reference in New Issue
Block a user