zhangwencui
2026-06-12 bca1a810a2ed5474702ed6336fb4b52e297619da
src/pages/oa/_components/FinReimbursementListPage.vue
@@ -118,7 +118,6 @@
  import { getApprovalModuleConfig } from "../_utils/approvalModuleRegistry.js";
  import {
    createModuleSearchForm,
    filterRowsByModuleSearch,
    formatDateRangeLabel,
    getModuleSearchMeta,
  } from "../_utils/approvalModuleListSearch.js";
@@ -131,7 +130,10 @@
    canEditReimbursementRow,
    deleteFinReimbursement,
    getReimbursementTypeByModuleKey,
    enrichReimbursementListRowsWithApprovalFlow,
    filterReimbursementRowsBySearch,
    filterRowsByReimbursementType,
    hasActiveReimbursementSearch,
    mapFinReimbursementFromApi,
    resolveReimbursementDeleteId,
    unwrapFinReimbursementPage,
@@ -169,7 +171,7 @@
  }
  const displayList = computed(() =>
    filterRowsByModuleSearch(props.moduleKey, list.value, searchForm)
    filterReimbursementRowsBySearch(list.value, searchForm)
  );
  const hasActiveFilter = computed(() => Boolean(filterSummary.value));
@@ -227,22 +229,36 @@
        })
      );
      const { records, total } = unwrapFinReimbursementPage(res);
      const mapped = filterRowsByReimbursementType(
      const filtered = filterRowsByReimbursementType(
        records,
        reimbursementType.value
      ).map(row =>
      );
      let mapped = filtered.map(row =>
        mapFinReimbursementFromApi(row, {
          reimbursementType: reimbursementType.value,
          moduleKey: props.moduleKey,
        })
      );
      mapped = await enrichReimbursementListRowsWithApprovalFlow(
        mapped,
        reimbursementType.value
      );
      if (hasActiveReimbursementSearch(searchForm)) {
        mapped = filterReimbursementRowsBySearch(mapped, searchForm);
      }
      if (page.current === 1) {
        list.value = mapped;
      } else {
        list.value = [...list.value, ...mapped];
      }
      page.total = total;
      const dropped = records.length - filtered.length;
      let nextTotal =
        dropped > 0 ? Math.max(0, Number(total) - dropped) : Number(total);
      if (hasActiveReimbursementSearch(searchForm)) {
        nextTotal = list.value.length;
      }
      page.total = nextTotal;
      if (list.value.length >= total || records.length < page.size) {
        pageStatus.value = "nomore";