From 190b7fae8c6049bb6e71250dd64b79f8f9b15688 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E6=81=92=E6=88=90?= <962704835@qq.com> Date: Tue, 9 Dec 2025 12:27:31 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=96=E5=AE=BF=E7=94=B3=E8=AF=B7-=E8=A1=A8?= =?UTF-8?q?=E5=8D=95=E8=AF=A6=E7=BB=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../applicationForm.vue | 50 +++- .../components/detailApply.vue | 215 ++++++++++++++++++ .../outsideAccommodationApply/index.vue | 12 +- .../outsideAccommodationApproval/index.vue | 19 +- src/views/flowable/task/todo/detail/index.vue | 1 + 5 files changed, 282 insertions(+), 15 deletions(-) create mode 100644 src/views/dormitory/outsideAccommodation/outsideAccommodationApply/components/detailApply.vue diff --git a/src/views/dormitory/outsideAccommodation/outsideAccommodationApply/applicationForm.vue b/src/views/dormitory/outsideAccommodation/outsideAccommodationApply/applicationForm.vue index 8c5d29e..739b88b 100644 --- a/src/views/dormitory/outsideAccommodation/outsideAccommodationApply/applicationForm.vue +++ b/src/views/dormitory/outsideAccommodation/outsideAccommodationApply/applicationForm.vue @@ -178,8 +178,8 @@ - 同意外宿 - 不同意外宿 + 同意外宿 + 不同意外宿 @@ -353,7 +353,7 @@ export default { outsideAddress: '', emergencyContact: '', emergencyPhone: '', - parentOpinion: '1', + parentOpinion: 1, parentPhone: '', parentAddress: '', parentDetailAddress: '', @@ -682,11 +682,24 @@ export default { submitForm(status) { this.$refs.formRef.validate((valid) => { if (valid) { + // 生成申请编号 if (!this.form.applyNo) { const year = new Date().getFullYear(); const randomNo = Math.floor(Math.random() * 1000000).toString().padStart(6, '0'); this.form.applyNo = `WS${year}${randomNo}`; // 获取申请编号 } + // 生成外宿结束时间(默认次年8月31日) + this.form.endDate = this.getOutsideDefaultEndTime() + // 生成本人承诺内容 + this.form.promiseContent = ` + 1. 自觉遵守国家法律、法规; + + 2. 自觉遵守学生行为规范和学校的规章制度,遵守社会公德; + + 3. 自觉遵守外宿住址所在社区的有关管理规定; + + 4. 本人申请外宿,属个人自愿行为,外宿期间发生的一切事故,造成本人、他人或集体的人身、财产损害的,学校不负责任。 + ` // 将地址数组转为字符串(用 / 拼接,后端可按此分隔解析) const submitForm = { ...this.form, @@ -701,7 +714,7 @@ export default { this.loading = false; this.$modal.msgSuccess('修改成功') this.goBack() - }).catch(error => { + }).catch(error => { this.loading = false; this.goBack() }) @@ -710,7 +723,7 @@ export default { this.loading = false; this.$modal.msgSuccess('新增成功') this.goBack() - }).catch(error => { + }).catch(error => { this.loading = false; this.goBack() }) @@ -919,6 +932,32 @@ export default { this.$message.error('上传头像图片大小不能超过 2MB!'); } return isJPG && isLt2M; + }, + /** + * 生成外宿默认结束时间(次年8月31日) + * @returns {String} 格式化日期(yyyy-MM-dd) + */ + getOutsideDefaultEndTime() { + const now = new Date(); + const currentYear = now.getFullYear(); + // 计算次年(当前年+1) + const nextYear = currentYear + 1; + // 生成次年8月31日(月份从0开始,8月对应9) + const endDate = new Date(nextYear, 8, 31); + // 格式化为 yyyy-MM-dd(适配 el-date-picker 的 value-format) + return this.formatDate(endDate); + }, + + /** + * 日期格式化工具(补零+拼接) + * @param {Date} date 日期对象 + * @returns {String} yyyy-MM-dd + */ + formatDate(date) { + const year = date.getFullYear(); + const month = String(date.getMonth() + 1).padStart(2, '0'); // 月份补零 + const day = String(date.getDate()).padStart(2, '0'); // 日期补零 + return `${year}-${month}-${day}`; } } } @@ -1069,5 +1108,4 @@ li { text-align: center !important; width: 120px; } - \ No newline at end of file diff --git a/src/views/dormitory/outsideAccommodation/outsideAccommodationApply/components/detailApply.vue b/src/views/dormitory/outsideAccommodation/outsideAccommodationApply/components/detailApply.vue new file mode 100644 index 0000000..af0bd83 --- /dev/null +++ b/src/views/dormitory/outsideAccommodation/outsideAccommodationApply/components/detailApply.vue @@ -0,0 +1,215 @@ + + + + + + + 原宿舍号 + {{ renderData.originalDormitory }} + + + 姓名 + {{ renderData.studentName }} + + + 性别 + 男 + 女 + + + 出生年月 + {{ renderData.birthDate }} + + + 专业系 + {{ renderData.majorName }} + + + 班级 + {{ renderData.className }} + + + 学号 + {{ renderData.studentNo }} + + + 宿费交纳情况(只填写当年度交费情况) + + 已交 绑定当前学年年度住宿费 人民币 + + + + 身份证号码 + {{ renderData.idCard }} + + + + 学生联系电话 + {{ renderData.studentPhone }} + + + + + 附件材料 + + + + + 申请原因 + + {{ renderData.applyReason }} + + + + + 申请人: + + + + + + 日期: {{ renderData.createTime }} + + + + + + + + 外宿详细地址(具体到门牌号) + {{ renderData.address + renderData.outsideAddress }} + + + 外宿居所紧急联系人电话 + {{ renderData.emergencyPhone }} + + + 家长意见 + + + + + + + + 申请人: + + + + + + 日期: {{ renderData.createTime }} + + + + + 家长联系方式 + + + 通讯地址 + {{ renderData.parentAddress + renderData.parentDetailAddress }} + + + 联系电话 + {{ renderData.parentPhone }} + + + + + + 保留学籍时间和编号 + {{ renderData.reserveNo }} + + + + + + + diff --git a/src/views/dormitory/outsideAccommodation/outsideAccommodationApply/index.vue b/src/views/dormitory/outsideAccommodation/outsideAccommodationApply/index.vue index 46ef840..219535e 100644 --- a/src/views/dormitory/outsideAccommodation/outsideAccommodationApply/index.vue +++ b/src/views/dormitory/outsideAccommodation/outsideAccommodationApply/index.vue @@ -142,9 +142,11 @@ 修改 + v-hasPermi="['dormitory:outsideAccommodationApply:edit']" v-if="scope.row.status == 0 || scope.row.status == 6">修改 删除 + v-hasPermi="['dormitory:outsideAccommodationApply:remove']" v-if="scope.row.status == 0">删除 + 详情 @@ -610,6 +612,12 @@ export default { // 跳转申请表 openForm() { this.$router.push("/dormitory/outsideAccommodation/applicationForm"); + }, + detail(row) { + this.$router.push({ + path: "/dormitory/outsideAccommodation/detailApply", + query: { id: row.id } // 将 row.id 放在 query 中 + }); } } }; diff --git a/src/views/dormitory/outsideAccommodation/outsideAccommodationApproval/index.vue b/src/views/dormitory/outsideAccommodation/outsideAccommodationApproval/index.vue index 5265b1e..9353ab0 100644 --- a/src/views/dormitory/outsideAccommodation/outsideAccommodationApproval/index.vue +++ b/src/views/dormitory/outsideAccommodation/outsideAccommodationApproval/index.vue @@ -4,11 +4,11 @@ - + + @@ -57,12 +57,17 @@ - + - + - - + + + 通过 + 驳回 + + + {{ parseTime(scope.row.approvalTime, '{y}-{m}-{d}') }} diff --git a/src/views/flowable/task/todo/detail/index.vue b/src/views/flowable/task/todo/detail/index.vue index 46e27fe..503a486 100644 --- a/src/views/flowable/task/todo/detail/index.vue +++ b/src/views/flowable/task/todo/detail/index.vue @@ -1105,6 +1105,7 @@ export default { if (this.taskName == '教务处主管领导审批') { // (最后一个领导审核完成之后,修改学生学籍状态, status:07是入伍保留学籍) updateStudent({stuId: this.form.studentId, status: '07'}).then(response => {}) } + this.$modal.msgSuccess(response.msg) } else { this.$modal.msgSuccess(response.msg) }