import { get, putJ, postJ } from "@/utils/request"; import Vue from "vue"; /** * 获取信息列表 */ export async function getTableList(params) { const res = await get(Vue.prototype.apiUrl + `/eom/purchaseinquiry/page`, params); if (res.code == 0) { return res.data; } return Promise.reject(new Error(res.message)); } /** * 获取信息详情 */ export async function getpurchaseinquiry(id) { const res = await get(Vue.prototype.apiUrl + `/eom/purchaseinquiry/getById/${id}`, {}); if (res.code == 0) { return res.data; } return Promise.reject(new Error(res.message)); } /** * 更新信息 */ export async function UpdateInformation(data) { const res = await putJ(Vue.prototype.apiUrl + `/eom/purchaseinquiry/update`, data); if (res.code == 0) { return res.data; } return Promise.reject(new Error(res.message)); } /** * 设置中标单位 */ export async function chooseWinner(data) { const res = await postJ(Vue.prototype.apiUrl + `/eom/purchaseinquiry/chooseWinner`, data); if (res.code == 0) { return res.data; } return Promise.reject(new Error(res.message)); } /** * 获取生成合同的数据 */ export async function generateContract(data) { const res = await postJ(Vue.prototype.apiUrl + `/eom/purchaseinquiry/generateContract`, data); if (res.code == 0) { return res.data; } return Promise.reject(new Error(res.message)); } /** * 流程作废 */ export async function cancel(data) { const res = await putJ(Vue.prototype.apiUrl + `/bpm/purchaseInquiryApprove/notPass`, data); if (res.code == 0) { return Promise.resolve(res.data); } return Promise.reject(new Error(res.message)); }