| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143 |
- 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));
- }
- /**
- * 查询项目列表
- * @data data
- */
- export async function projectsPageAPI(data) {
- const res = await postJ(Vue.prototype.apiUrl+'/pro/projects/page', data);
- if (res.code == 0) {
- return res.data;
- }
- return Promise.reject(new Error(res.message));
- }
- /**
- * 查询发货单列表
- * @data data
- */
- export async function saleordersendrecord(data) {
- const res = await get(Vue.prototype.apiUrl+'/eom/saleordersendrecord/page', data);
- if (res.code == 0) {
- return res.data;
- }
- return Promise.reject(new Error(res.message));
- }
- /**
- * 查询发货单详情
- * @data data
- */
- export async function saleordersendrecordInfo(id) {
- const res = await get(Vue.prototype.apiUrl+`/eom/saleordersendrecord/getById/${id}`, {});
- if (res.code == 0) {
- return res.data;
- }
- return Promise.reject(new Error(res.message));
- }
- /**
- * 新增发货确认单
- * @data data
- */
- export async function saleordersendconfirmSave(data) {
- const res = await postJ(Vue.prototype.apiUrl+`/eom/saleordersendconfirm/save`, data);
- if (res.code == 0) {
- return res.data;
- }
- return Promise.reject(new Error(res.message));
- }
- /**
- * 查询发货确认单详情
- * @data data
- */
- export async function saleordersendconfirmInfo(id) {
- const res = await get(Vue.prototype.apiUrl+`/eom/saleordersendconfirm/getById/${id}`, {});
- if (res.code == 0) {
- return res.data;
- }
- return Promise.reject(new Error(res.message));
- }
|