import request from '@/utils/request'

// 分页查询运输装载列表
export function pageListCargo(query) {
  return request({
    url: '/trans/cargo/pageList',
    method: 'get',
    params: query
  })
}

// 查询运输装载列表
export function listCargo(query) {
  return request({
    url: '/trans/cargo/list',
    method: 'get',
    params: query
  })
}

// 查询运输装载详细
export function getCargo(ID) {
  return request({
    url: '/trans/cargo/' + ID,
    method: 'get'
  })
}

// 新增运输装载
export function addCargo(data) {
  return request({
    url: '/trans/cargo',
    method: 'post',
    data: data
  })
}

// 修改运输装载
export function updateCargo(data) {
  return request({
    url: '/trans/cargo',
    method: 'put',
    data: data
  })
}

// 批量保存货物运输计划
export function saveTransCargo(data) {
  return request({
    url: '/trans/cargo/saveTransCargo',
    method: 'post',
    data: data
  })
}

// 删除运输装载
export function delCargo(ID) {
  return request({
    url: '/trans/cargo/' + ID,
    method: 'delete'
  })
}

// 导出运输装载
export function exportCargo(query) {
  return request({
    url: '/trans/cargo/' + 'export',
    method: 'post',
    params: query
  })
}
