import request from '@/utils/request'

// 创建VIEW
export function createOrderView(data) {
  return request({
    url: '/system/order-view/create',
    method: 'post',
    data: data
  })
}

// 更新VIEW
export function updateOrderView(data) {
  return request({
    url: '/system/order-view/update',
    method: 'put',
    data: data
  })
}

// 删除VIEW
export function deleteOrderView(id) {
  return request({
    url: '/system/order-view/delete?id=' + id,
    method: 'delete'
  })
}

// 获得VIEW
export function getOrderView(id) {
  return request({
    url: '/system/order-view/get?id=' + id,
    method: 'get'
  })
}

// 获得VIEW分页
export function getOrderViewPage(query) {
  return request({
    url: '/system/order-view/page',
    method: 'get',
    params: query
  })
}

// 导出VIEW Excel
export function exportOrderViewExcel(query) {
  return request({
    url: '/system/order-view/export-excel',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}
