import { request } from '@/service/request';

/**
 * 正常订单
 * @param data
 * @returns
 */
export function fetchGetOrderList(data: any) {
  return request<Api.Common.PaginatingQueryRecord<Api.delivery.deliveryOrder>>({
    url: '/smqjh-oms/api/v1/djkOrder/backendDJKOrderList',
    method: 'get',
    params: data
  });
}

/**
 *  获取订单状态数量
 * @returns
 */
export function fetchGetStatusNum(data: any) {
  return request<Api.delivery.DeliveryStatusNum>({
    url: '/smqjh-oms/api/v1/djkOrder/backendDJKOrderStatusCount',
    method: 'get',
    params: data
  });
}

/**
 * 获取快递订单详情
 * @param orderNumber
 * @returns
 */
export function fetchGetNomalOrderInfo(orderNumber: string) {
  return request<Api.delivery.deliveryOrder>({
    // url: `/smqjh-oms/api/v1/order/backendOrderInfo`,
    url: `/smqjh-oms/api/v1/djkOrder/backendDJKOrderInfo`,
    method: 'get',
    // params: { orderNo }
    params: { orderNumber }
  });
}

/**
 * 核销
 */
export function fetchAudit(data: any) {
  return request({
    url: '/smqjh-oms/api/v1/djkOrder/backendVerification',
    method: 'get',
    params: data
  });
}
