import request from "@/utils/request.js";

/**
 * 获取订单列表
 * @param {*} params
 * @returns
 */
export function orderfindOrder(params) {
  return request({
    method: "get",
    url: "order/findOrder",
    params,
  });
}
/**
 * 订单详情
 * @param {*} params
 * @returns
 */
export function orderorderDetail(params) {
  return request({
    method: "get",
    url: "order/orderDetail",
    params,
  });
}
/**
 * 退单
 * @param {*} params
 * @returns
 */
export function payreturnOrder(data, pwd, isOnline) {
  return request({
    method: "post",
    url: `pay/returnOrder?pwd=${pwd}&isOnline=${isOnline}`,
    data,
  });
}

/**
 * 打印
 * @param {*} params
 * @returns
 */
export function cloudPrinterprint(params) {
  return request({
    method: "get",
    url: "cloudPrinter/print",
    params,
  });
}

/**
 * 查询快捷收银订单
 * @param {*} params
 * @returns
 */
export function queryQuickPay(params) {
  return request({
    method: "get",
    url: "pay/queryQuickPay",
    params,
  });
}

/**
 * 叫号
 * @param {*} params
 * @returns
 */
export function sendMessage(params) {
  return request({
    method: "get",
    url: "/order/sendMessage",
    params,
  });
}

/**
 * 扫码叫号
 * @param {*} params
 * @returns
 */
export function scanSendMessage(params) {
  return request({
    method: "get",
    url: "/order/scanSendMessage",
    params,
  });
}

/**
 * 获取叫号记录
 * @param {*} params
 * @returns
 */
export function getsendMessage(params) {
  return request({
    method: "get",
    url: "/order/getsendMessage",
    params,
  });
}

/**
 * 订单详情
 * @param {*} params
 * @returns
 */
export function orderDetail(params) {
  return request({
    method: "get",
    url: "/order/orderDetail",
    params,
  });
}

/**
 * 获取员工最大优惠点
 * @param {*} params
 * @returns
 */
export function getStaffDiscount(params) {
  return request({
    method: "get",
    url: "/pay/getOrderDiscount",
    params,
  });
}
