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

/** 接口管理 */
const Api = {
    page: '/api/wms/request/page',
    save: '/api/wms/request/save',
    edit: '/api/wms/request/edit',
    reActivate:'/api/wms/request/reActivate',
    remove: '/api/wms/request/remove',
    cancel: '/api/wms/request/cancel',
    removeBatch: '/api/wms/request/removeBatch'
}

/** 托盘出入库记录列表 (分页) */
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 reActivate = data => {
    return request.request({
        url: Api.reActivate,
        data: data,
        method: 'POST'
    })
}

/** 请求取消 */
export const cancel = data => {
    return request.request({
        url: Api.cancel,
        data: data,
        method: 'POST'
    })
}
