import request from '@/utils/request'

// 创建集运包裹审批内容
export function createConsApproval(data) {
  return request({
    url: '/ecw/cons-approval/create',
    method: 'post',
    data: data
  })
}

// 更新集运包裹审批内容
export function updateConsApproval(data) {
  return request({
    url: '/ecw/cons-approval/update',
    method: 'put',
    data: data
  })
}

// 删除集运包裹审批内容
export function deleteConsApproval(id) {
  return request({
    url: '/ecw/cons-approval/delete?id=' + id,
    method: 'delete'
  })
}

// 获得集运包裹审批内容
export function getConsApproval(id) {
  return request({
    url: '/ecw/cons-approval/get?id=' + id,
    method: 'get'
  })
}

// 获得集运包裹审批内容列表
export function getConsApprovalList(query) {
  return request({
    url: '/ecw/cons-approval/getConsApprovalList',
    method: 'get',
    params: query
  })
}

// 获得集运包裹审批内容分页
export function getConsApprovalPage(query) {
  return request({
    url: '/ecw/cons-approval/page',
    method: 'get',
    params: query
  })
}

// 导出集运包裹审批内容 Excel
export function exportConsApprovalExcel(query) {
  return request({
    url: '/ecw/cons-approval/export-excel',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}
