import { get, post, postJson } from './http.js';

// 订单列表&订单查询
export const getOrderList = (params) => {
  return get('app/order/listNew', params)
}

// 订单角标
export const getOrderMarker = (params) => {
  return get('app/order/markerNew', params)
}

// 发起配送
export const sendValuation = (params) => {
  return postJson('app/order/valuation', params)
}

// 发起支付
export const sendOrder = (params) => {
  return postJson('app/pay/createOrder', params)
}

// 查询支付结果
export const getPayResult = (params) => {
  return get('app/pay/tradeQuery', params)
}

// 补打发票
export const waimaiprinter = (params) => {
  return get('app/order/print/waimai', params);
}

// 一件发单备注
export const addRemark = (params) => {
  return post('app/order/addRemark', params);
}

// 忽略订单
export const ignoreOrder = (params) => {
  return post('app/order/ignoreOrder', params);
}

// 撤回订单
export const rollOrder = (params) => {
  return post('app/order/rollOrder', params);
}

// 定时发单
export const setDeliveryTime = (params) => {
  return get('app/order/setDeliveryTime', params);
}

// 取消定时发单
export const cancelTimingPublish = (params) => {
  return postJson('app/order/cancelTimingPublish', params);
}

// 取消订单
export const cancelOrder = (params) => {
  return post('app/order/cancel', params);
}
// 订单跟踪
export const trackOrder = (params) => {
  return get('app/order/track', params);
}

// 订单详情
export const detailOrder = (params) => {
  return get('app/order/detailNew', params);
}

// 加小费
export const tips = (params) => {
  return post('app/order/tips', params);
}

// 新订单刷新
export const getRefreshOrder = (params) => {
  return postJson('app/order/findNewList', params);
}

// 订单地图数据
export const getMapData = (params) => {
  return get('app/order/showMap', params);
}

// 地点输入提示API服务
export const getInputPrompt = (params) => {
  return get('app/map/getInputPrompt', params);
}

// 地理编码信息
export const getGeoCode = (params) => {
  return get('app/map/getGeoCode', params);
}

// 获取地理位置信息
export const getLocation = (params) => {
  return get('app/map/getLocations', params);
}

// 手动发单保存订单
export const saveOrder = (params) => {
  return postJson('app/order/saveOrder', params);
}
// 获取骑手预计到达时间
export const getRiderArriveTime = (params) => {
  return get('app/order/getRiderArriveTime', params);
}
// 获取地址列表
export const getAddressList = (params) => {
  return get('app/address/getAddressList', params);
}

// 获取usb自动打印内容
export const getPrintOrderInfos = (params) => {
  return get('app/order/printOrderInfos', params);
}