实现企业银行账户与建行制单(corporate-bank-account-payment-order)
这个提交包含在:
@@ -0,0 +1,28 @@
|
||||
import { apiRequestData } from "./http";
|
||||
|
||||
export type EmployeeBankSummary = {
|
||||
bankInstitution: { id: string; code: string; name: string } | null;
|
||||
bankName: string | null;
|
||||
bankAccountMasked: string | null;
|
||||
};
|
||||
|
||||
export async function fetchUserSensitive(userId: string) {
|
||||
return apiRequestData<EmployeeBankSummary & { idNumber?: string | null }>(`/api/users/${userId}/sensitive`);
|
||||
}
|
||||
|
||||
export async function updateUserBank(userId: string, payload: {
|
||||
bankInstitutionId: string | null;
|
||||
bankAccount?: string | null;
|
||||
}) {
|
||||
return apiRequestData<{ id: string; updatedFields: string[] }>(`/api/users/${userId}/sensitive`, {
|
||||
method: "PATCH",
|
||||
body: JSON.stringify(payload),
|
||||
});
|
||||
}
|
||||
|
||||
export async function revealUserBank(userId: string, reason: string) {
|
||||
return apiRequestData<{ bankAccount: string | null }>(`/api/users/${userId}/sensitive/bank/reveal`, {
|
||||
method: "POST",
|
||||
body: JSON.stringify({ reason }),
|
||||
});
|
||||
}
|
||||
在新工单中引用
屏蔽一个用户