import request from '@/utils/request'

// 创建移交
export function createTurnOver(data) {
  return request({
    url: '/archives/turn-over/create',
    method: 'post',
    data: data
  })
}

// 更新移交
export function updateTurnOver(data) {
  return request({
    url: '/archives/turn-over/update',
    method: 'put',
    data: data
  })
}

// 删除移交
export function deleteTurnOver(id) {
  return request({
    url: '/archives/turn-over/delete?id=' + id,
    method: 'delete'
  })
}

// 获得移交
export function getTurnOver(id) {
  return request({
    url: '/archives/turn-over/get?id=' + id,
    method: 'get'
  })
}

// 获得移交分页
export function getTurnOverPage(query) {
  return request({
    url: '/archives/turn-over/page',
    method: 'get',
    params: query
  })
}

// 导出移交 Excel
export function exportTurnOverExcel(query) {
  return request({
    url: '/archives/turn-over/export-excel',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}
