| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346 |
- import {
- get,
- put,
- putJ,
- postJ
- } from "@/utils/request";
- import Vue from "vue";
- //获取我的消息列表
- export async function notifyMessagePageAPI(params, loding = true) {
- const res = await postJ(
- Vue.prototype.apiUrl + `/sys/notifymessage/page`, params, loding
- );
- if (res.code == 0) {
- return res.data;
- }
- return Promise.reject(new Error(res.message));
- }
- //更新已读-指定消息ID
- export async function updateNotifyMessageReadByIdAPI(params, loding = true) {
- const res = await postJ(
- Vue.prototype.apiUrl + `/sys/notifymessage/updateNotifyMessageRead`, params, loding
- );
- if (res.code == 0) {
- return res.data;
- }
- return Promise.reject(new Error(res.message));
- }
- //获取某用户的未读消息条数
- export async function getUnreadNotifyMessageCountAPI() {
- const res = await get(
- Vue.prototype.apiUrl + `/sys/notifymessage/getUnreadNotifyMessageCount`, '', false
- );
- if (res.code == 0) {
- return res.data;
- }
- return Promise.reject(new Error(res.message));
- }
- //获取待办事项列表
- export async function getTodoTaskPage(query, loding = true) {
- const res = await get(
- Vue.prototype.apiUrl + `/bpm/task/todo-page`, query, loding
- );
- if (res.code == 0) {
- return res.data;
- }
- return Promise.reject(new Error(res.message));
- }
- //获取已办事项列表
- export async function getDoneTaskPage(query) {
- const res = await get(
- Vue.prototype.apiUrl + `/bpm/task/done-page`, query, true
- );
- if (res.code == 0) {
- return res.data;
- }
- return Promise.reject(new Error(res.message));
- }
- //获取流程详情
- export async function getTaskListByProcessinstanceid(query) {
- const res = await get(
- Vue.prototype.apiUrl + `/bpm/task/list-by-process-instance-id`, query, true
- );
- if (res.code == 0) {
- return res.data;
- }
- return Promise.reject(new Error(res.message));
- }
- //获取流程任务实例
- export async function getProcessInstance(id) {
- const res = await get(Vue.prototype.apiUrl + `/bpm/process-instance/get`, id, true)
- if (res.code == 0) {
- return res.data;
- }
- return Promise.reject(new Error(res.message));
- }
- export async function getTaskListByProcessInstanceId(processInstanceId) {
- const res = await get(Vue.prototype.apiUrl + `/bpm/task/list-by-process-instance-id`, processInstanceId, true)
- if (res.code == 0) {
- return res.data;
- }
- return Promise.reject(new Error(res.message));
- }
- // 通用流程审核接口
- export async function approveTaskWithVariables(data) {
- const res = await putJ(Vue.prototype.apiUrl + `/bpm/task/approveTaskWithVariables`, data, true)
- if (res.code == 0) {
- return res.data;
- }
- return Promise.reject(new Error(res.message));
- }
- /**
- *销售退货审批流程审核接口
- */
- export async function approveTaskSalesOrderReturn(params) {
- const res = await postJ(Vue.prototype.apiUrl + `/bpm/salesOrderReturnApprove/approve`, params, true)
- if (res.code == 0) {
- return res;
- }
- return Promise.reject(new Error(res.message));
- }
- //费用申请
- // 编辑
- export async function feeApplyUpdateAPI(data) {
- const res = await putJ(Vue.prototype.apiUrl + `/eom/finfeeapply/update`, data, true)
- if (res.code == 0) {
- return res.data;
- }
- return Promise.reject(new Error(res.message));
- }
- // 信息
- export async function getFeeApplyInfoAPI(id) {
- const res = await get(Vue.prototype.apiUrl + `/eom/finfeeapply/getById/${id}`, {}, true)
- 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/contract/getById/${id}`, {}, true);
- if (res.code == 0) {
- return res.data;
- }
- return Promise.reject(new Error(res.message));
- }
- //
- //
- //
- //
- //客户申请
- /**
- * 客户申请列表
- */
- export async function contactApplyList(id) {
- const res = await get(Vue.prototype.apiUrl + `/eom/contactlistapply/getById/${id}`, {}, true);
- if (res.code == 0) {
- return res.data;
- }
- return Promise.reject(new Error(res.message));
- }
- //
- //
- //
- //
- //商机管理
- /**
- * /商机管理-获取信息详情
- */
- export async function getBusinessOpportunityDetailAPI(id) {
- const res = await get(Vue.prototype.apiUrl + `/eom/businessopportunity/getById/${id}`, {}, true);
- if (res.code == 0) {
- return res.data;
- }
- return Promise.reject(new Error(res.message));
- }
- /**
- * 更新信息
- */
- export async function businessOpportunityUpdateAPI(data) {
- const res = await postJ(Vue.prototype.apiUrl + `/eom/businessopportunity/updateProduct`, data, true);
- if (res.code == 0) {
- return res.data;
- }
- return Promise.reject(new Error(res.message));
- }
- //
- //
- //
- //
- //销售订单
- /**
- * /销售订单-获取信息详情
- */
- export async function getSaleOrderDetailAPI(id) {
- const res = await get(Vue.prototype.apiUrl + `/eom/saleorder/getById/${id}`, {}, true);
- if (res.code == 0) {
- return res.data;
- }
- return Promise.reject(new Error(res.message));
- }
- //
- //
- //
- //
- //销售退货单
- /**
- * /销售退货单-获取信息详情
- */
- export async function getSaleOrderReturnGetByIdAPI(id) {
- const res = await get(Vue.prototype.apiUrl + `/eom/saleorderreturnrecord/getById/${id}`, {}, true);
- if (res.code == 0) {
- return res.data;
- }
- return Promise.reject(new Error(res.message));
- }
- //
- //
- //
- //
- //获取发货单
- /**
- * /获取发货单信息详情-获取信息详情
- */
- export async function getSaleOrderSendRecordDetailAPI(id) {
- const res = await get(Vue.prototype.apiUrl + `/eom/saleordersendrecord/getById/${id}`, {}, true);
- if (res.code == 0) {
- return res.data;
- }
- return Promise.reject(new Error(res.message));
- }
- //
- //
- //
- //
- //获取仓库信息
- /**
- * /获取仓库信息
- */
- export async function getWarehouseListByIdsAPI(data) {
- const res = await postJ(Vue.prototype.apiUrl + `/wms/warehouse/getWarehouseListByIds`, data, true);
- if (res.code == 0) {
- return res.data;
- }
- return Promise.reject(new Error(res.message));
- }
- //
- //
- //
- //
- //
- //采购需求
- /**
- * /获取需求单信息
- */
- export async function getPurchaseRequirementByIdsAPI(id) {
- const res = await get(Vue.prototype.apiUrl + `/eom/purchaserequirement/getById/${id}`, {}, true);
- if (res.code == 0) {
- return res.data;
- }
- return Promise.reject(new Error(res.message));
- }
- //获取采购计划单信息
- export async function getPurchasePlanByIdsAPI(id) {
- const res = await get(Vue.prototype.apiUrl + `/eom/purchaseplan/getById/${id}`, {}, true);
- if (res.code == 0) {
- return res.data;
- }
- return Promise.reject(new Error(res.message));
- }
- /**
- * /新增采购需求负责人
- */
- export async function AssignPurchasePlanUserAPI(data) {
- const res = await postJ(Vue.prototype.apiUrl + `/bpm/purchasePlanApprove/assign`, data, true);
- if (res.code == 0) {
- return res.data;
- }
- return Promise.reject(new Error(res.message));
- }
- //
- //
- //
- //
- /**
- * /采购订单
- */
- //获取采购订单信息
- export async function purchaseOrderGetByIdAPI(id) {
- const res = await get(Vue.prototype.apiUrl + `/eom/purchaseorder/getById/${id}`, {}, true);
- if (res.code == 0) {
- return res.data;
- }
- return Promise.reject(new Error(res.message));
- }
- //
- //
- //
- //
- /**
- * /采购收货
- */
- //获取采购收货单信息
- export async function purchaseOrderReceiveGetByIdAPI(id) {
- const res = await get(Vue.prototype.apiUrl + `/eom/purchaseorderreceive/getById/${id}`, {}, true);
- if (res.code == 0) {
- return res.data;
- }
- return Promise.reject(new Error(res.message));
- }
- //
- //
- //
- //
- /**
- * /采购退货
- */
- //获取采购退货单信息
- export async function purchaseOrderReturnGetByIdAPI(id) {
- const res = await get(Vue.prototype.apiUrl + `/eom/purchaseorderreturn/getById/${id}`, {}, true);
- if (res.code == 0) {
- return res.data;
- }
- return Promise.reject(new Error(res.message));
- }
- //
- //
- //
- //
|