import request, { postBlob, getBlob, handleImport } from '@/utils/request'

// 获取订单列表
export function getList(params) {
  return request({
    url: '/lease/order/list/page',
    method: 'post',
    params
  })
}

// 新增
export function add(data) {
  return request({
    url: '/lease/order/add',
    method: 'post',
    data
  })
}

// 获取订单详情
export function getDetail(params) {
  return request({
    url: '/lease/order/detail',
    method: 'post',
    params
  })
}

// 获取订单商品
export function getGoods(params) {
  return request({
    url: '/goods/lease/list/page',
    method: 'post',
    params
  })
}

// 取消订单
export function cancelOrder(params) {
  return request({
    url: '/lease/order/cancel',
    method: 'post',
    params
  })
}

// 确认订单
export function confirmOrder(data) {
  return request({
    url: '/lease/order/confirm',
    method: 'post',
    data
  })
}

// 确认回收
export function confirmRecover(params) {
  return request({
    url: '/lease/order/recover',
    method: 'post',
    params
  })
}

// 确认续期
export function confirmRelet(params) {
  return request({
    url: '/lease/order/renewal',
    method: 'post',
    params
  })
}

// 报修
export function confirmRepair(data) {
  return request({
    url: '/order/base/save',
    method: 'post',
    data
  })
}

// 报修
export function getTypeList(data) {
  return request({
    url: '/order/smalltype/list',
    method: 'post',
    data
  })
}

// 报修
export function getUserList(data) {
  return request({
    url: '/member/list/customer',
    method: 'post',
    data
  })
}

// 计算
export function getPrice(params) {
  return request({
    url: '/lease/order/compute/amount',
    method: 'post',
    params
  })
}