index.js 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. import {
  2. get,
  3. put,
  4. putJ,
  5. postJ,
  6. deleteApi
  7. } from "@/utils/request";
  8. import Vue from "vue";
  9. // 配件申请记录 表格
  10. export async function accessoryPage(data) {
  11. const res = await get(Vue.prototype.apiUrl + `/eom/sparePartsApply/page`, {
  12. params: data
  13. });
  14. if (res.code == 0) {
  15. return res.data;
  16. }
  17. return Promise.reject(new Error(res.message));
  18. }
  19. // 配件回收记录 表格
  20. export async function recyclePage(data) {
  21. const res = await get(Vue.prototype.apiUrl + `/eom/afterSalesAccessoryApply/page`, {
  22. params: data
  23. });
  24. if (res.code == 0) {
  25. return res.data;
  26. }
  27. return Promise.reject(new Error(res.message));
  28. }
  29. // 配件申请记录 表格 新增
  30. export async function accessorySave(data) {
  31. const res = await postJ(Vue.prototype.apiUrl + `/eom/sparePartsApply/saveOrUpdate`, data);
  32. if (res.code == 0) {
  33. return res.data;
  34. }
  35. return Promise.reject(new Error(res.message));
  36. }
  37. // 配件申请记录 表格 修改
  38. export async function accessoryUpdate(data) {
  39. const res = await putJ(Vue.prototype.apiUrl + `/eom/sparePartsApply/update`, data);
  40. if (res.code == 0) {
  41. return res.data;
  42. }
  43. return Promise.reject(new Error(res.message));
  44. }