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/business/index.ts | 98 +++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 98 insertions(+), 0 deletions(-)
diff --git a/src/api/crm/business/index.ts b/src/api/crm/business/index.ts
new file mode 100644
index 0000000..2420425
--- /dev/null
+++ b/src/api/crm/business/index.ts
@@ -0,0 +1,98 @@
+import request from '@/config/axios'
+import { TransferReqVO } from '@/api/crm/permission'
+
+export interface BusinessVO {
+ id: number
+ name: string
+ customerId: number
+ customerName?: string
+ followUpStatus: boolean
+ contactLastTime: Date
+ contactNextTime: Date
+ ownerUserId: number
+ ownerUserName?: string // 璐熻矗浜虹殑鐢ㄦ埛鍚嶇О
+ ownerUserDept?: string // 璐熻矗浜虹殑閮ㄩ棬鍚嶇О
+ statusTypeId: number
+ statusTypeName?: string
+ statusId: number
+ statusName?: string
+ endStatus: number
+ endRemark: string
+ dealTime: Date
+ totalProductPrice: number
+ totalPrice: number
+ discountPercent: number
+ remark: string
+ creator: string // 鍒涘缓浜�
+ creatorName?: string // 鍒涘缓浜哄悕绉�
+ createTime: Date // 鍒涘缓鏃堕棿
+ updateTime: Date // 鏇存柊鏃堕棿
+ products?: [
+ {
+ id: number
+ productId: number
+ productName: string
+ productNo: string
+ productUnit: number
+ productPrice: number
+ businessPrice: number
+ count: number
+ totalPrice: number
+ }
+ ]
+}
+
+// 鏌ヨ CRM 鍟嗘満鍒楄〃
+export const getBusinessPage = async (params) => {
+ return await request.get({ url: `/crm/business/page`, params })
+}
+
+// 鏌ヨ CRM 鍟嗘満鍒楄〃锛屽熀浜庢寚瀹氬鎴�
+export const getBusinessPageByCustomer = async (params) => {
+ return await request.get({ url: `/crm/business/page-by-customer`, params })
+}
+
+// 鏌ヨ CRM 鍟嗘満璇︽儏
+export const getBusiness = async (id: number) => {
+ return await request.get({ url: `/crm/business/get?id=` + id })
+}
+
+// 鑾峰緱 CRM 鍟嗘満鍒楄〃锛堢簿绠�锛�
+export const getSimpleBusinessList = async () => {
+ return await request.get({ url: `/crm/business/simple-all-list` })
+}
+
+// 鏂板 CRM 鍟嗘満
+export const createBusiness = async (data: BusinessVO) => {
+ return await request.post({ url: `/crm/business/create`, data })
+}
+
+// 淇敼 CRM 鍟嗘満
+export const updateBusiness = async (data: BusinessVO) => {
+ return await request.put({ url: `/crm/business/update`, data })
+}
+
+// 淇敼 CRM 鍟嗘満鐘舵��
+export const updateBusinessStatus = async (data: BusinessVO) => {
+ return await request.put({ url: `/crm/business/update-status`, data })
+}
+
+// 鍒犻櫎 CRM 鍟嗘満
+export const deleteBusiness = async (id: number) => {
+ return await request.delete({ url: `/crm/business/delete?id=` + id })
+}
+
+// 瀵煎嚭 CRM 鍟嗘満 Excel
+export const exportBusiness = async (params) => {
+ return await request.download({ url: `/crm/business/export-excel`, params })
+}
+
+// 鑱旂郴浜哄叧鑱斿晢鏈哄垪琛�
+export const getBusinessPageByContact = async (params) => {
+ return await request.get({ url: `/crm/business/page-by-contact`, params })
+}
+
+// 鍟嗘満杞Щ
+export const transferBusiness = async (data: TransferReqVO) => {
+ return await request.put({ url: '/crm/business/transfer', data })
+}
--
Gitblit v1.8.0