import request from '@/utils/request'

// 创建出货
export function createbox(data) {
  return request({
    url: '/shipment/box/create',
    method: 'post',
    data: data
  })
}

// 更新出货
export function updatebox(data) {
  return request({
    url: '/shipment/box/update',
    method: 'put',
    data: data
  })
}

// 删除出货
export function deletebox(id) {
  return request({
    url: '/shipment/box/delete?id=' + id,
    method: 'delete'
  })
}

// 获得出货
export function getbox(id) {
  return request({
    url: '/shipment/box/get?id=' + id,
    method: 'get'
  })
}

// 获得出货分页
export function getboxPage(query) {
  return request({
    url: '/shipment/box/page',
    method: 'get',
    params: query
  })
}

// 导出出货 Excel
export function exportboxExcel(query) {
  return request({
    url: '/shipment/box/export-excel',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}
