移动端V1.0

This commit is contained in:
2025-07-16 15:34:34 +08:00
commit 194b0750fd
1083 changed files with 178295 additions and 0 deletions

View File

@@ -0,0 +1,942 @@
<template>
<!-- 做到退学年份 -->
<view class="detail">
<Nav :navs="navs" @change="navChange" />
<view class="form" v-if="navIndex==0">
<view class="container" style="padding-bottom: 60px;" v-if="formData!=null">
<!--学号 -->
<view class="form-item">
<text class="label">学号</text>
<text class="uni-input">{{ formData.stuNo }}</text>
</view>
<!--姓名 -->
<view class="form-item">
<text class="label">姓名</text>
<text class="uni-input">{{ formData.stuName }}</text>
</view>
<!-- 性别 -->
<view class="form-item">
<text class="label">性别</text>
<text class="uni-input">{{ formData.gender }}</text>
</view>
<!--院部 -->
<view class="form-item">
<text class="label">院部</text>
<text class="uni-input">{{ formData.departmentName }}</text>
</view>
<!--班级 -->
<view class="form-item">
<text class="label">年级</text>
<text class="uni-input">{{ formData.gradeName }}</text>
</view>
<view class="form-item">
<text class="label">班级</text>
<text class="uni-input">{{ formData.className }}</text>
</view>
<view class="form-item">
<text class="label">籍贯</text>
<text class="uni-input">{{ formData.jg }}</text>
</view>
<view class="form-item">
<text class="label">辅导员</text>
<text class="uni-input">{{formData.applicantName}}</text>
</view>
<view class="form-item">
<text class="label">辅导员联系情况</text>
<text class="uni-input">{{formData.ideologicalEducation}}</text>
</view>
<view class="form-item">
<text class="label">在校时间说明</text>
<text class="uni-input">{{formData.instructionSchoolHours}}</text>
</view>
<view class="btns" v-if="tag==1">
<button class="turn-down" @tap="onReject" v-if="role!=='学生'">驳回</button>
<button class="return" @tap="onReturn" v-if="returnTaskList.length>0&&role!=='学生'">回退</button>
<button class="submit" @tap="onComplete">审批</button>
</view>
</view>
</view>
<view class="progress" v-if="navIndex==1">
<FlowStep :procInsId="taskForm.procInsId" :deployId="taskForm.deployId" />
</view>
<uni-popup class="popup" ref="approveDialog" type="dialog" background-color="#fff">
<view class="popup-content">
<view class="title">
流程审批
</view>
<!-- <view class="content">
<button class="download" @tap="onLook">下载退学下文</button>
</view> -->
<view class="content" v-if="taskName=='辅导员联系情况'">
<view class="form-item">
<label class="label"><text class="required">*</text>辅导员联系情况</label>
<textarea type="text" placeholder-class="placeholderColor" placeholder="请输入辅导员联系情况"
v-model="taskForm.ideologicalEducation" />
</view>
<view class="form-item">
<label class="label"><text class="required">*</text>在校时间说明</label>
<input type="text" placeholder-class="placeholderColor" placeholder="请输入在校时间说明"
v-model="taskForm.instructionSchoolHours" />
</view>
</view>
<view class="content" v-if="taskName=='学生教育管理科审批归档'">
<view class="form-item">
<label class="label"><text class="required">*</text>退学文号</label>
<input type="text" placeholder-class="placeholderColor" placeholder="请输入休学文号"
v-model="taskForm.reentryNumber" />
</view>
<view class="form-item">
<label class="label"><text class="required">*</text>注销类型</label>
<picker v-if="rt_logout_types.length>0" range-key="dictLabel" :value="logout_type_index"
:range="rt_logout_types" @change="logoutTypeChange">
<view class="uni-input">
<text
class="val">{{logout_type_index==-1?'请选择注销类型':rt_logout_types[logout_type_index].dictLabel}}</text>
<uni-icons type="down" size="16" color="#202020"></uni-icons>
</view>
</picker>
</view>
<view class="form-item">
<label class="label"><text class="required">*</text>退学年份</label>
<picker v-if="dropOutYears.length>0" @change="onYearsChangeTime" range-key="dictLabel"
:range="dropOutYears" :value="dropOutIndex">
<view class="uni-input">
<text
class="val">{{dropOutIndex==-1?'请选择退学年份':dropOutYears[dropOutIndex].dictLabel}}</text>
<uni-icons type="calendar" size="25" color="#202020"></uni-icons>
</view>
</picker>
</view>
<view class="form-item">
<label class="label"><text class="required">*</text>退学下文</label>
<view class="upload-file" v-if="tempfiles.length==0" @tap="onUploadFile">
<view class="add">
+ 添加文件
</view>
<view class="tip">
<view>文件大小:不超过 5MB</view>
<view>文件格式:doc/xls/ppt/txt/pdf/xlsx </view>
</view>
<view class="file-list">
<view class="item" v-for="(file,index) in tempfiles" :key="index">
<image src="../../../../static/file.png" mode="widthFix"></image>
<view class="right">
<text>{{file.name}}</text>
<text>{{file.name}}</text>
</view>
</view>
</view>
</view>
<view class="file-list" v-else>
<view class="files">
<view class="item" v-for="(file,index) in tempfiles" :key="index">
<image src="../../../../static/file.png" mode="widthFix"></image>
<view class="right">
<text>{{file.name}}</text>
<text>{{file.size}}k</text>
</view>
<view class="del" @tap="onDel(index)">
删除
</view>
</view>
</view>
<view v-if="tempfiles.length<3" class="btn" @tap="onUploadFile">
+ 添加文件
</view>
</view>
</view>
<view class="form-item">
<label class="label">备注</label>
<textarea placeholder-class="placeholderColor" placeholder="请输入备注" v-model="taskForm.remark"
rows="3"></textarea>
</view>
</view>
<view class="btns">
<button type="default" @tap="onCancel">取消</button>
<button type="primary" @tap="approveDialogConfirm">确定</button>
</view>
</view>
</uni-popup>
<!-- 回退弹窗 -->
<uni-popup class="popup return-dialog" ref="returnDialog" type="dialog" background-color="#fff">
<view class="popup-content">
<view class="title">
退回流程
</view>
<view class="content">
<view class="form-item">
<label>退回节点</label>
<scroll-view scroll-y="true">
<view class="list">
<view class="item" @tap="taskDotChange(index,item)"
:class="index==taskDotIndex?'active':''" v-for="(item,index) in returnTaskList"
:key="index">
{{item.name}}
</view>
</view>
</scroll-view>
</view>
<view class="form-item">
<label> <text style="color: red;">*</text> 退回意见</label>
<textarea v-model="taskForm.comment"></textarea>
</view>
</view>
<view class="btns">
<button type="default" @tap="onCancel">取消</button>
<button type="primary" @tap="returnDialogConfirm">确定</button>
</view>
</view>
</uni-popup>
<!-- 驳回弹窗 -->
<uni-popup ref="rejectDialog" type="dialog">
<uni-popup-dialog mode="input" title="驳回" v-model="inputReject" @confirm="rejectDialogConfirm"
placeholder="请输入驳回理由"></uni-popup-dialog>
</uni-popup>
</view>
</template>
<script>
import Nav from "@/components/navs/navs.vue"
import FlowStep from "@/components/flow-step/flow-step.vue"
import {
baseUrl
} from "@/config.js";
import {
getDiseaseTypeByDictValue
} from "@/utils/dict.js";
import uploadFile from "@/plugins/upload.js";
import {
getRtStuDisqualificationByProcInsId,
updateDisqualification
} from '@/api/disqualifiCationIndex/disqualifiCationIndex'
import {
getLeaveApplicationByProcInsId,
complete,
reject,
returnList,
returnTask,
getDisciplinaryApplicationByProcInsId,
getStuDisciplinaryRelieveByProcInsId,
updateDisciplinaryApplication
} from "@/api/task.js";
import {
getDicts
} from "@/api/system/dict/data";
export default {
components: {
Nav,
FlowStep
},
data() {
return {
navs: [{
text: "表单信息",
val: 0
},
{
text: "流程跟踪",
val: 1
}
],
navIndex: 0,
taskDotIndex: 0, //回退列表索引
returnTaskList: [], // 回退列表数据
formData: null,
rt_quit_type: "",
rt_quit_types: [],
rt_logout_types: [], //注销类型列表
logout_type_index: -1, //注销索引
dropOutYears: [], //退学年份列表
dropOutIndex: -1, //退学年份索引
role: uni.getStorageSync("roles"),
tempfiles: [], //临时文件
inputReject: "",
taskName: "", //节点名
category: "",
taskForm: {
// multiple: false,
comment: '', // 意见内容
procInsId: '', // 流程实例编号
instanceId: '', // 流程实例编号
deployId: '', // 流程定义编号
taskId: '', // 流程任务编号
procDefId: '', // 流程编号
vars: '',
targetKey: '',
// quitYear: '',
ideologicalEducation: "",
instructionSchoolHours: "",
//
reentryNumber: "", //退学文号
disqualificatioType: "", //注销类型
reentryYear: '', //退学年份
ihandlingSuggestion: '', //选择的文件
},
}
},
onLoad(option) {
let query = JSON.parse(option.query);
this.taskId = query.taskId;
this.category = query.category;
this.tag = query.tag;
this.taskForm.deployId = query.deployId;
this.taskForm.instanceId = query.procInsId
this.taskForm.procInsId = query.procInsId
this.taskForm.executionId = query.executionId
this.taskForm.taskId = query.taskId
this.taskName = query.taskName
this.getRtStuDisqualificationByProcInsId(this.taskForm.procInsId)
},
methods: {
navChange(index) {
this.navIndex = index;
},
taskDotChange(index, item) {
this.taskDotIndex = index;
this.taskForm.targetKey = item.id;
},
getRtStuDisqualificationByProcInsId(procInsId) {
getRtStuDisqualificationByProcInsId(procInsId).then((res) => {
this.formData = res.data;
this.get_penalty_type(this.formData.dropOutType);
this.get_logout_type();
console.log(this.tag);
if (this.tag == 1) {
this.getReturnList();
}
this.getYear();
})
},
onComplete() {
this.$refs.approveDialog.open();
},
onReturn() {
this.$refs.returnDialog.open();
},
getReturnList() {
returnList(this.taskForm).then((res) => {
this.returnTaskList = res.data
})
},
onReject() {
this.$refs.rejectDialog.open();
},
onCancel() {
this.$refs.approveDialog.close();
this.$refs.returnDialog.close();
},
//回退确认
returnDialogConfirm() {
if (this.taskForm.targetKey == "") {
this.taskForm.targetKey = this.returnTaskList[0].id;
}
if (this.taskForm.comment == "") {
uni.showToast({
title: `请填写回退意见`,
icon: "none"
});
return;
}
uni.showLoading({
title: "正在回退"
});
returnTask(this.taskForm).then((res) => {
uni.hideLoading();
uni.showToast({
title: res.msg
})
uni.navigateBack({
success: () => {
const pages = getCurrentPages();
if (pages.length > 0) {
const prevPage = pages[pages.length - 2]
if (prevPage && typeof prevPage.getList === 'function') {
prevPage.handleChange(2);
}
}
}
})
})
this.$refs.returnDialog.close();
},
approveDialogConfirm() {
let requiredFields = [];
// if (this.taskName == '辅导员联系情况' && this.category == 'dropOut') {
// requiredFields = [
// 'ideologicalEducation',
// 'instructionSchoolHours'
// ];
// } else if (this.taskName == '学生教育管理科审核' && this.category == 'dropOut') {
// requiredFields = [
// 'quitNumber',
// 'quitYear'
// ];
// }
if (this.taskName == '学生教育管理科审批归档') {
requiredFields = [
'reentryNumber',
'disqualificatioType',
'reentryYear',
'ihandlingSuggestion'
];
}
const emptyField = requiredFields.find(field => this.taskForm[field] === "");
if (emptyField) {
uni.showToast({
title: `请填写完整内容`,
icon: "none"
})
return;
}
console.log(this.taskForm);
uni.showLoading({
title: "正在审批"
});
this.taskForm.comment = '同意';
complete(this.taskForm).then(res => {
if (res.code == 200) {
if (this.taskName == '学生教育管理科审批归档' && this.category == 'disqualification') {
//待修改
this.formData.reentryNumber = this.taskForm.reentryNumber;
this.formData.disqualificatioType = this.taskForm.disqualificatioType;
this.formData.reentryYear = this.taskForm.reentryYear;
this.formData.ihandlingSuggestion = this.taskForm.ihandlingSuggestion;
this.formData.remark = this.taskForm.remark;
this.updateDisqualification()
}
} else {
uni.showToast({
title: "审批成功"
});
}
uni.hideLoading();
uni.navigateBack({
success: () => {
const pages = getCurrentPages();
if (pages.length > 0) {
const prevPage = pages[pages.length - 2]
if (prevPage && typeof prevPage.getList === 'function') {
prevPage.handleChange(2);
}
}
}
})
})
},
rejectDialogConfirm() {
if (this.inputReject == "") {
uni.showToast({
title: `请填写驳回理由`,
icon: "none"
})
return;
}
uni.showLoading({
title: "正在驳回"
});
let sData = {
taskId: this.taskForm.taskId,
comment: this.inputReject
}
reject(sData).then(res => {
if (res.code == 200) {
uni.showToast({
title: "已驳回"
})
uni.hideLoading();
uni.navigateBack({
success: () => {
const pages = getCurrentPages();
if (pages.length > 0) {
const prevPage = pages[pages.length - 2]
if (prevPage && typeof prevPage.getList === 'function') {
prevPage.handleChange(2);
}
}
}
})
}
})
},
updateDisqualification() {
updateDisqualification(this.formData).then((response) => {
uni.showToast({
title: response.msg
})
})
},
get_penalty_type(ty) {
getDicts('rt_quit_type').then(res => {
this.rt_quit_types = res.data;
this.rt_quit_type = getDiseaseTypeByDictValue("rt_quit_type", ty, res.data);
});
},
//获取退学年份
getYear() {
getDicts('sys_teacher_kpi_filling_year').then(res => {
this.dropOutYears = res.data;
});
},
//切换退学年份
onYearsChangeTime(e) {
this.dropOutIndex = e.detail.value;
this.taskForm.reentryYear = this.dropOutYears[e.detail.value].dictValue;
},
//获取注销类型
get_logout_type(ty) {
getDicts('rt_logout_type').then(res => {
this.rt_logout_types = res.data;
});
},
// 切换类型选择
logoutTypeChange(e) {
this.logout_type_index = e.detail.value;
this.taskForm.disqualificatioType = this.rt_logout_types[e.detail.value].dictValue;
},
//上传文件
onUploadFile() {
uni.chooseFile({
count: 3,
extension: ['.doc', '.xls', '.ppt', '.docx'],
success: (file) => {
if (file.tempFiles.length > 0) {
const fileExtension = file.tempFiles[0].name.split('.').pop(); // 提取后缀名
const fileSizeKB = (file.tempFiles[0].size / 1024).toFixed(2);
this.tempfiles.push({
name: file.tempFiles[0].name,
extension: fileExtension,
size: fileSizeKB
})
}
uploadFile("/common/upload", file.tempFilePaths[0]).then((res) => {
let result = JSON.parse(res);
if (result.code == 200) {
uni.showToast({
title: "文件上传成功"
})
if (this.taskForm.ihandlingSuggestion !== "") {
this.taskForm.ihandlingSuggestion = this.taskForm
.ihandlingSuggestion +
"," + result.fileName;
} else {
this.taskForm.ihandlingSuggestion = result.fileName;
}
}
})
}
})
},
onDel(index) {
uni.showModal({
title: "确定删除文件吗?",
success: (res) => {
if (res.confirm) {
this.tempfiles.splice(index, 1);
let newFiles = this.taskForm.ihandlingSuggestion.split(",");
newFiles.splice(index, 1)
this.taskForm.ihandlingSuggestion = newFiles.join(",")
}
}
})
},
onLook(){
}
}
}
</script>
<style scoped lang="scss">
.detail {
padding-top: 90rpx;
.container {
display: flex;
flex-direction: column;
align-items: center;
padding: 10rpx;
.form-item {
width: 95%;
height: 80rpx;
display: flex;
align-items: center;
margin-bottom: 20rpx;
justify-content: space-between;
border-bottom: 1px solid #ededee;
}
.label {
text-align: right;
margin-right: 20rpx;
text-wrap: nowrap;
}
.uni-input {
color: #888889;
text-align: right;
}
.btn {
width: 100%;
height: 90rpx;
display: flex;
justify-content: space-between;
position: fixed;
bottom: 20px;
left: 0;
margin: 0 auto;
}
button {
width: 30%;
background-color: #87CEFA;
color: white;
}
.btns {
display: flex;
background: white;
position: fixed;
bottom: 0;
left: 0;
right: 0;
z-index: 999;
button {
height: 50px;
line-height: 50px;
flex: 1;
border-radius: 0;
&.turn-down {
background-color: #FF3334;
}
&.return {
background-color: #FFBA00;
}
&.submit {
background-color: #0092FF;
}
}
}
}
.progress {
padding: 0 30rpx 30rpx;
.title {
font-weight: bold;
color: #202020;
display: inline-block;
font-size: 30rpx;
margin-bottom: 30rpx;
}
}
.popup {
.popup-content {
width: 90vw;
max-height: 86vh;
overflow: scroll;
// padding: 0 40rpx;
.title {
font-size: 40rpx;
font-weight: bold;
text-align: center;
margin: 20rpx 0;
}
.content {
padding: 0 40rpx;
.download{
background-color: #FF4949;
color: white;
margin-top:60px;
}
.show-letter {
.title {
font-size: 30rpx;
}
.stu-name {
margin-bottom: 8rpx;
}
.desc {
color: #797979;
}
.bottom {
button {
margin: 20rpx 0;
}
.gaizhang {
text-align: right;
position: relative;
image {
width: 200rpx;
}
.time {
position: absolute;
right: 30rpx;
bottom: 55rpx;
display: flex;
flex-direction: column;
}
}
}
}
.form-item {
.required {
color: red;
margin-right: 8rpx;
}
&.download {
margin: 50rpx 0 30rpx;
display: flex;
align-items: center;
color: #4097FE;
justify-content: center;
.file-icon {
width: 50rpx;
margin-right: 20rpx;
}
text {
border-bottom: 1px solid #4097FE;
padding-bottom: 2px;
}
}
.label {
display: inline-block;
margin: 30rpx 0 20rpx;
color: #202020;
font-weight: 600;
}
input {
display: inline-block;
padding: 0 20rpx;
height: 70rpx;
color: #D8D8D8;
}
textarea {
height: 100rpx;
padding: 10rpx;
}
.placeholderColor {
color: #D8D8D8;
}
input,
textarea {
width: 100%;
border: 1px solid #E1E1E1;
border-radius: 16rpx;
}
picker {
border: 1px solid #E1E1E1;
height: 70rpx;
line-height: 70rpx;
padding: 0 30rpx;
.uni-input {
display: flex;
color: #202020;
opacity: 0.35;
.val {
flex: 1;
}
}
}
.upload-file {
border: 1px solid #E1E1E1;
padding: 20rpx;
display: flex;
flex-direction: column;
align-items: center;
text-align: center;
.tip {
margin-top: 15rpx;
// color: #202020;
color: #F56C6C;
opacity: 0.8;
font-size: 24rpx;
view {
margin-bottom: 8rpx;
}
}
}
.file-list {
border: 1px solid #D8D8D8;
border-radius: 20rpx;
.files {
.item {
display: flex;
padding: 40rpx 20rpx;
align-items: center;
&:not(:last-child) {
border-bottom: 1px solid #E1E1E1;
}
image {
width: 60rpx;
margin-right: 20rpx;
}
.right {
flex: 1;
display: flex;
flex-direction: column;
text:last-child {
color: #969696;
margin-top: 10rpx;
}
}
.del {
color: red;
}
}
.img {
position: relative;
width: 160rpx;
height: 170rpx;
margin-bottom: 15rpx;
margin-right: 15rpx;
image {
width: 100%;
height: 100%;
}
.remove {
position: absolute;
right: 0;
top: 0;
color: white;
background-color: rgba(0, 0, 0, 0.4);
width: 52rpx;
height: 52rpx;
display: flex;
justify-content: center;
align-items: center;
border-radius: 50%;
}
}
}
.btn {
border-top: 1px solid #D8D8D8;
height: 100rpx;
display: flex;
justify-content: center;
align-items: center;
font-size: 32rpx;
}
}
.uni-file-picker {
/deep/ .uni-progress-bar {
background-color: transparent !important;
}
}
}
}
.btns {
display: flex;
margin-top: 80rpx;
button {
flex: 1;
border-radius: 0;
border-bottom: 0;
&:first-child {
background-color: transparent;
border: 1px solid #4097FE;
border-bottom: 0;
color: #4097FE;
}
}
}
}
}
.return-dialog {
.form-item {
label {
font-weight: bold;
display: inline-block;
margin-bottom: 10px;
}
&:last-child {
margin-top: 15px;
}
.list {
height: auto;
max-height: 200px;
display: flex;
flex-wrap: wrap;
// height: 200px;
// display: flex;
// flex-wrap: wrap;
.item {
width: 100%;
height: 40px;
line-height: 40px;
text-align: center;
&.active {
background-color: #0092FF;
color: white;
}
}
}
}
}
}
</style>

View File

@@ -0,0 +1,751 @@
<template>
<view class="detail">
<Nav :navs="navs" @change="navChange" />
<view class="form" v-if="navIndex==0">
<view class="container" style="padding-bottom: 60px;" v-if="formData!=null">
<!--学号 -->
<view class="form-item">
<text class="label">学号</text>
<text class="uni-input">{{ formData.stuNo }}</text>
</view>
<!--姓名 -->
<view class="form-item">
<text class="label">姓名</text>
<text class="uni-input">{{ formData.stuName }}</text>
</view>
<!-- 性别 -->
<view class="form-item">
<text class="label">性别</text>
<text class="uni-input">{{ formData.gender }}</text>
</view>
<!--院部 -->
<view class="form-item">
<text class="label">院部</text>
<text class="uni-input">{{ formData.departmentName }}</text>
</view>
<!--班级 -->
<view class="form-item">
<text class="label">年级</text>
<text class="uni-input">{{ formData.gradeName }}</text>
</view>
<view class="form-item">
<text class="label">班级</text>
<text class="uni-input">{{ formData.className }}</text>
</view>
<!--联系电话 -->
<view class="form-item">
<text class="label">出生日期</text>
<text class="uni-input">{{ formData.birthday }}</text>
</view>
<!--家长姓名 -->
<view class="form-item">
<text class="label">家长姓名</text>
<text class="uni-input">{{ formData.parentName }}</text>
</view>
<!--家长联系电话 -->
<view class="form-item">
<text class="label">家长电话</text>
<text class="uni-input">{{ formData.parentPhone }}</text>
</view>
<view class="form-item">
<text class="label">民族</text>
<text class="uni-input">{{ formData.mz }}</text>
</view>
<view class="form-item">
<text class="label">籍贯</text>
<text class="uni-input">{{ formData.jg }}</text>
</view>
<view class="form-item">
<text class="label">退学类型</text>
<text class="uni-input">{{rt_quit_type}}</text>
</view>
<view class="form-item">
<text class="label">申请原因</text>
<text class="uni-input">{{ formData.reasonApplying }}</text>
</view>
<view class="form-item">
<text class="label">辅导员联系情况</text>
<text class="uni-input">{{formData.ideologicalEducation}}</text>
</view>
<view class="form-item">
<text class="label">在校时间说明</text>
<text class="uni-input">{{formData.instructionSchoolHours}}</text>
</view>
<view class="form-item">
<text class="label">退学文号</text>
<text class="uni-input">{{formData.quitNumber}}</text>
</view>
<view class="form-item">
<text class="label">退学类别</text>
<text class="uni-input">{{formData.rt_logouttype}}</text>
</view>
<view class="form-item">
<text class="label">退学年份</text>
<text class="uni-input">{{formData.quitYear}}</text>
</view>
<view class="form-item">
<text class="label">备注</text>
<text class="uni-input">{{formData.remark}}</text>
</view>
<view class="form-item" style="height: auto;">
<text class="label">签名</text>
<view class="uni-input">
<image class="form-img" :src="ImageUrl+formData.applySignature" mode=""></image>
</view>
</view>
<view class="btns" v-if="tag==1">
<button class="turn-down" @tap="onReject" v-if="role!=='学生'">驳回</button>
<button class="return" @tap="onReturn" v-if="returnTaskList.length>0&&taskName!=='学生接收'">回退</button>
<button class="submit" @tap="onComplete">审批</button>
</view>
</view>
</view>
<view class="progress" v-if="navIndex==1">
<FlowStep :procInsId="taskForm.procInsId" :deployId="taskForm.deployId" />
</view>
<uni-popup class="popup" ref="approveDialog" type="dialog" background-color="#fff">
<view class="popup-content">
<view class="title">
流程审批
</view>
<view class="content" v-if="taskName=='辅导员联系情况'">
<view class="form-item">
<label class="label"><text class="required">*</text>辅导员联系情况</label>
<textarea type="text" placeholder-class="placeholderColor" placeholder="请输入辅导员联系情况"
v-model="taskForm.ideologicalEducation" />
</view>
<view class="form-item">
<label class="label"><text class="required">*</text>在校时间说明</label>
<input type="text" placeholder-class="placeholderColor" placeholder="请输入在校时间说明"
v-model="taskForm.instructionSchoolHours" />
</view>
</view>
<view class="content" v-if="taskName=='学生教育管理科审核'">
<view class="form-item">
<label class="label"><text class="required">*</text>退学文号</label>
<input type="text" placeholder-class="placeholderColor" placeholder="请输入退学文号"
v-model="taskForm.quitNumber" />
</view>
<view class="form-item">
<label class="label"><text class="required">*</text>退学类别</label>
<picker v-if="dropOut_categorys.length>0" range-key="dictLabel" :value="dropOut_category_index"
:range="dropOut_categorys" @change="dropOutTypeChange">
<view class="uni-input">
<text
class="val">{{dropOut_category_index==-1?'请选择退学类别':dropOut_categorys[dropOut_category_index].dictLabel}}</text>
<uni-icons type="down" size="16" color="#202020"></uni-icons>
</view>
</picker>
</view>
<view class="form-item">
<label class="label"><text class="required">*</text>退学年份</label>
<picker v-if="quitSchoolYears.length>0" @change="onQuitYearChangeTime" :range="quitSchoolYears"
:value="quitSchoolIndex" range-key="dictLabel">
<view class="uni-input">
<text
class="val">{{quitSchoolIndex==-1?'请选择退学年份':quitSchoolYears[quitSchoolIndex].dictLabel}}</text>
<uni-icons type="calendar" size="25" color="#202020"></uni-icons>
</view>
</picker>
</view>
<view class="form-item">
<label class="label">备注</label>
<textarea v-model="taskForm.remark" type="text" placeholder-class="placeholderColor"
placeholder="请输入备注"></textarea>
</view>
</view>
<view class="btns">
<button type="default" @tap="onCancel">取消</button>
<button type="primary" @tap="approveDialogConfirm" :disabled="isSubmitting">确定</button>
</view>
</view>
</uni-popup>
<!-- 回退弹窗 -->
<uni-popup class="popup return-dialog" ref="returnDialog" type="dialog" background-color="#fff">
<view class="popup-content">
<view class="title">
退回流程
</view>
<view class="content">
<view class="form-item">
<label>退回节点</label>
<scroll-view scroll-y="true">
<view class="list">
<view class="item" @tap="taskDotChange(index,item)"
:class="index==taskDotIndex?'active':''" v-for="(item,index) in returnTaskList"
:key="index">
{{item.name}}
</view>
</view>
</scroll-view>
</view>
<view class="form-item">
<label><text class="required">*</text>退回意见</label>
<textarea v-model="taskForm.comment"></textarea>
</view>
</view>
<view class="btns">
<button type="default" @tap="onCancel">取消</button>
<button type="primary" @tap="returnDialogConfirm">确定</button>
</view>
</view>
</uni-popup>
<!-- 驳回弹窗 -->
<uni-popup ref="rejectDialog" type="dialog">
<uni-popup-dialog mode="input" title="驳回" v-model="inputReject" @confirm="rejectDialogConfirm"
placeholder="请输入驳回理由"></uni-popup-dialog>
</uni-popup>
</view>
</template>
<script>
import Nav from "@/components/navs/navs.vue"
import FlowStep from "@/components/flow-step/flow-step.vue"
import {
baseUrl
} from "@/config.js";
import {
getDiseaseTypeByDictValue
} from "@/utils/dict.js";
import uploadFile from "@/plugins/upload.js";
import {
getRtStuDropOutSchoolByprocInsId,
updateRtStuDropOutSchool
} from '@/api/rtStuDropOutSchool/rtStuDropOutSchool'
import {
getLeaveApplicationByProcInsId,
complete,
reject,
returnList,
returnTask,
getDisciplinaryApplicationByProcInsId,
getStuDisciplinaryRelieveByProcInsId,
updateDisciplinaryApplication
} from "@/api/task.js";
import {
getDicts
} from "@/api/system/dict/data";
export default {
components: {
Nav,
FlowStep
},
data() {
return {
isSubmitting: false, //表单提交标志位
navs: [{
text: "表单信息",
val: 0
},
{
text: "流程跟踪",
val: 1
}
],
navIndex: 0,
taskDotIndex: 0, //回退列表索引
returnTaskList: [], // 回退列表数据
formData: null,
rt_quit_type: "", //退学类型
rt_quit_types: [], //退学类型列表
quit_type_index: 0, //退学类型索引
dropOut_categorys: [], //退学类别列表
dropOut_category_index: -1, //退学类别索引
quitSchoolYears: [], //退学年份列表
quitSchoolIndex: -1, //退学年份索引
ImageUrl: baseUrl,
role: uni.getStorageSync("roles"),
inputReject: "",
taskName: "", //节点名
category: "",
taskForm: {
multiple: false,
comment: '', // 意见内容
procInsId: '', // 流程实例编号
instanceId: '', // 流程实例编号
deployId: '', // 流程定义编号
taskId: '', // 流程任务编号
procDefId: '', // 流程编号
vars: '',
targetKey: '',
quitNumber: "", //退学文号
quitYear: '',
ideologicalEducation: "",
instructionSchoolHours: "",
//退学类别
dropOutCategory: ''
},
}
},
onLoad(option) {
let query = JSON.parse(option.query);
this.taskId = query.taskId;
this.category = query.category;
this.tag = query.tag;
this.taskForm.deployId = query.deployId;
this.taskForm.instanceId = query.procInsId
this.taskForm.procInsId = query.procInsId
this.taskForm.executionId = query.executionId
this.taskForm.taskId = query.taskId
this.taskName = query.taskName
this.getRtStuDropOutSchoolByprocInsId(this.taskForm.procInsId)
},
methods: {
navChange(index) {
this.navIndex = index;
},
taskDotChange(index, item) {
this.taskDotIndex = index;
this.taskForm.targetKey = item.id;
},
getRtStuDropOutSchoolByprocInsId(procInsId) {
getRtStuDropOutSchoolByprocInsId(procInsId).then((res) => {
this.formData = res.data;
this.get_penalty_type(this.formData.dropOutType);
this.get_penalty_category(this.formData.dropOutCategory);
if (this.tag == 1) {
this.getReturnList();
}
this.getYear();
})
},
onComplete() {
this.$refs.approveDialog.open();
},
onReturn() {
this.$refs.returnDialog.open();
},
getReturnList() {
returnList(this.taskForm).then((res) => {
this.returnTaskList = res.data
})
},
onReject() {
this.$refs.rejectDialog.open();
},
onCancel() {
this.$refs.approveDialog.close();
this.$refs.returnDialog.close();
},
//回退确认
returnDialogConfirm() {
if (this.taskForm.targetKey == "") {
this.taskForm.targetKey = this.returnTaskList[0].id;
}
if (this.taskForm.comment == "") {
uni.showToast({
title: `请填写回退意见`,
icon: "none"
});
return;
}
uni.showLoading({
title: "正在回退"
});
returnTask(this.taskForm).then((res) => {
uni.hideLoading();
uni.showToast({
title: res.msg
})
uni.navigateBack({
success: () => {
const pages = getCurrentPages();
if (pages.length > 0) {
const prevPage = pages[pages.length - 2]
if (prevPage && typeof prevPage.getList === 'function') {
prevPage.handleChange(2);
}
}
}
})
})
this.$refs.returnDialog.close();
},
approveDialogConfirm() {
let requiredFields = [];
if (this.taskName == '辅导员联系情况' && this.category == 'dropOut') {
requiredFields = [
'ideologicalEducation',
'instructionSchoolHours'
];
} else if (this.taskName == '学生教育管理科审核' && this.category == 'dropOut') {
requiredFields = [
'quitNumber',
'dropOutCategory',
'quitYear'
];
}
const emptyField = requiredFields.find(field => this.taskForm[field] === "");
if (emptyField) {
uni.showToast({
title: `请填写完整内容`,
icon: "none"
})
return;
}
uni.showLoading({
title: "正在审批"
});
this.isSubmitting = true; // 设置为正在提交
this.taskForm.comment = '同意';
complete(this.taskForm).then(res => {
if (res.code == 200) {
if (this.taskName == '辅导员联系情况' && this.category == 'dropOut') {
this.formData.ideologicalEducation = this.taskForm.ideologicalEducation
this.formData.instructionSchoolHours = this.taskForm.instructionSchoolHours
this.updateRtStuDropOutSchool()
} else if (this.taskName == '学生教育管理科审核' && this.category == 'dropOut') {
// 学生教育管理科审核,赋值
this.formData.dropOutCategory = this.taskForm.dropOutCategory
this.formData.quitNumber = this.taskForm.quitNumber
this.formData.quitYear = this.taskForm.quitYear
this.formData.remark = this.taskForm.remark
this.updateRtStuDropOutSchool()
}
} else {
uni.showToast({
title: "审批成功"
});
}
uni.hideLoading();
uni.navigateBack({
success: () => {
const pages = getCurrentPages();
if (pages.length > 0) {
const prevPage = pages[pages.length - 2]
if (prevPage && typeof prevPage.getList === 'function') {
prevPage.handleChange(2);
}
}
}
})
})
},
rejectDialogConfirm() {
if (this.inputReject == "") {
uni.showToast({
title: `请填写驳回理由`,
icon: "none"
})
return;
}
uni.showLoading({
title: "正在驳回"
});
let sData = {
taskId: this.taskForm.taskId,
comment: this.inputReject
}
reject(sData).then(res => {
if (res.code == 200) {
uni.showToast({
title: "已驳回"
})
uni.hideLoading();
uni.navigateBack({
success: () => {
const pages = getCurrentPages();
if (pages.length > 0) {
const prevPage = pages[pages.length - 2]
if (prevPage && typeof prevPage.getList === 'function') {
prevPage.handleChange(2);
console.log('刷新已办任务数据');
}
}
}
})
}
})
},
updateRtStuDropOutSchool() {
updateRtStuDropOutSchool(this.formData).then((response) => {
uni.showToast({
title: response.msg
})
})
},
//获取退学类型
get_penalty_type(ty) {
getDicts('rt_reentry_type').then(res => {
this.rt_quit_types = res.data;
console.log("rt_quit_types");
console.log(this.rt_quit_types);
this.rt_quit_type = getDiseaseTypeByDictValue("rt_reentry_type", ty, res.data);
});
},
//获取退学类别
get_penalty_category(ty) {
getDicts('rt_logout_type').then(res => {
this.dropOut_categorys = res.data;
this.formData.rt_logouttype = getDiseaseTypeByDictValue("rt_logout_type", ty, res.data);
});
},
//切换退学类型
dropOutTypeChange(e) {
this.dropOut_category_index = e.detail.value;
this.taskForm.dropOutCategory = this.dropOut_categorys[e.detail.value].dictValue;
},
//获取退学年份
getYear() {
getDicts('sys_teacher_kpi_filling_year').then(res => {
this.quitSchoolYears = res.data;
});
},
//切换退学年份
onQuitYearChangeTime(e) {
this.quitSchoolIndex = e.detail.value;
this.taskForm.quitYear = this.quitSchoolYears[e.detail.value].dictValue;
},
}
}
</script>
<style scoped lang="scss">
.detail {
padding-top: 90rpx;
.container {
display: flex;
flex-direction: column;
align-items: center;
padding: 10rpx;
.form-item {
width: 95%;
height: 80rpx;
display: flex;
align-items: center;
margin-bottom: 20rpx;
justify-content: space-between;
border-bottom: 1px solid #ededee;
}
.form-img {
width: 100px;
height: 100px;
margin-bottom: 20rpx;
border-bottom: 1px solid #ededee;
}
.label {
text-align: right;
margin-right: 20rpx;
text-wrap: nowrap;
}
.uni-input {
color: #888889;
text-align: right;
}
.btn {
width: 100%;
height: 90rpx;
display: flex;
justify-content: space-between;
position: fixed;
bottom: 20px;
left: 0;
margin: 0 auto;
}
button {
width: 30%;
background-color: #87CEFA;
color: white;
}
.btns {
display: flex;
background: white;
position: fixed;
bottom: 0;
left: 0;
right: 0;
z-index: 999;
button {
height: 50px;
line-height: 50px;
flex: 1;
border-radius: 0;
&.turn-down {
background-color: #FF3334;
}
&.return {
background-color: #FFBA00;
}
&.submit {
background-color: #0092FF;
}
}
}
}
.progress {
padding: 0 30rpx 30rpx;
.title {
font-weight: bold;
color: #202020;
display: inline-block;
font-size: 30rpx;
margin-bottom: 30rpx;
}
}
.popup {
.popup-content {
width: 90vw;
max-height: 86vh;
overflow: scroll;
.title {
font-size: 40rpx;
font-weight: bold;
text-align: center;
margin: 20rpx 0;
}
.content {
padding: 0 40rpx;
.form-item {
.required {
color: red;
margin-right: 8rpx;
}
.label {
display: inline-block;
margin: 30rpx 0 20rpx;
color: #202020;
font-weight: 600;
}
input {
display: inline-block;
padding: 0 20rpx;
height: 70rpx;
// color: #D8D8D8;
}
textarea {
height: 200rpx;
padding: 10rpx;
}
.placeholderColor {
color: #D8D8D8;
}
input,
textarea {
width: 100%;
border: 1px solid #E1E1E1;
border-radius: 16rpx;
}
picker {
border: 1px solid #E1E1E1;
height: 70rpx;
line-height: 70rpx;
padding: 0 30rpx;
.uni-input {
display: flex;
color: #202020;
opacity: 0.35;
.val {
flex: 1;
}
}
}
.uni-file-picker {
/deep/ .uni-progress-bar {
background-color: transparent !important;
}
}
}
}
.btns {
display: flex;
margin-top: 80rpx;
button {
flex: 1;
border-radius: 0;
border-bottom: 0;
&:first-child {
background-color: transparent;
border: 1px solid #4097FE;
border-bottom: 0;
color: #4097FE;
}
}
}
}
}
.return-dialog {
.form-item {
label {
font-weight: bold;
display: inline-block;
margin-bottom: 10px;
}
&:last-child {
margin-top: 15px;
}
.list {
height: auto;
max-height: 200px;
display: flex;
flex-wrap: wrap;
// height: 200px;
// display: flex;
// flex-wrap: wrap;
.item {
width: 100%;
height: 40px;
line-height: 40px;
text-align: center;
&.active {
background-color: #0092FF;
color: white;
}
}
}
}
}
}
</style>

View File

@@ -0,0 +1,950 @@
<template>
<view class="detail">
<Nav :navs="navs" @change="navChange" />
<view class="form" v-if="navIndex==0">
<view class="container" style="padding-bottom: 60px;" v-if="formData!=null">
<!--学号 -->
<view class="form-item">
<text class="label">学号</text>
<text class="uni-input">{{ formData.stuNo }}</text>
</view>
<!--姓名 -->
<view class="form-item">
<text class="label">姓名</text>
<text class="uni-input">{{ formData.stuName }}</text>
</view>
<!-- 性别 -->
<view class="form-item">
<text class="label">性别</text>
<text class="uni-input">{{ formData.gender }}</text>
</view>
<!--院部 -->
<view class="form-item">
<text class="label">院部</text>
<text class="uni-input">{{ formData.departmentName }}</text>
</view>
<!--班级 -->
<view class="form-item">
<text class="label">年级</text>
<text class="uni-input">{{ formData.gradeName }}</text>
</view>
<view class="form-item">
<text class="label">班级</text>
<text class="uni-input">{{ formData.className }}</text>
</view>
<!--联系电话 -->
<view class="form-item">
<text class="label">出生日期</text>
<text class="uni-input">{{ formData.birthday }}</text>
</view>
<!--家长姓名 -->
<view class="form-item">
<text class="label">家长姓名</text>
<text class="uni-input">{{ formData.parentName }}</text>
</view>
<!--家长联系电话 -->
<view class="form-item">
<text class="label">家长联系电话</text>
<text class="uni-input">{{ formData.parentPhone }}</text>
</view>
<view class="form-item">
<text class="label">民族</text>
<text class="uni-input">{{ formData.mz }}</text>
</view>
<view class="form-item">
<text class="label">籍贯</text>
<text class="uni-input">{{ formData.jg }}</text>
</view>
<view class="form-item">
<text class="label">休学类型</text>
<text class="uni-input">{{rt_quit_type}}</text>
</view>
<view class="form-item">
<text class="label">申请原因</text>
<text class="uni-input">{{ formData.reasonApplying }}</text>
</view>
<view class="form-item">
<text class="label">辅导员联系情况</text>
<text class="uni-input">{{formData.ideologicalEducation}}</text>
</view>
<view class="form-item">
<text class="label">在校时间说明</text>
<text class="uni-input">{{formData.instructionSchoolHours}}</text>
</view>
<view class="form-item">
<text class="label">休学文号</text>
<text class="uni-input">{{formData.quitNumber}}</text>
</view>
<view class="form-item">
<text class="label">休学开始时间</text>
<text class="uni-input">{{formData.quitStartTime}}</text>
</view>
<view class="form-item">
<text class="label">休学结束时间</text>
<text class="uni-input">{{formData.quitEndTime}}</text>
</view>
<view class="form-item">
<text class="label">休学类别</text>
<text class="uni-input">{{transactionType}}</text>
</view>
<view class="form-item">
<text class="label">休学年份</text>
<text class="uni-input">{{formData.quitYear}}</text>
</view>
<view class="form-item">
<text class="label">备注</text>
<text class="uni-input">{{formData.remark}}</text>
</view>
<view class="form-item" style="height: auto;">
<text class="label">签名</text>
<view class="uni-input">
<image class="form-img" :src="ImageUrl+formData.applySignature" mode=""></image>
</view>
</view>
<view class="btns" v-if="tag==1">
<button class="turn-down" @tap="onReject" v-if="role!=='学生'">驳回</button>
<button class="return" @tap="onReturn" v-if="returnTaskList.length>0&&taskName!=='学生接收'">回退</button>
<button class="submit" @tap="onComplete">审批</button>
</view>
</view>
</view>
<view class="progress" v-if="navIndex==1">
<FlowStep :procInsId="taskForm.procInsId" :deployId="taskForm.deployId" />
</view>
<uni-popup class="popup" ref="approveDialog" type="dialog" background-color="#fff" v-if="formData!=null">
<view class="popup-content">
<view class="title">
流程审批
</view>
<scroll-view scroll-y="true" style="max-height:320px;">
<view class="content" v-if="taskName=='辅导员联系情况'">
<view class="form-item">
<label class="label"><text class="required">*</text>辅导员联系情况</label>
<textarea type="text" placeholder-class="placeholderColor" placeholder="请输入辅导员联系情况"
v-model="taskForm.ideologicalEducation" />
</view>
<view class="form-item">
<label class="label"><text class="required">*</text>在校时间说明</label>
<input type="text" placeholder-class="placeholderColor" placeholder="请输入在校时间说明"
v-model="taskForm.instructionSchoolHours" />
</view>
</view>
<view class="content" v-if="taskName=='学生教育管理科审核'">
<view class="form-item">
<label class="label"><text class="required">*</text>休学文号</label>
<input type="text" placeholder-class="placeholderColor" placeholder="请输入休学文号"
v-model="taskForm.quitNumber" />
</view>
<view class="form-item">
<label class="label"><text class="required">*</text>休学开始时间</label>
<picker @change="onQuitStartChangeTime" mode="date" :value="taskForm.quitStartTime">
<view class="uni-input">
<text
class="val">{{taskForm.quitStartTime==''?'休学开始时间':taskForm.quitStartTime}}</text>
<uni-icons type="calendar" size="25" color="#202020"></uni-icons>
</view>
</picker>
</view>
<view class="form-item">
<label class="label"><text class="required">*</text>休学结束时间</label>
<picker @change="onQuitEndChangeTime" mode="date" :value="taskForm.quitEndTime">
<view class="uni-input">
<text class="val">{{taskForm.quitEndTime==''?'休学结束时间':taskForm.quitEndTime}}</text>
<uni-icons type="calendar" size="25" color="#202020"></uni-icons>
</view>
</picker>
</view>
<view class="form-item">
<label class="label"><text class="required">*</text>休学类别</label>
<picker v-if="rt_categorys.length>0" range-key="dictLabel" :value="quit_category_index"
:range="rt_categorys" @change="quitCategoryChange">
<view class="uni-input">
<text
class="val">{{quit_category_index==-1?'请选择休学类别':rt_categorys[quit_category_index].dictLabel}}</text>
<uni-icons type="down" size="16" color="#202020"></uni-icons>
</view>
</picker>
</view>
<view class="form-item">
<label class="label"><text class="required">*</text>休学年份</label>
<picker v-if="quitSchoolYears.length>0" @change="onQuitYearChangeTime"
:range="quitSchoolYears" :value="quitSchoolIndex" range-key="dictLabel">
<view class="uni-input">
<text
class="val">{{quitSchoolIndex==-1?'请选择休学年份':quitSchoolYears[quitSchoolIndex].dictLabel}}</text>
<uni-icons type="calendar" size="25" color="#202020"></uni-icons>
</view>
</picker>
</view>
<view class="form-item">
<label class="label">休学备注</label>
<textarea v-model="taskForm.remark" type="text" placeholder-class="placeholderColor"
placeholder="请输入休学备注"></textarea>
</view>
</view>
<view class="content" v-if="taskName == '学生接收' || taskName == '辅导员接收'">
<view class="show-letter">
<view class="title">
休学证明
</view>
<view class="stu-name">
桂水电院 {{ formData.quitYear }} 休字第 {{ formData.quitNumber }}
</view>
<view class="desc">
{{ formData.stuName }},{{ formData.gender }},{{ formData.mz }},{{ formData.birthday }}出生{{ formData.jg }}{{ formData.className }}学生学号{{ formData.stuNo }}该生于个人原因-{{ formData.reasonApplying }}申请休学经学校研究同意休学时间从{{ formData.quitStartTime }}{{ formData.quitEndTime }}
</view>
<view class="bottom">
<view class="tip">
抄送教务处财务处{{ formData.departmentName }}
</view>
<view class="gaizhang">
<image
src="https://gss0.baidu.com/7Po3dSag_xI4khGko9WTAnF6hhy/zhidao/wh%3D450%2C600/sign=debd0a4bb2fd5266a77e34109e28bb1d/8d5494eef01f3a297283d36e9d25bc315d607cc2.jpg"
mode="widthFix"></image>
<view class="time">
<text>学生工作处</text>
<text>{{formData.quitStartTime}}</text>
</view>
</view>
</view>
</view>
</view>
</scroll-view>
<view class="btns">
<button type="default" @tap="onCancel">取消</button>
<button type="primary" @tap="approveDialogConfirm" :disabled="isSubmitting">确定</button>
</view>
</view>
</uni-popup>
<!-- 回退弹窗 -->
<uni-popup class="popup return-dialog" ref="returnDialog" type="dialog" background-color="#fff">
<view class="popup-content">
<view class="title">
退回流程
</view>
<view class="content">
<view class="form-item">
<label>退回节点</label>
<scroll-view scroll-y="true">
<view class="list">
<view class="item" @tap="taskDotChange(index,item)"
:class="index==taskDotIndex?'active':''" v-for="(item,index) in returnTaskList"
:key="index">
{{item.name}}
</view>
</view>
</scroll-view>
</view>
<view class="form-item">
<label><text class="required">*</text>退回意见</label>
<textarea v-model="taskForm.comment"></textarea>
</view>
</view>
<view class="btns">
<button type="default" @tap="onCancel">取消</button>
<button type="primary" @tap="returnDialogConfirm">确定</button>
</view>
</view>
</uni-popup>
<!-- 驳回弹窗 -->
<uni-popup ref="rejectDialog" type="dialog">
<uni-popup-dialog mode="input" title="驳回" v-model="inputReject" @confirm="rejectDialogConfirm"
placeholder="请输入驳回理由"></uni-popup-dialog>
</uni-popup>
</view>
</template>
<script>
import Nav from "@/components/navs/navs.vue"
import FlowStep from "@/components/flow-step/flow-step.vue"
import {
baseUrl
} from "@/config.js";
import {
getDiseaseTypeByDictValue
} from "@/utils/dict.js";
import uploadFile from "@/plugins/upload.js";
import {
getRtStuQuitSchoolByProcInsId,
updateRtStuQuitSchool
} from '@/api/rtStuQuitSchool/rtStuQuitSchool'
import {
getLeaveApplicationByProcInsId,
complete,
reject,
returnList,
returnTask,
getDisciplinaryApplicationByProcInsId,
getStuDisciplinaryRelieveByProcInsId,
updateDisciplinaryApplication
} from "@/api/task.js";
import {
getDicts
} from "@/api/system/dict/data";
import {
convertToTimestamp
} from "@/utils/time-calculation.js"
export default {
components: {
Nav,
FlowStep
},
data() {
return {
isSubmitting: false, //表单提交标志位
navs: [{
text: "表单信息",
val: 0
},
{
text: "流程跟踪",
val: 1
}
],
navIndex: 0,
taskDotIndex: 0,
returnTaskList: [], // 回退列表数据
formData: null,
rt_quit_type: "", //休学类型
rt_quit_types: [], //休学类型列表
quit_type_index: 0, //休学类型索引
rt_categorys: [], //休学类别列表
quit_category_index: -1, //休学类别索引
transactionType: "", //休学类别
ImageUrl: baseUrl,
role: uni.getStorageSync("roles"),
quitSchoolYears: [], //休学年份列表
quitSchoolIndex: -1, //休学年份列表
inputReject: "",
taskName: "", //节点名
category: "",
taskForm: {
multiple: false,
comment: '', // 意见内容
procInsId: '', // 流程实例编号
instanceId: '', // 流程实例编号
deployId: '', // 流程定义编号
taskId: '', // 流程任务编号
procDefId: '', // 流程编号
vars: '',
targetKey: '',
ideologicalEducation: "",
instructionSchoolHours: "",
quitNumber: "", //休学文号
quitStartTime: "",
quitEndTime: "",
quitYear: '', //休学年份
quitCategory: "", //休学类别
remark: '' //休学备注
},
// formDataState:false
}
},
onLoad(option) {
let query = JSON.parse(option.query);
this.taskId = query.taskId;
this.category = query.category;
this.tag = query.tag;
this.taskForm.deployId = query.deployId;
this.taskForm.instanceId = query.procInsId
this.taskForm.procInsId = query.procInsId
this.taskForm.executionId = query.executionId
this.taskForm.taskId = query.taskId
this.taskName = query.taskName
this.getRtStuQuitSchoolByProcInsId(this.taskForm.procInsId)
},
methods: {
navChange(index) {
this.navIndex = index;
},
taskDotChange(index, item) {
this.taskDotIndex = index;
this.taskForm.targetKey = item.id;
},
getRtStuQuitSchoolByProcInsId(procInsId) {
getRtStuQuitSchoolByProcInsId(procInsId).then((res) => {
this.formData = res.data;
this.get_penalty_type(this.formData.quitType);
this.get_category(this.formData.quitCategory);
if (this.tag == 1) {
this.getReturnList();
}
this.getYear();
})
},
onComplete() {
this.$refs.approveDialog.open();
},
onReturn() {
this.$refs.returnDialog.open();
},
getReturnList() {
returnList(this.taskForm).then((res) => {
this.returnTaskList = res.data
})
},
onReject() {
this.$refs.rejectDialog.open();
},
onCancel() {
this.$refs.approveDialog.close();
this.$refs.returnDialog.close();
},
//回退确认
returnDialogConfirm() {
if (this.taskForm.targetKey == "") {
this.taskForm.targetKey = this.returnTaskList[0].id;
}
if (this.taskForm.comment == "") {
uni.showToast({
title: `请填写回退意见`,
icon: "none"
});
return;
}
uni.showLoading({
title: "正在回退"
});
returnTask(this.taskForm).then((res) => {
uni.hideLoading();
uni.showToast({
title: res.msg
})
uni.navigateBack({
success: () => {
const pages = getCurrentPages();
if (pages.length > 0) {
const prevPage = pages[pages.length - 2]
if (prevPage && typeof prevPage.getList === 'function') {
prevPage.handleChange(2);
}
}
}
})
})
this.$refs.returnDialog.close();
},
approveDialogConfirm() {
let requiredFields = [];
if (this.taskName == '辅导员联系情况' && this.category == 'quitSchool') {
requiredFields = [
'ideologicalEducation',
'instructionSchoolHours'
];
} else if (this.taskName == '学生教育管理科审核' && this.category == 'quitSchool') {
requiredFields = [
'quitNumber',
'quitStartTime',
'quitEndTime',
'quitYear',
'quitCategory'
];
}
const emptyField = requiredFields.find(field => this.taskForm[field] === "");
if (emptyField) {
uni.showToast({
title: `请填写完整内容`,
icon: "none"
})
return;
}
let startTime = convertToTimestamp(this.taskForm.quitStartTime);
let endTime = convertToTimestamp(this.taskForm.quitEndTime);
if (endTime < startTime) {
uni.showToast({
title: "休学结束时间不能早于开始时间",
icon: "none",
duration: 2500
})
return;
}
uni.showLoading({
title: "正在审批"
});
console.log(this.taskForm);
this.isSubmitting = true; // 设置为正在提交
this.taskForm.comment = '同意';
complete(this.taskForm).then(res => {
if (res.code == 200) {
if (this.taskName == '辅导员联系情况' && this.category == 'quitSchool') {
this.formData.ideologicalEducation = this.taskForm.ideologicalEducation
this.formData.instructionSchoolHours = this.taskForm.instructionSchoolHours
this.updateRtStuQuitSchool()
} else if (this.taskName == '学生教育管理科审核' && this.category == 'quitSchool') {
// 学生教育管理科审核,赋值
this.formData.quitNumber = this.taskForm.quitNumber;
this.formData.quitStartTime = this.taskForm.quitStartTime;
this.formData.quitEndTime = this.taskForm.quitEndTime;
this.formData.quitType = this.taskForm.quitType;
this.formData.quitCategory = this.taskForm.quitCategory;
this.formData.quitYear = this.taskForm.quitYear;
this.formData.remark = this.taskForm.remark;
this.updateRtStuQuitSchool();
}
} else {
uni.showToast({
title: "审批成功"
});
}
uni.hideLoading();
uni.navigateBack({
success: () => {
const pages = getCurrentPages();
if (pages.length > 0) {
const prevPage = pages[pages.length - 2]
if (prevPage && typeof prevPage.getList === 'function') {
prevPage.handleChange(2);
}
}
}
})
})
},
rejectDialogConfirm() {
uni.showLoading({
title: "正在驳回"
});
let sData = {
taskId: this.taskForm.taskId,
comment: this.inputReject
}
reject(sData).then(res => {
if (res.code == 200) {
uni.showToast({
title: "已驳回"
})
uni.hideLoading();
uni.navigateBack({
success: () => {
const pages = getCurrentPages();
if (pages.length > 0) {
const prevPage = pages[pages.length - 2]
if (prevPage && typeof prevPage.getList === 'function') {
prevPage.handleChange(2);
console.log('刷新已办任务数据');
}
}
}
})
}
})
},
updateRtStuQuitSchool() {
updateRtStuQuitSchool(this.formData).then((response) => {
uni.showToast({
title: response.msg
})
})
},
//休学开始时间
onQuitStartChangeTime(e) {
this.taskForm.quitStartTime = e.detail.value;
},
//休学结束时间
onQuitEndChangeTime(e) {
this.taskForm.quitEndTime = e.detail.value;
},
//获取休学年份
getYear() {
getDicts('sys_teacher_kpi_filling_year').then(res => {
this.quitSchoolYears = res.data;
});
},
//切换休学年份
onQuitYearChangeTime(e) {
this.quitSchoolIndex = e.detail.value;
this.taskForm.quitYear = this.quitSchoolYears[e.detail.value].dictValue;
},
//获取休学类型
get_penalty_type(ty) {
getDicts('rt_quit_type').then(res => {
this.rt_quit_types = res.data;
this.rt_quit_type = getDiseaseTypeByDictValue("rt_quit_type", ty, res.data);
this.taskForm.quitType = ty;
});
},
//获取休学类别
get_category(ty) {
getDicts('rt_transaction_type').then(res => {
this.rt_categorys = res.data;
this.transactionType = getDiseaseTypeByDictValue("rt_transaction_type", ty, res.data);
});
},
//切换休学类别
quitCategoryChange(e) {
this.quit_category_index = e.detail.value;
this.taskForm.quitCategory = this.rt_categorys[e.detail.value].dictValue;
},
}
}
</script>
<style scoped lang="scss">
.detail {
padding-top: 90rpx;
.container {
display: flex;
flex-direction: column;
align-items: center;
padding: 10rpx;
.form-item {
width: 95%;
height: 80rpx;
display: flex;
align-items: center;
margin-bottom: 20rpx;
justify-content: space-between;
border-bottom: 1px solid #ededee;
}
.custom-input {
width: 100%;
}
.form-text {
width: 95%;
margin-bottom: 20rpx;
border-bottom: 1px solid #ededee;
}
.form-img {
width: 100px;
height: 100px;
margin-bottom: 20rpx;
border-bottom: 1px solid #ededee;
}
.example-body {
margin-top: 20rpx;
margin-bottom: 20rpx;
}
.txt {
margin-top: 20rpx;
}
.label {
text-align: right;
margin-right: 20rpx;
text-wrap: nowrap;
}
.select {
color: #888889;
white-space: nowrap;
/* 防止换行 */
overflow: hidden;
/* 隐藏溢出部分 */
text-overflow: ellipsis;
/* 显示省略号 */
}
.uni-input {
color: #888889;
text-align: right;
}
.btn {
width: 100%;
height: 90rpx;
display: flex;
justify-content: space-between;
position: fixed;
bottom: 20px;
left: 0;
margin: 0 auto;
}
button {
width: 30%;
background-color: #87CEFA;
color: white;
}
.form-address {
width: 100%;
display: flex;
justify-content: space-between;
}
.labelsafe {
color: red;
}
.form-canvas {
width: 95%;
height: 700rpx;
}
.tab-box {
width: 80%;
height: 100vh;
background-color: #f0f0f0;
.success-img {
width: 90%;
height: 300rpx;
}
}
.btns {
display: flex;
position: fixed;
bottom: 0;
left: 0;
right: 0;
button {
height: 50px;
line-height: 50px;
// width: 50%;
flex: 1;
border-radius: 0;
&.turn-down {
background-color: #FF3334;
}
&.return {
background-color: #FFBA00;
}
&.submit {
background-color: #0092FF;
}
}
}
}
.progress {
padding: 0 30rpx 30rpx;
.title {
font-weight: bold;
color: #202020;
display: inline-block;
font-size: 30rpx;
margin-bottom: 30rpx;
}
}
.popup {
.popup-content {
width: 90vw;
max-height: 86vh;
overflow: scroll;
// padding: 0 40rpx;
.title {
font-size: 40rpx;
font-weight: bold;
text-align: center;
margin: 20rpx 0;
}
.content {
padding: 0 40rpx;
.show-letter {
.title {
font-size: 30rpx;
text-align: left;
margin-top:40rpx;
color: #888889;
}
.stu-name {
margin-bottom: 8rpx;
color: #888889;
margin-bottom:25rpx;
}
.desc {
color: #797979;
line-height:45rpx;
}
.bottom {
.tip {
color: #888889;
font-size:26rpx;
margin-top: 20rpx;
}
.gaizhang {
text-align: right;
position: relative;
image {
width: 200rpx;
}
.time {
position: absolute;
right: 30rpx;
bottom: 55rpx;
display: flex;
flex-direction: column;
}
}
}
}
.form-item {
.required {
color: red;
margin-right: 8rpx;
}
&.download {
margin: 50rpx 0 30rpx;
display: flex;
align-items: center;
color: #4097FE;
justify-content: center;
.file-icon {
width: 50rpx;
margin-right: 20rpx;
}
text {
border-bottom: 1px solid #4097FE;
padding-bottom: 2px;
}
}
.label {
display: inline-block;
margin: 30rpx 0 20rpx;
color: #202020;
font-weight: 600;
}
input {
display: inline-block;
padding: 0 20rpx;
height: 70rpx;
}
textarea {
height: 200rpx;
padding: 10rpx;
}
.placeholderColor {
color: #D8D8D8;
}
input,
textarea {
width: 100%;
border: 1px solid #E1E1E1;
border-radius: 16rpx;
}
picker {
border: 1px solid #E1E1E1;
height: 70rpx;
line-height: 70rpx;
padding: 0 30rpx;
.uni-input {
display: flex;
color: #202020;
opacity: 0.35;
.val {
flex: 1;
}
}
}
.uni-file-picker {
/deep/ .uni-progress-bar {
background-color: transparent !important;
}
}
}
}
.btns {
display: flex;
margin-top: 80rpx;
button {
flex: 1;
border-radius: 0;
border-bottom: 0;
&:first-child {
background-color: transparent;
border: 1px solid #4097FE;
border-bottom: 0;
color: #4097FE;
}
}
}
}
}
.return-dialog {
.form-item {
label {
font-weight: bold;
display: inline-block;
margin-bottom: 10px;
}
&:last-child {
margin-top: 15px;
}
.list {
height: auto;
max-height: 200px;
display: flex;
flex-wrap: wrap;
// height: 200px;
// display: flex;
// flex-wrap: wrap;
.item {
width: 100%;
height: 40px;
line-height: 40px;
text-align: center;
&.active {
background-color: #0092FF;
color: white;
}
}
}
}
}
}
</style>

View File

@@ -0,0 +1,991 @@
<template>
<view class="detail">
<Nav :navs="navs" @change="navChange" />
<view class="form" v-if="navIndex==0">
<view class="container" style="padding-bottom: 60px;" v-if="formData!=null">
<!--学号 -->
<view class="form-item">
<text class="label">学号</text>
<text class="uni-input">{{ formData.stuNo }}</text>
</view>
<!--姓名 -->
<view class="form-item">
<text class="label">姓名</text>
<text class="uni-input">{{ formData.stuName }}</text>
</view>
<!-- 性别 -->
<view class="form-item">
<text class="label">性别</text>
<text class="uni-input">{{ formData.gender }}</text>
</view>
<!--院部 -->
<view class="form-item">
<text class="label">院部</text>
<text class="uni-input">{{ formData.departmentName }}</text>
</view>
<!--班级 -->
<view class="form-item">
<text class="label">年级</text>
<text class="uni-input">{{ formData.gradeName }}</text>
</view>
<view class="form-item">
<text class="label">班级</text>
<text class="uni-input">{{ formData.className }}</text>
</view>
<!--联系电话 -->
<view class="form-item">
<text class="label">出生日期</text>
<text class="uni-input">{{ formData.birthday }}</text>
</view>
<!--家长姓名 -->
<view class="form-item">
<text class="label">家长姓名</text>
<text class="uni-input">{{ formData.parentName }}</text>
</view>
<!--家长联系电话 -->
<view class="form-item">
<text class="label">家长电话</text>
<text class="uni-input">{{ formData.parentPhone }}</text>
</view>
<view class="form-item">
<text class="label">民族</text>
<text class="uni-input">{{ formData.mz }}</text>
</view>
<view class="form-item">
<text class="label">籍贯</text>
<text class="uni-input">{{ formData.jg }}</text>
</view>
<view class="form-item">
<text class="label">复学类别</text>
<text class="uni-input">{{rt_reentry_type}}</text>
</view>
<view class="form-item">
<text class="label">申请原因</text>
<text class="uni-input">{{ formData.reasonApplying }}</text>
</view>
<!-- <view class="form-item" style="height: auto;">
<text class="label">材料附件</text>
<view class="uni-input">
</view>
</view> -->
<view class="form-item" style="height: auto;">
<text class="label">签名</text>
<view class="uni-input">
<image class="form-img" :src="ImageUrl+formData.applySignature" mode=""></image>
</view>
</view>
<view class="form-item">
<text class="label">辅导员</text>
<text class="uni-input">{{formData.applicantName}}</text>
</view>
<view class="form-item">
<text class="label">辅导员联系情况</text>
<text class="uni-input">{{formData.ideologicalEducation}}</text>
</view>
<view class="form-item">
<text class="label">在校时间说明</text>
<text class="uni-input">{{formData.instructionSchoolHours}}</text>
</view>
<view class="form-item">
<text class="label">辅导员处理意见</text>
<text class="uni-input">{{formData.ihandlingSuggestion}}</text>
</view>
<view class="form-item">
<text class="label">休学时间</text>
<text class="uni-input">{{formData.quitTime}}</text>
</view>
<view class="form-item">
<text class="label">复学时间</text>
<text class="uni-input">{{formData.reentryTime}}</text>
</view>
<view class="form-item">
<text class="label">复学班级</text>
<text class="uni-input">{{formData.className}}</text>
</view>
<view class="form-item">
<text class="label">复学原因</text>
<text class="uni-input">{{formData.reentryCause}}</text>
</view>
<view class="form-item">
<text class="label">复学年份</text>
<text class="uni-input">{{formData.reentryYear}}</text>
</view>
<view class="form-item">
<text class="label">复学文号</text>
<text class="uni-input">{{formData.reentryNumber}}</text>
</view>
<view class="form-item">
<text class="label">休学类别</text>
<text class="uni-input">{{formData.transactionType}}</text>
</view>
<view class="btns" v-if="tag==1">
<button class="turn-down" @tap="onReject" v-if="role!=='学生'">驳回</button>
<button class="return" @tap="onReturn" v-if="returnTaskList.length>0">回退</button>
<button class="submit" @tap="onComplete">审批</button>
</view>
</view>
</view>
<view class="progress" v-if="navIndex==1">
<FlowStep :procInsId="taskForm.procInsId" :deployId="taskForm.deployId" />
</view>
<uni-popup class="popup" ref="approveDialog" type="dialog" background-color="#fff">
<view class="popup-content">
<view class="title">
流程审批
</view>
<view class="content" v-if="taskName=='辅导员提交申报'">
<view class="form-item">
<label class="label"><text class="required">*</text>辅导员联系情况</label>
<textarea type="text" placeholder-class="placeholderColor" placeholder="请输入辅导员联系情况"
v-model="taskForm.ideologicalEducation" />
</view>
<view class="form-item">
<label class="label"><text class="required">*</text>在校时间说明</label>
<input type="text" placeholder-class="placeholderColor" placeholder="请输入在校时间说明"
v-model="taskForm.instructionSchoolHours" />
</view>
<view class="form-item">
<label class="label"><text class="required">*</text>辅导员处理意见</label>
<textarea type="text" placeholder-class="placeholderColor" placeholder="请输入辅导员联系情况"
v-model="taskForm.ihandlingSuggestion" />
</view>
<view class="form-item">
<label class="label"><text class="required">*</text>休学时间</label>
<picker @change="onQuitTimeChangeTime" mode="date" :value="taskForm.quitTime">
<view class="uni-input" :class="taskForm.quitTime!=''?'select':''">
<text class="val">{{taskForm.quitTime==''?'请选择休学时间':taskForm.quitTime}}</text>
<uni-icons type="calendar" size="25" color="#202020"></uni-icons>
</view>
</picker>
</view>
<view class="form-item">
<label class="label"><text class="required">*</text>复学时间</label>
<picker @change="onReentryTimeChangeTime" mode="date" :value="taskForm.reentryTime">
<view class="uni-input" :class="taskForm.reentryTime!=''?'select':''">
<text class="val">{{taskForm.reentryTime==''?'请选择复学时间':taskForm.reentryTime}}</text>
<uni-icons type="calendar" size="25" color="#202020"></uni-icons>
</view>
</picker>
</view>
<view class="form-item">
<label class="label"><text class="required">*</text>请选择所属班级</label>
<uni-data-picker style="padding: 20rpx 20rpx;border: 1px solid #E1E1E1;"
:localdata="ClassNameList" @change="onClassChange" v-slot:default="{data, error, classes}"
popup-title="请选择所属班级">
<view v-if="error" class="error">
<text>{{error}}</text>
</view>
<view v-else-if="data.length" class="selected">
<view v-for="(item,index) in data" :key="index" class="selected-item">
<text v-if="data.length-1==index">{{item.text}}</text>
</view>
</view>
<view v-else>
<text style="color: #c5c5c5;">请选择所属班级</text>
</view>
</uni-data-picker>
</view>
</view>
<view class="content" v-if="taskName=='学生教育管理科审核'">
<view class="form-item">
<label class="label"><text class="required">*</text>退学原因</label>
<input type="text" placeholder-class="placeholderColor" placeholder="请输入退学原因"
v-model="taskForm.reentryCause" />
</view>
<view class="form-item">
<label class="label"><text class="required">*</text>复学年份</label>
<picker v-if="reentryYears.length>0" :value="reentry_year_index" range-key="dictValue"
:range="reentryYears" @change="reentryYearsChange">
<view class="uni-input" :class="taskForm.reentryYear!=''?'select':''">
<text class="val">{{taskForm.reentryYear==''?'请选择复学年份':taskForm.reentryYear}}</text>
<uni-icons type="calendar" size="25" color="#202020"></uni-icons>
</view>
</picker>
</view>
<view class="form-item">
<label class="label"><text class="required">*</text>复学文号</label>
<input type="text" placeholder-class="placeholderColor" placeholder="请输入复学文号"
v-model="taskForm.reentryNumber" />
</view>
<view class="form-item">
<label class="label"><text class="required">*</text>休学类别</label>
<picker v-if="rt_quit_types.length>0" range-key="dictLabel" :value="quit_type_index"
:range="rt_quit_types" @change="quitTypeChange">
<view class="uni-input" :class="rt_quit_type!=''?'select':''">
<text class="val">{{rt_quit_type==""?"请选择休学类别":rt_quit_type}}</text>
<uni-icons type="down" size="16" color="#202020"></uni-icons>
</view>
</picker>
</view>
</view>
<view class="btns">
<button type="default" @tap="onCancel">取消</button>
<button type="primary" @tap="approveDialogConfirm" :disabled="isSubmitting">确定</button>
</view>
</view>
</uni-popup>
<!-- 回退弹窗 -->
<uni-popup class="popup return-dialog" ref="returnDialog" type="dialog" background-color="#fff">
<view class="popup-content">
<view class="title">
退回流程
</view>
<view class="content">
<view class="form-item">
<label>退回节点</label>
<scroll-view scroll-y="true">
<view class="list">
<view class="item" @tap="taskDotChange(index,item)"
:class="index==taskDotIndex?'active':''" v-for="(item,index) in returnTaskList"
:key="index">
{{item.name}}
</view>
</view>
</scroll-view>
</view>
<view class="form-item">
<label><text class="required">*</text>退回意见</label>
<textarea v-model="taskForm.comment"></textarea>
</view>
</view>
<view class="btns">
<button type="default" @tap="onCancel">取消</button>
<button type="primary" @tap="returnDialogConfirm">确定</button>
</view>
</view>
</uni-popup>
<!-- 驳回弹窗 -->
<uni-popup ref="rejectDialog" type="dialog">
<uni-popup-dialog mode="input" title="驳回" v-model="inputReject" @confirm="rejectDialogConfirm"
placeholder="请输入驳回理由"></uni-popup-dialog>
</uni-popup>
</view>
</template>
<script>
import Nav from "@/components/navs/navs.vue";
import FlowStep from "@/components/flow-step/flow-step.vue";
import {
baseUrl
} from "@/config.js";
import {
getDiseaseTypeByDictValue
} from "@/utils/dict.js";
import uploadFile from "@/plugins/upload.js";
import {
getRtStuReentrySchoolByProcInsId,
updateRtStuReentrySchool
} from '@/api/rtStuReentrySchool/rtStuReentrySchool';
import {
ClassName,
} from '../../../../api/classmetting/classmeting.js';
import {
complete,
reject,
returnList,
returnTask
} from "@/api/task.js";
import {
getDicts
} from "@/api/system/dict/data";
export default {
components: {
Nav,
FlowStep
},
data() {
return {
isSubmitting: false, //表单提交标志位
navs: [{
text: "表单信息",
val: 0
},
{
text: "流程跟踪",
val: 1
}
],
//
taskDotIndex: 0,
navIndex: 0,
formData: null,
rt_reentry_type: "", //复学类别
rt_quit_types: [], //休学类别列表
rt_quit_type: "", //休学类别
quit_type_index: 0, //休学索引
ClassNameList: [], //班级名称
reentryYears: [], //复学年份
reentry_year_index: 0, //年份索引
class_index: 0,
ImageUrl: baseUrl,
role: uni.getStorageSync("roles"),
inputReject: "",
taskName: "", //节点名
category: "",
taskForm: {
multiple: false,
comment: '', // 意见内容
procInsId: '', // 流程实例编号
instanceId: '', // 流程实例编号
deployId: '', // 流程定义编号
taskId: '', // 流程任务编号
procDefId: '', // 流程编号
vars: '',
targetKey: '',
quitTime: '', //休学时间
reentryTime: '', //复学时间
ideologicalEducation: "", //辅导员联系情况
instructionSchoolHours: "", //在校时间说明
ihandlingSuggestion: '', //辅导员处理意见
reentryClass: [],
reentryCause: "", //退学原因
reentryYear: "", //复学年份
reentryNumber: "", //复学文号
quitType: "", //休学类别
},
returnTaskList: [], // 回退列表数据
}
},
onLoad(option) {
let query = JSON.parse(option.query);
this.taskId = query.taskId;
this.category = query.category;
this.tag = query.tag;
this.taskForm.deployId = query.deployId;
this.taskForm.instanceId = query.procInsId
this.taskForm.procInsId = query.procInsId
this.taskForm.executionId = query.executionId
this.taskForm.taskId = query.taskId
this.taskName = query.taskName
this.getRtStuReentrySchoolByProcInsId(this.taskForm.procInsId);
this.getClassNameList();
},
methods: {
navChange(index) {
this.navIndex = index;
},
taskDotChange(index, item) {
this.taskDotIndex = index;
this.taskForm.targetKey = item.id;
},
getRtStuReentrySchoolByProcInsId(procInsId) {
getRtStuReentrySchoolByProcInsId(procInsId).then((res) => {
this.formData = res.data;
this.get_reentry_type(this.formData.reentryType);
this.getReentryYears();
this.get_quit_type(this.formData.quitCategory);
if (this.tag == 1) {
this.getReturnList();
}
})
},
//获取复学类别
get_reentry_type(ty) {
getDicts('rt_reentry_type').then(res => {
this.rt_reentry_type = getDiseaseTypeByDictValue("rt_reentry_type", ty, res.data);
});
},
//获取休学类别
get_quit_type(ty) {
getDicts('rt_transaction_type').then(res => {
this.rt_quit_types = res.data;
this.formData.transactionType = getDiseaseTypeByDictValue("rt_transaction_type", ty, res.data);
});
},
//切换休学类型
quitTypeChange(e) {
this.quit_type_index = e.detail.value;
this.rt_quit_type = this.rt_quit_types[e.detail.value].dictLabel;
this.taskForm.quitType = this.rt_quit_types[e.detail.value].dictValue;
},
//获取复学年份
async getReentryYears() {
let years = await getDicts("sys_teacher_kpi_filling_year");
this.reentryYears = years.data;
},
reentryYearsChange(e) {
this.reentry_year_index = e.detail.value;
this.taskForm.reentryYear = this.reentryYears[this.reentry_year_index].dictValue;
},
//获取班级列表
getClassNameList() {
ClassName().then((res) => {
let classes = res.data.map(item => ({
...item, // 复制所有现有属性
text: item.label, // 添加新属性text其值为原label的值
children: item.children ? item.children.map(child => ({
...child, // 递归转换子项
text: child.label,
children: child.children ? child.children.map(subChild => ({
...subChild,
text: subChild.label,
children: subChild.children ? subChild.children
.map(subSubChild => ({
...subSubChild,
text: subSubChild.label,
children: subSubChild
.children // 注意:这里假设不再有更深的嵌套,如果有,需要继续递归
})) : null
})) : null
})) : null
}));
this.ClassNameList = classes;
})
},
onComplete() {
this.$refs.approveDialog.open();
},
onReturn() {
this.$refs.returnDialog.open();
},
getReturnList() {
returnList(this.taskForm).then((res) => {
this.returnTaskList = res.data
})
},
onReject() {
this.$refs.rejectDialog.open();
},
onCancel() {
this.$refs.approveDialog.close();
this.$refs.returnDialog.close();
},
//回退确认
returnDialogConfirm() {
if (this.taskForm.targetKey == "") {
this.taskForm.targetKey = this.returnTaskList[0].id;
}
if (this.taskForm.comment == "") {
uni.showToast({
title: `请填写回退意见`,
icon: "none"
});
return;
}
uni.showLoading({
title: "正在回退"
});
returnTask(this.taskForm).then((res) => {
uni.hideLoading();
uni.showToast({
title: res.msg
})
uni.navigateBack({
success: () => {
const pages = getCurrentPages();
if (pages.length > 0) {
const prevPage = pages[pages.length - 2]
if (prevPage && typeof prevPage.getList === 'function') {
prevPage.handleChange(2);
}
}
}
})
})
this.$refs.returnDialog.close();
},
approveDialogConfirm() {
let requiredFields = [];
if (this.taskName == '辅导员提交申报' && this.category == 'reentry') {
requiredFields = [
'ideologicalEducation',
'instructionSchoolHours',
'ihandlingSuggestion',
'quitTime',
'reentryTime',
];
} else if (this.taskName == '学生教育管理科审核' && this.category == 'reentry') {
requiredFields = [
'reentryCause',
'reentryYear',
'reentryNumber',
'quitType',
];
}
const emptyField = requiredFields.find(field => this.taskForm[field] === "");
if (emptyField) {
uni.showToast({
title: `请填写完整内容`,
icon: "none"
})
return;
}
if (this.taskForm.reentryClass.length == 0&&this.taskName == '辅导员提交申报') {
uni.showToast({
title: `请选择班级`,
icon: "none"
})
return;
}
uni.showLoading({
title: "正在审批"
});
this.isSubmitting = true; // 设置为正在提交
this.taskForm.comment = '同意';
complete(this.taskForm).then(res => {
if (res.code == 200) {
if (this.taskName == '辅导员提交申报' && this.category == 'reentry') {
this.formData.ideologicalEducation = this.taskForm.ideologicalEducation;
this.formData.instructionSchoolHours = this.taskForm.instructionSchoolHours;
this.formData.ihandlingSuggestion = this.taskForm.ihandlingSuggestion
this.formData.quitTime = this.taskForm.quitTime
this.formData.reentryTime = this.taskForm.reentryTime
this.formData.reentryClass = this.taskForm.reentryClass[2]
this.updateRtStuReentrySchool()
} else if (this.taskName == '学生教育管理科审核' && this.category == 'reentry') {
// 学生教育管理科审核,赋值
this.formData.reentryCause = this.taskForm.reentryCause
this.formData.reentryYear = this.taskForm.reentryYear
this.formData.reentryNumber = this.taskForm.reentryNumber
this.formData.quitType = this.taskForm.quitType
this.updateRtStuReentrySchool()
}
} else {
uni.showToast({
title: "审批成功"
});
}
uni.hideLoading();
uni.navigateBack({
success: () => {
const pages = getCurrentPages();
if (pages.length > 0) {
const prevPage = pages[pages.length - 2]
if (prevPage && typeof prevPage.getList === 'function') {
prevPage.handleChange(2);
}
}
}
})
})
},
rejectDialogConfirm() {
if (this.inputReject == "") {
uni.showToast({
title: `请填写驳回理由`,
icon: "none"
})
return;
}
uni.showLoading({
title: "正在驳回"
});
let sData = {
taskId: this.taskForm.taskId,
comment: this.inputReject
}
reject(sData).then(res => {
if (res.code == 200) {
uni.showToast({
title: "已驳回"
})
uni.hideLoading();
uni.navigateBack({
success: () => {
const pages = getCurrentPages();
if (pages.length > 0) {
const prevPage = pages[pages.length - 2]
if (prevPage && typeof prevPage.getList === 'function') {
prevPage.handleChange(2);
console.log('刷新已办任务数据');
}
}
}
})
}
})
},
updateRtStuReentrySchool() {
updateRtStuReentrySchool(this.formData).then((response) => {
uni.showToast({
title: response.msg
})
})
},
//休学时间选择
onQuitTimeChangeTime(e) {
this.taskForm.quitTime = e.detail.value;
console.log(this.taskForm.quitTime);
},
//复学时间选择
onReentryTimeChangeTime(e) {
this.taskForm.reentryTime = e.detail.value;
},
//班级选择
onClassChange(e) {
let index = e.detail.value.length - 1;
this.taskForm.reentryClass = e.detail.value[index].value
console.log(this.taskForm.reentryClass);
},
}
}
</script>
<style scoped lang="scss">
.detail {
padding-top: 90rpx;
.progress {
padding: 0 30rpx 30rpx;
.title {
font-weight: bold;
color: #202020;
display: inline-block;
font-size: 30rpx;
margin-bottom: 30rpx;
}
}
.container {
display: flex;
flex-direction: column;
align-items: center;
padding: 10rpx;
.form-item {
width: 95%;
height: 80rpx;
display: flex;
align-items: center;
margin-bottom: 20rpx;
justify-content: space-between;
border-bottom: 1px solid #ededee;
}
.custom-input {
width: 100%;
}
.form-text {
width: 95%;
margin-bottom: 20rpx;
border-bottom: 1px solid #ededee;
}
.form-img {
width: 100px;
height: 100px;
margin-bottom: 20rpx;
border-bottom: 1px solid #ededee;
}
.example-body {
margin-top: 20rpx;
margin-bottom: 20rpx;
}
.txt {
margin-top: 20rpx;
}
.label {
text-align: right;
margin-right: 20rpx;
text-wrap: nowrap;
}
.select {
color: #888889;
white-space: nowrap;
/* 防止换行 */
overflow: hidden;
/* 隐藏溢出部分 */
text-overflow: ellipsis;
/* 显示省略号 */
}
.uni-input {
color: #888889;
text-align: right;
}
.btn {
width: 100%;
height: 90rpx;
display: flex;
justify-content: space-between;
position: fixed;
bottom: 20px;
left: 0;
margin: 0 auto;
}
button {
width: 30%;
background-color: #87CEFA;
color: white;
}
.form-address {
width: 100%;
display: flex;
justify-content: space-between;
}
.labelsafe {
color: red;
}
.form-canvas {
width: 95%;
height: 700rpx;
}
.tab-box {
width: 80%;
height: 100vh;
background-color: #f0f0f0;
.success-img {
width: 90%;
height: 300rpx;
}
}
.btns {
display: flex;
position: fixed;
bottom: 0;
left: 0;
right: 0;
button {
height: 50px;
line-height: 50px;
// width: 50%;
flex: 1;
border-radius: 0;
&.turn-down {
background-color: #FF3334;
}
&.return {
background-color: #FFBA00;
}
&.submit {
background-color: #0092FF;
}
}
}
}
.popup {
.popup-content {
width: 90vw;
max-height: 80vh;
overflow: scroll;
// padding: 0 40rpx;
.title {
font-size: 40rpx;
font-weight: bold;
text-align: center;
margin: 20rpx 0;
}
.content {
padding: 0 40rpx;
.show-letter {
.title {
font-size: 30rpx;
}
.stu-name {
margin-bottom: 8rpx;
}
.desc {
color: #797979;
}
.bottom {
button {
margin: 20rpx 0;
}
.gaizhang {
text-align: right;
position: relative;
image {
width: 200rpx;
}
.time {
position: absolute;
right: 30rpx;
bottom: 55rpx;
display: flex;
flex-direction: column;
}
}
}
}
.form-item {
.required {
color: red;
margin-right: 8rpx;
}
&.download {
margin: 50rpx 0 30rpx;
display: flex;
align-items: center;
color: #4097FE;
justify-content: center;
.file-icon {
width: 50rpx;
margin-right: 20rpx;
}
text {
border-bottom: 1px solid #4097FE;
padding-bottom: 2px;
}
}
.label {
display: inline-block;
margin: 30rpx 0 20rpx;
color: #202020;
font-weight: 600;
}
input {
display: inline-block;
padding: 0 20rpx;
height: 70rpx;
}
textarea {
height: 200rpx;
padding: 10rpx;
}
.placeholderColor {
color: #D8D8D8;
}
input,
textarea {
width: 100%;
border: 1px solid #E1E1E1;
border-radius: 16rpx;
}
picker {
border: 1px solid #E1E1E1;
height: 70rpx;
line-height: 70rpx;
padding: 0 30rpx;
.uni-input {
display: flex;
color: #202020;
opacity: 0.35;
&.select {
opacity: 1;
}
.val {
flex: 1;
}
}
}
.uni-file-picker {
/deep/ .uni-progress-bar {
background-color: transparent !important;
}
}
}
}
.btns {
display: flex;
margin-top: 80rpx;
button {
flex: 1;
border-radius: 0;
border-bottom: 0;
&:first-child {
background-color: transparent;
border: 1px solid #4097FE;
border-bottom: 0;
color: #4097FE;
}
}
}
}
}
.return-dialog {
.form-item {
label {
font-weight: bold;
display: inline-block;
margin-bottom: 10px;
}
&:last-child {
margin-top: 15px;
}
.list {
height: auto;
max-height: 200px;
display: flex;
flex-wrap: wrap;
// height: 200px;
// display: flex;
// flex-wrap: wrap;
.item {
width: 100%;
height: 40px;
line-height: 40px;
text-align: center;
&.active {
background-color: #0092FF;
color: white;
}
}
}
}
}
}
</style>