From d979f89c4b46729976aa44429922a910aeb5d8da Mon Sep 17 00:00:00 2001
From: yyb <995253665@qq.com>
Date: 星期一, 10 八月 2026 11:17:15 +0800
Subject: [PATCH] Merge branch 'dev_pro_山西_德益科技' of http://114.132.189.42:9002/r/product-inventory-management into dev_pro_山西_德益科技
---
src/views/officeProcessAutomation/ReimburseManage/travel-reimburse/useTravelReimburse.js | 41 ++++++++++++++++++++++++++++++++---------
1 files changed, 32 insertions(+), 9 deletions(-)
diff --git a/src/views/officeProcessAutomation/ReimburseManage/travel-reimburse/useTravelReimburse.js b/src/views/officeProcessAutomation/ReimburseManage/travel-reimburse/useTravelReimburse.js
index 9aa6294..3667840 100644
--- a/src/views/officeProcessAutomation/ReimburseManage/travel-reimburse/useTravelReimburse.js
+++ b/src/views/officeProcessAutomation/ReimburseManage/travel-reimburse/useTravelReimburse.js
@@ -11,16 +11,21 @@
import { computed, getCurrentInstance, nextTick, onMounted, reactive, ref } from "vue";
import {
buildFinReimbursementListParams,
+ filterReimbursementRowsBySearch,
+ hasActiveReimbursementSearch,
buildTravelReimbursementSaveDto,
canDeleteReimbursementRow,
canEditReimbursementRow,
+ enrichReimbursementListRowsWithApprovalFlow,
filterRowsByReimbursementType,
FIN_REIMBURSEMENT_TYPE,
+ formatReimbursementDate,
mapFinReimbursementDetailRow,
mapTravelReimbursementRow,
resolveReimbursementDeleteId,
unwrapFinReimbursementDetail,
unwrapFinReimbursementPage,
+ validateReimbursementApprovalNodes,
validateReimbursementPersistDto,
} from "../shared/finReimbursementMappers.js";
import { consumeReimburseEditFromApprove } from "../shared/reimburseApproveBridge.js";
@@ -59,7 +64,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);
@@ -89,11 +94,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;
@@ -157,9 +177,9 @@
{ label: "鎶ラ攢鍗曞彿", prop: "reimburseNo", width: 150 },
{ label: "鐢宠浜虹紪鍙�", prop: "applicantNo", width: 110 },
{ label: "鐢宠浜�", prop: "applicantName", minWidth: 90 },
- { label: "鍑哄樊寮�濮�", prop: "travelStartTime", width: 165 },
- { label: "鍑哄樊缁撴潫", prop: "travelEndTime", width: 165 },
- { label: "鍒涘缓鏃堕棿", prop: "createTime", width: 165 },
+ { label: "鍑哄樊寮�濮�", prop: "travelStartTime", width: 120, formatData: (v) => formatReimbursementDate(v) },
+ { label: "鍑哄樊缁撴潫", prop: "travelEndTime", width: 120, formatData: (v) => formatReimbursementDate(v) },
+ { label: "鍒涘缓鏃堕棿", prop: "createTime", width: 120, formatData: (v) => formatReimbursementDate(v) },
{
label: "鐘舵��",
prop: "approvalResult",
@@ -366,8 +386,6 @@
function resetSearch() {
searchForm.applicantKeyword = "";
- searchForm.travelStartFrom = "";
- searchForm.travelEndTo = "";
handleQuery();
}
@@ -517,6 +535,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