import request from "@/utils/request";

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

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

/**
 * 订舱
 *
 * @export
 * @param {*} data
 * @return {*}
 */
export function booking(data) {
  if (data.id) {
    return request({
      url: "/shipment/box-book-air/update",
      method: "put",
      data,
    });
  }

  return request({
    url: "/shipment/box-book-air/create",
    method: "post",
    data,
  });
}