feat(client): 行政代提交/代上传 owner 选择入口(F33)
- 报销创建支持选择 ownerEmployeeId(delegation-grants received) - 票据上传支持 owner_employee_id(delegation-grants received) - 保持普通员工流程不变,权限不足由后端阻断
这个提交包含在:
@@ -12,6 +12,22 @@ export type DelegationItem = {
|
||||
revokedAt: string | null;
|
||||
createdAt: string;
|
||||
status: DelegationStatus;
|
||||
principal?: {
|
||||
id: string;
|
||||
employeeNo: string;
|
||||
name: string;
|
||||
departmentId: string;
|
||||
status: string;
|
||||
roleCodes: string[];
|
||||
} | null;
|
||||
delegate?: {
|
||||
id: string;
|
||||
employeeNo: string;
|
||||
name: string;
|
||||
departmentId: string;
|
||||
status: string;
|
||||
roleCodes: string[];
|
||||
} | null;
|
||||
};
|
||||
|
||||
export type CreateDelegationRequest = {
|
||||
@@ -56,4 +72,3 @@ export async function revokeDelegation(delegationId: string) {
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -96,12 +96,15 @@ export async function fetchInvoicePoolDetail(invoiceId: string) {
|
||||
return apiRequestData<InvoicePoolDetail>(`/api/invoice-pool/${invoiceId}`);
|
||||
}
|
||||
|
||||
export async function uploadInvoice(file: File, ocrType?: string) {
|
||||
export async function uploadInvoice(file: File, ocrType?: string, ownerEmployeeId?: string) {
|
||||
const formData = new FormData();
|
||||
formData.append("file", file);
|
||||
if (ocrType) {
|
||||
formData.append("ocr_type", ocrType);
|
||||
}
|
||||
if (ownerEmployeeId) {
|
||||
formData.append("owner_employee_id", ownerEmployeeId);
|
||||
}
|
||||
|
||||
return apiRequestData<{ invoicePoolId: string; status: string; fileSha256: string }>(
|
||||
"/api/invoice-pool/upload",
|
||||
|
||||
@@ -160,6 +160,7 @@ export async function fetchReimbursementDetail(reimbursementId: string) {
|
||||
}
|
||||
|
||||
export async function createReimbursement(payload: {
|
||||
ownerEmployeeId?: string;
|
||||
reimbursementDate?: string;
|
||||
description?: string;
|
||||
} = {}) {
|
||||
|
||||
在新工单中引用
屏蔽一个用户