import request from "@/utils/request";

// 创建WMS 仓库 仓库货位
export function createStockLocation(data) {
    return request({
        url: "/rtkwms/stock-location/create",
        method: "post",
        data: data,
    });
}

// 更新WMS 仓库 仓库货位
export function updateStockLocation(data) {
    return request({
        url: "/rtkwms/stock-location/update",
        method: "put",
        data: data,
    });
}

// 删除WMS 仓库 仓库货位
export function deleteStockLocation(id) {
    return request({
        url: "/rtkwms/stock-location/delete?id=" + id,
        method: "delete",
    });
}

// 获得WMS 仓库 仓库货位
export function getStockLocation(id) {
    return request({
        url: "/rtkwms/stock-location/get?id=" + id,
        method: "get",
    });
}

// 获得WMS 仓库 仓库货位分页
export function getStockLocationPage(query) {
    return request({
        url: "/rtkwms/stock-location/page",
        method: "get",
        params: query,
    });
}

// 获得WMS 仓库 仓库货位下拉
export function getStockLocationPageList(query) {
    return request({
        url: "/rtkwms/stock-location/dropDownList",
        method: "get",
        params: query,
    });
}

// 导出WMS 仓库 仓库货位 Excel
export function exportStockLocationExcel(query) {
    return request({
        url: "/rtkwms/stock-location/export-excel",
        method: "get",
        params: query,
        responseType: "blob",
    });
}