From 492802e4fc1b371ba21a2a490c8dcd67d7c8b29c Mon Sep 17 00:00:00 2001
From: gongchunyi <deslre0381@gmail.com>
Date: 星期一, 22 六月 2026 14:03:40 +0800
Subject: [PATCH] fix: 出差和请假审批新增开始与结束日期
---
src/views/collaborativeApproval/approvalProcess/index.vue | 44 +++++++++++++++++++++++++++++++++++---------
1 files changed, 35 insertions(+), 9 deletions(-)
diff --git a/src/views/collaborativeApproval/approvalProcess/index.vue b/src/views/collaborativeApproval/approvalProcess/index.vue
index a9df154..6677c48 100644
--- a/src/views/collaborativeApproval/approvalProcess/index.vue
+++ b/src/views/collaborativeApproval/approvalProcess/index.vue
@@ -18,6 +18,8 @@
name="6"></el-tab-pane>
<el-tab-pane label="鍙戣揣瀹℃壒"
name="7"></el-tab-pane>
+ <el-tab-pane label="鍏ュ簱瀹℃壒"
+ name="9"></el-tab-pane>
</el-tabs>
<div class="search_form">
<div>
@@ -52,12 +54,12 @@
<el-button @click="handleOut">瀹℃壒浜虹淮鎶�</el-button>
<el-button type="primary"
@click="openForm('add')"
- v-if="currentApproveType !== 5 && currentApproveType !== 6 && currentApproveType !== 7">鏂板</el-button>
+ v-if="currentApproveType !== 5 && currentApproveType !== 6 && currentApproveType !== 7 && currentApproveType !== 9">鏂板</el-button>
<el-button @click="handleExport">瀵煎嚭</el-button>
<el-button type="danger"
plain
@click="handleDelete"
- v-if="currentApproveType !== 5 && currentApproveType !== 6 && currentApproveType !== 7">鍒犻櫎</el-button>
+ v-if="currentApproveType !== 5 && currentApproveType !== 6 && currentApproveType !== 7 && currentApproveType !== 9">鍒犻櫎</el-button>
</div>
</div>
<div class="table_list">
@@ -184,9 +186,12 @@
// 鍔ㄦ�佽〃鏍煎垪閰嶇疆锛屾牴鎹鎵圭被鍨嬬敓鎴愬垪
const tableColumnCopy = computed(() => {
const isLeaveType = currentApproveType.value === 2; // 璇峰亣绠$悊
+ const isBusinessTripType = currentApproveType.value === 3; // 鍑哄樊绠$悊
+ const showDateRange = isLeaveType || isBusinessTripType; // 鏄惁鏄剧ず鏃堕棿娈�
const isReimburseType = currentApproveType.value === 4; // 鎶ラ攢绠$悊
const isQuotationType = currentApproveType.value === 6; // 鎶ヤ环瀹℃壒
const isPurchaseType = currentApproveType.value === 5; // 閲囪喘瀹℃壒
+ const isInboundType = currentApproveType.value === 9; // 鍏ュ簱瀹℃壒
// 鍩虹鍒楅厤缃�
const baseColumns = [
@@ -237,6 +242,8 @@
? "鎶ヤ环鍗曞彿"
: isPurchaseType
? "閲囪喘鍚堝悓鍙�"
+ : isInboundType
+ ? "鍏ュ簱鍗曞彿"
: "瀹℃壒浜嬬敱",
prop: "approveReason",
},
@@ -256,19 +263,35 @@
});
}
- // 鏃ユ湡鍒楋紙鏍规嵁绫诲瀷鍔ㄦ�侀厤缃級
+ // 鍩虹鏃ユ湡鍒�
baseColumns.push(
{
- label: isLeaveType ? "寮�濮嬫棩鏈�" : "鐢宠鏃ユ湡",
- prop: isLeaveType ? "startDate" : "approveTime",
- width: 200,
+ label: "鐢宠鏃ユ湡",
+ prop: "approveTime",
+ width: 160,
},
{
- label: "缁撴潫鏃ユ湡",
- prop: isLeaveType ? "endDate" : "approveOverTime",
- width: 120,
+ label: "瀹℃壒鏃ユ湡",
+ prop: "approveOverTime",
+ width: 160,
}
);
+
+ // 寮�濮嬪拰缁撴潫鏃ユ湡鍒�
+ if (showDateRange) {
+ baseColumns.push(
+ {
+ label: "寮�濮嬫棩鏈�",
+ prop: "startDate",
+ width: 120,
+ },
+ {
+ label: "缁撴潫鏃ユ湡",
+ prop: "endDate",
+ width: 120,
+ }
+ );
+ }
// 褰撳墠瀹℃壒浜哄垪
baseColumns.push({
@@ -289,6 +312,7 @@
currentApproveType.value === 5 ||
currentApproveType.value === 6 ||
currentApproveType.value === 7 ||
+ currentApproveType.value === 9 ||
row.approveStatus == 2 ||
row.approveStatus == 1 ||
row.approveStatus == 4,
@@ -402,6 +426,7 @@
5: "/approveProcess/exportFive",
6: "/approveProcess/exportSix",
7: "/approveProcess/exportSeven",
+ 9: "/approveProcess/exportNine",
};
const url = urlMap[type] || urlMap[0];
const nameMap = {
@@ -413,6 +438,7 @@
5: "閲囪喘鐢宠瀹℃壒琛�",
6: "鎶ヤ环瀹℃壒琛�",
7: "鍙戣揣瀹℃壒琛�",
+ 9: "鍏ュ簱瀹℃壒琛�",
};
const fileName = nameMap[type] || nameMap[0];
proxy.download(url, {}, `${fileName}.xlsx`);
--
Gitblit v1.9.3