import request from "@/http/request";

const getAllStocks = (params) => {
    return request({
        url: '/stock/getAllStocks',
        method: 'post',
        data: params
    })
}

const getStockByLocation = (params) => {
    return request({
        url: '/stock/getStockByLocation',
        method: 'post',
        data: params
    })
}

const getAllStocksByGoodsId = (params) => {
    return request({
        url: '/stock/getAllStocksByGoodsId',
        method: 'post',
        data: params
    })
}

const updateStockInfo = (params) => {
    return request({
        url: '/stock/updateStockInfo',
        method: 'post',
        data: params
    })
}
const addStockInfo = (params) => {
    return request({
        url: '/stock/addNewStock',
        method: 'post',
        data: params
    })
}

const deleteStockInfo = (params) => {
    return request({
        url: '/stock/deleteStockInfo',
        method: 'post',
        data: params
    })
}
export {
    getAllStocks,
    updateStockInfo,
    getAllStocksByGoodsId,
    addStockInfo,
    getStockByLocation,
    deleteStockInfo
}
