增加backend的erp若干功能
This commit is contained in:
@@ -0,0 +1,47 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function getCustomerList(params) {
|
||||
return request({
|
||||
url: '/backend/erp/customer/list',
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
export function getCustomerDetail(id) {
|
||||
return request({
|
||||
url: `/backend/erp/customer/${id}`,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
export function createCustomer(data) {
|
||||
return request({
|
||||
url: '/backend/erp/customer',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function updateCustomer(id, data) {
|
||||
return request({
|
||||
url: `/backend/erp/customer/${id}`,
|
||||
method: 'put',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function deleteCustomer(id) {
|
||||
return request({
|
||||
url: `/backend/erp/customer/${id}`,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
export function toggleCustomerStatus(id, status) {
|
||||
return request({
|
||||
url: `/backend/erp/customer/${id}/status`,
|
||||
method: 'post',
|
||||
data: { status }
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user