import request from '@/utils/request'

// 创建配送管理
export function createExpress(data) {
  return request({
    url: '/ecw/express/create',
    method: 'post',
    data: data
  })
}

// 更新配送管理
export function updateExpress(data) {
  return request({
    url: '/ecw/express/update',
    method: 'put',
    data: data
  })
}

// 删除配送管理
export function deleteExpress(id) {
  return request({
    url: '/ecw/express/delete?id=' + id,
    method: 'delete'
  })
}

// 获得配送管理
export function getExpress(id) {
  return request({
    url: '/ecw/express/get?id=' + id,
    method: 'get'
  })
}

// 获得配送管理分页
export function getExpressPage(query) {
  return request({
    url: '/ecw/express/page',
    method: 'get',
    params: query
  })
}

// 导出配送管理 Excel
export function exportExpressExcel(query) {
  return request({
    url: '/ecw/express/export-excel',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}
