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

const Api = {
  page: '/api/wms/sku/page',
  list: '/api/wms/sku/list',
  remove: '/api/wms/sku/remove',
  removeBatch: '/api/wms/sku/removeBatch',
  save: '/api/wms/sku/save',
  edit: '/api/wms/sku/edit',
  change: '/api/wms/sku/edit',
  inBillSkuPage: '/api/wms/sku/inBillSkuPage',
  
  
 
}

/** 物料管理 */
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 change = data => {
    return request.request({
        url: Api.change,
        data: data,
        method: 'PUT'
    })
}
/** 物料管理 */
export const inBillSkuPage = data => {
  return request.request({
    url: Api.inBillSkuPage,
    params: data,
    method: 'GET'
  })
}


