import request from "@/http/request";

/**
 * 分页查找物料
 */
const getGoodsInfoByPage = (params) => {
    return request({
        url: '/goods/getGoodsInfoByPage',
        method: 'post',
        data: params
    })
}

/**
 * 更新物料信息
 */
const updateGoodsInfo = (params) => {
    return request({
        url: '/goods/updateGoodsInfo',
        method: 'post',
        data: params
    })
}

/**
 * 查询所有物料信息
 */
const getGoodsInfo = (params) => {
    return request({
        url: '/goods/getGoodsInfo',
        method: 'post',
        data: params
    })
}

/**
 * 查询自动补全时可用的物料信息
 */
const getGoodsInfoByGoodsId = (params) => {
    return request({
        url: '/goods/getGoodsInfoByGoodsId',
        method: 'post',
        data: params
    })
}

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

export {
    getGoodsInfoByPage,
    deleteGoodsInfo,
    getGoodsInfoByGoodsId,
    getGoodsInfo,
    updateGoodsInfo
}