Files
zhxg_pc/src/views/poverty/stu.vue

439 lines
15 KiB
Vue
Raw Normal View History

2025-07-28 15:52:07 +08:00
<template>
2025-10-18 17:13:04 +08:00
<div class="app-container">
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleYearDialog">新增</el-button>
</el-col>
<right-toolbar :show-search.sync="showSearch" @queryTable="getList" />
</el-row>
<p style="color: red;">*审核完成后才可查看请认真填写</p>
<el-table v-loading="loading" :data="applyList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="学年" align="center" prop="applyYear" />
<el-table-column label="姓名" align="center" prop="xm" />
<el-table-column label="年级" align="center" prop="nj" />
<el-table-column label="学院" align="center" prop="xy" />
<el-table-column label="专业" align="center" prop="zy" />
<el-table-column label="班级" align="center" prop="bj" />
<el-table-column label="辅导员审核" align="center" prop="fdyqm">
<template slot-scope="scope">
<!-- <img v-if="scope.row.fdyqm" :src="scope.row.zp" width="160px" height="50px"> -->
<div v-if="scope.row.fdyqm !=null && scope.row.fdyqm != '' ">
<div v-if="scope.row.bjyjdj == '1'">
一等国家助学金
</div>
<div v-if="scope.row.bjyjdj == '2'">
二等国家助学金
</div>
<div v-if="scope.row.bjyjdj == '3'">
三等国家助学金
</div>
2025-07-28 15:52:07 +08:00
2025-10-18 17:13:04 +08:00
</div>
<span v-else>{{ scope.row.status1 }}</span>
</template>
2025-07-28 15:52:07 +08:00
2025-10-18 17:13:04 +08:00
</el-table-column>
<el-table-column label="二级学院审核" align="center" prop="ejxyldqm">
<template slot-scope="scope">
<div v-if="scope.row.ejxyldqm">
<div v-if="scope.row.ejxyyjdj == '1'">
一等国家助学金
</div>
<div v-if="scope.row.ejxyyjdj == '2'">
二等国家助学金
</div>
<div v-if="scope.row.ejxyyjdj == '3'">
三等国家助学金
</div>
<!-- 签名<img :src="scope.row.ejxyldqm" width="160px" height="50px"> -->
2025-07-28 15:52:07 +08:00
2025-10-18 17:13:04 +08:00
</div>
<span v-else>{{ scope.row.status2 }}</span>
</template>
2025-07-28 15:52:07 +08:00
2025-10-18 17:13:04 +08:00
</el-table-column>
<el-table-column label="学院意见" align="center" prop="zzdj">
<template slot-scope="scope">
<div v-if="scope.row.zzdj">
<div v-if="scope.row.zzdj == '1'">
一等国家助学金
</div>
<div v-if="scope.row.zzdj == '2'">
二等国家助学金
</div>
<div v-if="scope.row.zzdj == '3'">
三等国家助学金
</div>
</div>
<div v-else>{{ scope.row.status3 }}</div>
</template>
</el-table-column>
<el-table-column label="处分是否解除" align="center">
<template slot-scope="scope">
<span v-if="scope.row.penaltyStatus0 == 1" style="color:red"></span>
<span v-else-if="scope.row.penaltyStatus1 == 1"></span>
<!-- <span v-else-if="scope.row.penaltyStatus3 == 3 ">处分申请中</span> -->
<span v-else>无处分记录</span>
</template>
</el-table-column>
2025-07-28 15:52:07 +08:00
2025-10-18 17:13:04 +08:00
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button v-if="scope.row.step == 0" size="mini" type="text" icon="el-icon-edit"
@click="handleUpdate(scope.row,1)"
>
修改</el-button>
<el-button v-if="scope.row.step == 1 " size="mini" type="text" icon="el-icon-edit"
@click="handleRevoke(scope.row)"
>撤回</el-button>
2025-07-28 15:52:07 +08:00
2025-10-18 17:13:04 +08:00
<!-- <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
2025-07-28 15:52:07 +08:00
v-if="scope.row.step == 1" v-hasPermi="['system:apply:edit']">辅导员审核</el-button>
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
v-if="scope.row.step == 2" v-hasPermi="['system:apply:edit']">二级学院审核</el-button>
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
v-if="scope.row.step == 3" v-hasPermi="['system:apply:edit']">学校意见</el-button> -->
2025-10-18 17:13:04 +08:00
<el-button v-if="scope.row.step == 0" size="mini" type="text" icon="el-icon-edit"
@click="handleDelete(scope.row)"
>删除</el-button>
2025-07-28 15:52:07 +08:00
2025-10-18 17:13:04 +08:00
<el-button v-if="scope.row.step == 4 || scope.row.step == 0 || scope.row.step == -1" size="mini" type="text"
@click="handleUpdate(scope.row,2)"
>查看</el-button>
2025-07-28 15:52:07 +08:00
2025-10-18 17:13:04 +08:00
</template>
</el-table-column>
</el-table>
2025-07-28 15:52:07 +08:00
2025-10-18 17:13:04 +08:00
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize" @pagination="getList"
/>
2025-07-28 15:52:07 +08:00
2025-10-18 17:13:04 +08:00
<!-- 选择学年弹窗 -->
<el-dialog
title="请选择学年"
:visible.sync="stuYearDialogVisible"
width="30%"
>
<el-select v-model="stuYearId" placeholder="请选择">
<el-option
v-for="item in enableYeas"
:key="item.id"
:label="item.stuYearName"
:value="item.id"
/>
</el-select>
<span slot="footer" class="dialog-footer">
<el-button @click="stuYearDialogVisible = false"> </el-button>
<el-button type="primary" @click="yearConfirm"> </el-button>
</span>
</el-dialog>
</div>
2025-07-28 15:52:07 +08:00
</template>
<script>
import { listAllEnableYear,listAllYear,getYearByTag} from '@/api/stuCQS/basedata/year'
2025-10-18 17:13:04 +08:00
import { listApply, getApply, delApply, addApply, updateApply, listOwn,isPoor,revoke} from '@/api/zxj/apply'
import ImportTable from '../tool/gen/importTable.vue'
2025-07-28 15:52:07 +08:00
export default {
2025-10-18 17:13:04 +08:00
name: 'PovertyApply',
2025-07-28 15:52:07 +08:00
components:[
],
data() {
return {
// 遮罩层
loading: true,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 【请填写功能名称】表格数据
applyList: [],
// 弹出层标题
2025-10-18 17:13:04 +08:00
title: '',
2025-07-28 15:52:07 +08:00
// 是否显示弹出层
open: false,
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
step: null,
xm: null,
xb: null,
mz: null,
zzmm: null,
xh: null,
rxsj: null,
csny: null,
dh: null,
nj: null,
xy: null,
zy: null,
bj: null,
kndj: null,
knlx: null,
knlx2: null,
rkzs: null,
yzsr: null,
rjyr: null,
srly: null,
jtcy: null,
sqly: null,
fdyqm: null,
fdyqmrq: null,
ejxyldqm: null,
ejxyldqmrq: null,
xsqm: null,
xsqmrq: null,
csdj: null,
zzdj: null
},
// 表单参数
form: {},
// 表单校验
rules: {
},
//所有启用得年份
enableYeas:[],
//选择的年份
stuYearId:null,
//学年对话框开关
stuYearDialogVisible:false,
2025-10-18 17:13:04 +08:00
}
2025-07-28 15:52:07 +08:00
},
created() {
2025-10-18 17:13:04 +08:00
this.getList()
this.listAllStuYear()
2025-07-28 15:52:07 +08:00
},
methods: {
//查所有年份
listAllStuYear(){
/* listAllYear().then(res=>{
2025-07-28 15:52:07 +08:00
if(res.code == 200){
2025-10-18 17:13:04 +08:00
this.enableYeas = res.data
this.stuYearId = this.enableYeas[0].id
2025-07-28 15:52:07 +08:00
}
}) */
2025-07-28 15:52:07 +08:00
/* 使
当前页面的功能是获取'国家助学金---ZXJ'标签对应的学年信息
涉及到学年标签字典module_tag需要在字典管理中查询对应的信息
如果在字典管理更改了 学年标签 的信息此处也要进行相应修改
尽量避免学年标签字典的更改!!!! */
const tagValue = 'ZXJ' /* <---"国家助学金---ZXJ"标签对应的标签值 */
if (!tagValue) {
this.$modal.msgError('未找到标签值')
return // 如果没有标签值,则不执行后续操作
}
getYearByTag(tagValue).then(res=>{
if(res.code == 200){
this.enableYeas = res.data
if (this.enableYeas.length > 0) {
this.stuYearId = this.enableYeas[0].id
// 只有当有数据时才更新会话信息 sessionStorage
sessionStorage.setItem('zxjSelectedYear', JSON.stringify({
stuYearName: this.enableYeas[0].stuYearName,
id: this.enableYeas[0].id
}))
} else {
// 如果没有可用学年,清除 sessionStorage 中的相关数据
sessionStorage.removeItem('zxjSelectedYear')
}
}
}).catch(error => {
console.error('获取学年信息失败:', error)
this.$modal.msgError('获取学年信息失败')
})
2025-07-28 15:52:07 +08:00
},
//确认选择学年
yearConfirm(){
2025-10-18 17:13:04 +08:00
this.handleAdd()
2025-07-28 15:52:07 +08:00
},
//选择学年对话框
handleYearDialog(){
//只激活一个学年就不选了
if(this.enableYeas.length == 1){
2025-10-18 17:13:04 +08:00
this.handleAdd()
2025-07-28 15:52:07 +08:00
}
else{
2025-10-18 17:13:04 +08:00
this.stuYearDialogVisible = true
2025-07-28 15:52:07 +08:00
}
},
/** 查询【请填写功能名称】列表 */
getList() {
2025-10-18 17:13:04 +08:00
this.loading = true
2025-07-28 15:52:07 +08:00
listOwn(this.queryParams).then(response => {
2025-10-18 17:13:04 +08:00
this.applyList = response.rows
this.total = response.total
this.loading = false
})
2025-07-28 15:52:07 +08:00
},
// 取消按钮
cancel() {
2025-10-18 17:13:04 +08:00
this.open = false
this.reset()
2025-07-28 15:52:07 +08:00
},
// 表单重置
reset() {
this.form = {
id: null,
step: null,
xm: null,
xb: null,
mz: null,
zzmm: null,
xh: null,
rxsj: null,
csny: null,
dh: null,
nj: null,
xy: null,
zy: null,
bj: null,
kndj: null,
knlx: null,
knlx2: null,
rkzs: null,
yzsr: null,
rjyr: null,
srly: null,
jtcy: null,
sqly: null,
fdyqm: null,
fdyqmrq: null,
ejxyldqm: null,
ejxyldqmrq: null,
xsqm: null,
xsqmrq: null,
csdj: null,
zzdj: null
2025-10-18 17:13:04 +08:00
}
this.resetForm('form')
2025-07-28 15:52:07 +08:00
},
/** 搜索按钮操作 */
handleQuery() {
2025-10-18 17:13:04 +08:00
this.queryParams.pageNum = 1
this.getList()
2025-07-28 15:52:07 +08:00
},
/** 重置按钮操作 */
resetQuery() {
2025-10-18 17:13:04 +08:00
this.resetForm('queryForm')
this.handleQuery()
2025-07-28 15:52:07 +08:00
},
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id)
this.single = selection.length !== 1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
// //有记录就不能申请
// if(this.applyList.length > 0 ){
// this.$message({
// showClose: true,
// message: '每个学生只能申请一次',
// type: 'error'
// });
// return;
// }
//先查询是不是贫困生,不是不能申请
2025-10-18 17:13:04 +08:00
isPoor({'stuYearId':this.stuYearId}).then(res=>{
2025-07-28 15:52:07 +08:00
if(!res.data.isPoor){
this.$message({
showClose: true,
message: res.data.message,
type: 'error'
2025-10-18 17:13:04 +08:00
})
2025-07-28 15:52:07 +08:00
}else{
for(let i = 0;i< this.enableYeas.length;i++){
if(this.enableYeas[i].id == this.stuYearId){
2025-10-18 17:13:04 +08:00
let data = {'stuYearName':this.enableYeas[i].stuYearName,'id':this.stuYearId}
sessionStorage.setItem('zxjSelectedYear',JSON.stringify(data))
break
2025-07-28 15:52:07 +08:00
}
}
2025-10-18 17:13:04 +08:00
this.$router.push({ path: 'proverty_examine' })
2025-07-28 15:52:07 +08:00
}
2025-10-18 17:13:04 +08:00
})
2025-07-28 15:52:07 +08:00
// this.reset();
// this.open = true;
// this.title = "添加【请填写功能名称】";
// this.$router.push({ path: "proverty_examine" });
},
/**撤回按钮操作 */
handleRevoke(row){
this.$modal.confirm('是否确认撤回?').then(function () {
2025-10-18 17:13:04 +08:00
return revoke(row)
2025-07-28 15:52:07 +08:00
}).then(() => {
2025-10-18 17:13:04 +08:00
this.getList()
2025-07-28 15:52:07 +08:00
2025-10-18 17:13:04 +08:00
}).catch(() => { })
2025-07-28 15:52:07 +08:00
},
/** 修改按钮操作 */
handleUpdate(row,action) {
2025-10-18 17:13:04 +08:00
const nid = row.id || this.ids
this.$router.push({ path: 'proverty_examine', query: { id: nid,'action':action } })
2025-07-28 15:52:07 +08:00
},
/** 提交按钮 */
submitForm() {
2025-10-18 17:13:04 +08:00
this.$refs['form'].validate(valid => {
2025-07-28 15:52:07 +08:00
if (valid) {
if (this.form.id != null) {
updateApply(this.form).then(response => {
2025-10-18 17:13:04 +08:00
this.$modal.msgSuccess('修改成功')
this.open = false
this.getList()
})
2025-07-28 15:52:07 +08:00
} else {
addApply(this.form).then(response => {
2025-10-18 17:13:04 +08:00
this.$modal.msgSuccess('新增成功')
this.open = false
this.getList()
})
2025-07-28 15:52:07 +08:00
}
}
2025-10-18 17:13:04 +08:00
})
2025-07-28 15:52:07 +08:00
},
/** 删除按钮操作 */
handleDelete(row) {
2025-10-18 17:13:04 +08:00
const ids = row.id || this.ids
2025-07-28 15:52:07 +08:00
this.$modal.confirm('数据删除无法恢复,是否确认删除?').then(function () {
2025-10-18 17:13:04 +08:00
return delApply(ids)
2025-07-28 15:52:07 +08:00
}).then(() => {
2025-10-18 17:13:04 +08:00
this.getList()
this.$modal.msgSuccess('删除成功')
}).catch(() => { })
2025-07-28 15:52:07 +08:00
},
/** 导出按钮操作 */
handleExport() {
this.download('/comprehensive/zxj/apply/export', {
...this.queryParams
}, `apply_${new Date().getTime()}.xlsx`)
},
mounted() {
this.listAllStuYear(); //获取所有学年
},
2025-07-28 15:52:07 +08:00
}
2025-10-18 17:13:04 +08:00
}
2025-07-28 15:52:07 +08:00
</script>