import {axios} from '@/utils/request'
import {upcloud_base_wh_outbound, SERVICE_CTRL_TOWER} from "@/config/serviceSettings";

//获取波次订单详情
export function getWaveList(id) {
  return axios({
    url: upcloud_base_wh_outbound + '/wave/' + id,
    method: 'get',
  })
}

//取消波次订单
export function cencelWaveList(params) {
  return axios({
    url: upcloud_base_wh_outbound + '/wave/bill/cancel',
    method: 'post',
    params
  })
}

//获取波次订单商品详情
export function getWaveItemList(id, params) {
  return axios({
    url: upcloud_base_wh_outbound + '/wave/bill/' + id,
    method: 'get',
    params
  })
}

//批量下发
export function postdistributeList(data) {
  return axios({
    url: upcloud_base_wh_outbound + '/wave/distribute',
    method: 'post',
    headers: {'Content-Type': 'application/json'},
    data
  })
}

//获取货主信息
export function getAuthByUser(params) {
  return axios({
    url: SERVICE_CTRL_TOWER + '/userDataAuth/allDataAuthByUser/?companyType=H&pageNum=1&pageSize=10',
    method: 'get',
    params
  })
}

//货位修改提交
export function postbillDPrePosition(data) {
  return axios({
    url: upcloud_base_wh_outbound + '/billDPrePosition',
    method: 'post',
    headers: {'Content-Type': 'application/json'},
    data
  })
}