import request from '@/utils/wms-request'

// 查询盘点作业单列表
export function listInvJob(query) {
  return request({
    url: '/stock/invJob/list',
    method: 'get',
    params: query
  })
}

// 查询盘点作业单详细
export function getInvJob(id) {
  return request({
    url: '/stock/invJob/' + id,
    method: 'get'
  })
}

// 新增盘点作业单
export function addInvJob(data) {
  return request({
    url: '/stock/invJob',
    method: 'post',
    data: data
  })
}

// 修改盘点作业单
export function updateInvJob(data) {
  return request({
    url: '/stock/invJob',
    method: 'put',
    data: data
  })
}

// 删除盘点作业单
export function delInvJob(id) {
  return request({
    url: '/stock/invJob/' + id,
    method: 'delete'
  })
}

// 结案盘点作业单
export function finishInvJob(id) {
  return request({
    url: '/stock/invJob/finish/' + id,
    method: 'put',
  })
}

// 查询盘点作业单详细
export function getInvJobFromTask(data) {
  return request({
    url: '/stock/invJob/getInvJobFromTask',
    method: 'post',
    data: data
  })
}

// 导出盘点作业单为报告
export function exportInvJobReport(ids) {
  return request({
    url: '/stock/invJob/exportReport/' + ids,
    method: 'get'
  })
}