Merge branch 'main' of http://47.112.118.149:10082/xgxt_sd/zhxg_pc
This commit is contained in:
@@ -42,3 +42,13 @@ export function delEnlistmentReserveApproval(id) {
|
|||||||
method: 'post'
|
method: 'post'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// 新增保留学籍审批记录
|
||||||
|
export function insertOrUpdateByStuAndApprover(data) {
|
||||||
|
return request({
|
||||||
|
url: '/routine/enlistmentReserveApproval/insertOrUpdateByStuAndApprover',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
@@ -439,7 +439,7 @@
|
|||||||
<!--流程流转记录-->
|
<!--流程流转记录-->
|
||||||
<el-tab-pane label="流转记录" name="2">
|
<el-tab-pane label="流转记录" name="2">
|
||||||
<!--flowRecordList-->
|
<!--flowRecordList-->
|
||||||
<el-col :span="16" :offset="4">
|
<el-col :span="16" :offset="4" v-loading="loading" style="min-height: 500px;">
|
||||||
<div class="block">
|
<div class="block">
|
||||||
<el-timeline>
|
<el-timeline>
|
||||||
<el-timeline-item v-for="(item, index) in flowRecordList" :key="index" :icon="setIcon(item.finishTime)" :color="setColor(item.finishTime)">
|
<el-timeline-item v-for="(item, index) in flowRecordList" :key="index" :icon="setIcon(item.finishTime)" :color="setColor(item.finishTime)">
|
||||||
@@ -660,7 +660,10 @@ import { checkRole } from '@/utils/permission' // 权限判断函数
|
|||||||
import flow from '@/views/flowable/task/todo/detail/flow'
|
import flow from '@/views/flowable/task/todo/detail/flow'
|
||||||
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
|
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
|
||||||
import pdf from 'vue-pdf'
|
import pdf from 'vue-pdf'
|
||||||
import { getEnlistmentReserveByProcessInstanceId} from "@/api/routine/enlistmentReserve/enlistmentReserve";
|
import { getEnlistmentReserveByProcessInstanceId, updateEnlistmentReserve } from "@/api/routine/enlistmentReserve/enlistmentReserve";
|
||||||
|
import { insertOrUpdateByStuAndApprover } from "@/api/routine/enlistmentReserve/enlistmentReserveApproval";
|
||||||
|
import { getUserProfile } from '@/api/system/user' // 获取当前登录用户
|
||||||
|
import { updateStudent } from '@/api/stuCQS/basedata/student'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'Record',
|
name: 'Record',
|
||||||
@@ -984,9 +987,11 @@ export default {
|
|||||||
flowRecord(params)
|
flowRecord(params)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
that.flowRecordList = res.data.flowList
|
that.flowRecordList = res.data.flowList
|
||||||
|
this.loading = false
|
||||||
})
|
})
|
||||||
.catch((res) => {
|
.catch((res) => {
|
||||||
this.goBack()
|
this.goBack()
|
||||||
|
this.loading = false
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
fillFormData(form, data) {
|
fillFormData(form, data) {
|
||||||
@@ -1042,7 +1047,7 @@ export default {
|
|||||||
if (valid) {
|
if (valid) {
|
||||||
this.$modal.loading('正在努力加载中,请稍等...')
|
this.$modal.loading('正在努力加载中,请稍等...')
|
||||||
|
|
||||||
this.taskForm.comment = '同意'
|
this.taskForm.comment = this.taskForm.variables.approvalOpinion != '' ? this.taskForm.variables.approvalOpinion : '同意'
|
||||||
this.taskForm.variables.approvalResult = 1
|
this.taskForm.variables.approvalResult = 1
|
||||||
if (this.taskForm && this.formKeyExist) {
|
if (this.taskForm && this.formKeyExist) {
|
||||||
// 表单是否禁用
|
// 表单是否禁用
|
||||||
@@ -1054,7 +1059,6 @@ export default {
|
|||||||
|
|
||||||
complete(this.taskForm).then((response) => {
|
complete(this.taskForm).then((response) => {
|
||||||
this.$modal.closeLoading()
|
this.$modal.closeLoading()
|
||||||
|
|
||||||
this.goBack()
|
this.goBack()
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
@@ -1086,6 +1090,10 @@ export default {
|
|||||||
this.form.quitNumber = this.taskForm.quitNumber
|
this.form.quitNumber = this.taskForm.quitNumber
|
||||||
this.form.remark = this.taskForm.remark
|
this.form.remark = this.taskForm.remark
|
||||||
this.updateRtStuQuitSchool()
|
this.updateRtStuQuitSchool()
|
||||||
|
} else if (this.category == 'enlistmentReserve') { // 是应征入伍保留学籍申请,才执行
|
||||||
|
if (this.taskName == '教务处主管领导审批') { // (最后一个领导审核完成之后,修改学生学籍状态, status:07是入伍保留学籍)
|
||||||
|
updateStudent({stuId: this.form.studentId, status: '07'}).then(response => {})
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
this.$modal.msgSuccess(response.msg)
|
this.$modal.msgSuccess(response.msg)
|
||||||
}
|
}
|
||||||
@@ -1137,13 +1145,18 @@ export default {
|
|||||||
/** 驳回任务 */
|
/** 驳回任务 */
|
||||||
taskReject() {
|
taskReject() {
|
||||||
this.$refs['taskForm'].validate((valid) => {
|
this.$refs['taskForm'].validate((valid) => {
|
||||||
|
this.$modal.loading('正在努力加载中,请稍等...')
|
||||||
if (valid) {
|
if (valid) {
|
||||||
|
|
||||||
// 入伍保留学籍审核状态和意见
|
|
||||||
this.taskForm.variables.approvalResult = 0
|
|
||||||
this.taskForm.variables.approvalOpinion = this.taskForm.comment
|
|
||||||
rejectTask(this.taskForm).then((res) => {
|
rejectTask(this.taskForm).then((res) => {
|
||||||
|
|
||||||
|
// 是应征入伍保留学籍申请,才执行
|
||||||
|
if (this.category == 'enlistmentReserve') {
|
||||||
|
this.taskReturnApproval("驳回")
|
||||||
|
}
|
||||||
|
|
||||||
this.$modal.msgSuccess(res.msg)
|
this.$modal.msgSuccess(res.msg)
|
||||||
|
this.$modal.closeLoading()
|
||||||
this.goBack()
|
this.goBack()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -1157,39 +1170,45 @@ export default {
|
|||||||
this.returnTaskList = res.data
|
this.returnTaskList = res.data
|
||||||
this.taskForm.variables = null
|
this.taskForm.variables = null
|
||||||
|
|
||||||
|
// 是应征入伍保留学籍申请,才执行
|
||||||
if (this.category == 'enlistmentReserve') {
|
if (this.category == 'enlistmentReserve') {
|
||||||
this.form.enlistmentReserveApprovalList.push({nodeName: "学生申请"})
|
// 取原审批列表的副本(避免直接修改原表单数据导致重复push)
|
||||||
// 过滤returnTaskList,保留documentation在flowRecordList的taskName中存在的项
|
const approvalList = [...this.form.enlistmentReserveApprovalList]
|
||||||
|
|
||||||
|
// 判断approvalList中是否已存在"学生申请"项,仅不存在时才push
|
||||||
|
const hasStudentApply = approvalList.some(record => record.nodeName === "学生申请")
|
||||||
|
if (!hasStudentApply) {
|
||||||
|
approvalList.push({ nodeName: "学生申请" })
|
||||||
|
}
|
||||||
|
|
||||||
|
// 过滤returnTaskList,使用处理后的临时approvalList(不污染原数据)
|
||||||
this.returnTaskList = this.returnTaskList.filter(returnTask => {
|
this.returnTaskList = this.returnTaskList.filter(returnTask => {
|
||||||
// 检查flowRecordList中是否有项的taskName等于当前returnTask的documentation
|
return approvalList.some(record => record.nodeName === returnTask.documentation)
|
||||||
return this.form.enlistmentReserveApprovalList.some(record => record.nodeName === returnTask.documentation)
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
this.initApproval()
|
this.initApproval()
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
/** 提交退回任务 */
|
/** 提交退回任务 */
|
||||||
taskReturn() {
|
taskReturn() {
|
||||||
// 入伍保留学籍审核状态和意见
|
|
||||||
if (this.category == 'enlistmentReserve') {
|
|
||||||
this.taskForm.variables.approvalResult = 3
|
|
||||||
this.taskForm.variables.approvalOpinion = this.taskForm.comment
|
|
||||||
this.returnTaskList.forEach(element => {
|
|
||||||
if (element.id == this.taskForm.targetKey) {
|
|
||||||
this.taskForm.variables.targetNodeName = element.documentation
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
this.$refs['taskForm'].validate((valid) => {
|
this.$refs['taskForm'].validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
|
this.$modal.loading('正在努力加载中,请稍等...')
|
||||||
returnTask(this.taskForm).then((res) => {
|
returnTask(this.taskForm).then((res) => {
|
||||||
|
|
||||||
|
// 是应征入伍保留学籍申请,才执行
|
||||||
|
if (this.category == 'enlistmentReserve') {
|
||||||
|
this.taskReturnApproval("退回")
|
||||||
|
}
|
||||||
|
|
||||||
this.$modal.msgSuccess(res.msg)
|
this.$modal.msgSuccess(res.msg)
|
||||||
|
this.$modal.closeLoading()
|
||||||
this.goBack()
|
this.goBack()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
},
|
},
|
||||||
/** 取消回退任务按钮 */
|
/** 取消回退任务按钮 */
|
||||||
cancelTask() {
|
cancelTask() {
|
||||||
@@ -1266,6 +1285,49 @@ export default {
|
|||||||
targetNodeName: this.taskForm.variables.targetNodeName || ''
|
targetNodeName: this.taskForm.variables.targetNodeName || ''
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
// 退回或驳回的时候生成入伍保留学籍申请审核
|
||||||
|
taskReturnApproval(text) {
|
||||||
|
getUserProfile().then(res => {
|
||||||
|
let data = {
|
||||||
|
applyId: this.form.id,
|
||||||
|
processInstanceId: this.form.processInstanceId,
|
||||||
|
taskId: this.taskForm.taskId,
|
||||||
|
nodeName: this.taskName,
|
||||||
|
approverId: res.data.userId,
|
||||||
|
approverName: res.data.nickName,
|
||||||
|
approvalOpinion: this.taskForm.comment,
|
||||||
|
approvalResult: 2,
|
||||||
|
studentName: this.form.studentName,
|
||||||
|
studentNo: this.form.studentNo
|
||||||
|
}
|
||||||
|
// 生成审核记录
|
||||||
|
insertOrUpdateByStuAndApprover(data).then(ress => {
|
||||||
|
// 审核记录生成之后,判断退回或驳回是不是到学生申请,如果是则更新申请表状态
|
||||||
|
if (text == '退回') {
|
||||||
|
let nodeName = ''
|
||||||
|
this.returnTaskList.forEach(element => {
|
||||||
|
if (element.id == this.taskForm.targetKey) { // 如果选中的节点id等于列表里面的id,就将节点名称获取到nodeName
|
||||||
|
nodeName = element.documentation
|
||||||
|
}
|
||||||
|
});
|
||||||
|
if (nodeName == '学生申请') { // 如果退回选择的是学生节点更新申请表状态
|
||||||
|
this.form.applyStatus = 0
|
||||||
|
updateEnlistmentReserve(this.form).then(result => {
|
||||||
|
this.$modal.closeLoading()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// 驳回
|
||||||
|
if (this.taskName == '辅导员审批') { // 当前节点如果是辅导员审批,证明驳回就到了学生,所以更新申请表状态
|
||||||
|
this.form.applyStatus = 0
|
||||||
|
updateEnlistmentReserve(this.form).then(result => {
|
||||||
|
this.$modal.closeLoading()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -692,17 +692,25 @@ export default {
|
|||||||
};
|
};
|
||||||
if (this.formData.id != null) {
|
if (this.formData.id != null) {
|
||||||
updateEnlistmentReserve(submitData.formData).then(response => {
|
updateEnlistmentReserve(submitData.formData).then(response => {
|
||||||
this.$modal.msgSuccess("修改成功");
|
|
||||||
|
// 填写附件里面的申请编号
|
||||||
|
this.enlistmentReserveAttachList.forEach(element => {
|
||||||
|
element.applyNo = this.formData.applyNo
|
||||||
|
element.applyId = response.data.id
|
||||||
|
})
|
||||||
|
// 批量新增材料附件
|
||||||
|
if (this.enlistmentReserveAttachList && this.enlistmentReserveAttachList.length > 0) {
|
||||||
|
batchAddEnlistmentReserveAttach(this.enlistmentReserveAttachList)
|
||||||
|
}
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
|
this.$modal.msgSuccess("修改成功");
|
||||||
|
this.goBack()
|
||||||
|
|
||||||
});
|
});
|
||||||
// 批量新增材料附件
|
|
||||||
if (this.enlistmentReserveAttachList && this.enlistmentReserveAttachList.length > 0) {
|
|
||||||
this.batchAddEnlistmentReserveAttach(this.enlistmentReserveAttachList);
|
|
||||||
}
|
|
||||||
this.goBack()
|
|
||||||
} else {
|
} else {
|
||||||
addEnlistmentReserve(submitData.formData).then(response => {
|
addEnlistmentReserve(submitData.formData).then(response => {
|
||||||
this.$modal.msgSuccess("新增成功");
|
|
||||||
// 申请表新增成功之后,进行附件的添加
|
// 申请表新增成功之后,进行附件的添加
|
||||||
if (response.code == 200) {
|
if (response.code == 200) {
|
||||||
// 填写附件里面的申请编号
|
// 填写附件里面的申请编号
|
||||||
@@ -710,11 +718,12 @@ export default {
|
|||||||
element.applyNo = this.formData.applyNo
|
element.applyNo = this.formData.applyNo
|
||||||
element.applyId = response.data.id
|
element.applyId = response.data.id
|
||||||
})
|
})
|
||||||
this.loading = false;
|
|
||||||
// 批量新增材料附件
|
// 批量新增材料附件
|
||||||
if (this.enlistmentReserveAttachList && this.enlistmentReserveAttachList.length > 0) {
|
if (this.enlistmentReserveAttachList && this.enlistmentReserveAttachList.length > 0) {
|
||||||
this.batchAddEnlistmentReserveAttach(this.enlistmentReserveAttachList);
|
batchAddEnlistmentReserveAttach(this.enlistmentReserveAttachList)
|
||||||
}
|
}
|
||||||
|
this.loading = false;
|
||||||
|
this.$modal.msgSuccess("新增成功");
|
||||||
this.goBack()
|
this.goBack()
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -50,8 +50,12 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="文件路径" align="center" prop="filePath">
|
<el-table-column label="文件路径" align="center" prop="filePath">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-tooltip class="item" effect="dark" :content="scope.row.filePath" placement="top">
|
<el-tooltip class="item" effect="dark" :content="`点击可下载文件`" placement="top">
|
||||||
<div class="text-ellipsis">{{ scope.row.filePath }}</div>
|
<div class="text-ellipsis">
|
||||||
|
<el-link :href="`${baseUrl}${scope.row.filePath}`" :underline="false" target="_blank">
|
||||||
|
<span style="color: #007AFF;">{{ scope.row.filePath }}</span>
|
||||||
|
</el-link>
|
||||||
|
</div>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@@ -101,6 +105,7 @@ export default {
|
|||||||
name: "EnlistmentReserveAttach",
|
name: "EnlistmentReserveAttach",
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
baseUrl:process.env.VUE_APP_BASE_API,
|
||||||
// 遮罩层
|
// 遮罩层
|
||||||
loading: true,
|
loading: true,
|
||||||
// 选中数组
|
// 选中数组
|
||||||
|
|||||||
@@ -316,7 +316,14 @@ export default {
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.getUser();
|
// this.getUser();
|
||||||
|
},
|
||||||
|
// 路由守卫:当路由进入该组件时触发(解决返回后不刷新问题)
|
||||||
|
beforeRouteEnter(to, from, next) {
|
||||||
|
next(vm => {
|
||||||
|
// vm 是组件实例,这里调用数据加载方法
|
||||||
|
vm.getUser();
|
||||||
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
/** 查询应征入伍保留学籍申请列表 */
|
/** 查询应征入伍保留学籍申请列表 */
|
||||||
|
|||||||
Reference in New Issue
Block a user