From 7292888c7f0e79e9b83cabcb5edec6af5fe74c0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E6=81=92=E6=88=90?= <962704835@qq.com> Date: Fri, 14 Nov 2025 16:49:22 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BA=94=E5=BE=81=E5=85=A5=E4=BC=8D=E4=BF=9D?= =?UTF-8?q?=E7=95=99=E5=AD=A6=E7=B1=8D=E5=B7=A5=E4=BD=9C=E6=B5=81=E8=A1=A8?= =?UTF-8?q?=E5=8D=95=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../enlistmentReserve/enlistmentReserve.js | 10 ++ src/views/flowable/task/todo/detail/index.vue | 119 +++++++++++++++++- .../enlistmentReserve/applicationForm.vue | 2 +- .../enlistmentReserveApproval/index.vue | 7 +- src/views/routine/enlistmentReserve/index.vue | 2 +- 5 files changed, 136 insertions(+), 4 deletions(-) diff --git a/src/api/routine/enlistmentReserve/enlistmentReserve.js b/src/api/routine/enlistmentReserve/enlistmentReserve.js index 5b98c93..beae378 100644 --- a/src/api/routine/enlistmentReserve/enlistmentReserve.js +++ b/src/api/routine/enlistmentReserve/enlistmentReserve.js @@ -17,6 +17,16 @@ export function getEnlistmentReserve(id) { }) } + + +// 查询应征入伍保留学籍申请详细 +export function getEnlistmentReserveByProcessInstanceId(processInstanceId) { + return request({ + url: '/routine/enlistmentReserve/process/' + processInstanceId, + method: 'get' + }) +} + // 新增应征入伍保留学籍申请 export function addEnlistmentReserve(data) { return request({ diff --git a/src/views/flowable/task/todo/detail/index.vue b/src/views/flowable/task/todo/detail/index.vue index 4dd1843..57f2b6e 100644 --- a/src/views/flowable/task/todo/detail/index.vue +++ b/src/views/flowable/task/todo/detail/index.vue @@ -333,6 +333,76 @@ + + + + + + {{ form.studentName }} + + + + + + + + + + + + + + {{ form.grade }} + + + + {{ form.major }} + + + + {{ form.studentNo }} + + + + {{ form.className }} + + + + {{ form.familyAddress }} + + + + + {{ form.parentPhone }} + + + + + + + + + + + {{ form.applyReason }} + + + + + + + + + {{ form.reserveNo }} + + +
同意 @@ -509,6 +579,11 @@ + + + + + 取 消 @@ -564,10 +639,11 @@ import { checkRole } from '@/utils/permission' // 权限判断函数 import flow from '@/views/flowable/task/todo/detail/flow' import '@riophae/vue-treeselect/dist/vue-treeselect.css' import pdf from 'vue-pdf' +import { getEnlistmentReserveByProcessInstanceId} from "@/api/routine/enlistmentReserve/enlistmentReserve"; export default { name: 'Record', - dicts: ['rt_penalty_type', 'rt_penalty_status', 'rt_quit_type', 'rt_transaction_type', 'sys_teacher_kpi_filling_year'], + dicts: ['rt_penalty_type', 'rt_penalty_status', 'rt_quit_type', 'rt_transaction_type', 'sys_teacher_kpi_filling_year', 'rt_nation'], components: { Parser, flow, @@ -630,6 +706,8 @@ export default { targetKey: '', variables: { variables: {}, + approvalOpinion: '', // 必须初始化,避免 null 报错 + approvalResult: '' }, penaltyNumber: '', letterServiceContent: '', @@ -680,6 +758,7 @@ export default { ideologicalEducationShow: false, // 处分期间表现输入框 showFileDowload: false, //是否显示下载下文 quitTypeOptions: [], //休学类别 + enlistmentReserveForm: false, // 入伍保留学籍表单 } }, created() { @@ -731,6 +810,9 @@ export default { if (this.taskName == '学生教育管理科审核') { this.quitSchoolGLKSHShow = true } + } else if (this.category == 'enlistmentReserve') { + this.enlistmentReserveForm = true + this.getEnlistmentReserve(this.taskForm.procInsId) } // 流程任务获取变量信息 if (this.taskForm.taskId) { @@ -780,6 +862,14 @@ export default { this.pdfURL = this.baseUrl + this.form.dispositionService this.getStuInfo(this.form.stuNo) }) + }, + // 请求 入伍保留学籍表单数据 + getEnlistmentReserve(procInsId) { + getEnlistmentReserveByProcessInstanceId(procInsId.toString()).then((res) => { + this.form = res.data + }) + + }, getStuInfo(stuNo) { getStuInfo(stuNo).then((res) => { @@ -880,6 +970,28 @@ export default { flowTaskForm({ taskId: taskId }).then((res) => { this.variablesData = res.data.formData this.taskForm.variables = res.data.formData + + + // 初始化或完善 variables 对象,确保 approvalOpinion(入伍保留学籍申请审核意见) 存在 + if (this.taskForm.variables == null) { + // 情况1:variables 为 null → 初始化完整结构(包含原有 variables 嵌套和 approvalOpinion) + this.taskForm.variables = { + variables: {}, // 保留原有的嵌套 variables 结构(后端可能依赖) + approvalOpinion: '', // 初始化审批意见为空白 + approvalResult: '' + } + } else { + // 情况2:variables 已存在 → 保留原有字段,补充 approvalOpinion(无则添加,有则保留原值) + this.taskForm.variables = { + ...this.taskForm.variables, // 展开原有所有字段(如 variables、其他自定义字段) + approvalOpinion: this.taskForm.variables.approvalOpinion || '', // 兜底:若原有未定义则设为空白 + approvalResult: this.taskForm.variables.approvalOpinion || '' + } + } + + + + this.formKeyExist = res.data.formKeyExist }) } @@ -905,6 +1017,7 @@ export default { this.$modal.loading('正在努力加载中,请稍等...') this.taskForm.comment = '同意' + this.taskForm.variables.approvalResult = 1 if (this.taskForm && this.formKeyExist) { // 表单是否禁用 this.taskForm.formData.formData.disabled = true @@ -999,6 +1112,10 @@ export default { taskReject() { this.$refs['taskForm'].validate((valid) => { if (valid) { + + // 入伍保留学籍审核状态和意见 + this.taskForm.variables.approvalResult = 0 + this.taskForm.variables.approvalOpinion = this.taskForm.comment rejectTask(this.taskForm).then((res) => { this.$modal.msgSuccess(res.msg) this.goBack() diff --git a/src/views/routine/enlistmentReserve/applicationForm.vue b/src/views/routine/enlistmentReserve/applicationForm.vue index def601c..cd1338d 100644 --- a/src/views/routine/enlistmentReserve/applicationForm.vue +++ b/src/views/routine/enlistmentReserve/applicationForm.vue @@ -700,7 +700,7 @@ export default { .label { background-color: #eee !important; - -webkit-print-color-adjust: exact; + /* -webkit-print-color-adjust: exact; */ } .el-form-item__error { diff --git a/src/views/routine/enlistmentReserve/enlistmentReserveApproval/index.vue b/src/views/routine/enlistmentReserve/enlistmentReserveApproval/index.vue index d48a9fa..71dfc77 100644 --- a/src/views/routine/enlistmentReserve/enlistmentReserveApproval/index.vue +++ b/src/views/routine/enlistmentReserve/enlistmentReserveApproval/index.vue @@ -69,7 +69,12 @@ - + + + - +