import request from '@/utils/request'

// 查询货品清单列表
export function listCargoDetail (query) {
  return request({
    url: '/system/cargoDetail/list',
    method: 'get',
    params: query
  })
}

// 查询货品清单详细
export function getCargoDetail (id) {
  return request({
    url: '/system/cargoDetail/' + id,
    method: 'get'
  })
}

// 新增货品清单
export function addCargoDetail (data) {
  return request({
    url: '/system/cargoDetail',
    method: 'post',
    data: data
  })
}

// 修改货品清单
export function updateCargoDetail (data) {
  return request({
    url: '/system/cargoDetail',
    method: 'put',
    data: data
  })
}

// 删除货品清单
export function delCargoDetail (id) {
  return request({
    url: '/system/cargoDetail/' + id,
    method: 'delete'
  })
}

// 导出货品清单
export function exportCargoDetail (query) {
  return request({
    url: '/system/cargoDetail/export',
    method: 'get',
    params: query
  })
}

export function apply (data) {
  return request({
    url: '/system/cargoDetail/apply',
    method: 'post',
    data
  })
}

export function importTemplate () {
  return request({
    url: '/system/cargoDetail/importTemplate',
    method: 'get'
  })
}
