diff --git a/src/api/routine/basic.js b/src/api/routine/basic.js index 32d9d57..2f05490 100644 --- a/src/api/routine/basic.js +++ b/src/api/routine/basic.js @@ -1,5 +1,14 @@ import request from '@/utils/request' +// 根据流程编号查询数据 +// 根据学号查询信息 +export function getProcessId(processId) { + return request({ + url: '/routine/basic/processId/' + processId, + method: 'get' + }) +} + // 根据学号查询信息 export function getStname(stName) { return request({ diff --git a/src/views/flowable/task/todo/detail/index.vue b/src/views/flowable/task/todo/detail/index.vue index 503a486..29d8e83 100644 --- a/src/views/flowable/task/todo/detail/index.vue +++ b/src/views/flowable/task/todo/detail/index.vue @@ -335,7 +335,7 @@ - + {{ form.studentName }} @@ -424,6 +424,213 @@ + + + + + + + {{ form.stName }} + + + + {{form.sex}} + + + + + + + + + + {{ form.grade }} + + + + {{ form.stClass }} + + + + {{ form.stId }} + + + + {{ form.majors }} + + + + {{ form.datab }} + + + + +
+

本人于 {{ form.rwTime | formatDate }} 应征入伍,于 {{ form.dataa | formatDate }} 日退役,退役后申请复学。

+

是否申请转专业:(√)是 ()否

+

是否申请转专业:()是 (×)否

+ +

+ 原年级和专业:__{{ form.maList.length > 0 ? form.maList[0].oldgrade : '' }}__{{ form.maList.length > 0 ? form.maList[0].oldmajor : '' }}__ + 申请转入年级和专业:__{{ saveGradeName }}__{{ saveClassName }}__ +

+ + +
+ + + +
+ + +
+ 申请人: + {{ form.stName }} + 日期: + {{ form.times | formatDate }} +
+
+
+ + + + +
+

+ 符合转专业条件,拟同意转入年级和专业:__{{ saveGradeName }}__{{ saveClassName }}__ +

+
+ 审批结果: + + + + + + + 签名: + {{ form.zsIdea || '无' }} + 日期: + {{ form.zsTime | formatDate }} +
+
+
+ + + + +
+ {{ form.fdIdea || '暂无意见' }} +
+ 审批结果: + + + + + + + 签名: + {{ form.fdQm || '无' }} + 日期: + {{ form.fdTime | formatDate }} +
+
+
+ + + + +
+ {{ form.xwIdea || '暂无意见' }} +
+ 审批结果: + + + + + + + 签名: + {{ form.xwQm || '无' }} + 日期: + {{ form.xwTime | formatDate }} +
+
+
+ + + + +
+ {{ form.twoIdea || '暂无意见' }} +
+ 审批结果: + + + + + + + 签名: + {{ form.erQm || '无' }} + 日期: + {{ form.twoTime | formatDate }} +
+
+
+ + + + +
+ {{ form.xjIdea || '暂无意见' }} +
+ 审批结果: + + + + + + + 签名: + {{ form.xjQm || '无' }} + 日期: + {{ form.xjTime | formatDate }} +
+
+
+ + + + +
+ {{ form.jwIdea || '暂无意见' }} +
+ 审批结果: + + + + + + + 签名: + {{ form.jwQm || '无' }} + 日期: + {{ form.jwTime | formatDate }} +
+
+
+ +
+ +
同意 @@ -602,7 +809,7 @@ - + @@ -665,6 +872,7 @@ import { insertOrUpdateByStuAndApprover } from "@/api/routine/enlistmentReserve/ import { getUserProfile } from '@/api/system/user' // 获取当前登录用户 import { updateStudent } from '@/api/stuCQS/basedata/student' import { getOutsideAccommodationApplyByProcessInstanceId } from "@/api/dormitory/outsideAccommodation/outsideAccommodationApply"; +import { listBasic, getBasic, delBasic, addBasic, updateBasic, getStname,getProcessId } from "@/api/routine/basic"; export default { name: 'Record', @@ -786,6 +994,8 @@ export default { quitTypeOptions: [], //休学类别 enlistmentReserveForm: false, // 入伍保留学籍表单 outsideAccommodationForm: false, // 外宿申请表单 + basicForm: false,//退伍复学表单 + } }, created() { @@ -843,6 +1053,9 @@ export default { } else if (this.category == 'outsideAccommodation') { this.outsideAccommodationForm = true this.getOutsideAccommodation(this.taskForm.procInsId) + }else if (this.category == '退伍复学') { + this.basicForm = true + this.getBasicApplication(this.startUser) } // 流程任务获取变量信息 if (this.taskForm.taskId) { @@ -928,6 +1141,16 @@ export default { this.form = res.data }) }, + + // 退伍复学申请表单数据 + getBasicApplication(startUser) { + let newName = this.startUser.replace(/-/g, ""); + getStname(newName).then((res) => { + // console.log("后端返回原始数据:",res.data); + this.form = res.data + }); + }, + getStuInfo(stuNo) { getStuInfo(stuNo).then((res) => { if (res.code == 200) { @@ -1106,7 +1329,132 @@ export default { updateStudent({stuId: this.form.studentId, status: '07'}).then(response => {}) } this.$modal.msgSuccess(response.msg) - } else { + } else if (this.category == "退伍复学") { + // updateBasic({stuId:this.form.stuId,fdStatus:"1",fdIdea:this.taskForm.comment}).then(response => {}) + var stNameData = '' + let newName = this.startUser.replace(/-/g, ""); + // 异步请求的回调内处理后续逻辑 + getStname(newName).then(response => { + stNameData = response.data; + // console.log("这个是审批数据:", stNameData) + // console.log("stNameData.id:", stNameData.id); + // console.log("stNameData.newgrade" + stNameData.maList[0].data1) + // console.log("stNameData.newmajor" + stNameData.maList[0].data2) + + + + // 招生与就业处 + if (this.taskName == "招生与就业处") { + const currentFlowItem = this.flowRecordList.find(item => item.taskName === this.taskName); + const assigneeName = currentFlowItem ? currentFlowItem.assigneeName : ""; + updateBasic({ + id: stNameData.id, + zsStatus: "1", + // zsIdea: this.taskForm.comment, + zsTime: new Date(), + // zsIdea:字段缺失改为zsIdea字段 + zsIdea: assigneeName + }).then(response => { + this.$modal.msgSuccess(response.msg) + }) + } + // 辅导员审核信息 + else if (this.taskName == "辅导员审核") { + const currentFlowItem = this.flowRecordList.find(item => item.taskName === this.taskName); + const assigneeName = currentFlowItem ? currentFlowItem.assigneeName : ""; + console.log(stNameData.studentId) + console.log(stNameData.maList[0].data1) + updateBasic({ + id: stNameData.id, + fdStatus: "1", + fdIdea: this.taskForm.comment, + fdTime: new Date(), + fdQm: assigneeName + }).then(response => { + this.$modal.msgSuccess(response.msg) + }) + + } + + // 学务审核 + else if (this.taskName == "学务审核") { + const currentFlowItem = this.flowRecordList.find(item => item.taskName === this.taskName); + const assigneeName = currentFlowItem ? currentFlowItem.assigneeName : ""; + updateBasic({ + id: stNameData.id, + xwStatus: "1", + xwIdea: this.taskForm.comment, + xwTime: new Date(), + xwQm: assigneeName + }).then(response => { + this.$modal.msgSuccess(response.msg) + }) + + } + + // 二级学院审核 + else if (this.taskName == "二级学院审核") { + const currentFlowItem = this.flowRecordList.find(item => item.taskName === this.taskName); + const assigneeName = currentFlowItem ? currentFlowItem.assigneeName : ""; + updateBasic({ + id: stNameData.id, + twoStatus: "1", + twoIdea: this.taskForm.comment, + twoTime: new Date(), + erQm: assigneeName + }).then(response => { + this.$modal.msgSuccess(response.msg) + }) + + } + + // 学籍管理 + else if (this.taskName == "学籍管理") { + const currentFlowItem = this.flowRecordList.find(item => item.taskName === this.taskName); + const assigneeName = currentFlowItem ? currentFlowItem.assigneeName : ""; + updateBasic({ + id: stNameData.id, + xjglStatus: "1", + xjIdea: this.taskForm.comment, + xjTime: new Date(), + xjQm: assigneeName + }).then(response => { + this.$modal.msgSuccess(response.msg) + }) + + } + + // 教务处主管 + else if (this.taskName == "教务处主管") { + const currentFlowItem = this.flowRecordList.find(item => item.taskName === this.taskName); + const assigneeName = currentFlowItem ? currentFlowItem.assigneeName : ""; + updateBasic({ + id: stNameData.id, + jwStatus: "1", + jwIdea: this.taskForm.comment, + jwTime: new Date(), + jwQm: assigneeName + }).then(response => { + this.$modal.msgSuccess(response.msg) + }) + if (stNameData.conversion == "Y") { + updateStudent({ + stuId: stNameData.studentId, + deptId: parseInt(stNameData.maList[0].data1), + majorId: parseInt(stNameData.maList[0].data2), + classId: parseInt(stNameData.maList[0].newmajor), + status: '08', + }).then(response => { }) + } else { + updateStudent({ stuId: stNameData.studentId, status: '08', }).then(response => { }) + } + + } + + }) + } + + else { this.$modal.msgSuccess(response.msg) } this.$modal.closeLoading() @@ -1166,6 +1514,110 @@ export default { if (this.category == 'enlistmentReserve') { this.taskReturnApproval("驳回") } + else if (this.category == "退伍复学") { + // updateBasic({stuId:this.form.stuId,fdStatus:"1",fdIdea:this.taskForm.comment}).then(response => {}) + var stNameData = '' + let newName = this.startUser.replace(/-/g, ""); + // 异步请求的回调内处理后续逻辑 + getStname(newName).then(response => { + stNameData = response.data; + console.log(stNameData) + console.log("stNameData.id:", stNameData.id); + + // 招生与就业处 + if (this.taskName == "招生与就业处") { + const currentFlowItem = this.flowRecordList.find(item => item.taskName === this.taskName); + const assigneeName = currentFlowItem ? currentFlowItem.assigneeName : ""; + updateBasic({ + id: stNameData.id, + zsStatus: "3", + // zsIdea: this.taskForm.comment, + zsTime: new Date(), + // zsIdea:字段缺失改为zsIdea字段 + zsIdea: assigneeName + }).then(response => { + // this.$modal.msgSuccess(response.msg) + }) + } + // 辅导员审核信息 + else if (this.taskName == "辅导员审核") { + const currentFlowItem = this.flowRecordList.find(item => item.taskName === this.taskName); + const assigneeName = currentFlowItem ? currentFlowItem.assigneeName : ""; + // 辅导员审核信息 + updateBasic({ + id: stNameData.id, + fdStatus: "3", + fdIdea: this.taskForm.comment, + fdTime: new Date(), + fdQm: assigneeName + }).then(response => { + // this.$modal.msgSuccess(response.msg) + }) + } + + // 学务审核 + else if (this.taskName == "学务审核") { + const currentFlowItem = this.flowRecordList.find(item => item.taskName === this.taskName); + const assigneeName = currentFlowItem ? currentFlowItem.assigneeName : ""; + updateBasic({ + id: stNameData.id, + xwStatus: "3", + xwIdea: this.taskForm.comment, + xwTime: new Date(), + xwQm: assigneeName + }).then(response => { + // this.$modal.msgSuccess(response.msg) + }) + } + + // 二级学院审核 + else if (this.taskName == "二级学院审核") { + const currentFlowItem = this.flowRecordList.find(item => item.taskName === this.taskName); + const assigneeName = currentFlowItem ? currentFlowItem.assigneeName : ""; + updateBasic({ + id: stNameData.id, + twoStatus: "3", + twoIdea: this.taskForm.comment, + twoTime: new Date(), + erQm: assigneeName + }).then(response => { + // this.$modal.msgSuccess(response.msg) + }) + } + + // 学籍管理 + else if (this.taskName == "学籍管理") { + const currentFlowItem = this.flowRecordList.find(item => item.taskName === this.taskName); + const assigneeName = currentFlowItem ? currentFlowItem.assigneeName : ""; + updateBasic({ + id: stNameData.id, + xjglStatus: "3", + xjIdea: this.taskForm.comment, + xjTime: new Date(), + xjQm: assigneeName + }).then(response => { + // this.$modal.msgSuccess(response.msg) + }) + } + + // 教务处主管 + else if (this.taskName == "教务处主管") { + const currentFlowItem = this.flowRecordList.find(item => item.taskName === this.taskName); + const assigneeName = currentFlowItem ? currentFlowItem.assigneeName : ""; + updateBasic({ + id: stNameData.id, + jwStatus: "3", + jwIdea: this.taskForm.comment, + jwTime: new Date(), + jwQm: assigneeName + }).then(response => { + // this.$modal.msgSuccess(response.msg) + }) + } + + }) + } + this.$modal.msgSuccess(res.msg) this.$modal.closeLoading() @@ -1198,7 +1650,110 @@ export default { return approvalList.some(record => record.nodeName === returnTask.documentation) }) } - + + else if (this.category == "退伍复学") { + // updateBasic({stuId:this.form.stuId,fdStatus:"1",fdIdea:this.taskForm.comment}).then(response => {}) + var stNameData = '' + let newName = this.startUser.replace(/-/g, ""); + // 异步请求的回调内处理后续逻辑 + getStname(newName).then(response => { + stNameData = response.data; + console.log(stNameData) + console.log("stNameData.id:", stNameData.id); + + // 招生与就业处 + if (this.taskName == "招生与就业处") { + const currentFlowItem = this.flowRecordList.find(item => item.taskName === this.taskName); + const assigneeName = currentFlowItem ? currentFlowItem.assigneeName : ""; + updateBasic({ + id: stNameData.id, + zsStatus: "2", + // zsIdea: this.taskForm.comment, + zsTime: new Date(), + // zsIdea:字段缺失改为zsIdea字段 + zsIdea: assigneeName + }).then(response => { + // this.$modal.msgSuccess(response.msg) + }) + } + // 辅导员审核信息 + else if (this.taskName == "辅导员审核") { + const currentFlowItem = this.flowRecordList.find(item => item.taskName === this.taskName); + const assigneeName = currentFlowItem ? currentFlowItem.assigneeName : ""; + // 辅导员审核信息 + updateBasic({ + id: stNameData.id, + fdStatus: "2", + fdIdea: this.taskForm.comment, + fdTime: new Date(), + fdQm: assigneeName + }).then(response => { + // this.$modal.msgSuccess(response.msg) + }) + } + + // 学务审核 + else if (this.taskName == "学务审核") { + const currentFlowItem = this.flowRecordList.find(item => item.taskName === this.taskName); + const assigneeName = currentFlowItem ? currentFlowItem.assigneeName : ""; + updateBasic({ + id: stNameData.id, + xwStatus: "2", + xwIdea: this.taskForm.comment, + xwTime: new Date(), + xwQm: assigneeName + }).then(response => { + // this.$modal.msgSuccess(response.msg) + }) + } + + // 二级学院审核 + else if (this.taskName == "二级学院审核") { + const currentFlowItem = this.flowRecordList.find(item => item.taskName === this.taskName); + const assigneeName = currentFlowItem ? currentFlowItem.assigneeName : ""; + updateBasic({ + id: stNameData.id, + twoStatus: "2", + twoIdea: this.taskForm.comment, + twoTime: new Date(), + erQm: assigneeName + }).then(response => { + // this.$modal.msgSuccess(response.msg) + }) + } + + // 学籍管理 + else if (this.taskName == "学籍管理") { + const currentFlowItem = this.flowRecordList.find(item => item.taskName === this.taskName); + const assigneeName = currentFlowItem ? currentFlowItem.assigneeName : ""; + updateBasic({ + id: stNameData.id, + xjglStatus: "2", + xjIdea: this.taskForm.comment, + xjTime: new Date(), + xjQm: assigneeName + }).then(response => { + // this.$modal.msgSuccess(response.msg) + }) + } + + // 教务处主管 + else if (this.taskName == "教务处主管") { + const currentFlowItem = this.flowRecordList.find(item => item.taskName === this.taskName); + const assigneeName = currentFlowItem ? currentFlowItem.assigneeName : ""; + updateBasic({ + id: stNameData.id, + jwStatus: "2", + jwIdea: this.taskForm.comment, + jwTime: new Date(), + jwQm: assigneeName + }).then(response => { + // this.$modal.msgSuccess(response.msg) + }) + } + }) + } + this.initApproval() }) }, @@ -1213,6 +1768,108 @@ export default { if (this.category == 'enlistmentReserve') { this.taskReturnApproval("退回") } + else if (this.category == "退伍复学") { + // updateBasic({stuId:this.form.stuId,fdStatus:"1",fdIdea:this.taskForm.comment}).then(response => {}) + var stNameData = '' + let newName = this.startUser.replace(/-/g, ""); + // 异步请求的回调内处理后续逻辑 + getStname(newName).then(response => { + stNameData = response.data; + console.log(stNameData) + console.log("stNameData.id:", stNameData.id); + + // 招生与就业处 + if (this.taskName == "招生与就业处") { + const currentFlowItem = this.flowRecordList.find(item => item.taskName === this.taskName); + const assigneeName = currentFlowItem ? currentFlowItem.assigneeName : ""; + updateBasic({ + id: stNameData.id, + zsStatus: "2", + // zsIdea: this.taskForm.comment, + zsTime: new Date(), + // zsIdea:字段缺失改为zsIdea字段 + zsIdea: assigneeName + }).then(response => { + // this.$modal.msgSuccess(response.msg) + }) + } + // 辅导员审核信息 + else if (this.taskName == "辅导员审核") { + const currentFlowItem = this.flowRecordList.find(item => item.taskName === this.taskName); + const assigneeName = currentFlowItem ? currentFlowItem.assigneeName : ""; + // 辅导员审核信息 + updateBasic({ + id: stNameData.id, + fdStatus: "2", + fdIdea: this.taskForm.comment, + fdTime: new Date(), + fdQm: assigneeName + }).then(response => { + // this.$modal.msgSuccess(response.msg) + }) + } + + // 学务审核 + else if (this.taskName == "学务审核") { + const currentFlowItem = this.flowRecordList.find(item => item.taskName === this.taskName); + const assigneeName = currentFlowItem ? currentFlowItem.assigneeName : ""; + updateBasic({ + id: stNameData.id, + xwStatus: "2", + xwIdea: this.taskForm.comment, + xwTime: new Date(), + xwQm: assigneeName + }).then(response => { + // this.$modal.msgSuccess(response.msg) + }) + } + + // 二级学院审核 + else if (this.taskName == "二级学院审核") { + const currentFlowItem = this.flowRecordList.find(item => item.taskName === this.taskName); + const assigneeName = currentFlowItem ? currentFlowItem.assigneeName : ""; + updateBasic({ + id: stNameData.id, + twoStatus: "2", + twoIdea: this.taskForm.comment, + twoTime: new Date(), + erQm: assigneeName + }).then(response => { + // this.$modal.msgSuccess(response.msg) + }) + } + + // 学籍管理 + else if (this.taskName == "学籍管理") { + const currentFlowItem = this.flowRecordList.find(item => item.taskName === this.taskName); + const assigneeName = currentFlowItem ? currentFlowItem.assigneeName : ""; + updateBasic({ + id: stNameData.id, + xjglStatus: "2", + xjIdea: this.taskForm.comment, + xjTime: new Date(), + xjQm: assigneeName + }).then(response => { + // this.$modal.msgSuccess(response.msg) + }) + } + + // 教务处主管 + else if (this.taskName == "教务处主管") { + const currentFlowItem = this.flowRecordList.find(item => item.taskName === this.taskName); + const assigneeName = currentFlowItem ? currentFlowItem.assigneeName : ""; + updateBasic({ + id: stNameData.id, + jwStatus: "2", + jwIdea: this.taskForm.comment, + jwTime: new Date(), + jwQm: assigneeName + }).then(response => { + // this.$modal.msgSuccess(response.msg) + }) + } + }) + } this.$modal.msgSuccess(res.msg) this.$modal.closeLoading() diff --git a/src/views/routine/dis/basic/index.vue b/src/views/routine/dis/basic/index.vue index fcf8ff7..75cb735 100644 --- a/src/views/routine/dis/basic/index.vue +++ b/src/views/routine/dis/basic/index.vue @@ -309,6 +309,7 @@ export default { this.form.sex = studentRes.data.gender; this.form.grade = studentRes.data.gradeName; + listStudent({pageNum:1,pageSize:10,name:this.form.stName}).then(response => { this.form.studentId = response.rows[0].stuId // console.log(this.form.studentId)