import request from '@/utils/request'
import constant from '@/constant'

function pageList(formData){
  return request.post(constant.serverUrl + "/base/inventory/pageList", formData);
}

function update(formModel){  
  return request.post(constant.serverUrl + "/base/inventory/update", formModel,{
    headers: {
      "Content-Type": "application/json"
    }
  });
}

function edit(id){
  return request.get(constant.serverUrl + "/base/inventory/edit/" + id);
}

function initialize(formData){
  return request.post(constant.serverUrl + "/base/inventory/initialize", formData);
}

function changeState(id){
  return request.post(constant.serverUrl + "/base/inventory/changeState/" + id);
}

export default {
  pageList,update,edit,initialize,changeState
}