import request from '@/utils/request'

// 创建包裹费用
export function createConsFee(data) {
  return request({
    url: '/ecw/cons-fee/create',
    method: 'post',
    data: data
  })
}

// 更新包裹费用
export function updateConsFee(data) {
  return request({
    url: '/ecw/cons-fee/update',
    method: 'put',
    data: data
  })
}

// 删除包裹费用
export function deleteConsFee(id) {
  return request({
    url: '/ecw/cons-fee/delete?id=' + id,
    method: 'delete'
  })
}

// 获得包裹费用
export function getConsFee(id) {
  return request({
    url: '/ecw/cons-fee/get?id=' + id,
    method: 'get'
  })
}

// 获得包裹费用
export function getConsFeeList(query) {
  return request({
    url: '/ecw/cons-fee/getConsFeeList',
    method: 'get',
    params: query
  })
}

// 批量申请费用
export function createFeeBatchApplication(data) {
  return request({
    url: "/ecw/cons-fee/create/batch",
    method: "post",
    data: data
  })
}

// 导出包裹费用 Excel
export function exportConsFeeExcel(query) {
  return request({
    url: '/ecw/cons-fee/export-excel',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}
