import request from '@/utils/request'

// 查询订单统计
export async function getOrderCount(params) {
  const res = await request.get(`/aps/index/orderCount`, {
    params
  });
  if (res.data.code == 0) {
    return res.data.data;
  }
  return Promise.reject(new Error(res.data.message));
}

// 准时交付率&完成率
export async function deliveryCompletionRate(params) {
  const res = await request.get(`/aps/index/deliveryCompletionRate`, {
    params
  });
  if (res.data.code == 0) {
    return res.data.data;
  }
  return Promise.reject(new Error(res.data.message));
}