|
|
@@ -3,8 +3,8 @@
|
|
|
<el-card class="box-card">
|
|
|
<!-- 审批管理选项卡 -->
|
|
|
<el-tabs v-model="activeTab" type="border-card" @tab-click="handleTabClick">
|
|
|
- <!-- 待审批申请 -->
|
|
|
- <el-tab-pane label="待审批申请" name="pending">
|
|
|
+ <!-- 出国审批 -->
|
|
|
+ <el-tab-pane label="出国审批" name="pending">
|
|
|
<div class="tab-content">
|
|
|
<!-- 搜索区域 -->
|
|
|
<transition :enter-active-class="animate.searchAnimate.enter" :leave-active-class="animate.searchAnimate.leave">
|
|
|
@@ -42,20 +42,6 @@
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
- <el-col :span="9">
|
|
|
- <el-form-item label="出国时间">
|
|
|
- <el-date-picker
|
|
|
- v-model="pendingDateRange"
|
|
|
- style="width: 100%"
|
|
|
- type="daterange"
|
|
|
- range-separator="-"
|
|
|
- start-placeholder="开始日期"
|
|
|
- end-placeholder="结束日期"
|
|
|
- value-format="YYYY-MM-DD"
|
|
|
- @change="handlePendingDateRangeChange"
|
|
|
- />
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
</el-row>
|
|
|
|
|
|
<el-row>
|
|
|
@@ -185,20 +171,6 @@
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
- <el-col :span="9">
|
|
|
- <el-form-item label="审批时间">
|
|
|
- <el-date-picker
|
|
|
- v-model="recordDateRange"
|
|
|
- style="width: 100%"
|
|
|
- type="daterange"
|
|
|
- range-separator="-"
|
|
|
- start-placeholder="开始日期"
|
|
|
- end-placeholder="结束日期"
|
|
|
- value-format="YYYY-MM-DD"
|
|
|
- @change="handleRecordDateRangeChange"
|
|
|
- />
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
</el-row>
|
|
|
|
|
|
<el-row>
|
|
|
@@ -228,9 +200,9 @@
|
|
|
<!-- 审批记录表格 -->
|
|
|
<el-table v-loading="recordLoading" border :data="recordList" @row-dblclick="handleViewRecord" v-hasPermi="['rs:overseas:list']">
|
|
|
<el-table-column label="申请人" align="center" prop="applicantName" width="100" :show-overflow-tooltip="true" />
|
|
|
- <el-table-column label="所属部门" align="center" prop="department" width="140" :show-overflow-tooltip="true" />
|
|
|
<el-table-column label="出国目的" align="center" prop="purposeText" width="100" :show-overflow-tooltip="true" />
|
|
|
<el-table-column label="目的地" align="center" prop="destination" width="120" :show-overflow-tooltip="true" />
|
|
|
+ <el-table-column label="所属部门" align="center" prop="department" width="140" :show-overflow-tooltip="true" />
|
|
|
<el-table-column label="出国时间" align="center" min-width="220" :show-overflow-tooltip="true">
|
|
|
<template #default="scope"> {{ formatDate(scope.row.startDate) }} 至 {{ formatDate(scope.row.endDate) }} </template>
|
|
|
</el-table-column>
|
|
|
@@ -246,15 +218,7 @@
|
|
|
<el-tooltip content="查看详情" placement="top">
|
|
|
<el-button link type="primary" icon="View" @click="handleViewRecord(scope.row)" v-hasPermi="['rs:overseas:query']"></el-button>
|
|
|
</el-tooltip>
|
|
|
- <el-tooltip content="查看审批历史" placement="top">
|
|
|
- <el-button
|
|
|
- link
|
|
|
- type="info"
|
|
|
- icon="List"
|
|
|
- @click.stop="handleViewApprovalHistory(scope.row)"
|
|
|
- v-hasPermi="['rs:overseas:query']"
|
|
|
- ></el-button>
|
|
|
- </el-tooltip>
|
|
|
+ <!-- 查看审批历史按钮已隐藏 -->
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
@@ -435,16 +399,13 @@ const state = reactive({
|
|
|
pendingList: [] as OverseasApplicationVO[],
|
|
|
pendingTotal: 0,
|
|
|
showPendingSearch: true,
|
|
|
- pendingDateRange: [] as string[],
|
|
|
pendingQueryParams: {
|
|
|
pageNum: 1,
|
|
|
pageSize: 10,
|
|
|
applicantName: '',
|
|
|
department: '',
|
|
|
destination: '',
|
|
|
- status: '0', // 只查询待审核状态
|
|
|
- startDateBegin: '',
|
|
|
- startDateEnd: ''
|
|
|
+ status: '0' // 只查询待审核状态
|
|
|
} as OverseasApplicationQuery,
|
|
|
|
|
|
// 审批记录列表相关
|
|
|
@@ -452,7 +413,6 @@ const state = reactive({
|
|
|
recordList: [] as OverseasApprovalVO[],
|
|
|
recordTotal: 0,
|
|
|
showRecordSearch: true,
|
|
|
- recordDateRange: [] as string[],
|
|
|
recordQueryParams: {
|
|
|
pageNum: 1,
|
|
|
pageSize: 10,
|
|
|
@@ -461,9 +421,7 @@ const state = reactive({
|
|
|
approvalStatus: '',
|
|
|
applicantName: '',
|
|
|
department: '',
|
|
|
- destination: '',
|
|
|
- approvalTimeBegin: '',
|
|
|
- approvalTimeEnd: ''
|
|
|
+ destination: ''
|
|
|
} as OverseasApprovalQuery,
|
|
|
|
|
|
// 查看详情
|
|
|
@@ -520,13 +478,11 @@ const {
|
|
|
pendingList,
|
|
|
pendingTotal,
|
|
|
showPendingSearch,
|
|
|
- pendingDateRange,
|
|
|
pendingQueryParams,
|
|
|
recordLoading,
|
|
|
recordList,
|
|
|
recordTotal,
|
|
|
showRecordSearch,
|
|
|
- recordDateRange,
|
|
|
recordQueryParams,
|
|
|
viewDialog,
|
|
|
viewData,
|
|
|
@@ -631,28 +587,54 @@ const handleRecordQuery = () => {
|
|
|
|
|
|
// 重置搜索
|
|
|
const resetPendingQuery = () => {
|
|
|
- proxy.resetForm('pendingQueryForm');
|
|
|
- state.pendingDateRange = [];
|
|
|
- state.pendingQueryParams.status = '0'; // 保持查询待审核状态
|
|
|
- handlePendingQuery();
|
|
|
+ try {
|
|
|
+ // 重置查询参数
|
|
|
+ Object.assign(state.pendingQueryParams, {
|
|
|
+ pageNum: 1,
|
|
|
+ pageSize: 10,
|
|
|
+ applicantName: '',
|
|
|
+ department: '',
|
|
|
+ destination: '',
|
|
|
+ status: '0' // 保持查询待审核状态
|
|
|
+ });
|
|
|
+ // 重置表单字段
|
|
|
+ const form = proxy.$refs.pendingQueryForm;
|
|
|
+ if (form && typeof form.resetFields === 'function') {
|
|
|
+ form.resetFields();
|
|
|
+ }
|
|
|
+ handlePendingQuery();
|
|
|
+ } catch (error) {
|
|
|
+ console.error('重置查询条件时发生错误:', error);
|
|
|
+ handlePendingQuery();
|
|
|
+ }
|
|
|
};
|
|
|
|
|
|
const resetRecordQuery = () => {
|
|
|
- proxy.resetForm('recordQueryForm');
|
|
|
- handleRecordQuery();
|
|
|
-};
|
|
|
-
|
|
|
-// 处理日期范围变化
|
|
|
-const handlePendingDateRangeChange = (dates: string[] | null) => {
|
|
|
- if (dates && dates.length === 2) {
|
|
|
- state.pendingQueryParams.startDateBegin = dates[0];
|
|
|
- state.pendingQueryParams.startDateEnd = dates[1];
|
|
|
- } else {
|
|
|
- state.pendingQueryParams.startDateBegin = '';
|
|
|
- state.pendingQueryParams.startDateEnd = '';
|
|
|
+ try {
|
|
|
+ // 重置查询参数
|
|
|
+ Object.assign(state.recordQueryParams, {
|
|
|
+ pageNum: 1,
|
|
|
+ pageSize: 10,
|
|
|
+ applicationId: undefined,
|
|
|
+ approvalLevel: '',
|
|
|
+ approvalStatus: '',
|
|
|
+ applicantName: '',
|
|
|
+ department: '',
|
|
|
+ destination: ''
|
|
|
+ });
|
|
|
+ // 重置表单字段
|
|
|
+ const form = proxy.$refs.recordQueryForm;
|
|
|
+ if (form && typeof form.resetFields === 'function') {
|
|
|
+ form.resetFields();
|
|
|
+ }
|
|
|
+ handleRecordQuery();
|
|
|
+ } catch (error) {
|
|
|
+ console.error('重置查询条件时发生错误:', error);
|
|
|
+ handleRecordQuery();
|
|
|
}
|
|
|
};
|
|
|
|
|
|
+
|
|
|
// 查看申请详情
|
|
|
const handleViewApplication = async (row: OverseasApplicationVO) => {
|
|
|
try {
|
|
|
@@ -840,16 +822,7 @@ const getApprovalStatusTagType = (status: string): 'success' | 'warning' | 'dang
|
|
|
return typeMap[status] || 'info';
|
|
|
};
|
|
|
|
|
|
-// 审批记录日期范围变化处理
|
|
|
-const handleRecordDateRangeChange = (dates: [string, string] | null) => {
|
|
|
- if (dates && dates.length === 2) {
|
|
|
- state.recordQueryParams.approvalTimeBegin = dates[0];
|
|
|
- state.recordQueryParams.approvalTimeEnd = dates[1];
|
|
|
- } else {
|
|
|
- state.recordQueryParams.approvalTimeBegin = '';
|
|
|
- state.recordQueryParams.approvalTimeEnd = '';
|
|
|
- }
|
|
|
-};
|
|
|
+
|
|
|
</script>
|
|
|
|
|
|
<style scoped>
|