From a0535e42ebe01366d3bb83e00eb0180b34682a63 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期四, 04 六月 2026 14:04:19 +0800
Subject: [PATCH] 马铃薯app 1.客户往来、供应商往来查询展示修改 2.环境检测页面展示修改

---
 src/pages/oa/_components/ApprovalInstanceListPage.vue |   24 +++++++++++++++---------
 1 files changed, 15 insertions(+), 9 deletions(-)

diff --git a/src/pages/oa/_components/ApprovalInstanceListPage.vue b/src/pages/oa/_components/ApprovalInstanceListPage.vue
index cdf0e39..02b1f37 100644
--- a/src/pages/oa/_components/ApprovalInstanceListPage.vue
+++ b/src/pages/oa/_components/ApprovalInstanceListPage.vue
@@ -119,7 +119,7 @@
   import { fetchApprovalTemplateTypes } from "../_utils/approvalTemplateType.js";
   import {
     getApprovalModuleConfig,
-    resolveModuleBusinessType,
+    getModuleListBusinessType,
   } from "../_utils/approvalModuleRegistry.js";
   import {
     buildModuleListDto,
@@ -128,6 +128,7 @@
     filterRowsByModuleBusinessType,
     formatDateRangeLabel,
     getModuleSearchMeta,
+    hasActiveModuleSearch,
   } from "../_utils/approvalModuleListSearch.js";
   import {
     buildInstanceListParams,
@@ -235,14 +236,22 @@
       const res = await listApprovalInstancePage(buildListRequestParams());
       const { records, total } = unwrapInstancePage(res);
       const listFields = moduleConfig.value?.listFields || [];
-      const mapped = records.map(row => mapInstanceListRow(row, listFields));
+      let mapped = records.map(row => mapInstanceListRow(row, listFields));
+      if (hasActiveModuleSearch(props.moduleKey, searchForm)) {
+        mapped = filterRowsByModuleSearch(props.moduleKey, mapped, searchForm);
+      }
 
       if (page.current === 1) {
         list.value = mapped;
       } else {
         list.value = [...list.value, ...mapped];
       }
-      page.total = total;
+      const dropped = records.length - mapped.length;
+      page.total = hasActiveModuleSearch(props.moduleKey, searchForm)
+        ? list.value.length
+        : dropped > 0
+          ? Math.max(0, Number(total) - dropped)
+          : Number(total);
 
       if (list.value.length >= total || records.length < page.size) {
         pageStatus.value = "nomore";
@@ -260,15 +269,12 @@
   };
 
   const initBusinessType = async () => {
+    const fixed = getModuleListBusinessType(props.moduleKey);
+    businessType.value = fixed != null && fixed !== "" ? fixed : "";
     try {
       typeOptions.value = await fetchApprovalTemplateTypes();
-      const resolved = resolveModuleBusinessType(props.moduleKey, typeOptions.value);
-      businessType.value =
-        resolved != null && resolved !== ""
-          ? resolved
-          : moduleConfig.value?.approvalType ?? "";
     } catch {
-      businessType.value = moduleConfig.value?.approvalType ?? "";
+      typeOptions.value = [];
     }
   };
 

--
Gitblit v1.9.3