lizhenhao vor 2 Jahren
Ursprung
Commit
dd6c6c9425

+ 17 - 9
src/views/modules/flowable/task/TaskForm.vue

@@ -365,22 +365,30 @@
           type: 'warning'
         }).then(async () => {
           if (this.formType === '2') {
-            console.log('cUser', this.cUser)
-            if (this.cUser === true) { // cUser为true则页面审核人为自定义多选,驳回时要将审核人重新定义一次
+            if (this.cUser === true || this.cUser === 'true') { // cUser为true则页面审核人为自定义多选,驳回时要将审核人重新定义一次
               await this.$refs.form.updateStatusById('reject', (businessTable, businessId, inputForm) => {
                 this.auditForm.candidateUserList = inputForm.assignee
               })
+              setTimeout(() => {
+                this.taskService.backNodes(this.taskId).then(({data}) => {
+                  let backNodes = data
+                  if (backNodes.length > 0) {
+                    let backTaskDefKey = backNodes[backNodes.length - 1].taskDefKey
+                    this.back(backTaskDefKey)
+                  }
+                })
+              }, 100)
             } else {
               await this.$refs.form.updateStatusById('reject')
+              this.taskService.backNodes(this.taskId).then(({data}) => {
+                let backNodes = data
+                if (backNodes.length > 0) {
+                  let backTaskDefKey = backNodes[backNodes.length - 1].taskDefKey
+                  this.back(backTaskDefKey)
+                }
+              })
             }
           }
-          this.taskService.backNodes(this.taskId).then(({data}) => {
-            let backNodes = data
-            if (backNodes.length > 0) {
-              let backTaskDefKey = backNodes[backNodes.length - 1].taskDefKey
-              this.back(backTaskDefKey)
-            }
-          })
         })
       },
       // 驳回至指定节点(节点是从0开始)

+ 12 - 14
src/views/modules/klgBase/questions/KlgBaseQuestionsForm.vue

@@ -224,6 +224,7 @@
                 this.inputForm.klgBaseReplyDTOList.forEach((item, index) => {
                   if (this.commonJS.isNotEmpty(item.content)) {
                     this.$refs.contentEditorList[index].init(item.content)
+                    this.$refs.contentEditorList[index].disable()
                   }
                 })
               } else {
@@ -292,9 +293,8 @@
           // 审核同意
           if (this.inputForm.status === '2') {
             this.inputForm.status = '5'
-          }
-          if (this.inputForm.status === '5') {
-            this.inputForm.status = '9'
+          } else if (this.inputForm.status === '5') {
+            this.inputForm.status = '6'
           }
         }
         this.$refs['inputForm'].validate((valid) => {
@@ -320,7 +320,9 @@
               this.inputForm.klgBaseDisposeDTOList = []
             }
             this.klgBaseQuestionsService.saveForm(this.inputForm).then(({data}) => {
-              this.inputForm.assignee = this.inputForm.disposeBy
+              if (this.inputForm.status === '2') {
+                this.inputForm.assignee = this.inputForm.disposeBy
+              }
               callback(data.businessTable, data.businessId, this.inputForm)
               this.loading = false
             }).catch(() => {
@@ -370,8 +372,10 @@
                 this.inputForm.klgBaseReplyDTOList.splice(index, 1)
               }
             })
-            if (this.inputForm.status === '5') {
-              this.inputForm.status = '6'
+            if (this.inputForm.status === '2') {
+              this.inputForm.status = '4'
+            } else if (this.inputForm.status === '5') {
+              this.inputForm.status = '2'
             }
             this.klgBaseQuestionsService.saveForm(this.inputForm).then(({data}) => {
               this.inputForm.assignee = this.inputForm.disposeBy
@@ -384,14 +388,8 @@
           }
           if (type === 'reback') {
             // 撤回
-            if (this.inputForm.status === '2') {
-              let param = {status: '3', id: this.inputForm.id}
-              this.klgBaseQuestionsService.updateStatusById(param)
-            }
-            if (this.inputForm.status === '6') {
-              let param = {status: '7', id: this.inputForm.id}
-              this.klgBaseQuestionsService.updateStatusById(param)
-            }
+            let param = {status: '3', id: this.inputForm.id}
+            this.klgBaseQuestionsService.updateStatusById(param)
           }
         }
       },

+ 5 - 0
src/views/modules/sys/dashboard/workBench/Pending.vue

@@ -450,6 +450,10 @@
         // this.refreshList()
       },
       todo (row) {
+        let cUser = false
+        if (row.processDefinitionName === '业务提问') {
+          cUser = true
+        }
         this.taskService.getTaskDef({
           taskId: row.task.id,
           taskName: row.task.name,
@@ -466,6 +470,7 @@
               formReadOnly: true,
               formTitle: `${row.vars.title}`,
               num: 2,
+              cUser: cUser,
               title: `审批【${row.task.name || ''}】`,
               ...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title', 'businessId')
             }