import request from '@/utils/request'

// 查询库存总账列表
export function listWhgenleg(query) {
  return request({
    url: '/warehouseBusiness/receivable/list',
    method: 'get',
    params: query
  })
}

// 查询库存总账详细
export function getWhgenleg(fAccyear) {
  return request({
    url: '/warehouseBusiness/whgenleg/' + fAccyear,
    method: 'get'
  })
}

// 新增库存总账
export function addWhgenleg(data) {
  return request({
    url: '/warehouseBusiness/whgenleg',
    method: 'post',
    data: data
  })
}

// 修改库存总账
export function updateWhgenleg(data) {
  return request({
    url: '/warehouseBusiness/whgenleg',
    method: 'put',
    data: data
  })
}

// 删除库存总账
export function delWhgenleg(fAccyear) {
  return request({
    url: '/warehouseBusiness/whgenleg/' + fAccyear,
    method: 'delete'
  })
}

// 导出库存总账
export function exportWhgenleg(query) {
  return request({
    url: '/warehouseBusiness/whgenleg/export',
    method: 'get',
    params: query
  })
}
