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

const Api = {
    page: '/api/wms/InBillDetail/page',
    list: '/api/wms/InBillDetail/list',
    remove: '/api/wms/InBillDetail/remove',
    removeBatch: '/api/wms/InBillDetail/removeBatch',
    save: '/api/wms/InBillDetail/save',
    edit: '/api/wms/InBillDetail/edit',
    createInBillDetails: '/api/wms/InBillDetail/createInBillDetails',
}

/** 入库单明细管理 */
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 createInBillDetails = data => {
  return request.request({
    url: Api.createInBillDetails,
    data: data,
    method: 'POST'
  })
}
