import request from '@/utils/request'

// 分页查询客户订单列表
export function pageListOrder(query) {
  return request({
    url: '/order/order/pageList',
    method: 'get',
    params: query
  })
}

// 查询客户订单列表
export function listOrder(query) {
  return request({
    url: '/order/order/list',
    method: 'get',
    params: query
  })
}

// 查询客户订单详细
export function getOrder(id) {
  return request({
    url: '/order/order/' + id,
    method: 'get'
  })
}

// 新增客户订单
export function addOrder(data) {
  return request({
    url: '/order/order',
    method: 'post',
    data: data
  })
}

// 修改客户订单
export function updateOrder(data) {
  return request({
    url: '/order/order',
    method: 'put',
    data: data
  })
}

// 删除客户订单
export function delOrder(id) {
  return request({
    url: '/order/order/' + id,
    method: 'delete'
  })
}

// 导出客户订单
export function exportOrder(query) {
  return request({
    url: '/order/order/' + 'export',
    method: 'post',
    params: query
  })
}


export function getBillNumber(billPrefix) {
  return request({
    url: '/order/order/getBillNo/' + billPrefix,
    method: 'get'
  })
}
