| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290 |
- import {
- get,
- put,
- putJ,
- postJ
- } from "@/utils/request";
- import Vue from "vue";
- //获取客户
- export async function contactPage(query, loding = true) {
- const res = await get(
- Vue.prototype.apiUrl + `/eom/contact/page`, query, loding
- );
- if (res.code == 0) {
- return res.data;
- }
- return Promise.reject(new Error(res.message));
- }
- //根据多个ID查询分类详情系信息
- export async function getInfoByIds(id) {
- const res = await get(Vue.prototype.apiUrl + `/main/categoryLevel/getByIds/${id}`);
- if (res.code == 0) {
- return res.data;
- }
- return Promise.reject(new Error(res.message));
- }
- import request from '@/utils/request';
- /**
- * 获取客户信息详情
- */
- export async function contactDetail(id) {
- const res = await get(Vue.prototype.apiUrl + `/eom/contact/getById/${id}`, {});
- if (res.code == 0) {
- return res.data;
- }
- return Promise.reject(new Error(res.message));
- }
- /**
- * 更新客户信息
- */
- export async function contactSave(data) {
- let api = data.base.id ? putJ : postJ
- const res = await api(Vue.prototype.apiUrl + `/eom/contact/` + (data.base.id ? 'update' : 'save'), data);
- if (res.code == 0) {
- return res.data;
- }
- return Promise.reject(new Error(res.message));
- }
- /**
- * 发布动态
- */
- export async function updateContactDynamics(data) {
- const res = await putJ(Vue.prototype.apiUrl + '/eom/contact/updateContactDynamics', data);
- if (res.code == 0) {
- return res.data;
- }
- return Promise.reject(new Error(res.message));
- }
- /**
- * 回复动态
- */
- export async function updateContactComment(data) {
- const res = await putJ(Vue.prototype.apiUrl + '/eom/contact/updateContactComment', data);
- if (res.code == 0) {
- return res.data;
- }
- return Promise.reject(new Error(res.message));
- }
- // /**
- // * 客户证书资质信息分页
- // */
- // export async function contactQcPackPageAPI(params) {
- // const res = await request.get(`/main/professionCertification/selectByRelationIdAndType`, { params });
- // if (res.data.code == 0) {
- // return res.data.data;
- // }
- // return Promise.reject(new Error(res.data.message));
- // }
- // /**
- // * 新增客户证书资质信息
- // */
- // export async function contactQcPackSaveAPI(data) {
- // const res = await request.post(`/main/professionCertification/save`, data);
- // if (res.data.code == 0) {
- // return res.data.data;
- // }
- // return Promise.reject(new Error(res.data.message));
- // }
- // /**
- // * 修改客户证书资质信息
- // */
- // export async function contactQcPackUpdateAPI(data) {
- // const res = await request.put(`/main/professionCertification/update`, data);
- // if (res.data.code == 0) {
- // return res.data.data;
- // }
- // return Promise.reject(new Error(res.data.message));
- // }
- // /**
- // * 获取客户证书资质信息详情
- // */
- // export async function contactQcPackDetailAPI(id) {
- // const res = await request.get(`/main/professionCertification/getById/${id}`, {});
- // if (res.data.code == 0) {
- // return res.data.data;
- // }
- // return Promise.reject(new Error(res.data.message));
- // }
- // /**
- // * 删除客户证书资质包
- // */
- // export async function contactQcPackDeleteAPI(data) {
- // const res = await request.delete(`/main/professionCertification/delete`, { data });
- // if (res.data.code == 0) {
- // return res.data.data;
- // }
- // return Promise.reject(new Error(res.data.message));
- // }
- // /**
- // * 提交客户证书资质信息 开启流程
- // */
- // export async function contactQcSubmit(data) {
- // const res = await request.post(`/bpm/ProfessionCertification/submit`, data);
- // if (res.data.code == 0) {
- // return res.data.data;
- // }
- // return Promise.reject(new Error(res.data.message));
- // }
- /**
- * 删除事项
- */
- export async function contactDelete(data) {
- const res = await postJ(Vue.prototype.apiUrl + '/eom/contact/delete', data);
- if (res.code == 0) {
- return res.data;
- }
- return Promise.reject(new Error(res.message));
- }
- // /**
- // * 获取客户分类树
- // */
- // export async function contactTypeTree(data) {
- // const res = await request.get(`/main/categoryLevel/getTreeByPid/${data.type}`);
- // if (res.data.code == 0) {
- // return res.data;
- // }
- // return Promise.reject(new Error(res.data.message));
- // }
- // /**
- // * 更新用户状态
- // */
- // export async function updateStatus(id, status) {
- // const res = await request.get(`/eom/contact/updateStatus?id=` + id + '&status=' + status);
- // if (res.data.code == 0) {
- // return res.data;
- // }
- // return Promise.reject(new Error(res.data.message));
- // }
- // /**
- // * 指派
- // */
- export async function assign(data) {
- const res = await postJ(Vue.prototype.apiUrl + '/eom/contact/assign', data);
- if (res.code == 0) {
- return res.data;
- }
- return Promise.reject(new Error(res.message));
- }
- // /**
- // * 释放
- // */
- export async function free(data) {
- const res = await postJ(Vue.prototype.apiUrl + '/eom/contact/free', data);
- if (res.code == 0) {
- return res.data;
- }
- return Promise.reject(new Error(res.message));
- }
- /**
- * 申请
- */
- export async function apply(data) {
- const res = await postJ(Vue.prototype.apiUrl + '/bpm/contactlistapply/apply', data);
- if (res.code == 0) {
- return res.data;
- }
- return Promise.reject(new Error(res.message));
- }
- /**
- * 查询客户联系人列表
- */
- export async function getcontactlink(params) {
- const res = await get(Vue.prototype.apiUrl + `/eom/contactlink/list/`, params);
- if (res.code == 0) {
- return res.data;
- }
- return Promise.reject(new Error(res.message));
- }
- /**
- * 摘要卡片
- */
- export async function queryContactIdCount(id) {
- const res = await get(Vue.prototype.apiUrl + `/eom/contact/queryContactIdCount/` + id);
- console.log(res,'ressss')
- if (res.code == 0) {
- return res.data;
- }
- return Promise.reject(new Error(res.message));
- }
- // /**
- // * 供应商维护供货产品
- // */
- // export async function contactProductSaveAPI(data) {
- // const res = await request.post('/main/contactproduct/save', data);
- // if (res.data.code == 0) {
- // return res.data.data;
- // }
- // return Promise.reject(new Error(res.data.message));
- // }
- // /**
- // * 供应商维护供货产品
- // */
- // export async function contactProductUpdateAPI(data) {
- // const res = await request.post('/main/contactproduct/update', data);
- // if (res.data.code == 0) {
- // return res.data.data;
- // }
- // return Promise.reject(new Error(res.data.message));
- // }
- // /**
- // * 通过产品查供应商
- // */
- // export async function contactQueryByCategoryIdsAPI(data) {
- // const res = await request.post('/eom/contact/queryByCategoryIds', data);
- // if (res.data.code == 0) {
- // return res.data.data;
- // }
- // return Promise.reject(new Error(res.data.message));
- // }
- // /**
- // * 发布动态
- // */
- // export async function updateContactDynamics(data) {
- // const res = await request.put('/eom/contact/updateContactDynamics', data);
- // if (res.data.code == 0) {
- // return res.data.data;
- // }
- // return Promise.reject(new Error(res.data.message));
- // }
- // /**
- // * 回复动态
- // */
- // export async function updateContactComment(data) {
- // const res = await request.put('/eom/contact/updateContactComment', data);
- // if (res.data.code == 0) {
- // return res.data.data;
- // }
- // return Promise.reject(new Error(res.data.message));
- // }
- // /**
- // * 摘要卡片
- // */
- // export async function queryContactIdCount(id) {
- // const res = await request.get(`eom/contact/queryContactIdCount/`+id);
- // if (res.data.code == 0) {
- // return res.data;
- // }
- // return Promise.reject(new Error(res.data.message));
- // }
|