import request from '@/utils/request'

// 查询订单列表
export function listStoreOrder(query) {
  return request({
    url: '/store/storeOrder/list',
    method: 'get',
    params: query
  })
}
export function getCustomerOrderList(query) {
  return request({
    url: '/store/storeOrder/getCustomerOrderList',
    method: 'get',
    params: query
  })
}


export function myListStoreOrder(query) {
  return request({
    url: '/store/storeOrder/myList',
    method: 'get',
    params: query
  })
}

// 查询订单详细
export function getStoreOrder(id) {
  return request({
    url: '/store/storeOrder/' + id,
    method: 'get'
  })
}
export function getExpress(id) {
  return request({
    url: '/store/storeOrder/getExpress/' + id,
    method: 'get'
  })
}


// 新增订单
export function addStoreOrder(data) {
  return request({
    url: '/store/storeOrder',
    method: 'post',
    data: data
  })
}




// 修改订单
export function updateStoreOrder(data) {
  return request({
    url: '/store/storeOrder',
    method: 'put',
    data: data
  })
}

// 删除订单
export function delStoreOrder(id) {
  return request({
    url: '/store/storeOrder/' + id,
    method: 'delete'
  })
}

// 导出订单
export function exportStoreOrder(query) {
  return request({
    url: '/store/storeOrder/export',
    method: 'get',
    params: query
  })
}

export function exportStoreOrderItems(query) {
  return request({
    url: '/store/storeOrder/exportItems',
    method: 'get',
    params: query
  })
}


export function createUserOrder(data) {
  return request({
    url: '/store/storeOrder/createUserOrder',
    method: 'post',
    data: data
  })
}

export function editPayPrice(data) {
  return request({
    url: '/store/storeOrder/editPayPrice',
    method: 'post',
    data: data
  })
}


export function bindCustomer(data) {
  return request({
    url: '/store/storeOrder/bindCustomer',
    method: 'post',
    data: data
  })
}

export function uploadCredentials(data) {
  return request({
    url: '/store/storeOrder/uploadCredentials',
    method: 'post',
    data: data
  })
}

