完成五人团队正式内用最小收口(07-18-small-team-internal-readiness)

这个提交包含在:
2026-07-18 15:46:14 +08:00
父节点 58c8decef9
当前提交 5d0a5f9a38
共修改 134 个文件,包含 10790 行新增和 1413 行删除
+39 -7
查看文件
@@ -39,7 +39,7 @@ export type PaymentBatch = {
thresholdAmount: string;
requiredReviewCount: number;
completedReviewCount: number;
nextStep: "first_review" | "second_review" | "ready_for_execute";
nextStep: "first_review" | "ready_for_execute";
makerCheckerRequired: boolean;
reviewerPermission: string;
};
@@ -57,9 +57,32 @@ export type PaymentBatch = {
executedBy: string | null;
cancelledAt: string | null;
cancelledBy: string | null;
cancelledReason: string | null;
items: PaymentBatchItem[];
};
export type PaymentBatchCandidate = {
entityId: string;
entityType: "reimbursement";
businessNo: string;
employee: {
id: string;
employeeNo: string;
name: string;
};
amount: string;
currencyCode: "CNY";
businessDate: string | null;
summary: string | null;
};
export type PaymentBatchCandidatesResponse = {
items: PaymentBatchCandidate[];
page: number;
pageSize: number;
total: number;
};
export type PaymentBatchReceiptAttachment = {
id: string;
originalName: string;
@@ -89,6 +112,15 @@ export async function fetchPaymentBatchDetail(batchId: string) {
return apiRequestData<{ item: PaymentBatch }>(`/api/payment-batches/${batchId}`);
}
export async function fetchPaymentBatchCandidates(query: { q?: string; page?: number; pageSize?: number } = {}) {
const params = new URLSearchParams();
if (query.q?.trim()) params.set("q", query.q.trim());
if (query.page) params.set("page", String(query.page));
if (query.pageSize) params.set("pageSize", String(query.pageSize));
const suffix = params.toString() ? `?${params.toString()}` : "";
return apiRequestData<PaymentBatchCandidatesResponse>(`/api/payment-batches/candidates${suffix}`);
}
export async function createPaymentBatch(payload: {
entityType: PaymentBatchEntityType;
name: string;
@@ -131,10 +163,10 @@ export async function executePaymentBatch(batchId: string) {
});
}
export async function cancelPaymentBatch(batchId: string) {
export async function cancelPaymentBatch(batchId: string, reason: string) {
return apiRequestData<{ item: PaymentBatch }>(`/api/payment-batches/${batchId}/cancel`, {
method: "POST",
body: JSON.stringify({}),
body: JSON.stringify({ reason }),
});
}
@@ -170,9 +202,9 @@ export async function downloadPaymentBatchReceiptAttachment(
return apiRequestBlob(buildAttachmentFileUrl(paymentBatchReceiptAttachmentFileUrl(batchId, attachmentId), reason));
}
export async function deletePaymentBatchReceiptAttachment(batchId: string, attachmentId: string) {
return apiRequestData<{ attachmentId: string; outcome: "deleted" }>(
`/api/payment-batches/${batchId}/receipt-attachments/${attachmentId}`,
{ method: "DELETE" },
export async function voidPaymentBatchReceiptAttachment(batchId: string, attachmentId: string, reason: string) {
return apiRequestData<{ attachmentId: string; outcome: "voided"; voidedAt: string }>(
`/api/payment-batches/${batchId}/receipt-attachments/${attachmentId}/void`,
{ method: "POST", body: JSON.stringify({ reason }) },
);
}