import request from '@/utils/request'

export function listProduct(query) {
  return request({ url: '/warehouse/product/list', method: 'get', params: query })
}

export function getProduct(id) {
  return request({ url: '/warehouse/product/' + id, method: 'get' })
}

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

export function updateProduct(data) {
  return request({ url: '/warehouse/product', method: 'put', data })
}

export function delProduct(id) {
  return request({ url: '/warehouse/product/' + id, method: 'delete' })
}

export function optionselectProduct() {
  return request({ url: '/warehouse/product/optionselect', method: 'get' })
}
