From f10cf167372f2d8c4c0e14f42f361d7ab96d8347 Mon Sep 17 00:00:00 2001
From: spring <2396852758@qq.com>
Date: 星期五, 03 七月 2026 13:59:00 +0800
Subject: [PATCH] Merge branch 'dev_pro2.0' of http://114.132.189.42:9002/r/mom-pro2-before into dev_pro2.0

---
 src/api/crm/contract/index.ts |   41 ++++++++++++++++++++++++++++++++++-------
 1 files changed, 34 insertions(+), 7 deletions(-)

diff --git a/src/api/crm/contract/index.ts b/src/api/crm/contract/index.ts
index 92e9695..f245bb9 100644
--- a/src/api/crm/contract/index.ts
+++ b/src/api/crm/contract/index.ts
@@ -26,6 +26,7 @@
     totalProductPrice: number;
     discountPercent: number;
     totalPrice: number;
+    depositPrice?: number; // 瀹氶噾閲戦锛屽崟浣嶏細鍏�
     totalReceivablePrice: number;
     signContactId: number;
     signContactName?: string;
@@ -38,19 +39,31 @@
     updateTime?: Date;
     products?: ContractProduct[];
     contactName?: string;
+    orderId?: number; // 鍏宠仈 ERP 閿�鍞鍗曠紪鍙�
+    orderNo?: string; // ERP 閿�鍞鍗曞崟鍙�
   }
 
   /** 鍚堝悓浜у搧淇℃伅 */
   export interface ContractProduct {
     id: number;
-    productId: number;
-    productName: string;
-    productNo: string;
-    productUnit: number;
-    productPrice: number;
+    itemId: number;
+    itemName: string;
+    itemCode: string;
+    itemBarCode: string;
+    itemSpecification?: string;
+    itemUnitName: string;
+    itemUnitName2?: string;
+    itemUnitName3?: string;
+    itemPrice: number;
     contractPrice: number;
     count: number;
     totalPrice: number;
+  }
+
+  /** 瀹℃壒娴佺▼ */
+  export interface ApproveProcess {
+    key: string;
+    name: string;
   }
 }
 
@@ -113,8 +126,17 @@
 }
 
 /** 鎻愪氦瀹℃牳 */
-export function submitContract(id: number) {
-  return requestClient.put(`/crm/contract/submit?id=${id}`);
+export function submitContract(id: number, processDefinitionKey: string) {
+  return requestClient.put('/crm/contract/submit', null, {
+    params: { id, processDefinitionKey },
+  });
+}
+
+/** 鑾峰彇鍚堝悓瀹℃壒娴佺▼鍒楄〃 */
+export function getContractApproveProcessList() {
+  return requestClient.get<CrmContractApi.ApproveProcess[]>(
+    '/crm/contract/approve-process-list',
+  );
 }
 
 /** 鍚堝悓杞Щ */
@@ -131,3 +153,8 @@
 export function getRemindContractCount() {
   return requestClient.get<number>('/crm/contract/remind-count');
 }
+
+/** 鏍规嵁鍚堝悓鐢熸垚閿�鍞鍗� */
+export function generateSaleOrder(id: number) {
+  return requestClient.post<number>('/crm/contract/generate-sale-order', null, { params: { id } });
+}

--
Gitblit v1.9.3