import request from '@/utils/request'

// 查询销售主单列表
export function listSale(query) {
  return request({
    url: '/sale/sale/list',
    method: 'get',
    params: query
  })
}

// 查询销售主单详细
export function getSale(id) {
  return request({
    url: '/sale/sale/' + id,
    method: 'get'
  })
}

// 新增销售主单
export function addSale(data) {
  return request({
    url: '/sale/sale',
    method: 'post',
    data: data
  })
}

// 修改销售主单
export function updateSale(data) {
  return request({
    url: '/sale/sale',
    method: 'put',
    data: data
  })
}

// 删除销售主单
export function delSale(id) {
  return request({
    url: '/sale/sale/' + id,
    method: 'delete'
  })
}
