入伍保留学籍-申请表详细
This commit is contained in:
@@ -26,6 +26,15 @@ export function addOutsideAccommodationAttachment(data) {
|
||||
})
|
||||
}
|
||||
|
||||
// 批量外宿申请附件
|
||||
export function batchAddOutsideAccommodationAttachment(data) {
|
||||
return request({
|
||||
url: '/dormitory/outsideAccommodationAttachment/batchAdd',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改外宿申请附件
|
||||
export function updateOutsideAccommodationAttachment(data) {
|
||||
return request({
|
||||
|
||||
@@ -85,10 +85,15 @@
|
||||
<!-- 宿费交纳情况 -->
|
||||
<el-descriptions-item label="宿费交纳情况" required>
|
||||
<el-form-item prop="accommodationFeeStatus" class="no-label-form-item">
|
||||
<div style="display: flex;">
|
||||
<!-- <div>
|
||||
<el-radio-group v-model="form.accommodationFeeStatus">
|
||||
<el-radio :label="1" disabled>已交当前学年住宿费</el-radio>
|
||||
<el-radio :label="0" disabled>未交当前学年住宿费</el-radio>
|
||||
</el-radio-group>
|
||||
</div> -->
|
||||
<div>{{ form.accommodationFee }}</div>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
@@ -227,15 +232,16 @@
|
||||
<el-card shadow="hover" style="margin-bottom: 20px">
|
||||
<el-descriptions title="本人承诺" :column="1" border label-width="120px">
|
||||
<el-descriptions-item label="承诺内容">
|
||||
<el-card shadow="none" class="promise-card">
|
||||
<el-card shadow="none" class="promise-card" v-if="form.promiseContent == ''">
|
||||
<p>1. 自觉遵守国家法律、法规;</p>
|
||||
<p>2. 自觉遵守学生行为规范和学校的规章制度,遵守社会公德;</p>
|
||||
<p>3. 自觉遵守外宿住址所在社区的有关管理规定;</p>
|
||||
<p>
|
||||
4.
|
||||
本人申请外宿,属个人自愿行为,外宿期间发生的一切事故,造成本人、他人或集体的人身、财产损害的,学校不负责任。
|
||||
4. 本人申请外宿,属个人自愿行为,外宿期间发生的一切事故,造成本人、他人或集体的人身、财产损害的,学校不负责任。
|
||||
</p>
|
||||
</el-card>
|
||||
<el-card shadow="none" class="promise-card" v-else v-html="form.promiseContent">
|
||||
</el-card>
|
||||
</el-descriptions-item>
|
||||
|
||||
<!-- 承诺签名 -->
|
||||
@@ -324,7 +330,9 @@ import {
|
||||
updateOutsideAccommodationApply,
|
||||
addOutsideAccommodationApply
|
||||
} from '@/api/dormitory/outsideAccommodation/outsideAccommodationApply'
|
||||
import { batchAddOutsideAccommodationAttachment } from "@/api/dormitory/outsideAccommodation/outsideAccommodationAttachment";
|
||||
import { getUserProfile } from '@/api/system/user' // 获取当前登录用户
|
||||
import { getOwnLog } from '@/api/dormitory/new/stuDom'
|
||||
import {
|
||||
pcaTextArr // 省市区联动数据,纯汉字
|
||||
} from 'element-china-area-data'
|
||||
@@ -360,7 +368,9 @@ export default {
|
||||
studentSignature: '',
|
||||
studentPromiseSign: '',
|
||||
promiseDate: '',
|
||||
parentSignAttachment: ''
|
||||
parentSignAttachment: '',
|
||||
promiseContent: '',
|
||||
accommodationFee: ''
|
||||
},
|
||||
formRules: {
|
||||
originalDormitory: [{ required: true, message: '原宿舍号不能为空', trigger: 'blur' }],
|
||||
@@ -448,7 +458,6 @@ export default {
|
||||
address: res.data.address ? res.data.address.split('/') : [],
|
||||
parentAddress: res.data.parentAddress ? res.data.parentAddress.split('/') : []
|
||||
};
|
||||
this.reasonFileList = this.form.affixId
|
||||
const fileName = this.form.parentSignAttachment.split('/').pop()
|
||||
// 回显家长签字附件
|
||||
this.fileList = [{ name: fileName, url: this.baseUrl + this.form.parentSignAttachment }]
|
||||
@@ -478,6 +487,7 @@ export default {
|
||||
} else {
|
||||
// 若 id 为空,可做清空处理
|
||||
this.currentId = null;
|
||||
this.resetForm()
|
||||
this.getUser()
|
||||
}
|
||||
}
|
||||
@@ -510,7 +520,41 @@ export default {
|
||||
this.form.teacherName = res.data.teacherName
|
||||
this.form.studentPhone = res.data.stuPhone
|
||||
this.form.birthDate = res.data.birthday
|
||||
this.form.accommodationFee = "wu"
|
||||
// 获取学生宿舍缴费记录
|
||||
getOwnLog().then(response => {
|
||||
// 1. 提取当前学生的宿舍ID
|
||||
const currentDormId = response.data.dormStu.dormitoryId
|
||||
// 2. 从record中找到roomId匹配的第一条数据(提取基准学年)
|
||||
const matchedRecord = response.data.record.find(item => item.roomId === currentDormId)
|
||||
// 3. 核心逻辑:判断全量record是否同年度 + 汇总费用
|
||||
if (matchedRecord) {
|
||||
// 提取匹配记录的基准学年
|
||||
const baseStuYearName = matchedRecord.stuYearName || ''
|
||||
if (baseStuYearName) {
|
||||
// 检查整个record数组中所有数据的学年是否和基准学年一致
|
||||
const isAllSameYear = response.data.record.every(item => {
|
||||
return (item.stuYearName || '') === baseStuYearName
|
||||
})
|
||||
if (isAllSameYear) {
|
||||
// 所有记录同年度,汇总全部费用
|
||||
const totalMoney = response.data.record.reduce((sum, item) => {
|
||||
return sum + Number(item.needMoney || 0) // 确保金额为数字,避免NaN
|
||||
}, 0)
|
||||
this.form.accommodationFee = `已交${baseStuYearName}年度住宿费${totalMoney || 0}人民币`
|
||||
} else {
|
||||
// 存在不同年度的记录,仅展示基准年度+提示
|
||||
this.form.accommodationFee = `已交${baseStuYearName}年度住宿费 存在不同年度费用数据,暂无法汇总`
|
||||
}
|
||||
} else {
|
||||
// 匹配记录无学年名称
|
||||
this.form.accommodationFee = `已交未知年度住宿费 暂无有效学年信息`
|
||||
}
|
||||
} else {
|
||||
// 无匹配roomId的记录,兜底处理
|
||||
const firstStuYearName = response.data.record[0]?.stuYearName || ''
|
||||
this.form.accommodationFee = `已交${firstStuYearName || '未知'}年度住宿费 暂无匹配宿舍费用数据`
|
||||
}
|
||||
})
|
||||
this.getStuDom()
|
||||
}
|
||||
this.loading = false
|
||||
@@ -524,9 +568,9 @@ export default {
|
||||
(response) => {
|
||||
this.form.originalDormitory =
|
||||
response.rows[0].campusName +
|
||||
'-' +
|
||||
' ' +
|
||||
response.rows[0].parkName +
|
||||
'-' +
|
||||
' ' +
|
||||
response.rows[0].buildingName +
|
||||
response.rows[0].roomNo
|
||||
this.loading = false
|
||||
@@ -692,13 +736,10 @@ export default {
|
||||
this.form.endDate = this.getOutsideDefaultEndTime()
|
||||
// 生成本人承诺内容
|
||||
this.form.promiseContent = `
|
||||
1. 自觉遵守国家法律、法规;
|
||||
|
||||
2. 自觉遵守学生行为规范和学校的规章制度,遵守社会公德;
|
||||
|
||||
3. 自觉遵守外宿住址所在社区的有关管理规定;
|
||||
|
||||
4. 本人申请外宿,属个人自愿行为,外宿期间发生的一切事故,造成本人、他人或集体的人身、财产损害的,学校不负责任。
|
||||
<p>1.自觉遵守国家法律、法规;</p>
|
||||
<p>2.自觉遵守学生行为规范和学校的规章制度,遵守社会公德;</p>
|
||||
<p>3.自觉遵守外宿住址所在社区的有关管理规定;</p>
|
||||
<p>4.本人申请外宿,属个人自愿行为,外宿期间发生的一切事故,造成本人、他人或集体的人身、财产损害的,学校不负责任。</p>
|
||||
`
|
||||
// 将地址数组转为字符串(用 / 拼接,后端可按此分隔解析)
|
||||
const submitForm = {
|
||||
@@ -711,6 +752,11 @@ export default {
|
||||
this.loading = true;
|
||||
if (this.form.id != null) {
|
||||
updateOutsideAccommodationApply(submitForm).then((response) => {
|
||||
// 批量新增材料附件
|
||||
if (this.reasonFileList && this.reasonFileList.length > 0) {
|
||||
batchAddOutsideAccommodationAttachment(this.reasonFileList)
|
||||
this.resetForm()
|
||||
}
|
||||
this.loading = false;
|
||||
this.$modal.msgSuccess('修改成功')
|
||||
this.goBack()
|
||||
@@ -720,6 +766,15 @@ export default {
|
||||
})
|
||||
} else {
|
||||
addOutsideAccommodationApply(submitForm).then((response) => {
|
||||
// 填写附件里面的申请编号
|
||||
this.reasonFileList.forEach(element => {
|
||||
element.applyId = response.data.id
|
||||
})
|
||||
// 批量新增材料附件
|
||||
if (this.reasonFileList && this.reasonFileList.length > 0) {
|
||||
batchAddOutsideAccommodationAttachment(this.reasonFileList)
|
||||
this.resetForm()
|
||||
}
|
||||
this.loading = false;
|
||||
this.$modal.msgSuccess('新增成功')
|
||||
this.goBack()
|
||||
@@ -728,7 +783,6 @@ export default {
|
||||
this.goBack()
|
||||
})
|
||||
}
|
||||
this.resetForm()
|
||||
} else {
|
||||
this.loading = false;
|
||||
this.$message.error('表单填写有误,请检查!')
|
||||
@@ -740,6 +794,8 @@ export default {
|
||||
resetForm() {
|
||||
this.$refs.formRef.resetFields()
|
||||
this.reasonFileList = []
|
||||
this.fileList = []
|
||||
this.form.affixId = ""
|
||||
this.form.studentSignature = ''
|
||||
this.form.studentPromiseSign = ''
|
||||
this.clearStudentCanvas()
|
||||
@@ -775,7 +831,6 @@ export default {
|
||||
} else {
|
||||
this.$message.warning('该文件已添加,请勿重复上传')
|
||||
}
|
||||
console.log(this.reasonFileList)
|
||||
},
|
||||
// 处理子组件传递的删除文件事件
|
||||
handleDeleteFile(fileName) {
|
||||
|
||||
@@ -1,6 +1,16 @@
|
||||
<!-- 详细外宿申请表 -->
|
||||
<template>
|
||||
<div v-loading="loading">
|
||||
<div class="application-form-container" v-loading="loading">
|
||||
<el-card class="box-card">
|
||||
<div slot="header" class="clearfix">
|
||||
<span class="el-icon-document">外宿申请详情</span>
|
||||
<el-button style="float: right;margin-left: 10px;" size="mini" type="danger" @click="goBack">关闭</el-button>
|
||||
<el-button v-print="printobj" style="float: right" size="mini" type="success">打印</el-button>
|
||||
</div>
|
||||
<div id="outsideAccommodationApply" class="el-container">
|
||||
<div class="table-container" style="width: 100%;">
|
||||
<h2 style="text-align: center">广西水利电力职业技术学院外宿申请表</h2>
|
||||
<div class="block">
|
||||
<!-- 详细入伍保留学籍表单 -->
|
||||
<el-descriptions class="margin-top" title="" :column="4" size="medium" border style="width: 100%">
|
||||
<el-descriptions-item>
|
||||
@@ -56,20 +66,21 @@
|
||||
|
||||
<el-descriptions-item span="4">
|
||||
<template slot="label"> 申请原因 </template>
|
||||
<div style="padding-top: 10px;">
|
||||
<div>
|
||||
{{ renderData.applyReason }}
|
||||
</div>
|
||||
<div style="padding: 20px;">
|
||||
<div style="padding: 0 20px;">
|
||||
<div style="display: flex;justify-content: flex-end;align-items: center;">
|
||||
<div style="display: flex;justify-content: flex-end;align-items: center;">
|
||||
<div style="padding: 0 10px;display: flex;justify-content: flex-end;align-items: center;">
|
||||
<div>申请人: </div>
|
||||
<div>
|
||||
<el-image style="width: 100px; height: 50px; margin-left: 10px; border: 1px solid #eee"
|
||||
:src="baseUrl + renderData.studentSignature" :preview-src-list="[baseUrl + renderData.studentSignature]">
|
||||
:src="baseUrl + renderData.studentSignature"
|
||||
:preview-src-list="[baseUrl + renderData.studentSignature]">
|
||||
</el-image>
|
||||
</div>
|
||||
</div>
|
||||
<div style="padding: 0 10px;">日期: {{ renderData.createTime }}</div>
|
||||
<div style="margin-left: 10px;">日期: {{ renderData.createTime }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-descriptions-item>
|
||||
@@ -102,45 +113,75 @@
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item span="4">
|
||||
<template slot="label"> 家长意见 </template>
|
||||
<div style="padding-top: 10px;">
|
||||
<div>
|
||||
<el-image style="width: 200px; height: 150px; margin-left: 10px; border: 1px solid #eee"
|
||||
:src="baseUrl + renderData.parentSignAttachment" :preview-src-list="[baseUrl + renderData.parentSignAttachment]">
|
||||
:src="baseUrl + renderData.parentSignAttachment"
|
||||
:preview-src-list="[baseUrl + renderData.parentSignAttachment]">
|
||||
</el-image>
|
||||
</div>
|
||||
<div style="padding: 20px;">
|
||||
<div style="padding: 0 20px;">
|
||||
<div style="display: flex;justify-content: flex-end;align-items: center;">
|
||||
<div style="display: flex;justify-content: flex-end;align-items: center;">
|
||||
<div style="padding: 0 10px;display: flex;justify-content: flex-end;align-items: center;">
|
||||
<div>申请人: </div>
|
||||
<div>
|
||||
<el-image style="width: 100px; height: 50px; margin-left: 10px; border: 1px solid #eee"
|
||||
:src="baseUrl + renderData.parentSignAttachment" :preview-src-list="[baseUrl + renderData.parentSignAttachment]">
|
||||
:src="baseUrl + renderData.parentSignAttachment"
|
||||
:preview-src-list="[baseUrl + renderData.parentSignAttachment]">
|
||||
</el-image>
|
||||
</div>
|
||||
</div>
|
||||
<div style="padding: 0 10px;">日期: {{ renderData.createTime }}</div>
|
||||
<div style="margin-left: 10px;">日期: {{ renderData.createTime }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item span="4">
|
||||
<el-descriptions-item span="4" class="parent parent-contact-item">
|
||||
<template slot="label"> 家长联系方式 </template>
|
||||
<div>
|
||||
<div style="display: flex;align-items: center;">
|
||||
<div>通讯地址</div>
|
||||
<div style="margin: -10px;">
|
||||
<div style="display: flex;align-items: center;border-bottom: 1px solid #e6ebf5;">
|
||||
<div class="parentLabel">通讯地址</div>
|
||||
<div>{{ renderData.parentAddress + renderData.parentDetailAddress }}</div>
|
||||
</div>
|
||||
<div style="display: flex;align-items: center;">
|
||||
<div>联系电话</div>
|
||||
<div class="parentLabel">
|
||||
联系电话</div>
|
||||
<div>{{ renderData.parentPhone }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item span="4">
|
||||
<template slot="label"> 本人承诺 </template>
|
||||
<div v-html="renderData.promiseContent">
|
||||
<!-- {{ renderData.promiseContent }} -->
|
||||
</div>
|
||||
<div style="padding: 0 20px;">
|
||||
<div style="display: flex;justify-content: flex-end;align-items: center;">
|
||||
<div style="display: flex;justify-content: flex-end;align-items: center;">
|
||||
<div>申请人: </div>
|
||||
<div>
|
||||
<el-image style="width: 100px; height: 50px; margin-left: 10px; border: 1px solid #eee"
|
||||
:src="baseUrl + renderData.studentPromiseSign"
|
||||
:preview-src-list="[baseUrl + renderData.studentPromiseSign]">
|
||||
</el-image>
|
||||
</div>
|
||||
</div>
|
||||
<div style="margin-left: 10px;">日期: {{ renderData.createTime }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item span="4">
|
||||
<template slot="label"> 辅导员意见 </template>
|
||||
{{ renderData.reserveNo }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item span="4">
|
||||
<template slot="label"> 保留学籍时间和编号 </template>
|
||||
{{ renderData.reserveNo }}
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
@@ -162,6 +203,24 @@ export default {
|
||||
// formData: {} // 注释/删除这一行
|
||||
detailData: {}, // 用独立变量存储接口返回的详情数据
|
||||
baseUrl: process.env.VUE_APP_BASE_API,
|
||||
//打印
|
||||
printobj: {
|
||||
id: 'outsideAccommodationApply',
|
||||
popTitle: '打印', // 打印配置页上方标题
|
||||
extraHead: '', //最上方的头部文字,附加在head标签上的额外标签,使用逗号分隔
|
||||
preview: '', // 是否启动预览模式,默认是false(开启预览模式,可以先预览后打印)
|
||||
previewTitle: '', // 打印预览的标题(开启预览模式后出现),
|
||||
previewPrintBtnLabel: '', // 打印预览的标题的下方按钮文本,点击可进入打印(开启预览模式后出现)
|
||||
zIndex: '', // 预览的窗口的z-index,默认是 20002(此值要高一些,这涉及到预览模式是否显示在最上面)
|
||||
previewBeforeOpenCallback() { }, //预览窗口打开之前的callback(开启预览模式调用)
|
||||
previewOpenCallback() { }, // 预览窗口打开之后的callback(开启预览模式调用)
|
||||
beforeOpenCallback() { }, // 开启打印前的回调事件
|
||||
openCallback() { }, // 调用打印之后的回调事件
|
||||
closeCallback() { }, //关闭打印的回调事件(无法确定点击的是确认还是取消)
|
||||
url: '',
|
||||
standard: '',
|
||||
extraCss: '',
|
||||
},
|
||||
}
|
||||
},
|
||||
// 计算属性判断优先级
|
||||
@@ -204,7 +263,16 @@ export default {
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {},
|
||||
methods: {
|
||||
goBack() {
|
||||
// 关闭当前标签页并返回上个页面
|
||||
// const obj = { path: 'disciplinaryApplication', query: { t: Date.now() } }
|
||||
// this.$tab.closeOpenPage(obj)
|
||||
this.$router.back()
|
||||
// 关闭窗体 index 当前层索引
|
||||
this.$tab.closePage()
|
||||
},
|
||||
},
|
||||
created() { },
|
||||
mounted() { },
|
||||
destroyed() { }
|
||||
@@ -212,4 +280,26 @@ export default {
|
||||
</script>
|
||||
<style scoped>
|
||||
/* @import url(); 引入css类 */
|
||||
.application-form-container {
|
||||
width: 70%;
|
||||
margin: auto;
|
||||
padding: 30px;
|
||||
box-sizing: border-box;
|
||||
font-family: "Source Han Sans CN", "PingFang SC", "Microsoft YaHei", sans-serif;
|
||||
}
|
||||
|
||||
::v-deep .el-descriptions-item__label {
|
||||
text-align: center !important;
|
||||
width: 100px;
|
||||
}
|
||||
|
||||
.parentLabel {
|
||||
margin-right: 10px;
|
||||
border-right: 1px solid #e6ebf5;
|
||||
background: #fafafa;
|
||||
padding: 10px;
|
||||
width: 100px;
|
||||
text-align: center;
|
||||
color: #909399;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user