yuan
5 天以前 ca030ea1f083821afada9c6badf472897c52815e
src/views/officeProcessAutomation/ReimburseManage/travel-reimburse/useTravelReimburse.js
@@ -11,12 +11,15 @@
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,
@@ -61,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);
@@ -100,10 +103,17 @@
        mapped,
        FIN_REIMBURSEMENT_TYPE.TRAVEL
      );
      if (hasActiveReimbursementSearch(searchForm)) {
        mapped = filterReimbursementRowsBySearch(mapped, searchForm);
      }
      allRows.value = mapped;
      const dropped = records.length - filtered.length;
      page.total =
      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;
@@ -167,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",
@@ -376,8 +386,6 @@
  function resetSearch() {
    searchForm.applicantKeyword = "";
    searchForm.travelStartFrom = "";
    searchForm.travelEndTo = "";
    handleQuery();
  }