tangu.js 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. import {
  2. postJ,
  3. post,
  4. get
  5. } from "@/utils/request";
  6. import Vue from "vue";
  7. //工序计算列表
  8. export async function saveParam(params) {
  9. const data = await postJ(
  10. Vue.prototype.apiUrl + `/mes/computeparam/save`, params, true,
  11. );
  12. if (data.code == 0) {
  13. return data.data;
  14. }
  15. return Promise.reject(data.message);
  16. }
  17. // 根据工单工序取计算参数
  18. export async function getComputeParam(workOrderId, taskId) {
  19. const data = await get(
  20. Vue.prototype.apiUrl + `/mes/computeparam/getComputeParam/${workOrderId}/${taskId}`
  21. );
  22. if (data.code == 0) {
  23. return data.data;
  24. }
  25. return Promise.reject(data.message);
  26. }
  27. // pda常规质检-批量报工型取样
  28. export async function sample(params) {
  29. const data = await postJ(
  30. Vue.prototype.apiUrl + `/pda/mes/workorder/sample`, params, true,
  31. );
  32. if (data.code == 0) {
  33. return data.data;
  34. }
  35. return Promise.reject(data.message);
  36. }
  37. // 根据工单工序请求bom质检参数
  38. export async function bomQuality(params) {
  39. const data = await postJ(
  40. Vue.prototype.apiUrl + `/pda/mes/workreport/bomQuality`, params, true,
  41. );
  42. if (data.code == 0) {
  43. return data.data;
  44. }
  45. return Promise.reject(data.message);
  46. }