From 7b60f24e07f54634503e5b37e6ca5f85d4ad743f Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期五, 07 八月 2026 15:41:39 +0800
Subject: [PATCH] 天津_建诚恒商贸 1.备件管理-新增独立备件出库功能入口,支持直接完成备件领用出库操作。 2.设备保养-支持按日期分组折叠展示,分组条目可展开查看明细;单条明细行末尾增加【保养完成】操作按钮,可单独办结单条保养任务;折叠汇总状态下,新增【一键保养完成】批量操作按钮,快速办结当前分组全部保养项。 3.设备巡检-按日期分组折叠展示,分组支持展开查看明细;每条巡检明细后增设【巡检完成】按钮,支持单独办结单条巡检记录;分组折叠未展开状态下,提供【一键巡检完成】批量操作,统一办结该分组下所有巡检任务。 4.增值税对比-优化数据展示逻辑,列表展示各订单增值税明细;页面右侧新增柱状可视化图表,直观对比进销项增值税数据。 5.管理驾驶舱-指标修改:将顶部「销售产品数」调整为「销售订单数」;时间筛选:页面左上角新增日期范围下拉筛选控件,所有统计指标标注当前筛选时段;

---
 src/views/officeProcessAutomation/ReimburseManage/cost-reimburse/useCostReimburse.js |   41 ++++++++++++++++++++++++++++++++---------
 1 files changed, 32 insertions(+), 9 deletions(-)

diff --git a/src/views/officeProcessAutomation/ReimburseManage/cost-reimburse/useCostReimburse.js b/src/views/officeProcessAutomation/ReimburseManage/cost-reimburse/useCostReimburse.js
index 638d533..3b90a3b 100644
--- a/src/views/officeProcessAutomation/ReimburseManage/cost-reimburse/useCostReimburse.js
+++ b/src/views/officeProcessAutomation/ReimburseManage/cost-reimburse/useCostReimburse.js
@@ -12,8 +12,11 @@
 import {
   buildCostReimbursementSaveDto,
   buildFinReimbursementListParams,
+  filterReimbursementRowsBySearch,
+  hasActiveReimbursementSearch,
   canDeleteReimbursementRow,
   canEditReimbursementRow,
+  enrichReimbursementListRowsWithApprovalFlow,
   filterRowsByReimbursementType,
   FIN_REIMBURSEMENT_TYPE,
   mapCostReimbursementRow,
@@ -21,6 +24,7 @@
   resolveReimbursementDeleteId,
   unwrapFinReimbursementDetail,
   unwrapFinReimbursementPage,
+  validateReimbursementApprovalNodes,
   validateReimbursementPersistDto,
 } from "../shared/finReimbursementMappers.js";
 import { consumeReimburseEditFromApprove } from "../shared/reimburseApproveBridge.js";
@@ -68,8 +72,6 @@
 
   const searchForm = reactive({
     applicantKeyword: "",
-    applyTimeFrom: "",
-    applyTimeTo: "",
   });
   const tableLoading = ref(false);
   const page = reactive({ current: 1, size: 10, total: 0 });
@@ -105,11 +107,26 @@
         })
       );
       const { records, total } = unwrapFinReimbursementPage(res);
-      allRows.value = filterRowsByReimbursementType(
+      const filtered = filterRowsByReimbursementType(
         records,
         FIN_REIMBURSEMENT_TYPE.COST
-      ).map(mapCostReimbursementRow);
-      page.total = total;
+      );
+      let mapped = filtered.map(mapCostReimbursementRow);
+      mapped = await enrichReimbursementListRowsWithApprovalFlow(
+        mapped,
+        FIN_REIMBURSEMENT_TYPE.COST
+      );
+      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;
@@ -264,7 +281,11 @@
 
   function autoAssignApprovalFlow() {
     const amount = Number(form.applyAmount) || detailTotalAmount.value || 0;
-    form.approvalFlowNodes = buildAutoApprovalFlow(amount, form.expenseCategory || "other");
+    form.approvalFlowNodes = buildAutoApprovalFlow(
+      amount,
+      form.expenseCategory || "other",
+      form.approvalFlowNodes
+    );
     nextTick(() => formRef.value?.validateField?.("approvalFlowNodes"));
   }
 
@@ -313,8 +334,6 @@
 
   function resetSearch() {
     searchForm.applicantKeyword = "";
-    searchForm.applyTimeFrom = "";
-    searchForm.applyTimeTo = "";
     handleQuery();
   }
 
@@ -448,7 +467,6 @@
       return;
     }
     syncApplyAmountFromDetails();
-    autoAssignApprovalFlow();
 
     if (submitSaving.value) return;
     const isEdit = formDialog.mode === "edit";
@@ -458,6 +476,11 @@
       proxy?.$modal?.msgWarning?.(check.message);
       return;
     }
+    const nodeCheck = validateReimbursementApprovalNodes(dto);
+    if (!nodeCheck.ok) {
+      proxy?.$modal?.msgWarning?.(nodeCheck.message);
+      return;
+    }
     submitSaving.value = true;
     try {
       await persistFinReimbursement(dto, isEdit);

--
Gitblit v1.9.3