You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
53 lines
1.2 KiB
53 lines
1.2 KiB
2 years ago
|
import request from '@/config/axios'
|
||
|
|
||
|
export interface CustomerVO {
|
||
|
code: string
|
||
|
name: string
|
||
|
shortName: string
|
||
|
address: string
|
||
|
country: string
|
||
|
city: string
|
||
|
phone: string
|
||
|
fax: string
|
||
|
postId: string
|
||
|
contacts: string
|
||
|
bank: string
|
||
|
currency: string
|
||
|
taxRate: number
|
||
|
type: string
|
||
|
available: number
|
||
|
activeTime: Date
|
||
|
expireTime: Date
|
||
|
remark: string
|
||
|
}
|
||
|
|
||
|
// 查询客户列表
|
||
|
export const getCustomerPage = async (params) => {
|
||
|
return await request.get({ url: `/wms/customer/page`, params })
|
||
|
}
|
||
|
|
||
|
// 查询客户详情
|
||
|
export const getCustomer = async (id: number) => {
|
||
|
return await request.get({ url: `/wms/customer/get?id=` + id })
|
||
|
}
|
||
|
|
||
|
// 新增客户
|
||
|
export const createCustomer = async (data: CustomerVO) => {
|
||
|
return await request.post({ url: `/wms/customer/create`, data })
|
||
|
}
|
||
|
|
||
|
// 修改客户
|
||
|
export const updateCustomer = async (data: CustomerVO) => {
|
||
|
return await request.put({ url: `/wms/customer/update`, data })
|
||
|
}
|
||
|
|
||
|
// 删除客户
|
||
|
export const deleteCustomer = async (id: number) => {
|
||
|
return await request.delete({ url: `/wms/customer/delete?id=` + id })
|
||
|
}
|
||
|
|
||
|
// 导出客户 Excel
|
||
|
export const exportCustomer = async (params) => {
|
||
|
return await request.download({ url: `/wms/customer/export-excel`, params })
|
||
|
}
|