inquiryManage.js 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. import {
  2. get,
  3. putJ,
  4. postJ
  5. } from "@/utils/request";
  6. import Vue from "vue";
  7. /**
  8. * 获取信息列表
  9. */
  10. export async function getTableList(params) {
  11. const res = await get(Vue.prototype.apiUrl + `/eom/purchaseinquiry/page`, params);
  12. if (res.code == 0) {
  13. return res.data;
  14. }
  15. return Promise.reject(new Error(res.message));
  16. }
  17. /**
  18. * 获取信息详情
  19. */
  20. export async function getpurchaseinquiry(id) {
  21. const res = await get(Vue.prototype.apiUrl + `/eom/purchaseinquiry/getById/${id}`, {});
  22. if (res.code == 0) {
  23. return res.data;
  24. }
  25. return Promise.reject(new Error(res.message));
  26. }
  27. /**
  28. * 更新信息
  29. */
  30. export async function UpdateInformation(data) {
  31. const res = await putJ(Vue.prototype.apiUrl + `/eom/purchaseinquiry/update`, data);
  32. if (res.code == 0) {
  33. return res.data;
  34. }
  35. return Promise.reject(new Error(res.message));
  36. }
  37. /**
  38. * 设置中标单位
  39. */
  40. export async function chooseWinner(data) {
  41. const res = await postJ(Vue.prototype.apiUrl + `/eom/purchaseinquiry/chooseWinner`, data);
  42. if (res.code == 0) {
  43. return res.data;
  44. }
  45. return Promise.reject(new Error(res.message));
  46. }
  47. /**
  48. * 获取生成合同的数据
  49. */
  50. export async function generateContract(data) {
  51. const res = await postJ(Vue.prototype.apiUrl + `/eom/purchaseinquiry/generateContract`, data);
  52. if (res.code == 0) {
  53. return res.data;
  54. }
  55. return Promise.reject(new Error(res.message));
  56. }
  57. /**
  58. * 流程作废
  59. */
  60. export async function cancel(data) {
  61. const res = await putJ(Vue.prototype.apiUrl + `/bpm/purchaseInquiryApprove/notPass`, data);
  62. if (res.code == 0) {
  63. return Promise.resolve(res.data);
  64. }
  65. return Promise.reject(new Error(res.message));
  66. }