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

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

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