import request from '@/utils/request'

// 查询库存结转列表
export function listForward(query) {
  return request({
    url: '/inventory/forward/list',
    method: 'get',
    params: query
  })
}

// 查询库存结转详细
export function getForward(id) {
  return request({
    url: '/inventory/forward/' + id,
    method: 'get'
  })
}

// 结转
export function bindForward(query) {
  return request({
    url: '/inventory/forward/forward',
    method: 'get',
    params: query
  })
}
//核对账本
export function checkForward(query) {
  return request({
    url: '/inventory/forward/check',
    method: 'get',
    params: query
  })
}
// 新增库存结转
export function addForward(data) {
  return request({
    url: '/inventory/forward',
    method: 'post',
    data: data
  })
}

// 修改库存结转
export function updateForward(data) {
  return request({
    url: '/inventory/forward',
    method: 'put',
    data: data
  })
}

// 删除库存结转
export function delForward(id) {
  return request({
    url: '/inventory/forward/' + id,
    method: 'delete'
  })
}

// 导出库存结转
export function exportForward(query) {
  return request({
    url: '/inventory/forward/export',
    method: 'get',
    params: query
  })
}

//获取最后的结转时间
export function getTime(query) {
  return request({
    url: '/inventory/forward/getTime',
    method: 'get',
    params: query
  })
}
//获取最后的结转时间
export function getTimeList(query) {
  return request({
    url: '/inventory/forward/getTimeList',
    method: 'get',
    params: query
  })
}