mirror of
https://gitee.com/hhyykk/ipms-sjy-ui.git
synced 2025-06-22 00:01:59 +08:00
49 lines
1.4 KiB
TypeScript
49 lines
1.4 KiB
TypeScript
import request from '@/config/axios'
|
|
|
|
// 客户公司 VO
|
|
export interface CustomerCompanyVO {
|
|
id: number // 主键
|
|
contacts: string // 联系人
|
|
name: string // 公司名称
|
|
address: string // 地址
|
|
phone: string // 电话
|
|
}
|
|
|
|
// 客户公司 API
|
|
export const CustomerCompanyApi = {
|
|
// 查询客户公司分页
|
|
getCustomerCompanyPage: async (params: any) => {
|
|
return await request.get({ url: `/cms/customer-company/page`, params })
|
|
},
|
|
|
|
// 查询客户公司详情
|
|
getCustomerCompany: async (id: number) => {
|
|
return await request.get({ url: `/cms/customer-company/get?id=` + id })
|
|
},
|
|
|
|
// 新增客户公司
|
|
createCustomerCompany: async (data: CustomerCompanyVO) => {
|
|
return await request.post({ url: `/cms/customer-company/create`, data })
|
|
},
|
|
|
|
// 修改客户公司
|
|
updateCustomerCompany: async (data: CustomerCompanyVO) => {
|
|
return await request.put({ url: `/cms/customer-company/update`, data })
|
|
},
|
|
|
|
// 删除客户公司
|
|
deleteCustomerCompany: async (id: number) => {
|
|
return await request.delete({ url: `/cms/customer-company/delete?id=` + id })
|
|
},
|
|
|
|
// 导出客户公司 Excel
|
|
exportCustomerCompany: async (params) => {
|
|
return await request.download({ url: `/cms/customer-company/export-excel`, params })
|
|
},
|
|
|
|
// 获取客户公司列表
|
|
getCustomerCompanyList: async () => {
|
|
return await request.get({ url: `/cms/customer-company/list`})
|
|
},
|
|
}
|