import request from '@/utils/request'

export function getStockPage(params) {
    return request({
        url: '/admin/stock/page',
        method: 'get',
        params
    })
}

export function getStockList(params) {
    return request({
        url: '/admin/stock/list',
        method: 'get',
        params
    })
}

export function addStock(data) {
    return request({
        url: '/admin/stock/add',
        method: 'post',
        data: data
    })
}

export function addStockOut(data) {
  return request({
    url: '/admin/stock/addStockOut',
    method: 'post',
    data: data
  })
}

export function editStock(data) {
    return request({
        url: '/admin/stock/update',
        method: 'post',
        data: data
    })
}

export function deleteStock(stockId) {
    return request({
        url: '/admin/stock/delete/' + stockId,
        method: 'get'
    })
}

