feat(invoice-check): 立账凭证检核增加收件人配置并迁移到chat页面
This commit is contained in:
1 parent
18e957545c
commit
7b80b4c395
72 files changed
+2705
-263
No files matched your search
@@ -1,8 +1,9 @@
|
||||
/**
|
||||
* features/workspace/api/voucherCheck.api.ts
|
||||
* 用途:工作台立账凭证检核任务列表、最近一次检核、批次明细、企微发送记录与强制重检 API 客户端。
|
||||
* 用途:工作台立账凭证检核任务列表、最近一次检核、批次明细、企微发送记录、通知配置与强制重检 API 客户端。
|
||||
* 依赖:@/shared/api/client、getAuthHeaders。
|
||||
* 逻辑:AccountingVoucherCheckView / DetailView 调用;对应 /api/workspace/accounting-voucher-check/* 与排程 Excel 下载。
|
||||
* 逻辑:AccountingVoucherCheckView / DetailView / VoucherCheckNotifyConfigPanel 调用;
|
||||
* 对应 /api/workspace/accounting-voucher-check/* 与排程 Excel 下载。
|
||||
*/
|
||||
import { requestJson } from '@/shared/api/client';
|
||||
import { getAuthHeaders } from '@/shared/utils/auth';
|
||||
@@ -222,6 +223,60 @@ export async function downloadVoucherCheckExcel(scheduleRunId: number, filename?
|
||||
URL.revokeObjectURL(url);
|
||||
}
|
||||
|
||||
export interface VoucherCheckNotifyUser {
|
||||
id: number;
|
||||
username: string;
|
||||
real_name?: string | null;
|
||||
employee_id?: string | null;
|
||||
department?: string | null;
|
||||
wecom_bound: boolean;
|
||||
}
|
||||
|
||||
export interface VoucherCheckNotifyRule {
|
||||
code: string;
|
||||
name: string;
|
||||
type_folder: string;
|
||||
user_ids: number[];
|
||||
}
|
||||
|
||||
export interface VoucherCheckNotifyConfig {
|
||||
profile_code: string;
|
||||
rules: VoucherCheckNotifyRule[];
|
||||
users: VoucherCheckNotifyUser[];
|
||||
updated_at?: string | null;
|
||||
updated_by?: number | null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 读取按文件类型的企微接收人(仅平台管理员)。
|
||||
*/
|
||||
export function getVoucherCheckNotifyConfig(profileCode?: string) {
|
||||
const q = new URLSearchParams();
|
||||
if (profileCode) q.set('profile_code', profileCode);
|
||||
const qs = q.toString();
|
||||
return requestJson<VoucherCheckNotifyConfig>(
|
||||
`/api/workspace/accounting-voucher-check/notify-config${qs ? `?${qs}` : ''}`,
|
||||
{ headers: getAuthHeaders() },
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存按文件类型的企微接收人(仅平台管理员)。
|
||||
*/
|
||||
export function saveVoucherCheckNotifyConfig(payload: {
|
||||
profile_code?: string;
|
||||
recipients: Record<string, number[]>;
|
||||
}) {
|
||||
return requestJson<VoucherCheckNotifyConfig>(
|
||||
'/api/workspace/accounting-voucher-check/notify-config',
|
||||
{
|
||||
method: 'PUT',
|
||||
headers: { ...getAuthHeaders(), 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify(payload),
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* 强制重检上一个自然月(不走增量跳过)。
|
||||
*/
|
||||
|
||||
Reference in new issue
Block a user