yuansh 2 年之前
父節點
當前提交
7f8c6df8ef
共有 2 個文件被更改,包括 23 次插入3 次删除
  1. 13 1
      src/views/activiti/form/demoForm2.vue
  2. 10 2
      src/views/process-center/applyListByTableName.vue

+ 13 - 1
src/views/activiti/form/demoForm2.vue

@@ -132,6 +132,8 @@ export default {
                 gv:this.funName,
                 handle:this.funName1
             },
+            postInfo: {},//职位信息
+            deptInfo: {},//部门信息
             itemModelNameList: [], // 子表字段名
             buttonArr:[],
             printDisable:false//打印按钮
@@ -195,7 +197,7 @@ export default {
                     index = ihEnd + 1
                 }
             }
-            console.log(dynamicKeyValueList)
+            let that = this;
             if (dynamicKeyValueList.length > 0) {
                 // 获取数据字典数据源
                 postAction('/sys/dict/getDictItems/getDictList', dynamicKeyValueList).then(dictData => {
@@ -207,10 +209,13 @@ export default {
                                 userData.result.records.forEach(user => {
                                     user.label = user.realname
                                     user.value = user.username
+                                    that.postInfo[user.username] = user.post
+                                    that.deptInfo[user.username] = user.deptName
                                 })
                                 // 存到动态数据源中
                                 this.dynamicData.userList = userData.result.records
                                 this.dynamicData.add = this.add // 新增按钮
+                                
                                 // 获取json
                                 this.jsonData = res.result.jsonContent
                                 // this.jsonData.list[2].columns[0].list[0].help = "date_1663752082983,date_1663753163575,min"
@@ -592,6 +597,13 @@ export default {
          },
         // 表单字段数值发生改变事件
         handleChange (value, key) {  
+          if(key == 'proposer' && this.processData.businessTable == 'seal_apply'){//用印申请单
+            this.$refs.KFB.setData({apply_department:this.deptInfo[value]})   
+          }
+          if(key == 'employee_name' && this.processData.businessTable == 'separation_application'){//离职申请
+            this.$refs.KFB.setData({job_title:this.postInfo[value]})   
+          }
+                 
             //改变的表单是主子表类型时
             if((value instanceof Array) && (key.indexOf('child&')!==-1)){
                 this.tableCalculation(value)

+ 10 - 2
src/views/process-center/applyListByTableName.vue

@@ -915,7 +915,14 @@ export default {
             this.loadData()
             this.modalVisible = false
           } else {
-            this.$message.error(res.message)
+            if(res.message == '流程错误,直接通过'){
+              this.$message.success('操作成功')
+              this.loadData()
+              this.modalVisible = false
+            }else{
+              this.$message.error(res.message)
+            }
+            
           }
         })
         .finally(() => (this.submitLoading = false))
@@ -979,7 +986,8 @@ export default {
     },
     history(v) {
       if (!v.procInstId) {
-        this.$message.error('流程实例ID不存在')
+        // this.$message.error('流程实例ID不存在')
+        this.$message.error('无审批历史')
         return
       }
       this.procInstId = v.procInstId