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

const Api = {
    page: '/api/wms/outBillDetail/page',
    list: '/api/wms/outBillDetail/list',
    remove: '/api/wms/outBillDetail/remove',
    removeBatch: '/api/wms/outBillDetail/removeBatch',
    save: '/api/wms/outBillDetail/save',
    edit: '/api/wms/outBillDetail/edit',
    createOutBillDetails: '/api/wms/outBillDetail/CreateOutBillDetails',
    detailsAllot: '/api/wms/outBillDetail/detailsAllot',
}

/** 出库单明细管理 */
export const page = data => {
    return request.request({
        url: Api.page,
        params: data,
        method: 'GET'
    })
}

/** 出库单明细列表 */
export const list = data => {
    return request.request({
        url: Api.list,
        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 createOutBillDetails = data => {
  return request.request({
    url: Api.createOutBillDetails,
    data: data,
    method: 'POST'
  })
}
/** 出库单明细分配 */
export const detailsAllot = data => {
    return request.request({
        url: Api.detailsAllot,
        data: data,
        method: 'POST'
    })
}