import request from '@/utils/request'
import qs from 'qs'
import { UPCLOUD_RDC_TMS_BMS_SERVICE, UPCLOUD_RDC_TMS_MAINDATA_SERVICE } from '@/config/serviceSettings.js'
const serviceName = UPCLOUD_RDC_TMS_BMS_SERVICE
// 主表地址
export const listRemoteUrl = {
  url: serviceName + '/settlementManagement/findList',
  method: 'post',
}

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

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

// 结算单信息
export const settlementSave = (data) => {
  return request({
    url: serviceName + '/settlementManagement/settlementSave',
    method: 'post',
    data,
  })
}

// 运单查看
export const viewUrl = (data) => {
  return request({
    url: serviceName + '/pending_review/view',
    method: 'post',
    data,
  })
}

// 号码管理器
export const Code = (data) => {
  return request({
    url: UPCLOUD_RDC_TMS_MAINDATA_SERVICE + '/codes/one',
    method: 'post',
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded'
    },
    data: qs.stringify(data),
  })
}
