import request from '@/utils/request'

// 创建预定舱计划
export function createFutureBox(data) {
  return request({
    url: '/ecw/future-box/create',
    method: 'post',
    data: data
  })
}

// 更新预定舱计划
export function updateFutureBox(data) {
  return request({
    url: '/ecw/future-box/update',
    method: 'put',
    data: data
  })
}

// 删除预定舱计划
export function deleteFutureBox(id) {
  return request({
    url: '/ecw/future-box/delete?id=' + id,
    method: 'delete'
  })
}

// 获得预定舱计划
export function getFutureBox(id) {
  return request({
    url: '/ecw/future-box/get?id=' + id,
    method: 'get'
  })
}

// 获得预定舱计划分页
export function getFutureBoxPage(query) {
  return request({
    url: '/ecw/future-box/page',
    method: 'get',
    params: query
  })
}

// 导出预定舱计划 Excel
export function exportFutureBoxExcel(query) {
  return request({
    url: '/ecw/future-box/export-excel',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}
