“编译修改”
This commit is contained in:
1 parent
69e4b08946
commit
e79bf5a26c
224 files changed
+66161
-6
No files matched your search
@@ -767,3 +767,219 @@ export function deleteOverseasAttachments(attachmentIds: Array<string | number>)
|
||||
data: attachmentIds
|
||||
});
|
||||
}
|
||||
|
||||
// ==================== 出国行程变更相关API ====================
|
||||
|
||||
// 行程变更查询参数类型
|
||||
export interface ItineraryChangeQuery {
|
||||
pageNum: number;
|
||||
pageSize: number;
|
||||
applicantName?: string;
|
||||
destination?: string;
|
||||
status?: string;
|
||||
params?: Record<string, any>;
|
||||
}
|
||||
|
||||
// 行程变更数据类型
|
||||
export interface ItineraryChangeVO {
|
||||
changeId: number | string;
|
||||
recordId: number;
|
||||
applicationId?: number;
|
||||
applicantName: string;
|
||||
gender?: string;
|
||||
birthDate?: string;
|
||||
politicalStatus?: string;
|
||||
professionalTitle?: string;
|
||||
position?: string;
|
||||
documentName?: string;
|
||||
documentNumber?: string;
|
||||
department: string;
|
||||
originalDestination: string;
|
||||
originalDestinationCity?: string;
|
||||
originalExitReason: string;
|
||||
originalStartDate: string;
|
||||
originalEndDate: string;
|
||||
originalDuration: number;
|
||||
originalItinerary: string;
|
||||
changeType: string;
|
||||
newDestination?: string;
|
||||
newDestinationCity?: string;
|
||||
newExitReason?: string;
|
||||
newStartDate?: string;
|
||||
newEndDate?: string;
|
||||
newDuration?: number;
|
||||
newItinerary?: string;
|
||||
changeReason: string;
|
||||
remark?: string;
|
||||
status: string;
|
||||
statusText: string;
|
||||
approvalOpinion?: string;
|
||||
approvalBy?: number;
|
||||
approvalByName?: string;
|
||||
approvalTime?: string;
|
||||
createTime: string;
|
||||
updateTime?: string;
|
||||
createBy: string;
|
||||
updateBy: string;
|
||||
}
|
||||
|
||||
// 行程变更表单类型
|
||||
export interface ItineraryChangeForm {
|
||||
changeId?: number | string;
|
||||
recordId: number; // 关联出国记录ID(必填)
|
||||
applicationId: number;
|
||||
applicantId: number; // 申请人ID(必填)
|
||||
applicantName?: string;
|
||||
gender?: string;
|
||||
birthDate?: string;
|
||||
politicalStatus?: string;
|
||||
professionalTitle?: string;
|
||||
position?: string;
|
||||
documentName?: string;
|
||||
documentNumber?: string;
|
||||
department?: string;
|
||||
originalDestination?: string;
|
||||
originalDestinationCity?: string;
|
||||
originalExitReason?: string;
|
||||
originalStartDate?: string;
|
||||
originalEndDate?: string;
|
||||
originalDuration?: number;
|
||||
originalItinerary?: string;
|
||||
changeType: string;
|
||||
newDestination?: string;
|
||||
newDestinationCity?: string;
|
||||
newExitReason?: string;
|
||||
newStartDate?: string;
|
||||
newEndDate?: string;
|
||||
newDuration?: number;
|
||||
newItinerary?: string;
|
||||
changeReason: string;
|
||||
remark?: string;
|
||||
}
|
||||
|
||||
// 行程变更审批请求类型
|
||||
export interface ItineraryChangeApprovalRequest {
|
||||
changeId: number | string;
|
||||
approved: boolean; // true=通过,false=拒绝
|
||||
opinion?: string; // 审批意见
|
||||
}
|
||||
|
||||
// 查询行程变更列表
|
||||
export function listItineraryChange(query: ItineraryChangeQuery) {
|
||||
return request({
|
||||
url: '/rs/itinerary/change/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
}
|
||||
|
||||
// 查询我的变更记录列表(只返回已通过的变更申请)
|
||||
export function listMyItineraryChange(query: ItineraryChangeQuery) {
|
||||
return request({
|
||||
url: '/rs/itinerary/change/my/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
}
|
||||
|
||||
// 查询待审批的行程变更列表
|
||||
export function listPendingItineraryChange(query: ItineraryChangeQuery) {
|
||||
return request({
|
||||
url: '/rs/itinerary/change/pending/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
}
|
||||
|
||||
// 查询行程变更详细
|
||||
export function getItineraryChange(changeId: string | number) {
|
||||
return request({
|
||||
url: `/rs/itinerary/change/${changeId}`,
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
// 新增行程变更
|
||||
export function addItineraryChange(data: ItineraryChangeForm) {
|
||||
return request({
|
||||
url: '/rs/itinerary/change',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
// 修改行程变更(重新提交)
|
||||
export function updateItineraryChange(data: ItineraryChangeForm) {
|
||||
return request({
|
||||
url: '/rs/itinerary/change',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
// 删除行程变更
|
||||
export function delItineraryChange(changeId: string | number | Array<string | number>) {
|
||||
return request({
|
||||
url: `/rs/itinerary/change/${typeof changeId === 'object' ? changeId.join(',') : changeId}`,
|
||||
method: 'delete'
|
||||
});
|
||||
}
|
||||
|
||||
// 撤回行程变更
|
||||
export function cancelItineraryChange(changeId: string | number, reason?: string) {
|
||||
return request({
|
||||
url: `/rs/itinerary/change/cancel/${changeId}`,
|
||||
method: 'put',
|
||||
params: { reason }
|
||||
});
|
||||
}
|
||||
|
||||
// 审批行程变更
|
||||
export function approveItineraryChange(data: ItineraryChangeApprovalRequest) {
|
||||
return request({
|
||||
url: '/rs/itinerary/change/approve',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
// 导出行程变更列表
|
||||
export function exportItineraryChange(query: ItineraryChangeQuery) {
|
||||
return request({
|
||||
url: '/rs/itinerary/change/export',
|
||||
method: 'post',
|
||||
data: query
|
||||
});
|
||||
}
|
||||
|
||||
// 获取可用的出国记录列表(用于选择原出国申请)
|
||||
export function getAvailableOverseasRecords() {
|
||||
return request({
|
||||
url: '/rs/itinerary/change/available-records',
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
// 获取已审批通过的出国申请列表(用于行程变更申请选择)
|
||||
export function getApprovedOverseasApplications() {
|
||||
return request({
|
||||
url: '/rs/overseas/application/status/1',
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
// 根据记录ID查询出国记录详情(用于显示原申请信息)
|
||||
export function getOverseasRecordForChange(recordId: string | number) {
|
||||
return request({
|
||||
url: `/rs/itinerary/change/record/${recordId}`,
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
// 查询某个记录的变更历史
|
||||
export function getItineraryChangeHistory(recordId: string | number) {
|
||||
return request({
|
||||
url: `/rs/itinerary/change/record/${recordId}/history`,
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
@@ -1169,6 +1169,66 @@
|
||||
}}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
|
||||
<!-- 变更历史记录 -->
|
||||
<div v-if="state.viewData && 'recordId' in state.viewData" style="margin-top: 20px;">
|
||||
<el-divider content-position="left">
|
||||
<span style="font-size: 16px; font-weight: bold; color: #409eff;">
|
||||
<el-icon style="vertical-align: middle; margin-right: 5px;"><EditPen /></el-icon>
|
||||
变更历史记录
|
||||
</span>
|
||||
</el-divider>
|
||||
|
||||
<!-- 变更历史列表 -->
|
||||
<div v-loading="state.changeHistoryLoading">
|
||||
<el-empty
|
||||
v-if="!state.changeHistoryLoading && state.changeHistoryList.length === 0"
|
||||
description="暂无变更记录"
|
||||
:image-size="80"
|
||||
/>
|
||||
|
||||
<el-table
|
||||
v-else
|
||||
:data="state.changeHistoryList"
|
||||
border
|
||||
style="width: 100%"
|
||||
max-height="400px"
|
||||
>
|
||||
<el-table-column label="变更时间" align="center" prop="createTime" min-width="160" />
|
||||
<el-table-column label="变更类型" align="center" prop="changeType" min-width="150">
|
||||
<template #default="scope">
|
||||
<el-tag
|
||||
v-for="(type, index) in (scope.row.changeType || '').split(',')"
|
||||
:key="index"
|
||||
style="margin: 2px;"
|
||||
size="small"
|
||||
>
|
||||
{{ type }}
|
||||
</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="原目的地" align="center" prop="originalDestination" min-width="120" />
|
||||
<el-table-column label="新目的地" align="center" prop="newDestination" min-width="120" />
|
||||
<el-table-column label="原出国时间" align="center" min-width="200">
|
||||
<template #default="scope">
|
||||
{{ formatDate(scope.row.originalStartDate) }} 至 {{ formatDate(scope.row.originalEndDate) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="新出国时间" align="center" min-width="200">
|
||||
<template #default="scope">
|
||||
{{ formatDate(scope.row.newStartDate) }} 至 {{ formatDate(scope.row.newEndDate) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="变更原因" align="center" prop="changeReason" min-width="200" show-overflow-tooltip />
|
||||
<el-table-column label="状态" align="center" prop="statusText" min-width="100">
|
||||
<template #default="scope">
|
||||
<el-tag :type="getChangeStatusTagType(scope.row.status)">{{ scope.row.statusText }}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="审批意见" align="center" prop="approvalOpinion" min-width="150" show-overflow-tooltip />
|
||||
</el-table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 记录详情操作按钮 -->
|
||||
<template #footer v-if="state.viewData && 'recordId' in state.viewData">
|
||||
<div class="dialog-footer">
|
||||
@@ -1257,6 +1317,7 @@ import {
|
||||
listOverseasAttachments,
|
||||
uploadOverseasAttachment,
|
||||
deleteOverseasAttachment,
|
||||
getItineraryChangeHistory,
|
||||
type OverseasApplicationQuery,
|
||||
type OverseasApplicationVO,
|
||||
type OverseasApplicationForm,
|
||||
@@ -1267,7 +1328,7 @@ import {
|
||||
type OverseasAttachmentVO
|
||||
} from '@/api/rs/overseas';
|
||||
import { ElMessage, ElMessageBox } from 'element-plus';
|
||||
import { UploadFilled, Document, Loading, Download, Delete, View } from '@element-plus/icons-vue';
|
||||
import { UploadFilled, Document, Loading, Download, Delete, View, EditPen } from '@element-plus/icons-vue';
|
||||
import ImagePreview from '@/components/ImagePreview/index.vue';
|
||||
import animate from '@/animate';
|
||||
import { parseTime } from '@/utils/ruoyi';
|
||||
@@ -1382,6 +1443,10 @@ const state = reactive({
|
||||
status: '0'
|
||||
},
|
||||
|
||||
// 变更历史记录
|
||||
changeHistoryLoading: false,
|
||||
changeHistoryList: [] as any[],
|
||||
|
||||
// 文件通知阅读弹窗
|
||||
noticeDialog: {
|
||||
visible: false,
|
||||
@@ -2524,6 +2589,17 @@ const getStatusTagType = (status: string): 'primary' | 'success' | 'info' | 'war
|
||||
return typeMap[status || ''] || 'info';
|
||||
};
|
||||
|
||||
// 获取变更状态的Tag类型
|
||||
const getChangeStatusTagType = (status: string): 'success' | 'warning' | 'danger' | 'info' => {
|
||||
const typeMap: Record<string, 'success' | 'warning' | 'danger' | 'info'> = {
|
||||
'0': 'warning', // 待审核
|
||||
'1': 'success', // 已通过
|
||||
'2': 'danger', // 已拒绝
|
||||
'3': 'info' // 已撤回
|
||||
};
|
||||
return typeMap[status] || 'info';
|
||||
};
|
||||
|
||||
const getCompletionStatusTagType = (status: string): 'primary' | 'success' | 'info' | 'warning' | 'danger' => {
|
||||
const typeMap: Record<string, 'primary' | 'success' | 'info' | 'warning' | 'danger'> = {
|
||||
'1': 'success', // 已完成
|
||||
@@ -2533,12 +2609,42 @@ const getCompletionStatusTagType = (status: string): 'primary' | 'success' | 'in
|
||||
};
|
||||
|
||||
// 记录相关操作
|
||||
const handleViewRecord = (row: OverseasRecordVO) => {
|
||||
const handleViewRecord = async (row: OverseasRecordVO) => {
|
||||
// 查看记录详情
|
||||
console.log('查看记录:', row);
|
||||
state.viewData = row;
|
||||
state.viewDialog.visible = true;
|
||||
state.viewDialog.title = '出国记录详情';
|
||||
|
||||
// 加载该记录的变更历史
|
||||
await loadChangeHistory(row.recordId);
|
||||
};
|
||||
|
||||
// 加载变更历史记录
|
||||
const loadChangeHistory = async (recordId: number) => {
|
||||
if (!recordId) {
|
||||
console.warn('recordId为空,无法加载变更历史');
|
||||
state.changeHistoryList = [];
|
||||
return;
|
||||
}
|
||||
|
||||
state.changeHistoryLoading = true;
|
||||
try {
|
||||
console.log('🔄 开始加载变更历史记录, recordId:', recordId);
|
||||
const response = await getItineraryChangeHistory(recordId);
|
||||
if (response.code === 200) {
|
||||
state.changeHistoryList = response.data || [];
|
||||
console.log('✅ 变更历史记录加载成功, 共', state.changeHistoryList.length, '条记录');
|
||||
} else {
|
||||
console.warn('⚠️ 获取变更历史失败:', response.msg);
|
||||
state.changeHistoryList = [];
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('❌ 加载变更历史记录失败:', error);
|
||||
state.changeHistoryList = [];
|
||||
} finally {
|
||||
state.changeHistoryLoading = false;
|
||||
}
|
||||
};
|
||||
|
||||
// 下载因私出国(境)情况回执PDF
|
||||
|
||||
Reference in new issue
Block a user