/*
 * Author: gn
 */

import request from '@/router/axios'

export function fetchList(query) {
  return request({
    url: '/invtory/invgoodsinvtory/page',
    method: 'get',
    params: query
  })
}

export function addObj(obj) {
  return request({
    url: '/invtory/invgoodsinvtory',
    method: 'post',
    data: obj
  })
}

export function getObj(id) {
  return request({
    url: '/invtory/invgoodsinvtory/' + id,
    method: 'get'
  })
}

export function delObj(id) {
  return request({
    url: '/invtory/invgoodsinvtory/' + id,
    method: 'delete'
  })
}

export function putObj(obj) {
  return request({
    url: '/invtory/invgoodsinvtory',
    method: 'put',
    data: obj
  })
}
export function getInvgoodsinvtorydeal(invtoryId, postion) {
  return request({
    url: '/invtory/invgoodsinvtorydeal/getGoodsInvtoryDealByInvtId?invtoryId=' + invtoryId + '&postion=' + postion,
    method: 'get'
  })

}
export function exportStock(invtoryId) {
  return request({
    url: '/invtory/invgoodsinvtory/export?invtoryId=' + invtoryId,
    method: 'post',
    responseType: 'blob'
  })
}
