214 lines
3.5 KiB
JavaScript
214 lines
3.5 KiB
JavaScript
import request from '@/utils/request'
|
|
//客户
|
|
export function getCustomerList(query) {
|
|
return request({
|
|
url: '/sam/customer/',
|
|
method: 'get',
|
|
params: query
|
|
})
|
|
}
|
|
export function createCustomer(data) {
|
|
return request({
|
|
url: '/sam/customer/',
|
|
method: 'post',
|
|
data
|
|
})
|
|
}
|
|
export function updateCustomer(id, data) {
|
|
return request({
|
|
url: `/sam/customer/${id}/`,
|
|
method: 'put',
|
|
data
|
|
})
|
|
}
|
|
export function deleteCustomer(id, data) {
|
|
return request({
|
|
url: `/sam/customer/${id}/`,
|
|
method: 'delete',
|
|
data
|
|
})
|
|
}
|
|
export function getCustomer(id) {
|
|
return request({
|
|
url: `/sam/customer/${id}/`,
|
|
method: 'get',
|
|
|
|
})
|
|
}
|
|
|
|
|
|
//合同
|
|
export function getContractList(query) {
|
|
return request({
|
|
url: '/sam/contract/',
|
|
method: 'get',
|
|
params: query
|
|
})
|
|
}
|
|
export function getContract(id) {
|
|
return request({
|
|
url: `/sam/contract/${id}/`,
|
|
method: 'get'
|
|
})
|
|
}
|
|
export function createContract(data) {
|
|
return request({
|
|
url: '/sam/contract/',
|
|
method: 'post',
|
|
data
|
|
})
|
|
}
|
|
export function updateContract(id, data) {
|
|
return request({
|
|
url: `/sam/contract/${id}/`,
|
|
method: 'put',
|
|
data
|
|
})
|
|
}
|
|
export function deleteContract(id, data) {
|
|
return request({
|
|
url: `/sam/contract/${id}/`,
|
|
method: 'delete',
|
|
data
|
|
})
|
|
}
|
|
//订单
|
|
//合同
|
|
export function getOrderList(query) {
|
|
return request({
|
|
url: '/sam/order/',
|
|
method: 'get',
|
|
params: query
|
|
})
|
|
}
|
|
export function createOrder(data) {
|
|
return request({
|
|
url: '/sam/order/',
|
|
method: 'post',
|
|
data
|
|
})
|
|
}
|
|
export function getOrder(id) {
|
|
return request({
|
|
url: `/sam/order/${id}/`,
|
|
method: 'get'
|
|
})
|
|
}
|
|
|
|
export function updateOrder(id, data) {
|
|
return request({
|
|
url: `/sam/order/${id}/`,
|
|
method: 'put',
|
|
data
|
|
})
|
|
}
|
|
export function deleteOrder(id, data) {
|
|
return request({
|
|
url: `/sam/order/${id}/`,
|
|
method: 'delete',
|
|
data
|
|
})
|
|
}
|
|
|
|
export function getordertoplan() {
|
|
return request({
|
|
url: '/sam/order/toplan/',
|
|
method: 'get',
|
|
})
|
|
}
|
|
//销售记录列表
|
|
export function getSaleList(query) {
|
|
return request({
|
|
url: '/sam/sale/',
|
|
method: 'get',
|
|
params: query
|
|
})
|
|
}
|
|
|
|
//销售记录创建
|
|
export function createSale(data) {
|
|
return request({
|
|
url: '/sam/sale/',
|
|
method: 'post',
|
|
data
|
|
})
|
|
}
|
|
|
|
|
|
export function deleteSale(id, data) {
|
|
return request({
|
|
url: `/sam/sale/${id}/`,
|
|
method: 'delete',
|
|
data
|
|
})
|
|
}
|
|
|
|
|
|
export function getSale(id) {
|
|
return request({
|
|
url: `/sam/sale/${id}/`,
|
|
method: 'get'
|
|
})
|
|
}
|
|
|
|
//销售记录列表
|
|
export function getSaleproductList(query) {
|
|
return request({
|
|
url: '/sam/sale_product/',
|
|
method: 'get',
|
|
params: query
|
|
})
|
|
}
|
|
|
|
//删除销售记录关联产品
|
|
export function deleteSaleproduct(id, data) {
|
|
return request({
|
|
url: `/sam/sale_product/${id}/`,
|
|
method: 'delete',
|
|
data
|
|
})
|
|
}
|
|
|
|
|
|
//审核
|
|
export function saleAudit(id) {
|
|
return request({
|
|
url: `/sam/sale/${id}/audit/`,
|
|
method: 'POST',
|
|
|
|
})
|
|
}
|
|
|
|
//返回装箱文件
|
|
export function gePack(id) {
|
|
return request({
|
|
url: `/sam/sale_product/${id}/pack/`,
|
|
method: 'get'
|
|
})
|
|
}
|
|
|
|
//打包装箱文件确认
|
|
export function subPack(id, data) {
|
|
return request({
|
|
url: `/sam/sale_product/${id}/pack/`,
|
|
method: 'POST',
|
|
data
|
|
})
|
|
}
|
|
///未装箱备注
|
|
export function notPackremark(id, data) {
|
|
return request({
|
|
url: `/sam/sale_product/${id}/remark/`,
|
|
method: 'POST',
|
|
data
|
|
})
|
|
}
|
|
//物流图片上传
|
|
export function ship(id, data) {
|
|
return request({
|
|
url: `/sam/sale/${id}/up_ship/`,
|
|
method: 'POST',
|
|
data
|
|
})
|
|
}
|