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

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

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