From 990257e90f992cccbfbdd5e3bebd27b0ae5402a8 Mon Sep 17 00:00:00 2001
From: gongchunyi <deslre0381@gmail.com>
Date: 星期一, 10 八月 2026 14:38:38 +0800
Subject: [PATCH] fix: 审批刷新页面优化

---
 src/views/collaborativeApproval/approvalProcess/index.vue |   65 +++++++++++++++++++++++++-------
 1 files changed, 50 insertions(+), 15 deletions(-)

diff --git a/src/views/collaborativeApproval/approvalProcess/index.vue b/src/views/collaborativeApproval/approvalProcess/index.vue
index 11a2869..f8309a3 100644
--- a/src/views/collaborativeApproval/approvalProcess/index.vue
+++ b/src/views/collaborativeApproval/approvalProcess/index.vue
@@ -124,8 +124,8 @@
     </el-card>
 
     <!-- 寮圭獥缁勪欢 -->
-    <info-form-dia ref="infoFormDia" @close="handleQuery" :approveType="currentApproveType"></info-form-dia>
-    <approval-dia ref="approvalDia" @close="handleQuery" :approveType="currentApproveType"></approval-dia>
+    <info-form-dia ref="infoFormDia" @close="handleDialogClose" :approveType="currentApproveType"></info-form-dia>
+    <approval-dia ref="approvalDia" @close="handleDialogClose" :approveType="currentApproveType"></approval-dia>
     <FileList v-if="fileDialogVisible"
               v-model:visible="fileDialogVisible"
               record-type="approve_process"
@@ -207,6 +207,7 @@
 // 鍔ㄦ�佽〃鏍煎垪閰嶇疆锛屾牴鎹鎵圭被鍨嬬敓鎴愬垪
 const tableColumnCopy = computed(() => {
   const isLeaveType = currentApproveType.value === 2; // 璇峰亣绠$悊
+  const isBusinessTripType = currentApproveType.value === 3; // 鍑哄樊绠$悊
   const isReimburseType = currentApproveType.value === 4; // 鎶ラ攢绠$悊
   const isQuotationType = currentApproveType.value === 6; // 鎶ヤ环瀹℃壒
   const isPurchaseType = currentApproveType.value === 5; // 閲囪喘瀹℃壒
@@ -274,26 +275,52 @@
       width: 120
     });
   }
+
+  // 璇峰亣绠$悊锛氬紑濮嬫棩鏈� / 缁撴潫鏃ユ湡
+  if (isLeaveType) {
+    baseColumns.push(
+      { label: "寮�濮嬫棩鏈�", prop: "startDate", width: 120 },
+      { label: "缁撴潫鏃ユ湡", prop: "endDate", width: 120 }
+    );
+  }
   
-  // 鏃ユ湡鍒楋紙鏍规嵁绫诲瀷鍔ㄦ�侀厤缃級
-  baseColumns.push(
-    {
-      label: isLeaveType ? "寮�濮嬫棩鏈�" : "鐢宠鏃ユ湡",
-      prop: isLeaveType ? "startDate" : "approveTime",
-      width: 200
-    },
-    {
-      label: "缁撴潫鏃ユ湡",
-      prop: isLeaveType ? "endDate" : "approveOverTime",
-      width: 120
-    }
-  );
+  // 鍑哄樊绠$悊锛氬紑濮嬫椂闂� / 缁撴潫鏃堕棿锛堜笉鍚锛�
+  if (isBusinessTripType) {
+    baseColumns.push(
+      {
+        label: "寮�濮嬫椂闂�",
+        prop: "startDateTime",
+        width: 180,
+        formatData: (val) => val ? val.substring(0, 16) : ''
+      },
+      {
+        label: "缁撴潫鏃堕棿",
+        prop: "endDateTime",
+        width: 180,
+        formatData: (val) => val ? val.substring(0, 16) : ''
+      }
+    );
+  }
   
   // 褰撳墠瀹℃壒浜哄垪
   baseColumns.push({
     label: "褰撳墠瀹℃壒浜�",
     prop: "approveUserCurrentName",
     width: 120
+  });
+
+  // 鐢宠鏃堕棿 - 鎵�鏈夌被鍨嬮兘鏄剧ず
+  baseColumns.push({
+    label: "鐢宠鏃堕棿",
+    prop: "approveTime",
+    width: 180,
+  });
+
+  // 瀹℃壒鏃堕棿 - 鎵�鏈夌被鍨嬮兘鏄剧ず
+  baseColumns.push({
+    label: "瀹℃壒鏃堕棿",
+    prop: "approveOverTime",
+    width: 180,
   });
   
   // 鎿嶄綔鍒�
@@ -375,6 +402,10 @@
   getList();
 };
 
+const handleDialogClose = () => {
+  getList();
+};
+
 // 鎵撳紑闄勪欢寮圭獥
 const recordId =ref(0)
 const fileDialogVisible = ref(false)
@@ -398,6 +429,10 @@
     page.total = res.data.total;
     // 鏇存柊褰撳墠绫诲瀷鏁伴噺
     typeCounts.value[activeTab.value] = res.data.total;
+    if (res.data.records.length === 0 && page.current > 1) {
+      page.current = Math.max(1, Math.ceil(res.data.total / page.size));
+      getList();
+    }
   }).catch(err => {
     tableLoading.value = false;
   })

--
Gitblit v1.9.3