import request from '@/utils/request'

// 查询资产调拨列表
export function listAllot(query) {
  return request({
    url: '/assets/allot/list',
    method: 'get',
    params: query
  })
}

// 查询资产调拨详细
export function getAllot(aId) {
  return request({
    url: '/assets/allot/' + aId,
    method: 'get'
  })
}

// 新增资产调拨
export function addAllot(data) {
  return request({
    url: '/assets/allot',
    method: 'post',
    data: data
  })
}

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

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

// 修改资产调拨
export function updateAllot(data) {
  return request({
    url: '/assets/allot',
    method: 'put',
    data: data
  })
}

// 删除资产调拨
export function delAllot(aId) {
  return request({
    url: '/assets/allot/' + aId,
    method: 'delete'
  })
}

// 导出资产调拨
export function exportAllot(query) {
  return request({
    url: '/assets/allot/export',
    method: 'get',
    params: query
  })
}
