import request from '@/utils/request'

// 分页查询货源明细列表
export function pageListDetail(query) {
  return request({
    url: '/cargo/detail/pageList',
    method: 'get',
    params: query
  })
}

// 查询货源明细列表
export function listDetail(query) {
  return request({
    url: '/cargo/detail/list',
    method: 'get',
    params: query
  })
}

// 查询货源明细详细
export function getDetail(ID) {
  return request({
    url: '/cargo/detail/' + ID,
    method: 'get'
  })
}

// 新增货源明细
export function addDetail(data) {
  return request({
    url: '/cargo/detail',
    method: 'post',
    data: data
  })
}

// 修改货源明细
export function updateDetail(data) {
  return request({
    url: '/cargo/detail',
    method: 'put',
    data: data
  })
}

// 删除货源明细
export function delDetail(ID) {
  return request({
    url: '/cargo/detail/' + ID,
    method: 'delete'
  })
}

// 导出货源明细
export function exportDetail(query) {
  return request({
    url: '/cargo/detail/' + 'export',
    method: 'post',
    params: query
  })
}
