From 91eff4781fa4142d1f62d30a0fa1de5cae424eaf Mon Sep 17 00:00:00 2001
From: liu <2021943741@qq.com>
Date: 星期三, 16 九月 2026 18:23:12 +0800
Subject: [PATCH] refactor: 单据审核改为审批配置状态机(前端统一审核弹窗)
---
src/api/crm/cancellation/index.ts | 40 +++++++++++++++++++++++++++++++++-------
1 files changed, 33 insertions(+), 7 deletions(-)
diff --git a/src/api/crm/cancellation/index.ts b/src/api/crm/cancellation/index.ts
index 684850a..3b58856 100644
--- a/src/api/crm/cancellation/index.ts
+++ b/src/api/crm/cancellation/index.ts
@@ -19,7 +19,11 @@
applyUserName?: string;
applyTime?: string;
auditStatus?: number;
- processInstanceId?: string;
+ // 浠ヤ笅涓哄鏍告淳鐢熷瓧娈碉紝鐢卞悗绔湪瀹℃牳鏃跺啓鍏ワ紝鍓嶇鍙灞曠ず
+ reviewerId?: number; // 瀹℃牳浜篒D锛堝疄闄呮墽琛屽鏍哥殑鐢ㄦ埛锛�
+ reviewerName?: string; // 瀹℃牳浜哄鍚�
+ reviewTime?: string; // 瀹℃牳鏃堕棿
+ reviewRemark?: string; // 瀹℃牳鎰忚锛堝鏍搁�氳繃鏃剁殑鎰忚 / 瀹℃牳涓嶉�氳繃鏃剁殑鍘熷洜锛�
remark?: string;
createTime?: string;
}
@@ -58,12 +62,34 @@
return requestClient.put('/crm/cancellation/update', data);
}
-/** 瀹℃壒閿�鎴风敵璇� */
-export function auditCancellation(data: {
- id: number;
- auditStatus: number;
-}) {
- return requestClient.put('/crm/cancellation/audit', data);
+/**
+ * 鎻愪氦瀹℃壒锛堣崏绋� / 瀹℃牳涓嶉�氳繃 鈫� 瀹℃壒涓級
+ * 瀹℃壒浜虹敱銆岀郴缁熺鐞� - 瀹℃壒閰嶇疆銆嶇粺涓�閰嶇疆锛屾彁浜ゆ椂鏃犻渶鎸囧畾銆�
+ */
+export function submitCancellation(id: number) {
+ return requestClient.put('/crm/cancellation/submit', null, { params: { id } });
+}
+
+/** 鑾峰緱閿�鎴风敵璇风殑瀹℃壒浜虹紪鍙烽泦鍚堬紝渚涘垪琛ㄩ〉鍒ゆ柇鏄惁灞曠ず瀹℃牳鎸夐挳 */
+export function getCancellationApproverIds() {
+ return requestClient.get<number[]>('/crm/cancellation/approver-ids');
+}
+
+/**
+ * 瀹℃牳閿�鎴风敵璇凤紙瀹℃壒涓� 鈫� 瀹℃牳閫氳繃 / 瀹℃牳涓嶉�氳繃锛�
+ *
+ * 浠呭鎵归厤缃腑鐨勫鎵逛汉鍙皟鐢紙澶氫汉鏃舵垨绛撅級锛沺ass=false 鏃� reviewRemark锛堜笉閫氳繃鍘熷洜锛夊繀濉��
+ */
+export function auditCancellation(
+ id: number,
+ pass: boolean,
+ reviewRemark?: string,
+) {
+ return requestClient.put('/crm/cancellation/audit', {
+ id,
+ pass,
+ reviewRemark,
+ });
}
/** 鍒犻櫎閿�鎴风敵璇� */
--
Gitblit v1.9.3