初始化

This commit is contained in:
2025-07-28 15:52:07 +08:00
commit cd0e77b332
1304 changed files with 302802 additions and 0 deletions

View File

@@ -0,0 +1,475 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="学生名称" prop="stuName">
<el-input v-model="queryParams.stuName" placeholder="请输入学生名称" clearable @keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item label="补办原因" prop="reason">
<el-input v-model="queryParams.reason" placeholder="请输入补办原因" clearable @keyup.enter.native="handleQuery" />
</el-form-item>
<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="inspectionProgress">
<el-select v-model="queryParams.inspectionProgress" placeholder="请选择审核状态" @keyup.enter.native="handleQuery">
<el-option v-for="item in inspectionProgressList" :label="item.name" :value="item.val" :key="item.val"></el-option>
</el-select>
<!-- <el-input v-model="queryParams.inspectionProgress" 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 type="warning" plain icon="el-icon-download" size="mini" @click="handleExport"
v-hasPermi="['routine:stuIdReissue:export']">导出</el-button> -->
</el-col>
<right-toolbar v-if="showRole === 3" :showSearch.sync="showSearch" @queryTable="getListByCounsellorName"></right-toolbar>
<right-toolbar v-else :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="stuIdReissueList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="学号" align="center" prop="stuNo" />
<el-table-column label="申请人名称" align="center" prop="stuName" />
<el-table-column label="性别" align="center" prop="gender" />
<el-table-column label="学院" align="center" prop="departmentName" />
<el-table-column label="年级" align="center" prop="gradeName" />
<el-table-column label="班级" align="center" prop="className" />
<el-table-column label="出生年月" align="center" prop="birthday" />
<el-table-column label="照片" align="center" prop="photo" width="100">
<template slot-scope="scope">
<image-preview :src="scope.row.photo" :width="50" :height="50" />
</template>
</el-table-column>
<el-table-column label="补办原因" align="center" prop="reason" />
<el-table-column label="审核状态" align="center" prop="inspectionProgress">
<template slot-scope="scope">
<el-tag type="danger" v-if="scope.row.inspectionProgress === 0">未审核</el-tag>
<el-tag type="success" v-else-if="scope.row.inspectionProgress === 1">辅导员通过</el-tag>
<el-tag type="success" v-else-if="scope.row.inspectionProgress === 2">学工通过</el-tag>
<el-tag type="danger" v-if="scope.row.inspectionProgress < 0">驳回</el-tag>
</template>
</el-table-column>
<el-table-column label="缴费状态" align="center" prop="inspectionProgress">
<template slot-scope="scope">
<el-tag type="danger" v-if="scope.row.isPay === 0">未缴费</el-tag>
<el-tag type="success" v-else-if="scope.row.isPay === 1">已缴费</el-tag>
</template>
</el-table-column>
<el-table-column label="缴费金额" align="center" prop="paymentAmount">
<template slot-scope="scope">
<el-tag type="danger" v-if="scope.row.isPay === 0">未缴费</el-tag>
<el-tag type="success" v-else-if="scope.row.isPay === 1">{{ scope.row.paymentAmount.toFixed(2) }}</el-tag>
</template>
</el-table-column>
<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)"
v-hasPermi="['routine:stuIdReissue:edit']">修改</el-button> -->
<el-button size="mini" type="text" icon="el-icon-edit" @click="openExamine(scope.row)"
v-if="scope.row.inspectionProgress < 1 && transactor === '辅导员'"
v-hasPermi="['routine:stuIdReissue:edit']">辅导员审核</el-button>
<el-button size="mini" type="text" icon="el-icon-edit" @click="openExamine(scope.row)"
v-if="transactor === '学工' && scope.row.inspectionProgress == 1" v-hasPermi="['routine:stuIdReissue:edit']">学工审核</el-button>
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)" v-if="showRole == 0 || transactor === '超级管理员'"
v-hasPermi="['routine:stuIdReissue:remove']">删除</el-button>
<el-button size="mini" type="text" icon="el-icon-info" @click="detail(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="getListByCounsellorName" v-if="showRole === 3"/>
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
@pagination="getList" v-else/>
<!-- 审核信息-->
<el-dialog title="审核信息" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
<el-form-item label="学号" prop="stuNo">
<el-input v-model="form.stuNo" placeholder="请输入学号" disabled />
</el-form-item>
<el-form-item label="学生名称" prop="studentName">
<el-input v-model="form.stuName" placeholder="请输入学生名称" disabled />
</el-form-item>
<el-form-item label="学生补办原因" prop="reason">
<el-input v-model="form.reason" placeholder="请输入补办原因" disabled />
</el-form-item>
<el-form-item :label="transactor === '学工' ? '是否缴费' : '是否通过'" prop="inspectionProgress">
<!-- <el-input v-model.number="form.inspectionProgress" placeholder="请输入审核状态" /> -->
<el-select v-model="form.inspectionProgress" placeholder="请选择审核状态" style="width: 100%;" @change="selectChange"
v-if="transactor === '辅导员'">
<!-- <el-option label="学生提交申请" value="0" key="学生提交申请"></el-option> -->
<el-option v-for="item in fdyStatusList" :label="item.value" :value="item.status"
:key="item.status"></el-option>
</el-select>
<el-select v-model="form.isPay" placeholder="请选择缴费状态" style="width: 100%;" @change="selectChange"
v-else-if="transactor === '学工'">
<!-- <el-option label="学生提交申请" value="0" key="学生提交申请"></el-option> -->
<el-option v-for="item in statusList" :label="item.value" :value="item.status"
:key="item.status"></el-option>
</el-select>
</el-form-item>
<el-form-item label="学工意见" prop="jwcCmt" v-if="transactor === '学工'">
<el-input v-model="form.jwcCmt" type="textarea" placeholder="请输入内容" />
</el-form-item>
<el-form-item label="辅导员意见" prop="notes" v-else-if="transactor === '辅导员'">
<el-input v-model="form.fdyCmt" type="textarea" placeholder="请输入内容" />
</el-form-item>
<el-form-item label="缴费金额" prop="paymentAmount" v-if="form.isPayNum">
<el-input v-model="form.paymentAmount" placeholder="请输入缴费金额" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitAudit"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { listStuIdReissue, getStuIdReissue, delStuIdReissue, addStuIdReissue, updateStuIdReissue, getListByCounsellorName } from "@/api/routine/stuIdReissue";
import { addStuMultiLevelReview, getStuMultiLevelReviewByReviewerIdentity, updateStuMultiLevelReview } from "@/api/routine/stuMultiLevelReview";
import { getUserProfile } from "@/api/system/user"; // 获取
export default {
name: "counsellorExamine",
data() {
return {
// 遮罩层
loading: true,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 学生证补办表格数据
stuIdReissueList: [],
// 弹出层标题
title: "",
// 是否显示弹出层
open: false,
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
stuName: null,
photo: null,
reason: null,
stuId: null,
inspectionProgress: null
},
// 表单参数
form: {},
// 表单校验
rules: {
photo: [
{ required: true, message: "照片不能为空", trigger: "blur" }
],
reason: [
{ required: true, message: "补办原因不能为空", trigger: "blur" }
],
},
inspectionProgressList: [
{ val: 0, name: '学生提交申请' },
{ val: 1, name: '辅导员通过' },
{ val: 2, name: '学工通过' }
],
stuMultiLevelReview: {},
// 审核处理人
transactor: '',
// 缴费状态
statusList: [
{ status: 0, value: '未缴费' },
{ status: 1, value: '已缴费' }
],
// 审核状态
fdyStatusList: [
{ status: 0, value: '未审核' },
{ status: 1, value: '通过' },
{ status: -1, value: '驳回' }
],
user: null
};
},
created() {
this.getUser();
let temp = this.$store.getters.roles;
temp.map(x => {
if (x == "admin") {
this.showRole = 0;
this.getList();
}
if (x == "test") { //学工
this.showRole = 1;
// this.getList();
}
if (x == "stumanger") { //学务
this.showRole = 2;
this.getList();
}
if (x == "testteacher") { //辅导员
this.showRole = 3;
// this.getListByCounsellorName();
}
});
if (this.transactor == "学工") {
this.queryParams.inspectionProgress = 1
this.getList();
} else {
this.queryParams.inspectionProgress = 0
this.getListByCounsellorName();
}
},
watch: {
'$route': {
immediate: true, // 第一次初始化渲染就可以监听到
handler(to, from) {
if (to.path === '/routine/sicr/learningIndustrialProductionAudit') {
this.transactor = '学工'
} else {
this.transactor = '辅导员'
}
}
}
},
methods: {
/** 查询学生证补办列表 */
getList() {
this.loading = true;
listStuIdReissue(this.queryParams).then(response => {
this.stuIdReissueList = response.rows;
this.total = response.total;
this.loading = false;
});
},
/** 根据学生名字查询学生证补办列表 */
getListByCounsellorName() {
this.loading = true;
getListByCounsellorName(this.queryParams).then(response => {
this.stuIdReissueList = response.rows;
this.total = response.total;
this.loading = false;
});
},
// 获取当前登录信息
getUser() {
getUserProfile().then(response => {
this.user = response.data;
// this.roleGroup = response.roleGroup;
// this.postGroup = response.postGroup;
// console.log(this.user);
});
},
// 取消按钮
cancel() {
this.open = false;
this.reset();
},
// 表单重置
reset() {
this.form = {
id: null,
stuName: null,
photo: null,
reason: null,
stuId: null,
createTime: null,
inspectionProgress: null
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.handleRole();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id)
this.single = selection.length !== 1
this.multiple = !selection.length
},
/** 修改按钮操作 */
openExamine(row) {
this.reset();
const id = row.id || this.ids
getStuIdReissue(id).then(response => {
this.form = response.data;
this.open = true;
this.title = "辅导员审核";
// 如果记录有缴费金额,则上周缴费记录未已缴费
if (this.form.paymentAmount != null) {
this.form.isPayNum = true
}
});
getStuMultiLevelReviewByReviewerIdentity(this.transactor, row.stuNo).then(response => {
this.stuMultiLevelReview = response.data || {}
});
// StuMultiLevelReviewAdd({
// stuName: this.form.stuName,
// stuNo: this.form.stuNo,
// reason: this.form.reason,
// reviewerIdentity: '辅导员',
// reviewTime: this.getNowDate(),
// type: 0,
// reviewerStatus: 0
// }).then(response => { });
// StuMultiLevelReviewAdd({
// stuName: this.form.stuName,
// stuNo: this.form.stuNo,
// reason: this.form.reason,
// reviewerIdentity: '学工',
// reviewTime: this.getNowDate(),
// type: 0,
// reviewerStatus: 0
// }).then(response => { });
},
// 辅导员提交审核
submitAudit() {
this.$modal.loading('正在努力加载中,请稍等...')
// 如果没有审核信息,添加
if (!this.stuMultiLevelReview.hasOwnProperty('stuName')) {
addStuMultiLevelReview({
stuName: this.form.stuName,
stuNo: this.form.stuNo,
reason: this.form.reason,
reviewerIdentity: this.transactor,
type: 0,
reviewerStatus: this.transactor === '辅导员' ? 1 : 2
}).then(response => {
getStuMultiLevelReviewByReviewerIdentity(this.transactor, this.form.stuNo).then(res => {
this.stuMultiLevelReview = res.data
updateStuIdReissue(this.form).then(response => {
if (this.transactor === '辅导员') {
this.stuMultiLevelReview.notes = this.form.fdyCmt
} else {
this.stuMultiLevelReview.notes = this.form.jwcCmt
}
// 更新审核信息
updateStuMultiLevelReview(this.stuMultiLevelReview).then(response => {
this.$modal.msgSuccess("审核成功");
this.$modal.closeLoading()
this.open = false;
this.handleRole()
});
});
})
});
} else {
updateStuIdReissue(this.form).then(response => {
if (this.transactor === '辅导员') {
this.stuMultiLevelReview.notes = this.form.fdyCmt
} else {
this.stuMultiLevelReview.notes = this.form.jwcCmt
}
// 更新审核信息
updateStuMultiLevelReview(this.stuMultiLevelReview).then(response => {
this.$modal.msgSuccess("审核成功");
this.$modal.closeLoading()
this.open = false;
this.handleRole()
});
});
}
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.id != null) {
updateStuIdReissue(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.handleRole();
});
} else {
addStuIdReissue(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.handleRole();
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
this.$modal.confirm('是否确认删除学生证补办编号为"' + ids + '"的数据项?').then(function () {
return delStuIdReissue(ids);
}).then(() => {
this.handleRole();
this.$modal.msgSuccess("删除成功");
}).catch(() => { });
},
/** 导出按钮操作 */
handleExport() {
this.download('routine/stuIdReissue/export', {
...this.queryParams
}, `stuIdReissue_${new Date().getTime()}.xlsx`)
},
detail(row) {
this.$router.push({
path: '/routine/sicr/stuIdReissue',
query: {
id: row.id,
stuNo: row.stuNo,
inspectionProgress: row.inspectionProgress,
fdyCmt: row.fdyCmt,
jwcCmt: row.jwcCmt
},
})
},
// 审核下拉框选择触发
selectChange(val) {
if (this.transactor === '辅导员') {
if (this.form.inspectionProgress === 1) {
this.stuMultiLevelReview.reviewerStatus = 1
} else if (this.form.inspectionProgress === -1) {
this.stuMultiLevelReview.reviewerStatus = -1
} else {
this.stuMultiLevelReview.reviewerStatus = 0
}
} else {
if (this.form.isPay === 1) {
this.form.inspectionProgress = 2
this.stuMultiLevelReview.reviewerStatus = 2
this.form.isPayNum = true
} else {
this.form.inspectionProgress = 1
this.stuMultiLevelReview.reviewerStatus = 1
this.form.isPayNum = false
}
}
},
handleRole() {
if (this.showRole === 3) {
this.getListByCounsellorName()
} else {
this.getList();
}
}
}
};
</script>

View File

@@ -0,0 +1,416 @@
<template>
<div class="app-container">
<el-card class="box-card">
<el-steps :active="active" :finish-status="finishStatus">
<el-step title="学生申请" description="提交申请,填写补办的原因以及相片"></el-step>
<el-step title="辅导员审核" :description="changeActive(form.inspectionProgress)"></el-step>
<el-step title="学工处理"
:description="`${form.isPay === 0 ? '未缴费:' : '已缴费,备注:'}` + `${$route.query.jwcCmt ? $route.query.jwcCmt : '等待缴费,记录缴费金额'}`"></el-step>
</el-steps>
</el-card>
<el-card class="box-card" style="margin-top: 20px;">
<div class="titleNav">基本信息</div>
<el-form ref="form" :model="form" :rules="rules" label-width="110px">
<div class="formItem">
<div>
<el-form-item label="学号" prop="stuNo">
<el-input v-model="form.stuNo" placeholder="请输入学号" @blur="changeGet" :disabled="$route.query.inspectionProgress == -1 ? isDisabledStuNo : isDisabled" />
</el-form-item>
<el-form-item label="出生日期" prop="birthday">
<!-- <el-input v-model="form.createTime" placeholder="请输入出生日期" /> -->
<el-date-picker v-model="form.birthday" align="right" type="date" placeholder="选择日期"
value-format="yyyy-MM-dd" style="width: 100%;">
</el-date-picker>
</el-form-item>
<el-form-item label="家庭所在地" prop="hksz2">
<el-cascader :options="areaOptions" v-model="form.homeLocation" clearable filterable @change="hkszChange" style="width: 100%"></el-cascader>
</el-form-item>
<el-form-item label="家庭详细地址" prop="birthplace">
<el-input v-model="form.birthplace" placeholder="请输入家庭详细地址" />
</el-form-item>
<el-form-item label="民族" prop="mz">
<el-select clearable v-model="form.mz" placeholder="请选择民族" style="width: 100%">
<el-option v-for="dict in dict.type.rt_nation" :key="dict.value" :label="dict.label"
:value="dict.value" />
</el-select>
</el-form-item>
</div>
<div>
<el-form-item label="学生名称" prop="studentName">
<el-input v-model="form.studentName" placeholder="请输入学生名称" :disabled="$route.query.inspectionProgress == -1 ? isDisabledStuNo : isDisabled" />
</el-form-item>
<el-form-item label="性别" prop="gender">
<el-input v-model="form.gender" placeholder="请输入性别" :disabled="$route.query.inspectionProgress == -1 ? isDisabledStuNo : isDisabled" />
</el-form-item>
<el-form-item label="籍贯" prop="nativePlace">
<el-cascader :options="areaOptions" v-model="form.nativePlace" clearable filterable
@change="addressChange" style="width: 100%"></el-cascader>
<!-- <el-cascader :options="areaOptions" v-model="form.nativePlace" clearable filterable v-else
@change="addressChange" style="width: 100%"></el-cascader> -->
</el-form-item>
<el-form-item label="联系电话" prop="phoneNumber">
<el-input v-model="form.phoneNumber" placeholder="请输入联系电话" />
</el-form-item>
<el-form-item label="乘火车区间" prop="railwayStation">
<el-input v-model="form.railwayStation" placeholder="请输入乘火车区间(南宁到XX站)" />
</el-form-item>
</div>
<!-- <div>
<el-form-item label="照片" prop="photo">
<image-upload v-model="form.photo" />
</el-form-item>
</div> -->
</div>
</el-form>
</el-card>
<el-card class="box-card" style="margin-top: 20px;">
<div class="titleNav">办理信息</div>
<el-form ref="form" :model="form" :rules="rules" label-width="90px">
<div class="formItem">
<div>
<el-form-item label="年级" prop="gradeName">
<el-input v-model="form.gradeName" placeholder="请输入年级" :disabled="$route.query.inspectionProgress == -1 ? isDisabledStuNo : isDisabled" />
</el-form-item>
<el-form-item label="班级" prop="className">
<el-input v-model="form.className" placeholder="请输入班级" :disabled="$route.query.inspectionProgress == -1 ? isDisabledStuNo : isDisabled" />
</el-form-item>
<el-form-item label="宿舍楼" prop="dormitoryBuilding">
<el-input v-model="form.dormitoryBuilding" placeholder="请输入宿舍楼" />
</el-form-item>
<el-form-item label="宿舍号" prop="dormitoryNumber">
<el-input v-model="form.dormitoryNumber" placeholder="请输入宿舍号" />
</el-form-item>
</div>
<div>
<el-form-item label="学院" prop="departmentName">
<el-input v-model="form.departmentName" placeholder="请输入学院" :disabled="$route.query.inspectionProgress == -1 ? isDisabledStuNo : isDisabled" />
</el-form-item>
<el-form-item label="入学时间" prop="enrollmentTime">
<el-date-picker v-model="form.enrollmentTime" align="right" type="date" placeholder="选择日期"
value-format="yyyy-MM-dd" style="width: 100%;">
</el-date-picker>
</el-form-item>
<el-form-item label="申请时间" prop="applyTime">
<el-date-picker v-model="form.applyTime" align="right" type="date" placeholder="选择日期"
value-format="yyyy-MM-dd HH:mm:ss" style="width: 100%;">
</el-date-picker>
</el-form-item>
<el-form-item label="补办原因" prop="reason">
<el-input v-model="form.reason" placeholder="请输入补办原因" />
</el-form-item>
</div>
<div>
<el-form-item label="照片" prop="photo">
<image-upload v-model="form.photo" />
</el-form-item>
</div>
</div>
</el-form>
</el-card>
<div slot="footer" class="dialog-footer" style="text-align: right; margin-top: 20px;">
<el-button v-if="active === 0" type="primary" @click="submitForm(1)">提交申请</el-button>
<el-button v-if="finishStatus !== 'success' || form.inspectionProgress === 0" type="primary"
@click="submitForm(1)">修改提交申请</el-button>
<el-button type="primary" @click="printing">打印学生证申请表</el-button>
<!-- <el-button v-if="active === 1 && showRole <= 3" type="primary"
@click="auditInformation(2, '辅导员')">审核信息</el-button>
<el-button v-if="active === 2 && showRole <= 2" type="primary" @click="payment(3, '学工')">登记缴费金额</el-button> -->
<el-button @click="$router.push('/routine/sicr/stuIdReissueLIst')"> </el-button>
</div>
</div>
</template>
<script>
import { getStuIdReissue, addStuIdReissue, updateStuIdReissue, getStudentInfoByStuId } from "@/api/routine/stuIdReissue";
import { listClass } from "@/api/stuCQS/basedata/class";
import {
pcaTextArr, // 省市区联动数据,纯汉字
} from 'element-china-area-data'
export default {
name: "StuIdReissue",
dicts: ['rt_nation'],
data() {
return {
// 遮罩层
loading: true,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
// 学生证补办表格数据
stuIdReissueList: [],
// 表单参数
form: {},
// 表单校验
rules: {
reason: [
{ required: true, message: "补办原因不能为空", trigger: "blur" }
],
inspectionProgress: [
{ required: true, message: "审核状态不能为空", trigger: "blur" }
],
stuNo: [
{ required: true, message: "学号不能为空", trigger: "blur" }
],
stuId: [
{ required: true, message: "学号不能为空", trigger: "blur" }
],
studentName: [
{ required: true, message: "学生名称不能为空", trigger: "blur" }
],
phoneNumber: [
{ required: true, message: "联系电话不能为空", trigger: "blur" }
],
enrollmentTime: [
{ required: true, message: "入学时间不能为空", trigger: "blur" }
],
railwayStation: [
{ required: true, message: "乘火车区间不能为空", trigger: "blur" }
],
birthplace: [
{ required: true, message: "家庭详细地址不能为空", trigger: "blur" }
]
},
// 申请进展
active: 0,
showRole: 0,
// 查询到的审核信息
stuMultiLevelReview: {},
// 审核处理人
transactor: '',
// 省市区
areaOptions: pcaTextArr,
// 控件禁用
isDisabled: false,
// 审核进度状态
finishStatus: 'success',
isDisabledStuNo: false
};
},
watch: {
"$route.query.id": {
immediate: true,
handler() {
this.form = {}
this.active = 0
this.finishStatus = 'success'
if (this.$route.query.id !== undefined) {
this.handleUpdate()
if (this.$route.query.inspectionProgress >= 0) {
this.isDisabled = true
this.finishStatus = 'success'
} else if (this.$route.query.inspectionProgress == -1) {
this.isDisabledStuNo = true
this.finishStatus = 'error'
} else {
this.finishStatus = 'error'
}
} else {
this.reset()
this.isDisabled = false
this.isDisabledStuNo = false
this.finishStatus = 'success'
}
}
}
},
created() {
// this.getList();
let temp = this.$store.getters.roles;
temp.map(x => {
if (x == "admin") {
this.showRole = 1;
}
if (x == "test") { //学工
this.showRole = 1;
}
if (x == "stumanger") { //学务
this.showRole = 2;
}
if (x == "testteacher") { //辅导员
this.showRole = 3;
}
if (x == "teststu") { //学生
this.showRole = 4;
}
});
},
methods: {
// 填写学号时自动获取其他信息
changeGet() {
this.form.stuId = this.form.stuNo ? this.form.stuNo : this.$route.query.stuNo
getStudentInfoByStuId(this.form.stuId).then(response => {
if (response.data == null) {
this.$message.error('学号不存在')
return
}
this.form = response.data
listClass({ // 根据班级名称查询班级信息
className: this.form.className
}).then(response => {
// this.classList = response.rows;
this.form.counsellorName = response.rows[0].teacher.name
this.form.counsellorId = response.rows[0].teacher.teacherId
});
});
},
// 进度变化时改变文字提示
changeActive(active) {
if (active === -1) {
return '申请被驳回,备注:申请不通过,' + this.$route.query.fdyCmt
} else if (active >= 1) {
return '申请通过,备注:' + this.$route.query.fdyCmt
} else {
return '辅导员审核学生补办请求通不通过'
}
},
// 取消按钮
cancel() {
this.open = false;
this.reset();
},
// 表单重置
reset() {
this.form = {
id: null,
stuName: null,
photo: null,
reason: null,
stuId: null,
stuNo: null,
createTime: null,
jg: null,
hksz2: null
};
this.active = 0
this.resetForm("form");
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
/** 修改按钮操作 */
handleUpdate() {
this.reset();
const id = this.$route.query && this.$route.query.id
getStuIdReissue(id).then(response => {
this.form = response.data;
this.form.studentName = this.form.stuName
// this.form.stuName = this.form.studentName
if (response.data.inspectionProgress === -1) {
this.active = 2
} else {
this.active = +response.data.inspectionProgress + 1
// console.log(this.active);
}
// 地区转换
this.form.nativePlace = this.form.jg !== null ? this.parseSelectedPath(this.form.jg) : '暂无填写'
// 地区转换
this.form.homeLocation = this.form.hksz2 !== null ? this.parseSelectedPath(this.form.hksz2) : '暂无填写'
});
},
/** 提交按钮 */
submitForm(active) {
this.$modal.loading('正在努力加载中,请稍等...')
// 学生提交申请状态
this.form.inspectionProgress = 0
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.id != null) {
updateStuIdReissue(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.active = active
this.finishStatus = 'success'
this.isDisabled = true
// this.$router.replace({ inspectionProgress: this.form.inspectionProgress });
// 修改成功后修改路上参数
this.$router.push({ path: this.$route.path, query: { id: this.form.id, stuNo: this.form.stuNo, inspectionProgress: this.form.inspectionProgress } });
this.$modal.closeLoading()
});
} else {
addStuIdReissue(this.form).then(response => {
if (response.code === 500) {
this.$modal.closeLoading()
return
}
else {
this.$modal.msgSuccess("提交申请成功");
this.active = active
// this.reset()
this.$modal.closeLoading()
}
});
}
}
});
},
// el-cascader选择处理
addressChange(arr) {
this.form.jg = arr[0] + '/' + arr[1] + '/' + arr[2]
},
// el-cascader选择处理
hkszChange(arr) {
this.form.hksz2 = arr[0] + '/' + arr[1] + '/' + arr[2]
},
// 地区回显到el-cascader
parseSelectedPath(pathString) {
const pathArray = pathString.split('/');
// 假设 options 已经被正确设置,并且可以通过遍历找到对应的值
let currentLevel = this.areaOptions;
const selectedOptions = [];
for (let i = 0; i < pathArray.length; i++) {
const found = currentLevel.find(item => item.label === pathArray[i]);
if (found) {
selectedOptions.push(found.value);
currentLevel = found.children || [];
} else {
// 处理未找到的情况,例如返回空数组或显示错误
break;
}
}
return selectedOptions;
},
// 跳转打印页面
printing() {
this.$router.push({
path: '/routine/sicr/studentIdPrinting',
query: {
listId: this.form.id || null,
},
})
}
}
};
</script>
<style scoped>
.titleNav {
font-size: 20px;
font-weight: bold;
margin: 10px 0 20px 0;
}
.titleNav::before {
content: "";
margin-right: 10px;
border: 3px solid rgb(64, 158, 255);
}
.formItem {
display: flex;
}
.formItem>div {
flex: 1;
}
</style>

View File

@@ -0,0 +1,353 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="学生名称" prop="stuName">
<el-input v-model="queryParams.stuName" placeholder="请输入学生名称" clearable @keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item label="补办原因" prop="reason">
<el-input v-model="queryParams.reason" placeholder="请输入补办原因" clearable @keyup.enter.native="handleQuery" />
</el-form-item>
<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="inspectionProgress">
<el-select v-model="queryParams.inspectionProgress" placeholder="请选择审核状态" @keyup.enter.native="handleQuery">
<el-option label="学生提交申请" value="0"></el-option>
<el-option label="辅导员通过" value="1"></el-option>
<el-option label="学工通过" value="2"></el-option>
</el-select>
<!-- <el-input v-model="queryParams.inspectionProgress" 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" v-if="showRole !== 4">
<el-col :span="1.5">
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd"
v-hasPermi="['routine:stuIdReissue:add']">新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="success" plain icon="el-icon-edit" size="mini" :disabled="single" @click="handleUpdate"
v-hasPermi="['routine:stuIdReissue:edit']">修改</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="danger" plain icon="el-icon-delete" size="mini" :disabled="multiple" @click="handleDelete"
v-hasPermi="['routine:stuIdReissue:remove']">删除</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport"
v-hasPermi="['routine:stuIdReissue:export']">导出</el-button>
</el-col>
</el-row>
<el-row class="mb8">
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList" v-if="showRole <= 2"></right-toolbar>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getListByCounsellorName" v-if="showRole === 3"></right-toolbar>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getListName" v-if="showRole === 4"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="stuIdReissueList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="学号" align="center" prop="stuNo" />
<el-table-column label="学生名称" align="center" prop="stuName" />
<el-table-column label="性别" align="center" prop="gender" />
<el-table-column label="学院" align="center" prop="departmentName" />
<el-table-column label="年级" align="center" prop="gradeName" />
<el-table-column label="班级" align="center" prop="className" />
<el-table-column label="民族" align="center" prop="mz">
<template slot-scope="scope">
<dict-tag :options="dict.type.rt_nation" :value="scope.row.mz" />
</template>
</el-table-column>
<el-table-column label="照片" align="center" prop="photo" width="100">
<template slot-scope="scope">
<image-preview :src="scope.row.photo" :width="50" :height="50" />
</template>
</el-table-column>
<el-table-column label="补办原因" align="center" prop="reason" />
<el-table-column label="审核状态" align="center" prop="inspectionProgress">
<template slot-scope="scope">
<el-tag type="danger" v-if="scope.row.inspectionProgress === 0">未审核</el-tag>
<el-tag type="success" v-else-if="scope.row.inspectionProgress === 1">辅导员通过</el-tag>
<el-tag type="success" v-else-if="scope.row.inspectionProgress === 2">学工通过</el-tag>
<el-tag type="danger" v-else>辅导员驳回</el-tag>
</template>
</el-table-column>
<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)"
v-hasPermi="['routine:stuIdReissue:edit']" v-if="showRole !== 4">修改</el-button>
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
v-hasPermi="['routine:stuIdReissue:remove']">取消申请</el-button>
<el-button size="mini" type="text" icon="el-icon-info" @click="detail(scope.row)"
v-if="scope.row.inspectionProgress >= -1">详情</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" v-if="showRole <= 2"/>
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
@pagination="getListByCounsellorName" v-if="showRole === 3"/>
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
@pagination="getListName" v-if="showRole === 4"/>
<!-- 添加或修改学生证补办对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="学生名称" prop="stuName">
<el-input v-model="form.stuName" placeholder="请输入学生名称" />
</el-form-item>
<el-form-item label="照片" prop="photo">
<image-upload v-model="form.photo" />
</el-form-item>
<el-form-item label="补办原因" prop="reason">
<el-input v-model="form.reason" placeholder="请输入补办原因" />
</el-form-item>
<el-form-item label="学号" prop="stuNo">
<el-input v-model="form.stuNo" placeholder="请输入学号" />
</el-form-item>
<!-- <el-form-item label="审核状态" prop="inspectionProgress">
<el-select v-model.number="form.inspectionProgress" placeholder="请选择审核状态" style="width: 100%;">
<el-option label="学生提交申请" value="0" key="学生提交申请"></el-option>
<el-option label="辅导员通过" value="1" key="辅导员通过"></el-option>
<el-option label="学工通过" value="2" key="学工通过"></el-option>
</el-select>
</el-form-item> -->
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { listStuIdReissue, getStuIdReissue, delStuIdReissue, addStuIdReissue, updateStuIdReissue, listStuIdReissueName, getListByCounsellorName } from "@/api/routine/stuIdReissue";
export default {
name: "reissuerLIst",
dicts: ['rt_nation'],
data() {
return {
// 遮罩层
loading: true,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 学生证补办表格数据
stuIdReissueList: [],
// 弹出层标题
title: "",
// 是否显示弹出层
open: false,
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
stuName: null,
photo: null,
reason: null,
stuId: null,
inspectionProgress: null
},
// 表单参数
form: {},
// 表单校验
rules: {
photo: [
{ required: true, message: "照片不能为空", trigger: "blur" }
],
reason: [
{ required: true, message: "补办原因不能为空", trigger: "blur" }
],
},
inspectionProgressList: [
{ val: 0, name: '学生提交申请' },
{ val: 1, name: '辅导员通过' },
{ val: 2, name: '学工通过' }
],
showRole: '',
};
},
created() {
let temp = this.$store.getters.roles;
temp.map(x => {
if (x == "admin") {
this.showRole = 1;
this.getList();
}
if (x == "test") { //学工
this.showRole = 1;
this.getList();
}
if (x == "stumanger") { //学务
this.showRole = 2;
this.getList();
}
if (x == "testteacher") { //辅导员
this.showRole = 3;
this.getListByCounsellorName();
}
if (x == "teststu") { //学生
this.showRole = 4;
this.getListName()
}
});
},
methods: {
/** 查询学生证补办列表 */
getList() {
this.loading = true;
listStuIdReissue(this.queryParams).then(response => {
this.stuIdReissueList = response.rows;
this.total = response.total;
this.loading = false;
});
},
/** 根据学校名字查询学生证补办列表 */
getListName() {
this.loading = true;
listStuIdReissueName(this.queryParams).then(response => {
this.stuIdReissueList = response.rows;
this.total = response.total;
this.loading = false;
});
},
/** 根据学校名字查询学生证补办列表 */
getListByCounsellorName() {
this.loading = true;
getListByCounsellorName(this.queryParams).then(response => {
this.stuIdReissueList = response.rows;
this.total = response.total;
this.loading = false;
});
},
// 取消按钮
cancel() {
this.open = false;
this.reset();
},
// 表单重置
reset() {
this.form = {
id: null,
stuName: null,
photo: null,
reason: null,
stuId: null,
createTime: null,
inspectionProgress: null
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.handleRole()
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id)
this.single = selection.length !== 1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加学生证补办";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const id = row.id || this.ids
getStuIdReissue(id).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改学生证补办";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.id != null) {
updateStuIdReissue(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.handleRole()
});
} else {
addStuIdReissue(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.handleRole()
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
if (row.inspectionProgress > 0) {
this.$message.error('正在审核中,无法取消')
return
}
this.$modal.confirm('是否确认取消学生证补办申请编号为"' + ids + '"的数据项?').then(function () {
return delStuIdReissue(ids);
}).then(() => {
this.handleRole()
this.$modal.msgSuccess("取消成功");
}).catch(() => { });
},
/** 导出按钮操作 */
handleExport() {
this.download('routine/stuIdReissue/export', {
...this.queryParams
}, `stuIdReissue_${new Date().getTime()}.xlsx`)
},
detail(row) {
this.$router.push({
path: '/routine/sicr/stuIdReissue',
query: {
id: row.id,
stuNo: row.stuNo,
inspectionProgress: row.inspectionProgress,
fdyCmt: row.fdyCmt,
jwcCmt: row.jwcCmt
},
})
},
handleRole() {
if (this.showRole === 4) {
this.getListName()
} else if (this.showRole === 3) {
this.getListByCounsellorName()
} else {
this.getList();
}
}
}
};
</script>

View File

@@ -0,0 +1,190 @@
<!-- -->
<template>
<div style="margin: 20px 0;">
<el-button style="margin-left: 50px;" size="mini" type="success" v-print="printobj">点击打印</el-button>
<div id="disposal">
<div style="text-align: center;margin: 40px 0;">
<div>广西水利电力职业技术学院</div>
<div style="font-size: 30px;">补办学生证申请表</div>
</div>
<table align="center" border="1" width="800px" height="900px" cellspacing="0">
<tr align="center" height="50px" cellspacing="0">
<td width="150px">学号</td>
<td width="150px" colspan="2">{{ tableData.stuNo }}</td>
<td>姓名</td>
<td width="150px" colspan="2">{{ tableData.stuName }}</td>
<td width="150px" rowspan="3">
<img :src="imgUrl + tableData.photo" alt="相片" style="width: 100%;height: 150px;">
</td>
</tr>
<tr align="center" height="50px">
<td>性别</td>
<td width="50px">{{ tableData.gender }}</td>
<td>民族</td>
<td><dict-tag :options="dict.type.rt_nation" :value="tableData.mz" /></td>
<td>籍贯</td>
<td>{{ tableData.jg }}</td>
</tr>
<tr align="center" height="50px">
<td>班级</td>
<td colspan="5">{{ tableData.className }}</td>
</tr>
<tr align="center" height="50px">
<td>出生日期</td>
<td colspan="2">{{ formatDate(tableData.birthday) }}</td>
<td>入学时间</td>
<td colspan="3">{{ formatDate(tableData.enrollmentTime) }}</td>
</tr>
<tr align="center" height="50px">
<td>家庭详细地址</td>
<td colspan="4">{{ tableData.birthplace }}</td>
<td>乘火车区间</td>
<td colspan="2">南宁至{{ tableData.railwayStation }}</td>
</tr>
<tr rowspan="2" align="center" height="150px">
<td>遗失原因说明</td>
<td colspan="6">
<div style="padding: 20px 0;">
{{ tableData.reason }}
</div>
<div style="text-align: right;margin: 0 50px 10px 10px">
申请人签名
</div>
</td>
</tr>
<tr align="center" rowspan="2" height="150px">
<td>辅导员审核意见</td>
<td colspan="6" style="position: relative;">
<div style="padding: 20px 0;">
{{ tableData.fdyCmt }}
</div>
<div style="text-align: right;margin: 0 50px 10px 10px">
辅导员签名
</div>
</td>
</tr>
<tr rowspan="2" align="center" height="150px">
<td>学工处审核意见</td>
<td colspan="6" style="position: relative;">
<img style="position: absolute; bottom: 0;width: 150px;right: 50px;opacity: 0.2;" src="../../../assets/logo/logo.png" alt="">
<div style="padding: 20px 0;">
{{ tableData.jwcCmt }}
</div>
<div style="text-align: right;margin: 0 50px 10px 10px;">
签字盖章
</div>
</td>
</tr>
</table>
</div>
</div>
</template>
<script>
import { getStuIdReissue } from "@/api/routine/stuIdReissue";
export default {
name: 'studentIdPrinting',
dicts: ['rt_nation'],
data() {
return {
tableData: [],
imgUrl: process.env.VUE_APP_BASE_API,
//打印
printobj: {
id: 'disposal',
popTitle: '打印', // 打印配置页上方标题
extraHead: '', //最上方的头部文字附加在head标签上的额外标签,使用逗号分隔
preview: '', // 是否启动预览模式默认是false开启预览模式可以先预览后打印
previewTitle: '', // 打印预览的标题(开启预览模式后出现),
previewPrintBtnLabel: '', // 打印预览的标题的下方按钮文本,点击可进入打印(开启预览模式后出现)
zIndex: '', // 预览的窗口的z-index默认是 20002此值要高一些这涉及到预览模式是否显示在最上面
previewBeforeOpenCallback() { }, //预览窗口打开之前的callback开启预览模式调用
previewOpenCallback() { }, // 预览窗口打开之后的callback开启预览模式调用
beforeOpenCallback() { }, // 开启打印前的回调事件
openCallback() { }, // 调用打印之后的回调事件
closeCallback() { }, //关闭打印的回调事件(无法确定点击的是确认还是取消)
url: '',
standard: '',
extraCss: '',
},
}
},
watch: {
"$route.query.listId": {
immediate: true,
handler() {
this.reset()
if (this.$route.query.listId !== undefined) {
if (this.$route.query.listId !== null) {
this.getStuIdReissue(this.$route.query.listId)
}
this.reset()
} else {
this.reset()
}
}
}
},
methods: {
getStuIdReissue(id) {
getStuIdReissue(id).then(response => {
this.tableData = response.data;
});
},
reset() {
this.tableData = []
},
//时间数据2024-05-24转成年月日
formatDate(dateStr) {
// 创建一个 Date 对象
const date = new Date(dateStr);
// 检查日期是否有效
if (isNaN(date.getTime())) {
return '无效的日期';
}
// 提取年月日,并添加前缀和后缀
const year = date.getFullYear();
const month = (date.getMonth() + 1).toString().padStart(2, '0'); // 月份从0开始所以需要+1
const day = date.getDate().toString().padStart(2, '0'); // 使用 padStart 添加前导零
// 拼接成 "年月日" 格式
return `${year}${month}${day}`;
}
},
// 生命周期 - 创建完成访问当前this实例
created() {
},
// 生命周期 - 挂载完成访问DOM元素
mounted() {
},
// 离开当前页面时执行代码
destroyed() {
}
}
</script>
<style scoped>
/* @import url(); 引入css类 */
</style>
<style @media="print">
@page {
size: auto;
margin: 5mm;
}
html {
background-color: #ffffff;
height: auto;
margin: 0px;
}
</style>