From 9f3bc47b98cbc51df7cfcea94d4aa0c35f40cbc5 Mon Sep 17 00:00:00 2001
From: yuan <123@>
Date: 星期二, 13 十月 2026 14:09:06 +0800
Subject: [PATCH] feat: 添加数字格式化工具,支持去掉小数末尾多余的 0 和四舍五入功能

---
 src/views/officeProcessAutomation/ApproveManage/approve-list/approveListConstants.js |   15 +++++++++++++--
 1 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/src/views/officeProcessAutomation/ApproveManage/approve-list/approveListConstants.js b/src/views/officeProcessAutomation/ApproveManage/approve-list/approveListConstants.js
index e2f1e45..5edaec8 100644
--- a/src/views/officeProcessAutomation/ApproveManage/approve-list/approveListConstants.js
+++ b/src/views/officeProcessAutomation/ApproveManage/approve-list/approveListConstants.js
@@ -136,9 +136,19 @@
 /** 瀹℃壒璁板綍 approveAction 鈫� 椤甸潰 result */
 export function mapRecordResultFromApi(action) {
   const s = String(action || "").toUpperCase();
+  // 鍙戣捣鐢宠锛氱敵璇蜂汉鏄湰浜猴紝涓嶆槸瀹℃壒鍔ㄤ綔锛屽崟鐙爣璇嗭紝閬垮厤鏄剧ず鎴愩�屽緟澶勭悊銆�
+  if (s === "SUBMIT" || s === "SUBMITTED" || s === "CREATE") return "submitted";
   if (s === "APPROVED" || s === "APPROVE" || s === "PASS") return "approved";
   if (s === "REJECTED" || s === "REJECT" || s === "REFUSE") return "rejected";
   return "pending";
+}
+
+/** 瀹℃壒璁板綍 result 鈫� 鏂囨 */
+export function approvalRecordResultLabel(result) {
+  if (result === "submitted") return "鐢宠";
+  if (result === "approved") return "閫氳繃";
+  if (result === "rejected") return "椹冲洖";
+  return "寰呭鐞�";
 }
 
 /** 鍚庣 records 鈫� 鏃堕棿绾垮睍绀虹粨鏋� */
@@ -357,8 +367,9 @@
   if (isUpdate) {
     dto.id = existingRow?.id ?? submitForm?.instanceId;
     dto.instanceNo = existingRow?.instanceNo ?? submitForm?.instanceNo ?? "";
-    dto.status = submitForm?.saveStatusApi || existingRow?.statusRaw || mapInstanceStatusToApi(existingRow?.approvalStatus) || "PENDING";
-    dto.currentLevel = existingRow?.currentLevel ?? submitForm?.currentLevel ?? 1;
+    // 淇敼淇濆瓨鍗抽噸鏂版彁浜わ紝娴佺▼浠庣涓�绾ч噸鏂板紑濮�
+    dto.status = "PENDING";
+    dto.currentLevel = 1;
     dto.applicantId = existingRow?.applicantId ?? existingRow?.applicantNo;
     dto.applicantName = existingRow?.applicantName || "";
   } else {

--
Gitblit v1.9.3