import { axios } from '@/utils/request'

// 订单列表
export const orderList = (params) => {
  const url = `/order/queryPage/${params.pageNo}/${params.pageSize}`
  delete params.pageNo
  delete params.pageSize
  return axios.request({
    url: url,
    data: params,
    method: 'post'
  })
}
// 订单详情
export const orderFind = (params) => {
  return axios.request({
    url: `/order/findById/${params.id}`,
    method: 'get'
  })
}
//  根据供应商查订单
export const offPartnerOrderFind = (params) => {
  return axios.request({
    url: '/offPartnerOrder/findByGroupExpress',
    data: params,
    method: 'post'
  })
}
//  填写物流信息
export const orderExpressSend = (params) => {
  return axios.request({
    url: '/orderExpress/sendExpress',
    data: params,
    method: 'post'
  })
}
//  快递公司
export const expressCompanyQuery = (params) => {
  return axios.request({
    url: '/expressCompany/query',
    data: params,
    method: 'post'
  })
}
//  导出
export const orderExport = (params) => {
  return axios.request({
    url: '/order/exportExcel',
    data: params,
    method: 'post',
    responseType: 'blob'
  })
}

// 导出订单明细
export const orderDetailExport = (params) => {
  return axios.request({
    url: 'orderGoods/exportOrderGoodDetails',
    data: params,
    method: 'post',
    responseType: 'blob'
  })
}
