import request from '@/utils/request'

// 查询资产报废列表
export function listScrap(query) {
  return request({
    url: '/assets/scrap/list',
    method: 'get',
    params: query
  })
}

// 查询资产报废详细
export function getScrap(aId) {
  return request({
    url: '/assets/scrap/' + aId,
    method: 'get'
  })
}

// 新增资产报废
export function addScrap(data) {
  return request({
    url: '/assets/scrap',
    method: 'post',
    data: data
  })
}

// 提交审核
export function commit(aId,processId) {
  return request({
    url: '/assets/scrap/commit/'+aId+'/'+processId,
    method: 'post',
  })
}

// 提交审核
export function recommit(data) {
  return request({
    url: '/assets/scrap/recommit',
    method: 'post',
    data: data
  })
}

// 修改资产报废
export function updateScrap(data) {
  return request({
    url: '/assets/scrap',
    method: 'put',
    data: data
  })
}

// 删除资产报废
export function delScrap(aId) {
  return request({
    url: '/assets/scrap/' + aId,
    method: 'delete'
  })
}

// 导出资产报废
export function exportScrap(query) {
  return request({
    url: '/assets/scrap/export',
    method: 'get',
    params: query
  })
}
