From 18340ebdeb405be3ba01eb4d1600d9b26cee7ccd Mon Sep 17 00:00:00 2001
From: liu <2021943741@qq.com>
Date: 星期一, 14 九月 2026 16:56:13 +0800
Subject: [PATCH] fix(erp): 查看审批明细时明细表格取消固定列
---
src/api/crm/contract/index.ts | 65 ++++++++++++++++++++++++++++----
1 files changed, 57 insertions(+), 8 deletions(-)
diff --git a/src/api/crm/contract/index.ts b/src/api/crm/contract/index.ts
index 92e9695..808b869 100644
--- a/src/api/crm/contract/index.ts
+++ b/src/api/crm/contract/index.ts
@@ -1,4 +1,4 @@
-import type { PageParam, PageResult } from '../../../packages/effects/request/src';
+import type { PageParam, PageResult } from '@vben/request';
import type { CrmPermissionApi } from '#/api/crm/permission';
@@ -26,7 +26,10 @@
totalProductPrice: number;
discountPercent: number;
totalPrice: number;
+ depositPrice?: number; // 瀹氶噾閲戦锛屽崟浣嶏細鍏�
totalReceivablePrice: number;
+ totalInvoicePrice?: number; // 宸插紑绁ㄩ噾棰濓紙鍚鎵逛腑锛夛紝鍗曚綅锛氬厓
+ unInvoicePrice?: number; // 鏈紑绁ㄩ噾棰濓紝鍗曚綅锛氬厓
signContactId: number;
signContactName?: string;
signUserId: number;
@@ -38,19 +41,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 +128,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 +155,28 @@
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 } });
+}
+
+/** 鍚堝悓瀵煎叆缁撴灉 */
+export interface ImportResult {
+ /** 鍒涘缓鎴愬姛鐨勫悎鍚岀紪鍙� */
+ createList?: string[];
+ /** 鏇存柊鎴愬姛鐨勫悎鍚岀紪鍙� */
+ updateList?: string[];
+ /** 瀵煎叆澶辫触闆嗗悎锛宬ey 涓哄悎鍚岀紪鍙锋垨琛屽彿锛寁alue 涓哄け璐ュ師鍥� */
+ failureList?: Record<string, string>;
+}
+
+/** 涓嬭浇鍚堝悓瀵煎叆妯℃澘 */
+export function importContractTemplate() {
+ return requestClient.download('/crm/contract/get-import-template');
+}
+
+/** 瀵煎叆鍚堝悓 */
+export function importContract(file: File) {
+ return requestClient.upload<ImportResult>('/crm/contract/import', { file });
+}
--
Gitblit v1.9.3