purchaseNeedManage.js 924 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. import {
  2. get,
  3. put,
  4. putJ,
  5. postJ,
  6. deleteApi
  7. } from "@/utils/request";
  8. import Vue from "vue";
  9. /**
  10. * 获取信息列表
  11. */
  12. export async function getTableList(params) {
  13. const res = await get(Vue.prototype.apiUrl + `/eom/purchaserequirement/page`, params);
  14. if (res.code == 0) {
  15. return res.data;
  16. }
  17. return Promise.reject(new Error(res.message));
  18. }
  19. /**
  20. * 获取信息详情
  21. */
  22. export async function getDetail(id) {
  23. const res = await get(Vue.prototype.apiUrl + `/eom/purchaserequirement/getById/${id}`, {});
  24. if (res.code == 0) {
  25. return res.data;
  26. }
  27. return Promise.reject(new Error(res.message));
  28. }
  29. /**
  30. * 删除事项
  31. */
  32. export async function deleteInformation(data) {
  33. const res = await deleteApi(Vue.prototype.apiUrl + '/eom/purchaserequirement/delete', data);
  34. if (res.code == 0) {
  35. return res.data;
  36. }
  37. return Promise.reject(new Error(res.message));
  38. }