/*
 * Author: gn
 */

import request from '@/router/axios'

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

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

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

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

export function putObj(obj) {
  return request({
    url: '/invtory/invcust',
    method: 'put',
    data: obj
  })
}
export function fetchTree(query) {
  return request({
    url: '/invtory/invcust/tree',
    method: 'get',
    params: query
  })
}

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

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

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

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