import request from '../util/request.js';

// 生成成品及成品入库单
export function generateStockIn(params) {
    return request({
        url: '/api/InventoryResource/generateFinishedInventory',
        method: 'post',
        data: params,
    });
}

// 查询在库成品
export function queryFinishProduct(params) {
    params.warehouseId = localStorage.getItem('#warehouseId');
    return request({
        url: '/api/InventoryResource/findInventoryFinishProduct',
        method: 'post',
        data: params,
    });
}

// 生成成品出库单
export function generateStockOut(params) {
    return request({
        url: '/api/StockOutResource/inventoryFinishProductStockOut',
        method: 'post',
        data: params,
    });
}

// 获取货位列表
export function getLocatorList() {
    const warehouseId = localStorage.getItem('#warehouseId');
    return request({
        url: '/api/positionResource/queryIdlePositionByFinish?warehouseId=' + warehouseId,
        method: 'get',
    });
}