/**
 * 容器信息 api 封装
 *
 * @Author:    霍锦
 * @Date:      2024-11-26 11:37:48
 * @Copyright  友仓
 */
import {postRequest, getRequest,getDownload} from '/@/lib/axios';

export const stockApi = {

    /**
     * 分页查询  @author  霍锦
     */
    queryPage: (param: object) => {
        return postRequest('/stock/queryPage', param);
    },

    /**
     * 增加  @author  霍锦
     */
    add: (param: object) => {
        return postRequest('/stock/add', param);
    },

    /**
     * 修改  @author  霍锦
     */
    update: (param: object) => {
        return postRequest('/stock/update', param);
    },


    /**
     * 删除  @author  霍锦
     */
    delete: (stockId: number) => {
        return getRequest('/stock/delete', {stockId});
    },

    /**
     * 批量删除  @author  霍锦
     */
    batchDelete: (idList: number[]) => {
        return postRequest('/stock/batchDelete', idList);
    },
    /**
     * 下拉查询  @author  hj
     */
    queryStock: (param: object) => {
        return postRequest('/stock/queryStock', param);
    },

    /**
     * 导入  @author  hj
     */
    importStocks: (file: object) => {
        return postRequest('/stock/importStocks', file);
    },

    /**
     * 导出  @author  hj
     */
    exportStocks: () => {
        return getDownload('/stock/exportStocks', {});
    }


};
