import request from '@/utils/request'

export function createItem(data) {
  return request({
    url: '/product/add',
    method: 'post',
    data
  })
}

export function updateItem(query) {
  return request({
    url: '/product/edit',
    method: 'post',
    data: query
  })
}

export function goodsList(query) {
  return request({
    url: '/product/page',
    method: 'get',
    params: query
  })
}

export function listGoods(query) {
  return request({
    url: '/warehouse-info/info/product',
    method: 'get',
    params: query
  })
}

export function removeItem(query) {
  return request({
    url: '/product/remove',
    method: 'post',
    params: query
  })
}
