outsourcedWarehousing.js 881 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. import { get, postJ } from "@/utils/request";
  2. import Vue from "vue";
  3. /**
  4. * 详情
  5. */
  6. export async function getById(id) {
  7. const res = await get(
  8. Vue.prototype.apiUrl + `/mes/applyoutsource/getById/${id}`,
  9. {},
  10. true,
  11. );
  12. if (res.code == 0) {
  13. return res.data;
  14. }
  15. return Promise.reject(new Error(res.message));
  16. }
  17. // 指派
  18. export async function outsourceAssign(data) {
  19. const res = await postJ(
  20. Vue.prototype.apiUrl + `/bpm/outsource/assign`,
  21. data,
  22. true,
  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 outsourceNotPass(data) {
  31. const res = await postJ(
  32. Vue.prototype.apiUrl + `/bpm/outsource/notPass`,
  33. data,
  34. true,
  35. );
  36. if (res.code == 0) {
  37. return res.data;
  38. }
  39. return Promise.reject(new Error(res.message));
  40. }