From 4ab0be7d4441f378add1f242b168d80fb27e65fe Mon Sep 17 00:00:00 2001
From: yyb <995253665@qq.com>
Date: 星期五, 22 五月 2026 17:57:44 +0800
Subject: [PATCH] OA部分查询条件变更

---
 src/views/officeProcessAutomation/ReimburseManage/travel-reimburse/useTravelReimburse.js |   28 ++++++++++++++++++++++------
 1 files changed, 22 insertions(+), 6 deletions(-)

diff --git a/src/views/officeProcessAutomation/ReimburseManage/travel-reimburse/useTravelReimburse.js b/src/views/officeProcessAutomation/ReimburseManage/travel-reimburse/useTravelReimburse.js
index 0df94e5..c92d88c 100644
--- a/src/views/officeProcessAutomation/ReimburseManage/travel-reimburse/useTravelReimburse.js
+++ b/src/views/officeProcessAutomation/ReimburseManage/travel-reimburse/useTravelReimburse.js
@@ -11,9 +11,12 @@
 import { computed, getCurrentInstance, nextTick, onMounted, reactive, ref } from "vue";
 import {
   buildFinReimbursementListParams,
+  filterReimbursementRowsBySearch,
+  hasActiveReimbursementSearch,
   buildTravelReimbursementSaveDto,
   canDeleteReimbursementRow,
   canEditReimbursementRow,
+  enrichReimbursementListRowsWithApprovalFlow,
   filterRowsByReimbursementType,
   FIN_REIMBURSEMENT_TYPE,
   mapFinReimbursementDetailRow,
@@ -60,7 +63,7 @@
 
   const allRows = ref([]);
 
-  const searchForm = reactive({ applicantKeyword: "", travelStartFrom: "", travelEndTo: "" });
+  const searchForm = reactive({ applicantKeyword: "" });
   const tableLoading = ref(false);
   const page = reactive({ current: 1, size: 10, total: 0 });
   const importInputRef = ref(null);
@@ -90,11 +93,26 @@
         })
       );
       const { records, total } = unwrapFinReimbursementPage(res);
-      allRows.value = filterRowsByReimbursementType(
+      const filtered = filterRowsByReimbursementType(
         records,
         FIN_REIMBURSEMENT_TYPE.TRAVEL
-      ).map(mapTravelReimbursementRow);
-      page.total = total;
+      );
+      let mapped = filtered.map(mapTravelReimbursementRow);
+      mapped = await enrichReimbursementListRowsWithApprovalFlow(
+        mapped,
+        FIN_REIMBURSEMENT_TYPE.TRAVEL
+      );
+      if (hasActiveReimbursementSearch(searchForm)) {
+        mapped = filterReimbursementRowsBySearch(mapped, searchForm);
+      }
+      allRows.value = mapped;
+      const dropped = records.length - filtered.length;
+      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;
@@ -367,8 +385,6 @@
 
   function resetSearch() {
     searchForm.applicantKeyword = "";
-    searchForm.travelStartFrom = "";
-    searchForm.travelEndTo = "";
     handleQuery();
   }
 

--
Gitblit v1.9.3