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

/** 接口管理 */
const Api = {
    page: '/api/wms/list/page',
    save: '/api/wms/list/save',
    edit: '/api/wms/list/edit',
    remove: '/api/wms/list/remove',
    removeBatch: '/api/wms/list/removeBatch',
    wmsListDict: '/api/wms/list/getWmsListDict',
}

/** 下拉值表 (分页) */
export const page = data => {
    return request.request({
        url: Api.page,
        params: data,
        method: 'GET'
    })
}

/** 保存 */
export const save = data => {
    return request.request({
        url: Api.save,
        data: data,
        method: 'POST'
    })
}

/** 修改 */
export const edit = data => {
    return request.request({
        url: Api.edit,
        data: data,
        method: 'PUT'
    })
}

/** 删除 */
export const remove = data => {
    return request.request({
        url: Api.remove,
        params: data,
        method: 'DELETE'
    })
}

/** 批量删除 */
export const removeBatch = data => {
    return request.request({
        url: Api.removeBatch,
        params: data,
        method: 'DELETE'
    })
}

/** 获取下拉值字典 --树相关 */
export const wmsListDict = data => {
    return request.request({
        url: Api.wmsListDict,
        params: data,
        method: 'GET'
    })
}

