From a1d7e81859f554f3a53680cc35f0f49bf1f77098 Mon Sep 17 00:00:00 2001
From: wwf <1971391498@qq.com>
Date: 星期四, 14 五月 2026 14:37:02 +0800
Subject: [PATCH] 导入项目

---
 src/api/crm/contact/index.ts |  113 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 113 insertions(+), 0 deletions(-)

diff --git a/src/api/crm/contact/index.ts b/src/api/crm/contact/index.ts
new file mode 100644
index 0000000..7c24dfa
--- /dev/null
+++ b/src/api/crm/contact/index.ts
@@ -0,0 +1,113 @@
+import request from '@/config/axios'
+import { TransferReqVO } from '@/api/crm/permission'
+
+export interface ContactVO {
+  id: number // 缂栧彿
+  name: string // 鑱旂郴浜哄悕绉�
+  customerId: number // 瀹㈡埛缂栧彿
+  customerName?: string // 瀹㈡埛鍚嶇О
+  contactLastTime: Date // 鏈�鍚庤窡杩涙椂闂�
+  contactLastContent: string // 鏈�鍚庤窡杩涘唴瀹�
+  contactNextTime: Date // 涓嬫鑱旂郴鏃堕棿
+  ownerUserId: number // 璐熻矗浜虹殑鐢ㄦ埛缂栧彿
+  ownerUserName?: string // 璐熻矗浜虹殑鐢ㄦ埛鍚嶇О
+  ownerUserDept?: string // 璐熻矗浜虹殑閮ㄩ棬鍚嶇О
+  mobile: string // 鎵嬫満鍙�
+  telephone: string // 鐢佃瘽
+  qq: string // QQ
+  wechat: string // wechat
+  email: string // email
+  areaId: number // 鎵�鍦ㄥ湴
+  areaName?: string // 鎵�鍦ㄥ湴鍚嶇О
+  detailAddress: string // 璇︾粏鍦板潃
+  sex: number // 鎬у埆
+  master: boolean // 鏄惁涓昏仈绯讳汉
+  post: string // 鑱屽姟
+  parentId: number // 涓婄骇鑱旂郴浜虹紪鍙�
+  parentName?: string // 涓婄骇鑱旂郴浜哄悕绉�
+  remark: string // 澶囨敞
+  creator: string // 鍒涘缓浜�
+  creatorName?: string // 鍒涘缓浜哄悕绉�
+  createTime: Date // 鍒涘缓鏃堕棿
+  updateTime: Date // 鏇存柊鏃堕棿
+}
+
+export interface ContactBusinessReqVO {
+  contactId: number
+  businessIds: number[]
+}
+
+export interface ContactBusiness2ReqVO {
+  businessId: number
+  contactIds: number[]
+}
+
+// 鏌ヨ CRM 鑱旂郴浜哄垪琛�
+export const getContactPage = async (params) => {
+  return await request.get({ url: `/crm/contact/page`, params })
+}
+
+// 鏌ヨ CRM 鑱旂郴浜哄垪琛紝鍩轰簬鎸囧畾瀹㈡埛
+export const getContactPageByCustomer = async (params: any) => {
+  return await request.get({ url: `/crm/contact/page-by-customer`, params })
+}
+
+// 鏌ヨ CRM 鑱旂郴浜哄垪琛紝鍩轰簬鎸囧畾鍟嗘満
+export const getContactPageByBusiness = async (params: any) => {
+  return await request.get({ url: `/crm/contact/page-by-business`, params })
+}
+
+// 鏌ヨ CRM 鑱旂郴浜鸿鎯�
+export const getContact = async (id: number) => {
+  return await request.get({ url: `/crm/contact/get?id=` + id })
+}
+
+// 鏂板 CRM 鑱旂郴浜�
+export const createContact = async (data: ContactVO) => {
+  return await request.post({ url: `/crm/contact/create`, data })
+}
+
+// 淇敼 CRM 鑱旂郴浜�
+export const updateContact = async (data: ContactVO) => {
+  return await request.put({ url: `/crm/contact/update`, data })
+}
+
+// 鍒犻櫎 CRM 鑱旂郴浜�
+export const deleteContact = async (id: number) => {
+  return await request.delete({ url: `/crm/contact/delete?id=` + id })
+}
+
+// 瀵煎嚭 CRM 鑱旂郴浜� Excel
+export const exportContact = async (params) => {
+  return await request.download({ url: `/crm/contact/export-excel`, params })
+}
+
+// 鑾峰緱 CRM 鑱旂郴浜哄垪琛紙绮剧畝锛�
+export const getSimpleContactList = async () => {
+  return await request.get({ url: `/crm/contact/simple-all-list` })
+}
+
+// 鎵归噺鏂板鑱旂郴浜哄晢鏈哄叧鑱�
+export const createContactBusinessList = async (data: ContactBusinessReqVO) => {
+  return await request.post({ url: `/crm/contact/create-business-list`, data })
+}
+
+// 鎵归噺鏂板鑱旂郴浜哄晢鏈哄叧鑱�
+export const createContactBusinessList2 = async (data: ContactBusiness2ReqVO) => {
+  return await request.post({ url: `/crm/contact/create-business-list2`, data })
+}
+
+// 瑙i櫎鑱旂郴浜哄晢鏈哄叧鑱�
+export const deleteContactBusinessList = async (data: ContactBusinessReqVO) => {
+  return await request.delete({ url: `/crm/contact/delete-business-list`, data })
+}
+
+// 瑙i櫎鑱旂郴浜哄晢鏈哄叧鑱�
+export const deleteContactBusinessList2 = async (data: ContactBusiness2ReqVO) => {
+  return await request.delete({ url: `/crm/contact/delete-business-list2`, data })
+}
+
+// 鑱旂郴浜鸿浆绉�
+export const transferContact = async (data: TransferReqVO) => {
+  return await request.put({ url: '/crm/contact/transfer', data })
+}

--
Gitblit v1.8.0