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 + '/driverFeeSettlement/page',
  method: 'post',
}

// 派车单明细
export const mainViewUrl = serviceName + '/driverFeeSettlement/view'

// 运单商品明细查询
export const childrenTableInfoUrl = serviceName + '/driverFeeSettlement/getItem'
// 包裹信息
export const packTableInfoUrl = serviceName + '/driverFeeSettlement/getPackage'
// 审批信息查询 POST
export const auditTableInfoUrl = serviceName + '/driverFeeSettlement/getAudit'
// 日志
export const logTableInfoUrl = serviceName + '/driverFeeSettlement/getLog'
// 费用
export const adjustTableInfoUrl = serviceName + '/driverFeeSettlement/getDetail'

// 结算单初始化
export const initPaySettlement = (data) => {
  return request({
    url: serviceName + '/driverFeeSettlement/initPaySettlement',
    method: 'post',
    data,
  })
}

// 费用结算
export const settlementSave = (data) => {
  return request({
    url: serviceName + '/driverFeeSettlement/feeSettlement',
    method: 'post',
    data,
  })
}

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