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/ReimburseManage/cost-reimburse/useCostReimburse.js | 17 ++++++++++++-----
1 files changed, 12 insertions(+), 5 deletions(-)
diff --git a/src/views/officeProcessAutomation/ReimburseManage/cost-reimburse/useCostReimburse.js b/src/views/officeProcessAutomation/ReimburseManage/cost-reimburse/useCostReimburse.js
index 520c2a5..0a8cf5f 100644
--- a/src/views/officeProcessAutomation/ReimburseManage/cost-reimburse/useCostReimburse.js
+++ b/src/views/officeProcessAutomation/ReimburseManage/cost-reimburse/useCostReimburse.js
@@ -12,6 +12,8 @@
import {
buildCostReimbursementSaveDto,
buildFinReimbursementListParams,
+ filterReimbursementRowsBySearch,
+ hasActiveReimbursementSearch,
canDeleteReimbursementRow,
canEditReimbursementRow,
enrichReimbursementListRowsWithApprovalFlow,
@@ -70,8 +72,6 @@
const searchForm = reactive({
applicantKeyword: "",
- applyTimeFrom: "",
- applyTimeTo: "",
});
const tableLoading = ref(false);
const page = reactive({ current: 1, size: 10, total: 0 });
@@ -116,10 +116,17 @@
mapped,
FIN_REIMBURSEMENT_TYPE.COST
);
+ if (hasActiveReimbursementSearch(searchForm)) {
+ mapped = filterReimbursementRowsBySearch(mapped, searchForm);
+ }
allRows.value = mapped;
const dropped = records.length - filtered.length;
- page.total =
+ let nextTotal =
dropped > 0 ? Math.max(0, Number(total) - dropped) : Number(total);
+ if (hasActiveReimbursementSearch(searchForm)) {
+ nextTotal = mapped.length;
+ }
+ page.total = nextTotal;
} catch {
allRows.value = [];
page.total = 0;
@@ -327,8 +334,6 @@
function resetSearch() {
searchForm.applicantKeyword = "";
- searchForm.applyTimeFrom = "";
- searchForm.applyTimeTo = "";
handleQuery();
}
@@ -407,6 +412,8 @@
}
function approvalActionLabel(v) {
+ // 涓庡鎵瑰彴璐︿繚鎸佷竴鑷达細鐢宠璁板綍鏄剧ず銆岀敵璇枫�嶏紝瀹℃壒鍔ㄤ綔鏄剧ず銆岄�氳繃/椹冲洖銆�
+ if (v === "submitted" || v === "pending") return "鐢宠";
if (v === "approved") return "閫氳繃";
if (v === "rejected") return "椹冲洖";
return "鎻愪氦";
--
Gitblit v1.9.3