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

// 预约单分页查询
export const listRemoteUrl = {
  url: serviceName + '/callNumber/queryAppoint',
  method: 'post',
}

// 运单查询
export const dialogListRemoteUrl = {
  url: serviceName + '/callNumber/get_shipbill',
  method: 'post',
}

// 商品表地址
export const page_detail_item = {
  url: serviceName + '/pending_dispatch/detail/list',
  method: 'post',
}

// 包裹表地址
export const page_detail_package = {
  url: serviceName + '/pending_dispatch/package/list',
  method: 'post',
}

// 仓库各预约时间段排队数查询
export const queryTimeCount = data => {
  return axios.post(serviceName + "/callNumber/queryTimeCount", data);
};

// 插队
export const insertSort = data => {
  return axios.post(serviceName + "/callNumber/insertSort", data);
};

// 月台与当前装卸车辆查询
export const platformAndVehicle = data => {
  return axios.post(serviceName + "/callNumber/platformAndVehicle", data);
};

// 等待区车辆查询
export const queryWaitingZone = data => {
  return axios.post(serviceName + "/callNumber/queryWaitingZone", data);
};

// 下一位
export const next_one = data => {
  return axios.post(serviceName + "/callNumber/next_one", data);
};

// 过号
export const passNumber = data => {
  return axios.post(serviceName + "/callNumber/passNumber", data);
};

// 查询运单明细
export const viewUrl = (data) => {
  return axios.post(serviceName + "/pending_dispatch/pending_dispatch_view", qs.stringify(data), {
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded'
    }
  })
}