import request from '@/utils/request'

// 查询资产盘点记录列表
export function listInventory(query) {
  return request({
    url: '/inventory/inventory/list',
    method: 'get',
    params: query
  })
}

// 查询资产盘点记录视图列表
export function listInventoryDTO(query) {
  return request({
    url: '/inventory/inventory/listDTO',
    method: 'get',
    params: query
  })
}

// 查询资产盘点记录详细
export function getInventory(id) {
  return request({
    url: '/inventory/inventory/' + id,
    method: 'get'
  })
}

// 新增资产盘点记录
export function addInventory(data) {
  return request({
    url: '/inventory/inventory',
    method: 'post',
    data: data
  })
}

// 修改资产盘点记录
export function updateInventory(data) {
  return request({
    url: '/inventory/inventory',
    method: 'put',
    data: data
  })
}

// 删除资产盘点记录
export function delInventory(id) {
  return request({
    url: '/inventory/inventory/' + id,
    method: 'delete'
  })
}

export function selectQrCode(number, v) {
  return `/inventory/inventory/code/${number}?v=${v}`
}


// 删除资产盘点记录
export function getDepAssetLossTb(id) {
  return request({
    url: '/inventory/inventory/getDepAssetLossTb?depId=' + id,
    method: 'get'
  })
}
