47 lines
1.6 KiB
TypeScript
47 lines
1.6 KiB
TypeScript
import request from '@/config/axios'
|
|
|
|
// 客户关联单位 VO
|
|
export interface CustomerCompanyVO {
|
|
id: number // ID
|
|
customerId: number // 客户ID
|
|
companyName: string // 单位名称
|
|
unifiedCreditCode: string // 统一社会信用代码
|
|
invoicingAddress: string // 开票地址
|
|
invoicingTelephone: string // 开票电话
|
|
companyBank: string // 开户行
|
|
companyAccount: string // 开户账号
|
|
companyAddress: string // 通讯地址
|
|
}
|
|
|
|
// 客户关联单位 API
|
|
export const CustomerCompanyApi = {
|
|
// 查询客户关联单位分页
|
|
getCustomerCompanyPage: async (params: any) => {
|
|
return await request.get({ url: `/crm/customer-company/page`, params })
|
|
},
|
|
|
|
// 查询客户关联单位详情
|
|
getCustomerCompany: async (id: number) => {
|
|
return await request.get({ url: `/crm/customer-company/get?id=` + id })
|
|
},
|
|
|
|
// 新增客户关联单位
|
|
createCustomerCompany: async (data: CustomerCompanyVO) => {
|
|
return await request.post({ url: `/crm/customer-company/create`, data })
|
|
},
|
|
|
|
// 修改客户关联单位
|
|
updateCustomerCompany: async (data: CustomerCompanyVO) => {
|
|
return await request.put({ url: `/crm/customer-company/update`, data })
|
|
},
|
|
|
|
// 删除客户关联单位
|
|
deleteCustomerCompany: async (id: number) => {
|
|
return await request.delete({ url: `/crm/customer-company/delete?id=` + id })
|
|
},
|
|
|
|
// 导出客户关联单位 Excel
|
|
exportCustomerCompany: async (params) => {
|
|
return await request.download({ url: `/crm/customer-company/export-excel`, params })
|
|
},
|
|
}
|