import request from '@/utils/request'

// 查询线下订单列表
export function listStoreOrderOffline(query) {
  return request({
    url: '/store/store/storeOrderOffline/list',
    method: 'get',
    params: query
  })
}


// 查询线下订单列表
export function myOrderList(query) {
  return request({
    url: '/store/store/storeOrderOffline/myList',
    method: 'get',
    params: query
  })
}

// 查询线下订单详细
export function getStoreOrderOffline(orderId) {
  return request({
    url: '/store/store/storeOrderOffline/' + orderId,
    method: 'get'
  })
}

// 新增线下订单
export function createOrder(data) {
  return request({
    url: '/store/store/storeOrderOffline/createOrder',
    method: 'post',
    data: data
  })
}

// 修改线下订单
export function updateStoreOrderOffline(data) {
  return request({
    url: '/store/store/storeOrderOffline',
    method: 'put',
    data: data
  })
}

// 删除线下订单
export function delStoreOrderOffline(orderId) {
  return request({
    url: '/store/store/storeOrderOffline/' + orderId,
    method: 'delete'
  })
}

// 导出线下订单
export function exportStoreOrderOffline(query) {
  return request({
    url: '/store/store/storeOrderOffline/export',
    method: 'get',
    params: query
  })
}

// 上传凭证
export function uploadCredentials(data) {
  return request({
    url: '/store/store/storeOrderOffline/uploadCredentials',
    method: 'post',
    data: data
  })
}
