import http from '../http'

export default {
  page: data => http.post('/v1/chemical_stock/page', data).then(res => res),
  getTree: data =>
    http.put('/v1/chemical_stock/get_tree', data).then(res => res),
  getById: id => http.get('/v1/chemical_stock/' + id).then(res => res),
  edit: data =>
    http.put('/v1/chemical_stock?id=' + data.id, data.obj).then(res => res),
  editStock: data =>
    http.put('/v1/chemical_stock/' + data.chemicalId, data).then(res => res),
  add: data => http.post('/v1/chemical_stock/', data).then(res => res),
  tzInStock: data =>
    http.post('/v1/chemical_stock/tz_in_stock', data).then(res => res)
}
