| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788 |
- 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/saleorder/page`,params);
- if (res.code == 0) {
- return res.data;
- }
- return Promise.reject(new Error(res.message));
- }
- /**
- * 获取信息详情
- */
- export async function getSaleOrderDetail(id) {
- const res = await get(Vue.prototype.apiUrl + `/eom/saleorder/getById/${id}`, {});
- if (res.code == 0) {
- return res.data;
- }
- return Promise.reject(new Error(res.message));
- }
- /**
- * 更新信息
- */
- export async function saveSaleorder(data) {
- let api = data.id ? putJ : postJ
- const res = await api(Vue.prototype.apiUrl + `/eom/saleorder/` + (data.id ? 'update' :
- 'save'), data);
- if (res.code == 0) {
- return res.data;22
- }
- return Promise.reject(new Error(res.message));
- }
- /**
- * 获取合同列表
- */
- export async function contractList(params) {
- const res = await get(Vue.prototype.apiUrl + `/eom/contract/page`, params);
- if (res.code == 0) {
- return res.data;
- }
- return Promise.reject(new Error(res.message));
- }
- /**
- * 获取合同详情
- */
- export async function getContract(id) {
- const res = await get(Vue.prototype.apiUrl + `/eom/contract/getById/${id}`, {});
- if (res.code == 0) {
- return res.data;
- }
- return Promise.reject(new Error(res.message));
- }
- /**
- * 摘要卡片
- */
- export async function queryOrderNoCount(code) {
- const res = await get(Vue.prototype.apiUrl + `/eom/saleorder/queryOrderNoCount/${code}`, {});
- 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/saleorder/delete', data);
- if (res.code == 0) {
- return res.data;
- }
- return Promise.reject(new Error(res.message));
- }
|