import { axios } from "@/utils/request";
import qs from "qs";
import { UPCLOUD_RDC_TMS_BUSINESS_SERVICE, UPCLOUD_RDC_TMS_MAINDATA_SERVICE } from '@/config/serviceSettings.js'
const serviceName = UPCLOUD_RDC_TMS_BUSINESS_SERVICE

// 主表地址
export const listRemoteUrl = {
  url: serviceName + '/booking/page',
  method: 'post',
}

// 配载运单地址
export const waybillListRemoteUrl = {
  url: serviceName + '/booking/get_shipbill',
  method: 'post',
}

// 商品表地址
export const goodsListRemoteUrl = {
  url: serviceName + '/booking/item_detail',
  method: 'post',
}

// 包裹表地址
export const packListRemoteUrl = {
  url: serviceName + '/booking/package_detail',
  method: 'post',
}

// 预约单取消
export const Cancel = data => {
  return axios.post(serviceName + "/booking/cancel", data);
};

// 预约单审核
export const Review = data => {
  return axios.post(serviceName + "/booking/review", data);
};

// 预约单调整(批量)
export const update_batch = data => {
  return axios.post(serviceName + "/booking/update_batch", data);
};

// 预约单调整(单个)
export const update_one = data => {
  return axios.post(serviceName + "/booking/update_one", data);
};

// 调整查询(单个)
export const view_one = data => {
  return axios.post(serviceName + "/booking/view_one", data);
};

// 调整查询(单个)
export const queryBranchTime = data => {
  return axios.post(UPCLOUD_RDC_TMS_MAINDATA_SERVICE + "/tmsBaseBranch/queryBranchTime", data);
};
