移动端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,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>