Some checks failed
CI / Test (ubuntu-latest) (push) Has been cancelled
CI / Test (windows-latest) (push) Has been cancelled
CI / Lint (ubuntu-latest) (push) Has been cancelled
CI / Lint (windows-latest) (push) Has been cancelled
CI / Check (ubuntu-latest) (push) Has been cancelled
CI / Check (windows-latest) (push) Has been cancelled
CI / CI OK (push) Has been cancelled
CodeQL / Analyze (javascript-typescript) (push) Has been cancelled
Deploy Website on push / Deploy Push Playground Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Docs Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Antd Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Element Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Naive Ftp (push) Has been cancelled
Deploy Website on push / Rerun on failure (push) Has been cancelled
Release Drafter / update_release_draft (push) Has been cancelled
67 lines
1.8 KiB
TypeScript
67 lines
1.8 KiB
TypeScript
import type { PageParam, PageResult } from '@vben/request';
|
|
|
|
import { requestClient } from '#/api/request';
|
|
|
|
export namespace ErpCustomerApi {
|
|
/** 客户信息 */
|
|
export interface Customer {
|
|
id?: number; // 客户编号
|
|
name: string; // 客户名称
|
|
contact: string; // 联系人
|
|
mobile: string; // 手机号码
|
|
telephone: string; // 联系电话
|
|
email: string; // 电子邮箱
|
|
fax: string; // 传真
|
|
remark: string; // 备注
|
|
status: number; // 开启状态
|
|
sort: number; // 排序
|
|
taxNo: string; // 纳税人识别号
|
|
taxPercent: number; // 税率
|
|
bankName: string; // 开户行
|
|
bankAccount: string; // 开户账号
|
|
bankAddress: string; // 开户地址
|
|
}
|
|
}
|
|
|
|
/** 查询客户分页 */
|
|
export function getCustomerPage(params: PageParam) {
|
|
return requestClient.get<PageResult<ErpCustomerApi.Customer>>(
|
|
'/erp/customer/page',
|
|
{ params },
|
|
);
|
|
}
|
|
|
|
/** 查询客户精简列表 */
|
|
export function getCustomerSimpleList() {
|
|
return requestClient.get<ErpCustomerApi.Customer[]>(
|
|
'/erp/customer/simple-list',
|
|
);
|
|
}
|
|
|
|
/** 查询客户详情 */
|
|
export function getCustomer(id: number) {
|
|
return requestClient.get<ErpCustomerApi.Customer>(
|
|
`/erp/customer/get?id=${id}`,
|
|
);
|
|
}
|
|
|
|
/** 新增客户 */
|
|
export function createCustomer(data: ErpCustomerApi.Customer) {
|
|
return requestClient.post('/erp/customer/create', data);
|
|
}
|
|
|
|
/** 修改客户 */
|
|
export function updateCustomer(data: ErpCustomerApi.Customer) {
|
|
return requestClient.put('/erp/customer/update', data);
|
|
}
|
|
|
|
/** 删除客户 */
|
|
export function deleteCustomer(id: number) {
|
|
return requestClient.delete(`/erp/customer/delete?id=${id}`);
|
|
}
|
|
|
|
/** 导出客户 Excel */
|
|
export function exportCustomer(params: any) {
|
|
return requestClient.download('/erp/customer/export-excel', { params });
|
|
}
|