import request from '@/utils/request'

// 查询报损单列表
export function listReporting(query) {
  return request({
    url: '/yfc-admin/inventory/reporting/list',
    method: 'get',
    params: query
  })
}

// 查询报损单详细
export function getReporting(id) {
  return request({
    url: '/yfc-admin/inventory/reporting/' + id,
    method: 'get'
  })
}

// 新增报损单
export function addReporting(data) {
  return request({
    url: '/yfc-admin/inventory/reporting',
    method: 'post',
    data: data
  })
}

// 修改报损单
export function updateReporting(data) {
  return request({
    url: '/yfc-admin/inventory/reporting',
    method: 'put',
    data: data
  })
}

// 删除报损单
export function delReporting(id) {
  return request({
    url: '/yfc-admin/inventory/reporting/' + id,
    method: 'delete'
  })
}

// 导出报损单
export function exportReporting(query) {
  return request({
    url: '/yfc-admin/inventory/reporting/export',
    method: 'get',
    params: query
  })
}

export function updataKeeping(id) {
  return request({
    url: '/yfc-admin/inventory/reporting/keeping/' + id,
    method: 'put',
  })
}
