import request from '@/utils/request'

// 批量创建包裹特需
export function createConsSpecialNeed(data) {
  return request({
    url: '/ecw/cons-special-need/create',
    method: 'post',
    data: data
  })
}

// 更新包裹特需
export function updateConsSpecialNeed(data) {
  return request({
    url: '/ecw/cons-special-need/update',
    method: 'put',
    data: data
  })
}

// 删除包裹特需
export function deleteConsSpecialNeed(id) {
  return request({
    url: '/ecw/cons-special-need/delete?id=' + id,
    method: 'delete'
  })
}

// 获得包裹特需
export function getConsSpecialNeed(id) {
  return request({
    url: '/ecw/cons-special-need/get?id=' + id,
    method: 'get'
  })
}

// 根据包裹id特需列表
export function getSpecialListByConsId(id) {
  return request({
    url: '/ecw/cons-special-need/getSpecialListByConsId?consId=' + id,
    method: 'get'
  })
}

// 根据包裹id特需列表
export function selectAllSpecialListByConsId(id) {
  return request({
    url: '/ecw/cons-special-need/selectAllSpecialListByConsId?consId=' + id,
    method: 'get'
  })
}

// 获得包裹特需分页
export function getConsSpecialNeedPage(query) {
  return request({
    url: '/ecw/cons-special-need/page',
    method: 'get',
    params: query
  })
}

// 导出包裹特需 Excel
export function exportConsSpecialNeedExcel(query) {
  return request({
    url: '/ecw/cons-special-need/export-excel',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}
