Compare commits

...

6 Commits

4 changed files with 327 additions and 76 deletions

View File

@@ -208,7 +208,7 @@
<td class="input-cell"> <td class="input-cell">
<el-form-item prop="studentNo" class="form-item-custom"> <el-form-item prop="studentNo" class="form-item-custom">
<el-input v-model="formData.studentNo" placeholder="请输入学号" class="basic-input" type="textarea" <el-input v-model="formData.studentNo" placeholder="请输入学号" class="basic-input" type="textarea"
:rows="3"></el-input> :rows="3" @blur="changeGet"></el-input>
</el-form-item> </el-form-item>
</td> </td>
<td class="label">班级</td> <td class="label">班级</td>
@@ -249,15 +249,17 @@
class="opinion-textarea"></el-input> class="opinion-textarea"></el-input>
</el-form-item> --> </el-form-item> -->
<p class="reason-text">本人应征入伍申请保留学籍从 <p class="reason-text">本人应征入伍申请保留学籍从
<el-form-item prop="reserveStartDate" class="form-item-custom inline-item"> <!-- <el-form-item prop="reserveStartDate" class="form-item-custom inline-item">
<el-date-picker v-model="formData.reserveStartDate" type="date" placeholder="选择日期" format="yyyy-MM-dd" <el-date-picker v-model="formData.reserveStartDate" type="date" placeholder="选择日期" format="yyyy-MM-dd"
value-format="yyyy-MM-dd" class="date-picker"></el-date-picker> value-format="yyyy-MM-dd" class="date-picker"></el-date-picker>
</el-form-item> 日至退役后两年 </el-form-item> -->
{{ formData.reserveStartDate }} 日至退役后两年{{ parseTime(formData.reserveEndDate, '{y}-{m}-{d}') }}
</p> </p>
<el-form-item prop="affixId"> <el-form-item prop="affixId">
<p class="attachment-tip"> <p class="attachment-tip">
<span style="color: red">请上传:入伍通知书等佐证材料.</span> <span style="color: red">请上传:入伍通知书等佐证材料.</span>
<Affix v-model="formData.affixId" @input="handleAffix" @fileUploaded="handleAffix" @delete-file="handleDeleteFile"/> <Affix v-model="formData.affixId" @input="handleAffix" @fileUploaded="handleAffix"
@delete-file="handleDeleteFile" />
</p> </p>
</el-form-item> </el-form-item>
@@ -350,6 +352,8 @@ import { getOwnInfo, getEnlistmentReserve, delEnlistmentReserve, addEnlistmentRe
import { batchAddEnlistmentReserveAttach, deleteRtEnlistmentReserveAttachByFileNameAndStuName } from "@/api/routine/enlistmentReserve/enlistmentReserveAttach"; import { batchAddEnlistmentReserveAttach, deleteRtEnlistmentReserveAttachByFileNameAndStuName } from "@/api/routine/enlistmentReserve/enlistmentReserveAttach";
import { getUserProfile } from '@/api/system/user' // 获取当前登录用户 import { getUserProfile } from '@/api/system/user' // 获取当前登录用户
import { flowRecord } from '@/api/flowable/finished' import { flowRecord } from '@/api/flowable/finished'
import { getStudentInfoByStuId } from '@/api/routine/stuIdReissue'
import { listStudent } from '@/api/stuCQS/basedata/student'
export default { export default {
name: 'EnlistmentReserveForm', name: 'EnlistmentReserveForm',
dicts: ['rt_nation'], dicts: ['rt_nation'],
@@ -437,11 +441,11 @@ export default {
previewTitle: '', // 打印预览的标题(开启预览模式后出现), previewTitle: '', // 打印预览的标题(开启预览模式后出现),
previewPrintBtnLabel: '', // 打印预览的标题的下方按钮文本,点击可进入打印(开启预览模式后出现) previewPrintBtnLabel: '', // 打印预览的标题的下方按钮文本,点击可进入打印(开启预览模式后出现)
zIndex: '', // 预览的窗口的z-index,默认是 20002(此值要高一些,这涉及到预览模式是否显示在最上面) zIndex: '', // 预览的窗口的z-index,默认是 20002(此值要高一些,这涉及到预览模式是否显示在最上面)
previewBeforeOpenCallback() {}, //预览窗口打开之前的callback(开启预览模式调用) previewBeforeOpenCallback() { }, //预览窗口打开之前的callback(开启预览模式调用)
previewOpenCallback() {}, // 预览窗口打开之后的callback(开启预览模式调用) previewOpenCallback() { }, // 预览窗口打开之后的callback(开启预览模式调用)
beforeOpenCallback() {}, // 开启打印前的回调事件 beforeOpenCallback() { }, // 开启打印前的回调事件
openCallback() {}, // 调用打印之后的回调事件 openCallback() { }, // 调用打印之后的回调事件
closeCallback() {}, //关闭打印的回调事件(无法确定点击的是确认还是取消) closeCallback() { }, //关闭打印的回调事件(无法确定点击的是确认还是取消)
url: '', url: '',
standard: '', standard: '',
extraCss: '', extraCss: '',
@@ -523,14 +527,60 @@ export default {
}, },
mounted() { mounted() {
// this.getUser() // this.getUser()
this.setSemesterStartDate();
}, },
methods: { methods: {
// 填写学号时自动获取其他信息
changeGet() {
getStudentInfoByStuId(this.formData.studentNo).then(response => {
if (response.data == null) {
this.$message.error('学号不存在')
return
}
if (this.roleGroup.includes("辅导员")) {
this.formData.className = response.data.className
this.formData.studentName = response.data.studentName
this.formData.grade = response.data.gradeName
this.formData.gender = response.data.gender == '男' ? '1' : '0'
listStudent({name: this.formData.studentName}).then(res => {
this.formData.major = res.rows[0].srsMajors.majorName
this.formData.studentId = res.rows[0].stuId
this.formData.teacherName = res.rows[0].cphName
this.formData.deptName = res.rows[0].deptName
})
}
})
},
// 根据学期规则生成起始日期并赋值
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() { getUser() {
getUserProfile().then(response => { getUserProfile().then(response => {
this.user = response.data this.user = response.data
this.roleGroup = response.roleGroup; this.roleGroup = response.roleGroup;
// this.postGroup = response.postGroup; // this.postGroup = response.postGroup;
if (this.roleGroup.includes("学生")) {
if (this.user) { if (this.user) {
this.formData.studentName = this.user.nickName this.formData.studentName = this.user.nickName
this.formData.gender = this.user.sex this.formData.gender = this.user.sex
@@ -542,9 +592,11 @@ export default {
this.formData.className = res.data.className this.formData.className = res.data.className
this.formData.grade = res.data.gradeName this.formData.grade = res.data.gradeName
this.formData.teacherName = res.data.teacherName this.formData.teacherName = res.data.teacherName
this.formData.deptName = res.data.deptName
} }
}) })
} }
}
}) })
}, },
setIcon(val) { setIcon(val) {
@@ -697,7 +749,7 @@ export default {
handleDeleteFile(fileName) { handleDeleteFile(fileName) {
// 接收文件名后,可执行后续逻辑,删除在数据库的数据 // 接收文件名后,可执行后续逻辑,删除在数据库的数据
if (fileName) { if (fileName) {
deleteRtEnlistmentReserveAttachByFileNameAndStuName({fileName:fileName, studentName: this.formData.studentName}).then(res => { deleteRtEnlistmentReserveAttachByFileNameAndStuName({ fileName: fileName, studentName: this.formData.studentName }).then(res => {
this.$message.success(`成功删除文件:${fileName}`); this.$message.success(`成功删除文件:${fileName}`);
}) })
} }

View File

@@ -0,0 +1,174 @@
<template>
<div>
<el-form v-show="showSearch" ref="queryForm" :model="queryParams" size="small" :inline="true" label-width="68px">
<el-form-item label="学号" prop="stuNo">
<el-input v-model="queryParams.stuNo" placeholder="请输入学号" clearable @keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item label="姓名" prop="name">
<el-input v-model="queryParams.name" placeholder="请输入姓名" clearable @keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<!-- <el-col :span="1.5">
<el-button v-hasPermi="['system:student:add']" type="primary" plain icon="el-icon-plus" size="mini"
@click="handleAdd">新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button v-hasPermi="['system:student:edit']" type="success" plain icon="el-icon-edit" size="mini"
:disabled="single" @click="handleUpdate">修改</el-button>
</el-col> -->
<el-col :span="1.5">
<el-button type="primary" plain icon="el-icon-delete" size="mini" :disabled="multiple"
@click="handleAdd">批量申请</el-button>
</el-col>
<!-- <el-col :span="1.5">
<el-button v-hasPermi="['system:stuent:import']" type="info" plain icon="el-icon-upload2" size="mini"
@click="handleImport">导入</el-button>
</el-col>
<el-col :span="1.5">
<el-button v-hasPermi="['system:student:export']" type="warning" plain icon="el-icon-download" size="mini"
@click="handleExport">导出</el-button>
</el-col>
<el-col :span="1.5">
<el-button v-hasPermi="['system:student:exportAllOwnStu']" type="warning" plain icon="el-icon-download"
size="mini" @click="handleExportAll">导出全部</el-button>
</el-col> -->
<right-toolbar :show-search.sync="showSearch" @queryTable="getList" />
</el-row>
<el-table v-loading="loading" :data="studentList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="学号" align="center" prop="stuNo" width="150" />
<el-table-column label="姓名" align="center" prop="name" width="100" />
<el-table-column label="性别" align="center" prop="gender" />
<!-- <el-table-column label="生日" align="center" prop="birthday" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.birthday, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column> -->
<!-- <el-table-column label="身份证" align="center" prop="idCard" /> -->
<el-table-column label="学院名称" align="center" prop="deptId">
<template slot-scope="scope">
<span>{{ scope.row.dept.deptName }}</span>
</template>
</el-table-column>
<el-table-column label="专业名称" align="center" prop="majorId" width="250">
<template slot-scope="scope">
<span>{{ scope.row.srsMajors.majorName }}</span>
</template>
</el-table-column>
<!-- <el-table-column label="年级id" align="center" prop="gradeId" /> -->
<el-table-column label="班级名称" align="center" prop="classId" width="270">
<template slot-scope="scope">
<span>{{ scope.row.srsClass.className }}</span>
</template>
</el-table-column>
<!-- <el-table-column label="手机号码" align="center" prop="phone" />
<el-table-column label="家庭地址" align="center" prop="address" /> -->
<!-- <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)">修改</el-button>
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)">删除</el-button>
<el-button size="mini" type="text" icon="el-icon-refresh" @click="doInitPwdOne(scope.row)">初始化密码</el-button>
<el-button size="mini" type="text" icon="el-icon-view" @click="picVClick(scope.row)">查看画像</el-button>
<el-button size="mini" type="text" icon="el-icon-view" @click="lookDetail(scope.row)">查看详情</el-button>
<el-button size="mini" type="text" icon="el-icon-search" @click="detailVClick(scope.row)">查新详情</el-button>
</template>
</el-table-column> -->
</el-table>
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
@pagination="getList" />
</div>
</template>
<script>
import { listOwnStu as listStudent } from '@/api/stuCQS/basedata/student'
export default {
data() {
return {
// 遮罩层
loading: true,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 学生信息表格数据
studentList: [],
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
name: null,
stuNo: null,
},
}
},
methods: {
/** 查询学生信息列表 */
getList() {
this.loading = true
listStudent(this.queryParams).then(response => {
this.studentList = response.rows
this.total = response.total
this.loading = false
})
},
// 表单重置
reset() {
this.form = {
stuId: null,
name: null,
stuNo: null,
}
this.resetForm('form')
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1
this.getList()
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm('queryForm')
this.classVlue1 = [],
this.handleQuery()
},
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.stuId)
this.single = selection.length !== 1
this.multiple = !selection.length
},
handleAdd() {
}
},
// 生命周期 - 创建完成访问当前this实例
created() {
},
// 生命周期 - 挂载完成访问DOM元素
mounted() {
this.getList()
},
// 离开当前页面时执行代码
destroyed() {
}
}
</script>
<style scoped>
/* @import url(); 引入css类 */
</style>

View File

@@ -49,6 +49,9 @@
<el-col :span="1.5"> <el-col :span="1.5">
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="openForm">发起入伍保留学籍申请</el-button> <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="openForm">发起入伍保留学籍申请</el-button>
</el-col> </el-col>
<el-col :span="1.5">
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="applicationDialogShow" v-if="this.roleGroup.includes('辅导员')">批量发起入伍保留学籍申请</el-button>
</el-col>
<!-- <el-col :span="1.5"> <!-- <el-col :span="1.5">
<el-button type="success" plain icon="el-icon-edit" size="mini" :disabled="single" @click="handleUpdate" <el-button type="success" plain icon="el-icon-edit" size="mini" :disabled="single" @click="handleUpdate"
v-hasPermi="['routine:enlistmentReserve:edit']">修改</el-button> v-hasPermi="['routine:enlistmentReserve:edit']">修改</el-button>
@@ -221,15 +224,20 @@
<el-button @click="cancel"> </el-button> <el-button @click="cancel"> </el-button>
</div> </div>
</el-dialog> </el-dialog>
<el-dialog title="批量申请" :visible.sync="applicationDialogOpen" width="80%" append-to-body>
<applicationDialog></applicationDialog>
</el-dialog>
</div> </div>
</template> </template>
<script> <script>
import { listEnlistmentReserve, getOwnInfo, delEnlistmentReserve, addEnlistmentReserve, updateEnlistmentReserve } from "@/api/routine/enlistmentReserve/enlistmentReserve"; import { listEnlistmentReserve, getOwnInfo, delEnlistmentReserve, addEnlistmentReserve, updateEnlistmentReserve } from "@/api/routine/enlistmentReserve/enlistmentReserve";
import { getUserProfile } from '@/api/system/user' // 获取当前登录用户 import { getUserProfile } from '@/api/system/user' // 获取当前登录用户
import applicationDialog from '@/views/routine/enlistmentReserve/components/applicationDialog'
export default { export default {
name: "EnlistmentReserve", name: "EnlistmentReserve",
dicts: ['rt_classes', 'rt_nation', 'rt_grade'], dicts: ['rt_classes', 'rt_nation', 'rt_grade'],
components: { applicationDialog },
data() { data() {
return { return {
// 遮罩层 // 遮罩层
@@ -250,6 +258,8 @@ export default {
title: "", title: "",
// 是否显示弹出层 // 是否显示弹出层
open: false, open: false,
// 是否显示弹出层
applicationDialogOpen: false,
// 查询参数 // 查询参数
queryParams: { queryParams: {
pageNum: 1, pageNum: 1,
@@ -272,6 +282,7 @@ export default {
reserveStartDate: null, reserveStartDate: null,
reserveEndDate: null, reserveEndDate: null,
approvalNo: null, approvalNo: null,
deptName: null
}, },
// 表单参数 // 表单参数
form: {}, form: {},
@@ -354,6 +365,8 @@ export default {
this.queryParams.studentName = this.user.nickName this.queryParams.studentName = this.user.nickName
} else if (this.roleGroup.includes("辅导员")) { } else if (this.roleGroup.includes("辅导员")) {
this.queryParams.teacherName = this.user.nickName this.queryParams.teacherName = this.user.nickName
} else if (this.roleGroup.includes("学务") || this.roleGroup.includes("二级学院")) {
this.queryParams.deptName = this.user.dept.deptName
} }
this.getList() this.getList()
} }
@@ -505,6 +518,9 @@ export default {
// 无驳回记录 // 无驳回记录
return { isReject: false, rejectText: '' }; return { isReject: false, rejectText: '' };
} }
},
applicationDialogShow() {
this.applicationDialogOpen = true
} }
} }
}; };

View File

@@ -104,7 +104,16 @@
<el-dialog title="查看" :visible.sync="lookV"> <el-dialog title="查看" :visible.sync="lookV">
<el-steps :active="getStep(lookForm)"> <el-steps :active="getStep(lookForm)">
<el-step title="指导老师填报薪资" description="" /> <el-step title="指导老师填报薪资" description="">
<template slot="description">
<div>
{{ isEmpty(lookForm.zdlsName) ? '' : lookForm.zdlsName }}
</div>
<div>
{{ isEmpty(lookForm.applyTime) ? '' : lookForm.applyTime }}
</div>
</template>
</el-step>
<el-step title="部门领导审批" :status="isEmpty(lookForm.deptCmt) ? 'wait' : getStepStatus(lookForm.deptCmt)"> <el-step title="部门领导审批" :status="isEmpty(lookForm.deptCmt) ? 'wait' : getStepStatus(lookForm.deptCmt)">
<template slot="description"> <template slot="description">