| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879 |
- import {
- get,
- put,
- putJ,
- postJ,
- deleteApi
- } from "@/utils/request";
- import Vue from "vue";
- /**
- * 获取信息列表
- */
- export async function getTableList(params) {
- const res = await get(Vue.prototype.apiUrl + `/eom/purchaserequirement/page`, params);
- if (res.code == 0) {
- return res.data;
- }
- return Promise.reject(new Error(res.message));
- }
- /**
- * 获取信息详情
- */
- export async function getDetail(id) {
- const res = await get(Vue.prototype.apiUrl + `/eom/purchaserequirement/getById/${id}`, {});
- if (res.code == 0) {
- return res.data;
- }
- return Promise.reject(new Error(res.message));
- }
- /**
- * 删除事项
- */
- export async function deleteInformation(data) {
- const res = await deleteApi(Vue.prototype.apiUrl + '/eom/purchaserequirement/delete', data);
- if (res.code == 0) {
- return res.data;
- }
- return Promise.reject(new Error(res.message));
- }
- //工序分页
- export async function producetask(params) {
- const res = await get(Vue.prototype.apiUrl + '/main/producetask/page', params);
- if (res.code == 0) {
- return res.data;
- }
- }
- /**
- * 更新信息
- */
- export async function UpdateInformation(data) {
- const res = await putJ(Vue.prototype.apiUrl + `/eom/purchaserequirement/update`, data);
- if (res.code == 0) {
- return res.data;
- }
- return Promise.reject(new Error(res.message));
- }
- /**
- * 新增信息
- */
- export async function addPurchaseNeedManage(data) {
- const res = await postJ(Vue.prototype.apiUrl + `/eom/purchaserequirement/save`, data);
- if (res.code == 0) {
- return res.data;
- }
- return Promise.reject(new Error(res.message));
- }
- export async function getCBomAPI(params) {
- const res = await get(Vue.prototype.apiUrl + '/main/bomCategory/cBom', params);
- if (res.code == 0) {
- return res.data;
- }
- return Promise.reject(new Error(res.message));
- }
|