import request from '@/utils/request'

// 分页查询承运货物信息列表
export function pageListCargo(query) {
  return request({
    url: '/order/cargo/pageList',
    method: 'get',
    params: query
  })
}

// 查询承运货物信息列表
export function listCargo(query) {
  return request({
    url: '/order/cargo/list',
    method: 'get',
    params: query
  })
}

// 查询承运货物信息详细
export function getCargo(ID) {
  return request({
    url: '/order/cargo/' + ID,
    method: 'get'
  })
}

// 新增承运货物信息
export function addCargo(data) {
  return request({
    url: '/order/cargo',
    method: 'post',
    data: data
  })
}

// 修改承运货物信息
export function updateCargo(data) {
  return request({
    url: '/order/cargo',
    method: 'put',
    data: data
  })
}

// 删除承运货物信息
export function delCargo(ID) {
  return request({
    url: '/order/cargo/' + ID,
    method: 'delete'
  })
}

// 导出承运货物信息
export function exportCargo(query) {
  return request({
    url: '/order/cargo/' + 'export',
    method: 'post',
    params: query
  })
}
