feat: 客户名称字段校验

This commit is contained in:
caiyuchao
2025-05-24 16:12:34 +08:00
parent 7206389717
commit 588709c589
3 changed files with 37 additions and 4 deletions

View File

@@ -52,3 +52,15 @@ export function deleteCustomer(id: number) {
export function exportCustomer(params: any) {
return requestClient.download('/license/customer/export-excel', params);
}
/** 客户名称是否存在 */
async function isCustomerNameExists(
name: string,
id?: CustomerApi.Customer['id'],
) {
return requestClient.get<boolean>('/license/customer/name-exists', {
params: { id, name },
});
}
export { isCustomerNameExists };