import request from '@/utils/request'


// 领用
export function receiveItem(data) {
  return request({
    url: '/finance/asset/receive-info/create',
    method: 'post',
    data: data
  })
}

// 归还
export function returnItem(data) {
  return request({
    url: '/finance/asset/receive-info/update',
    method: 'put',
    data: data
  })
}

// 报废
export function retireItem(data) {
  return request({
    url: '/finance/asset/info/retire',
    method: 'post',
    data: data
  })
}
// 查询流转列表
export function receiveInfo(query) {
  return request({
    url: '/finance/asset/receive-info/page',
    method: 'get',
    params: query
  })
}

// 查询列表
export function listInfo(query) {
  return request({
    url: '/finance/asset/info/page',
    method: 'get',
    params: query
  })
}

// 查询详细
export function getInfo(dictId) {
  return request({
    url: '/finance/asset/info/get?id=' + dictId,
    method: 'get'
  })
}

// 新增
export function addInfo(data) {
  return request({
    url: '/finance/asset/info/create',
    method: 'post',
    data: data
  })
}

// 修改
export function updateInfo(data) {
  return request({
    url: '/finance/asset/info/update',
    method: 'put',
    data: data
  })
}

// 删除
export function delInfo(dictId) {
  return request({
    url: '/finance/asset/info/delete?id=' + dictId,
    method: 'delete'
  })
}

// 导出
export function exportInfo(query) {
  return request({
    url: '/finance/asset/info/export-excel',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}