From 03782e3c9dcd01fd9a9018f748b82f2c3014ba55 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E6=81=92=E6=88=90?= <962704835@qq.com> Date: Mon, 16 Mar 2026 16:23:24 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=A5=E4=BC=8D=E4=BF=9D=E7=95=99=E5=AD=A6?= =?UTF-8?q?=E7=B1=8D=E4=BF=AE=E6=94=B9=E8=BF=99=E5=AD=A6=E6=9C=9F=E7=9A=84?= =?UTF-8?q?=E6=97=B6=E9=97=B4=E9=83=BD=E7=BB=9F=E4=B8=80=E4=B8=BA=EF=BC=9A?= =?UTF-8?q?2026-3-1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../enlistmentReserve/applicationForm.vue | 177 ++++++++++-------- 1 file changed, 103 insertions(+), 74 deletions(-) diff --git a/src/views/routine/enlistmentReserve/applicationForm.vue b/src/views/routine/enlistmentReserve/applicationForm.vue index 0c35134..f10f72c 100644 --- a/src/views/routine/enlistmentReserve/applicationForm.vue +++ b/src/views/routine/enlistmentReserve/applicationForm.vue @@ -84,15 +84,15 @@ 驳回
-
签名:
-
- - -
+ style="display: flex;justify-content: center;align-items: center;min-width: 130px;text-align: left;"> +
签名:
+
+ +
+
日期: {{ item.approvalTime }}
@@ -109,49 +109,49 @@ -
- - -

{{ item.taskName }}

- - - - - {{ item.assigneeName }} - {{ item.deptName }} - - - - {{ item.candidate }} - - - - {{ item.createTime }} - - - - {{ item.finishTime }} - - - - {{ item.duration }} - - - - {{ item.comment.comment }} - - - - -
-
-
+ + + + + @@ -249,15 +249,17 @@ class="opinion-textarea"> -->

本人应征入伍,申请保留学籍从 - + + {{ formData.reserveStartDate }} 日至退役后两年({{ formData.reserveEndDate }})。

请上传:入伍通知书等佐证材料. - +

@@ -437,11 +439,11 @@ export default { previewTitle: '', // 打印预览的标题(开启预览模式后出现), previewPrintBtnLabel: '', // 打印预览的标题的下方按钮文本,点击可进入打印(开启预览模式后出现) zIndex: '', // 预览的窗口的z-index,默认是 20002(此值要高一些,这涉及到预览模式是否显示在最上面) - previewBeforeOpenCallback() {}, //预览窗口打开之前的callback(开启预览模式调用) - previewOpenCallback() {}, // 预览窗口打开之后的callback(开启预览模式调用) - beforeOpenCallback() {}, // 开启打印前的回调事件 - openCallback() {}, // 调用打印之后的回调事件 - closeCallback() {}, //关闭打印的回调事件(无法确定点击的是确认还是取消) + previewBeforeOpenCallback() { }, //预览窗口打开之前的callback(开启预览模式调用) + previewOpenCallback() { }, // 预览窗口打开之后的callback(开启预览模式调用) + beforeOpenCallback() { }, // 开启打印前的回调事件 + openCallback() { }, // 调用打印之后的回调事件 + closeCallback() { }, //关闭打印的回调事件(无法确定点击的是确认还是取消) url: '', standard: '', extraCss: '', @@ -513,7 +515,7 @@ export default { if (newId) { this.deployId = newId // 获取流程记录 - this.getFlowRecordList() + this.getFlowRecordList() } else { this.deployId = null this.loading = false @@ -523,28 +525,55 @@ export default { }, mounted() { // this.getUser() + this.setSemesterStartDate(); }, methods: { + // 根据学期规则生成起始日期并赋值 + setSemesterStartDate() { + // 方式1:手动指定学期(推荐,可直接改'spring'/'autumn'切换) + // const targetSemester = 'spring'; // spring=春季,autumn=秋季 + + // 方式2:自动根据当前月份判断学期(可选,注释掉方式1可启用) + const currentMonth = new Date().getMonth() + 1; + const targetSemester = currentMonth <= 6 ? 'spring' : 'autumn'; + + // 获取当前年份,计算+2年(如2024→2026) + const currentYear = new Date().getFullYear(); + const semesterYear = currentYear; // 固定为当前年份如2026 + + // 根据学期赋值起始日期 + if (targetSemester === 'spring') { + // 春季学期:YYYY-03-01(如2026-03-01) + this.formData.reserveStartDate = `${semesterYear}-03-01`; + } else { + // 秋季学期:YYYY-09-01(如2026-09-01) + this.formData.reserveStartDate = `${semesterYear}-09-01`; + } + }, + // 获取当前登录信息 getUser() { getUserProfile().then(response => { this.user = response.data this.roleGroup = response.roleGroup; // this.postGroup = response.postGroup; - if (this.user) { - this.formData.studentName = this.user.nickName - this.formData.gender = this.user.sex - getOwnInfo().then(res => { - if (res.data) { - this.formData.studentId = res.data.stuId - this.formData.studentNo = res.data.stuNo - this.formData.major = res.data.majorName - this.formData.className = res.data.className - this.formData.grade = res.data.gradeName - this.formData.teacherName = res.data.teacherName - } - }) + if (this.roleGroup.includes("学生")) { + if (this.user) { + this.formData.studentName = this.user.nickName + this.formData.gender = this.user.sex + getOwnInfo().then(res => { + if (res.data) { + this.formData.studentId = res.data.stuId + this.formData.studentNo = res.data.stuNo + this.formData.major = res.data.majorName + this.formData.className = res.data.className + this.formData.grade = res.data.gradeName + this.formData.teacherName = res.data.teacherName + } + }) + } } + }) }, setIcon(val) { @@ -695,12 +724,12 @@ export default { }, // 处理子组件传递的删除文件事件 handleDeleteFile(fileName) { - // 接收文件名后,可执行后续逻辑,删除在数据库的数据 - if (fileName) { - deleteRtEnlistmentReserveAttachByFileNameAndStuName({fileName:fileName, studentName: this.formData.studentName}).then(res => { - this.$message.success(`成功删除文件:${fileName}`); - }) - } + // 接收文件名后,可执行后续逻辑,删除在数据库的数据 + if (fileName) { + deleteRtEnlistmentReserveAttachByFileNameAndStuName({ fileName: fileName, studentName: this.formData.studentName }).then(res => { + this.$message.success(`成功删除文件:${fileName}`); + }) + } } } };