入伍保留学籍申请、外宿申请移动端审批(退回和驳回)流程完成
This commit is contained in:
@@ -3,10 +3,10 @@
|
||||
<!-- 基础信息区域 -->
|
||||
<view class="form-section">
|
||||
<view class="card-header">
|
||||
<uni-icons type="contact" size="41" color="#409EFF"></uni-icons>
|
||||
<uni-icons type="contact" size="30" color="#409EFF"></uni-icons>
|
||||
<text class="section-title">基础信息</text>
|
||||
</view>
|
||||
|
||||
|
||||
<!--学号 -->
|
||||
<view class="form-item">
|
||||
<text class="label">学号:</text>
|
||||
@@ -88,7 +88,12 @@
|
||||
<!--申请状态 -->
|
||||
<view class="form-item">
|
||||
<text class="label">申请状态:</text>
|
||||
<view class="uni-input status-tag" :class="getStatusClass(form.applyStatus)" style="text-align: center;">
|
||||
<view class="uni-input status-tag status-reject" style="text-align: center;"
|
||||
v-if="getRejectInfo(form.enlistmentReserveApprovalList).isReject">
|
||||
{{ getRejectInfo(form.enlistmentReserveApprovalList).rejectText }}
|
||||
</view>
|
||||
<view v-else class="uni-input status-tag" :class="getStatusClass(form.applyStatus)"
|
||||
style="text-align: center;">
|
||||
{{ getStatusText(form.applyStatus) }}
|
||||
</view>
|
||||
</view>
|
||||
@@ -115,13 +120,14 @@
|
||||
<!-- 附件区域 -->
|
||||
<view class="form-section" v-if="form.enlistmentReserveAttachList && form.enlistmentReserveAttachList.length">
|
||||
<view class="card-header">
|
||||
<uni-icons type="folder-add-filled" size="41" color="#409EFF"></uni-icons>
|
||||
<uni-icons type="folder-add-filled" size="30" color="#409EFF"></uni-icons>
|
||||
<text class="section-title">材料附件</text>
|
||||
</view>
|
||||
<view class="form-item form-item-auto">
|
||||
<text class="label">附件列表:</text>
|
||||
<view class="uni-input file-list">
|
||||
<view class="file-item" v-for="(file, index) in form.enlistmentReserveAttachList" :key="index" @click="previewFile(file, '附件')">
|
||||
<view class="file-item" v-for="(file, index) in form.enlistmentReserveAttachList" :key="index"
|
||||
@click="previewFile(file, '附件')">
|
||||
<uni-icons type="paper" size="24" color="#0092FF"></uni-icons>
|
||||
<text class="file-name">{{ file.fileName || '-' }}</text>
|
||||
<text class="file-size">{{ formatFileSize(file.fileSize) }}</text>
|
||||
@@ -131,13 +137,15 @@
|
||||
</view>
|
||||
|
||||
<!-- 审批记录区域 -->
|
||||
<view class="form-section" v-if="form.enlistmentReserveApprovalList && form.enlistmentReserveApprovalList.length">
|
||||
<view class="form-section"
|
||||
v-if="form.enlistmentReserveApprovalList && form.enlistmentReserveApprovalList.length">
|
||||
<view class="card-header">
|
||||
<uni-icons type="calendar-filled" size="41" color="#409EFF"></uni-icons>
|
||||
<uni-icons type="calendar-filled" size="30" color="#409EFF"></uni-icons>
|
||||
<text class="section-title">审批记录</text>
|
||||
</view>
|
||||
<view class="approval-list">
|
||||
<view class="approval-item" v-for="(approval, index) in form.enlistmentReserveApprovalList" :key="index">
|
||||
<view class="approval-item" v-for="(approval, index) in form.enlistmentReserveApprovalList"
|
||||
:key="index">
|
||||
<!-- 审批节点信息 -->
|
||||
<view class="approval-header">
|
||||
<text class="approval-node">{{ approval.nodeName || '-' }}</text>
|
||||
@@ -163,7 +171,8 @@
|
||||
<!-- 审批签名 -->
|
||||
<view class="form-item mini" v-if="approval.signature">
|
||||
<text class="label">审批签名:</text>
|
||||
<image class="signature-img" :src="baseUrl + approval.signature" mode="aspectFit" @click="previewFile(approval, '签名')"></image>
|
||||
<image class="signature-img" :src="baseUrl + approval.signature" mode="aspectFit"
|
||||
@click="previewFile(approval, '签名')"></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -238,10 +247,14 @@
|
||||
*/
|
||||
getStatusText(status) {
|
||||
const statusMap = {
|
||||
1: '待审批',
|
||||
2: '审批中',
|
||||
3: '已通过',
|
||||
4: '已驳回'
|
||||
0: '待提交',
|
||||
1: '待辅导员审批',
|
||||
2: '待学务审批',
|
||||
3: '待二级学院审批',
|
||||
4: '待学籍管理科审批',
|
||||
5: '待教务处主管领导审批',
|
||||
6: '审批通过',
|
||||
7: '不通过'
|
||||
};
|
||||
return statusMap[status] || '未知状态';
|
||||
},
|
||||
@@ -253,10 +266,14 @@
|
||||
*/
|
||||
getStatusClass(status) {
|
||||
const classMap = {
|
||||
1: 'status-pending',
|
||||
0: 'status-pending',
|
||||
1: 'status-processing',
|
||||
2: 'status-processing',
|
||||
3: 'status-success',
|
||||
4: 'status-reject'
|
||||
3: 'status-processing',
|
||||
4: 'status-processing',
|
||||
5: 'status-processing',
|
||||
6: 'status-success',
|
||||
7: 'status-reject'
|
||||
};
|
||||
return classMap[status] || 'status-default';
|
||||
},
|
||||
@@ -323,6 +340,37 @@
|
||||
current: this.baseUrl + file.signature
|
||||
});
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 获取驳回信息(是否驳回 + 驳回文字)
|
||||
* @param {Array} approvalList 审批意见列表
|
||||
* @returns {Object} { isReject: 布尔值, rejectText: 驳回文字 }
|
||||
*/
|
||||
getRejectInfo(approvalList) {
|
||||
// 空值保护:列表不存在/非数组/为空时,返回未驳回
|
||||
if (!approvalList || !Array.isArray(approvalList) || approvalList.length === 0) {
|
||||
return {
|
||||
isReject: false,
|
||||
rejectText: ''
|
||||
};
|
||||
}
|
||||
// 找到第一个审批结果为0(驳回)的记录
|
||||
const rejectItem = approvalList.find(item => item.approvalResult === 2);
|
||||
if (rejectItem) {
|
||||
// 提取审批节点名称(如「辅导员审批」→ 截取「辅导员」)
|
||||
const nodeName = rejectItem.nodeName.replace('审批', '');
|
||||
// 拼接驳回文字(如「辅导员驳回」)
|
||||
return {
|
||||
isReject: true,
|
||||
rejectText: `${nodeName}驳回`
|
||||
};
|
||||
} else {
|
||||
// 无驳回记录
|
||||
return {
|
||||
isReject: false,
|
||||
rejectText: ''
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -342,12 +390,13 @@
|
||||
padding: 20rpx;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.card-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 10rpx 0rpx;
|
||||
border-bottom: 1px solid #f5f5f5;
|
||||
|
||||
|
||||
.section-title {
|
||||
font-size: 30rpx;
|
||||
font-weight: 600;
|
||||
@@ -385,7 +434,8 @@
|
||||
/* 关键修改:移除右对齐,改为左对齐 */
|
||||
// text-align: right;
|
||||
text-align: left;
|
||||
margin-right: 10rpx; /* 减小右边距,更紧凑 */
|
||||
margin-right: 10rpx;
|
||||
/* 减小右边距,更紧凑 */
|
||||
text-wrap: nowrap;
|
||||
font-size: 28rpx;
|
||||
color: #333;
|
||||
@@ -512,7 +562,7 @@
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
// ========== 修复:将&嵌套到.approval-header内部 ==========
|
||||
// ========== 将&嵌套到.approval-header内部 ==========
|
||||
.approval-result-tag {
|
||||
padding: 6rpx 12rpx;
|
||||
border-radius: 15rpx;
|
||||
|
||||
@@ -9,7 +9,10 @@
|
||||
<text class="apply-no">申请编号:{{ form.applyNo || '-' }}</text>
|
||||
<text class="student-name">{{ form.studentName || '-' }} {{ form.studentNo || '-' }}</text>
|
||||
</view>
|
||||
<view class="status-tag" :class="getStatusClass(form.status)">
|
||||
<view class="status-tag status-reject" v-if="getRejectInfo(form.outsideAccommodationApprovals).isReject">
|
||||
{{ getRejectInfo(form.outsideAccommodationApprovals).rejectText }}
|
||||
</view>
|
||||
<view v-else class="status-tag" :class="getStatusClass(form.status)">
|
||||
{{ getStatusText(form.status) }}
|
||||
</view>
|
||||
</view>
|
||||
@@ -91,7 +94,8 @@
|
||||
<!-- 学生电子签名 -->
|
||||
<view class="form-item signature-item" v-if="form.studentSignature">
|
||||
<text class="label">学生签名:</text>
|
||||
<image class="signature-img" :src="getFullUrl(form.studentSignature)" mode="aspectFit" @click="previewImage(form.studentSignature)"></image>
|
||||
<image class="signature-img" :src="getFullUrl(form.studentSignature)" mode="aspectFit"
|
||||
@click="previewImage(form.studentSignature)"></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -128,7 +132,8 @@
|
||||
<view class="form-item">
|
||||
<text class="label">家长意见:</text>
|
||||
<text class="value">
|
||||
<view class="opinion-tag" :class="form.parentOpinion == 1 ? 'opinion-agree' : 'opinion-disagree'">
|
||||
<view class="opinion-tag"
|
||||
:class="form.parentOpinion == 1 ? 'opinion-agree' : 'opinion-disagree'">
|
||||
{{ form.parentOpinion == 1 ? '同意' : '不同意' }}
|
||||
</view>
|
||||
</text>
|
||||
@@ -145,7 +150,8 @@
|
||||
<!-- 家长签字附件 -->
|
||||
<view class="form-item signature-item" v-if="form.parentSignAttachment">
|
||||
<text class="label">家长签字:</text>
|
||||
<image class="signature-img" :src="getFullUrl(form.parentSignAttachment)" mode="aspectFit" @click="previewImage(form.parentSignAttachment)"></image>
|
||||
<image class="signature-img" :src="getFullUrl(form.parentSignAttachment)" mode="aspectFit"
|
||||
@click="previewImage(form.parentSignAttachment)"></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -169,19 +175,22 @@
|
||||
<!-- 承诺签名 -->
|
||||
<view class="form-item signature-item" v-if="form.studentPromiseSign">
|
||||
<text class="label">承诺签名:</text>
|
||||
<image class="signature-img" :src="getFullUrl(form.studentPromiseSign)" mode="aspectFit" @click="previewImage(form.studentPromiseSign)"></image>
|
||||
<image class="signature-img" :src="getFullUrl(form.studentPromiseSign)" mode="aspectFit"
|
||||
@click="previewImage(form.studentPromiseSign)"></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 附件列表 -->
|
||||
<view class="card" v-if="form.outsideAccommodationAttachments && form.outsideAccommodationAttachments.length">
|
||||
<view class="card"
|
||||
v-if="form.outsideAccommodationAttachments && form.outsideAccommodationAttachments.length">
|
||||
<view class="card-header">
|
||||
<uni-icons type="download-filled" size="24" color="#409EFF"></uni-icons>
|
||||
<text class="card-title">佐证材料</text>
|
||||
</view>
|
||||
<view class="attachment-list">
|
||||
<view class="attachment-item" v-for="(item, index) in form.outsideAccommodationAttachments" :key="index" @click="previewImage(item.attachmentUrl)">
|
||||
<view class="attachment-item" v-for="(item, index) in form.outsideAccommodationAttachments"
|
||||
:key="index" @click="previewImage(item.attachmentUrl)">
|
||||
<view class="file-icon">
|
||||
<uni-icons type="file" size="32" color="#409EFF"></uni-icons>
|
||||
</view>
|
||||
@@ -201,9 +210,12 @@
|
||||
<text class="card-title">审批记录</text>
|
||||
</view>
|
||||
<view class="approval-list">
|
||||
<view class="approval-item" v-for="(item, index) in form.outsideAccommodationApprovals" :key="index">
|
||||
<view class="approval-item" v-for="(item, index) in form.outsideAccommodationApprovals"
|
||||
:key="index">
|
||||
<view class="approval-line">
|
||||
<view class="approval-dot" :class="item.approvalResult == 1 ? 'dot-success' : item.approvalResult == 0 ? 'dot-pending' : 'dot-danger'"></view>
|
||||
<view class="approval-dot"
|
||||
:class="item.approvalResult == 1 ? 'dot-success' : item.approvalResult == 0 ? 'dot-pending' : 'dot-danger'">
|
||||
</view>
|
||||
<view class="approval-content">
|
||||
<view class="approval-header">
|
||||
<text class="approval-node">{{ item.approvalNode || '未知节点' }}</text>
|
||||
@@ -216,19 +228,22 @@
|
||||
</view>
|
||||
<view class="approval-info">
|
||||
<text class="info-key">审批结果:</text>
|
||||
<view class="approval-result-tag" :class="item.approvalResult == 1 ? 'result-approve' : item.approvalResult == 0 ? 'result-pending' : 'result-reject'">
|
||||
<view class="approval-result-tag"
|
||||
:class="item.approvalResult == 1 ? 'result-approve' : item.approvalResult == 0 ? 'result-pending' : 'result-reject'">
|
||||
{{ item.approvalResult == 1 ? '通过' : '驳回' }}
|
||||
</view>
|
||||
</view>
|
||||
<view class="approval-info" v-if="item.approvalOpinion">
|
||||
<text class="info-key">审批意见:</text>
|
||||
<text class="info-val">{{ item.approvalOpinion }}</text>
|
||||
</view>
|
||||
<!-- 审批签名 -->
|
||||
<view class="approval-info" v-if="item.signature">
|
||||
<text class="info-key">审批签名:</text>
|
||||
<!-- <image class="signature-img" :src="baseUrl + approval.signature" mode="aspectFit" @click="previewFile(approval, '签名')"></image> -->
|
||||
<image style="width: 100px; height: 50px;border: 1px solid #eee" :src="getFullUrl(item.signature)" mode="aspectFit" @click="previewImage(item.signature)"></image>
|
||||
<image style="width: 100px; height: 50px;border: 1px solid #eee"
|
||||
:src="getFullUrl(item.signature)" mode="aspectFit"
|
||||
@click="previewImage(item.signature)"></image>
|
||||
</view>
|
||||
<view class="approval-info" v-if="item.approvalOpinion">
|
||||
<text class="info-key">审批意见:</text>
|
||||
<text class="info-val">{{ item.approvalOpinion }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -238,7 +253,8 @@
|
||||
</view>
|
||||
|
||||
<!-- 空审批记录提示 -->
|
||||
<view class="card empty-card" v-if="form.outsideAccommodationApprovals && form.outsideAccommodationApprovals.length === 0">
|
||||
<view class="card empty-card"
|
||||
v-if="form.outsideAccommodationApprovals && form.outsideAccommodationApprovals.length === 0">
|
||||
<view class="card-header">
|
||||
<uni-icons type="checkbox" size="24" color="#409EFF"></uni-icons>
|
||||
<text class="card-title">审批记录</text>
|
||||
@@ -309,7 +325,7 @@
|
||||
const statusMap = {
|
||||
0: '待提交',
|
||||
1: '待辅导员审批',
|
||||
2: '待学院书记审批',
|
||||
2: '待二级学院书记审批',
|
||||
3: '待学工处审批',
|
||||
4: '待学校领导审批',
|
||||
5: '审核通过',
|
||||
@@ -365,6 +381,37 @@
|
||||
urls: [fullUrl],
|
||||
current: fullUrl
|
||||
});
|
||||
},
|
||||
/**
|
||||
* 获取驳回信息(是否驳回 + 驳回文字)
|
||||
* @param {Array} approvalList 审批意见列表
|
||||
* @returns {Object} { isReject: 布尔值, rejectText: 驳回文字 }
|
||||
*/
|
||||
getRejectInfo(approvalList) {
|
||||
// 空值保护:列表不存在/非数组/为空时,返回未驳回
|
||||
if (!approvalList || !Array.isArray(approvalList) || approvalList.length === 0) {
|
||||
return {
|
||||
isReject: false,
|
||||
rejectText: ''
|
||||
};
|
||||
}
|
||||
// 找到第一个审批结果为0(驳回)的记录
|
||||
const rejectItem = approvalList.find(item => item.approvalResult === 0);
|
||||
if (rejectItem) {
|
||||
// 提取审批节点名称(如「辅导员审批」→ 截取「辅导员」)
|
||||
const nodeName = rejectItem.approvalNode.replace('审批', '');
|
||||
// 拼接驳回文字(如「辅导员驳回」)
|
||||
return {
|
||||
isReject: true,
|
||||
rejectText: `${nodeName}驳回`
|
||||
};
|
||||
} else {
|
||||
// 无驳回记录
|
||||
return {
|
||||
isReject: false,
|
||||
rejectText: ''
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -613,8 +660,9 @@
|
||||
height: 20rpx;
|
||||
border-radius: 50%;
|
||||
background-color: #ddd;
|
||||
z-index: 2;
|
||||
// z-index: 2;
|
||||
flex-shrink: 0;
|
||||
margin-top: 10rpx;
|
||||
|
||||
&.dot-success {
|
||||
background-color: #67c23a;
|
||||
@@ -655,7 +703,7 @@
|
||||
.approval-info {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 8rpx;
|
||||
margin-bottom: 20rpx;
|
||||
font-size: 26rpx;
|
||||
|
||||
.info-key {
|
||||
@@ -675,7 +723,10 @@
|
||||
}
|
||||
|
||||
// 标签样式
|
||||
.status-tag, .fee-tag, .opinion-tag, .approval-result-tag {
|
||||
.status-tag,
|
||||
.fee-tag,
|
||||
.opinion-tag,
|
||||
.approval-result-tag {
|
||||
padding: 8rpx 16rpx;
|
||||
border-radius: 24rpx;
|
||||
font-size: 24rpx;
|
||||
|
||||
Reference in New Issue
Block a user