import request from '@/utils/request'

// 查询设备台账列表
export function listEquipLedger(query) {
  return request({
    url: '/equipment/ledger/list',
    method: 'get',
    params: query
  })
}

// 获取设备台账详细信息
export function getEquipLedger(ledgerId) {
  return request({
    url: '/equipment/ledger/' + ledgerId,
    method: 'get'
  })
}

// 新增设备台账
export function addEquipLedger(data) {
  return request({
    url: '/equipment/ledger',
    method: 'post',
    data: data
  })
}

// 修改设备台账
export function updateEquipLedger(data) {
  return request({
    url: '/equipment/ledger',
    method: 'put',
    data: data
  })
}

// 删除设备台账
export function delEquipLedger(ledgerIds) {
  return request({
    url: '/equipment/ledger/' + ledgerIds,
    method: 'delete'
  })
}

// 导出设备台账列表
export function exportEquipLedger(data) {
  return request({
    url: '/equipment/ledger/export',
    method: 'post',
    data: data,
    responseType: 'blob'
  })
}