import { get, postJ } from "@/utils/request"; import Vue from "vue"; /** * 获取信息列表 */ export async function getTableList(params) { const res = await get(Vue.prototype.apiUrl + `/eom/purchaseplan/page`, params); if (res.code == 0) { return res.data; } return Promise.reject(new Error(res.message)); } /** * 获取计划详情 */ export async function getplanDetail(id) { const res = await get(Vue.prototype.apiUrl + `/eom/purchaseplan/getById/${id}`, {}); if (res.code == 0) { return res.data; } return Promise.reject(new Error(res.message)); } /** * 新增/保存采购计划 */ export async function savePurchasePlan(data) { const res = await postJ(Vue.prototype.apiUrl + `/eom/purchaseplan/save`, data); if (res.code == 0) { return res.data; } return Promise.reject(new Error(res.message)); }