import request from '@/utils/request'

// 查询安全库存单据列表
export function listStockData(query) {
  return request({
    url: '/system/stockData/list',
    method: 'get',
    params: query
  })
}

// 查询安全库存单据详细
export function getStockData(id) {
  return request({
    url: '/system/stockData/' + id,
    method: 'get'
  })
}

// 新增安全库存单据
export function addStockData(data) {
  return request({
    url: '/system/stockData',
    method: 'post',
    data: data
  })
}

// 修改安全库存单据
export function updateStockData(data) {
  return request({
    url: '/system/stockData',
    method: 'put',
    data: data
  })
}

// 删除安全库存单据
export function delStockData(id) {
  return request({
    url: '/system/stockData/' + id,
    method: 'delete'
  })
}

export function generateDoc() {
  return request({
    url: '/system/stockData/generateDoc',
    method: 'post',
    timeout: 10 * 1000 * 60
  });
}

export function logs(lastIndex) {
  return request({
    url: `/system/stockData/logs?lastIndex=${lastIndex}`,
    method: 'get'
  });
}


