/*
 * Author: gn
 */

import request from '@/router/axios'

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

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

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

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

export function putObj(obj) {
  return request({
    url: '/invtory/invgoods',
    method: 'put',
    data: obj
  })
}

export function getGoodsByGoodsType(goodsTypeNo,custNo) {
  return request({
    url: '/invtory/invgoods/getGoodsByGoodsType?goodsTypeNo='+goodsTypeNo+"&custNo="+custNo,
    method: 'get'
  })
}