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/contract/index.ts |  114 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 114 insertions(+), 0 deletions(-)

diff --git a/src/api/crm/contract/index.ts b/src/api/crm/contract/index.ts
new file mode 100644
index 0000000..7028b77
--- /dev/null
+++ b/src/api/crm/contract/index.ts
@@ -0,0 +1,114 @@
+import request from '@/config/axios'
+import { TransferReqVO } from '@/api/crm/permission'
+
+export interface ContractVO {
+  id: number
+  name: string
+  no: string
+  customerId: number
+  customerName?: string
+  businessId: number
+  businessName: string
+  contactLastTime: Date
+  ownerUserId: number
+  ownerUserName?: string
+  ownerUserDeptName?: string
+  processInstanceId: number
+  auditStatus: number
+  orderDate: Date
+  startTime: Date
+  endTime: Date
+  totalProductPrice: number
+  discountPercent: number
+  totalPrice: number
+  totalReceivablePrice: number
+  signContactId: number
+  signContactName?: string
+  signUserId: number
+  signUserName: string
+  remark: string
+  createTime?: Date
+  creator: string
+  creatorName: string
+  updateTime?: Date
+  products?: [
+    {
+      id: number
+      productId: number
+      productName: string
+      productNo: string
+      productUnit: number
+      productPrice: number
+      contractPrice: number
+      count: number
+      totalPrice: number
+    }
+  ]
+}
+
+// 鏌ヨ CRM 鍚堝悓鍒楄〃
+export const getContractPage = async (params) => {
+  return await request.get({ url: `/crm/contract/page`, params })
+}
+
+// 鏌ヨ CRM 鑱旂郴浜哄垪琛紝鍩轰簬鎸囧畾瀹㈡埛
+export const getContractPageByCustomer = async (params: any) => {
+  return await request.get({ url: `/crm/contract/page-by-customer`, params })
+}
+
+// 鏌ヨ CRM 鑱旂郴浜哄垪琛紝鍩轰簬鎸囧畾鍟嗘満
+export const getContractPageByBusiness = async (params: any) => {
+  return await request.get({ url: `/crm/contract/page-by-business`, params })
+}
+
+// 鏌ヨ CRM 鍚堝悓璇︽儏
+export const getContract = async (id: number) => {
+  return await request.get({ url: `/crm/contract/get?id=` + id })
+}
+
+// 鏌ヨ CRM 鍚堝悓涓嬫媺鍒楄〃
+export const getContractSimpleList = async (customerId: number) => {
+  return await request.get({
+    url: `/crm/contract/simple-list?customerId=${customerId}`
+  })
+}
+
+// 鏂板 CRM 鍚堝悓
+export const createContract = async (data: ContractVO) => {
+  return await request.post({ url: `/crm/contract/create`, data })
+}
+
+// 淇敼 CRM 鍚堝悓
+export const updateContract = async (data: ContractVO) => {
+  return await request.put({ url: `/crm/contract/update`, data })
+}
+
+// 鍒犻櫎 CRM 鍚堝悓
+export const deleteContract = async (id: number) => {
+  return await request.delete({ url: `/crm/contract/delete?id=` + id })
+}
+
+// 瀵煎嚭 CRM 鍚堝悓 Excel
+export const exportContract = async (params) => {
+  return await request.download({ url: `/crm/contract/export-excel`, params })
+}
+
+// 鎻愪氦瀹℃牳
+export const submitContract = async (id: number) => {
+  return await request.put({ url: `/crm/contract/submit?id=${id}` })
+}
+
+// 鍚堝悓杞Щ
+export const transferContract = async (data: TransferReqVO) => {
+  return await request.put({ url: '/crm/contract/transfer', data })
+}
+
+// 鑾峰緱寰呭鏍稿悎鍚屾暟閲�
+export const getAuditContractCount = async () => {
+  return await request.get({ url: '/crm/contract/audit-count' })
+}
+
+// 鑾峰緱鍗冲皢鍒版湡锛堟彁閱掞級鐨勫悎鍚屾暟閲�
+export const getRemindContractCount = async () => {
+  return await request.get({ url: '/crm/contract/remind-count' })
+}

--
Gitblit v1.8.0