Преглед изворни кода

人员档案流程增加处理完刷新

cyy пре 4 дана
родитељ
комит
89e27db0ad
1 измењених фајлова са 14 додато и 11 уклоњено
  1. 14 11
      src/views/component/personnelFile/index.vue

+ 14 - 11
src/views/component/personnelFile/index.vue

@@ -284,6 +284,11 @@ export default {
       }
       this.dialogVisible = val
     },
+    finishWorkflowAction() {
+      this.infoNumArr = []
+      this.dialogVisible = false
+      this.$emit('callback', this)
+    },
     changeTabs(val) {
       this.activeName = val
     },
@@ -409,8 +414,6 @@ export default {
               this.$alert(`任务办理成功!`, '提示', {
                 confirmButtonText: '确定',
                 callback: (action) => {
-                  this.showTF(false)
-                  this.infoNumArr = []
                   this.saveData(this.personInfoData, 'agree')
                 }
               })
@@ -427,9 +430,7 @@ export default {
               this.$alert(`已退回!`, '提示', {
                 confirmButtonText: '确定',
                 callback: (action) => {
-                  this.showTF(false)
-                  this.infoNumArr = []
-                  this.saveData(this.personInfoData)
+                  this.saveData(this.personInfoData, 'sendBack')
                 }
               })
             })
@@ -500,19 +501,23 @@ export default {
         const flow = this.$attrs.params?.attrs?.flow * 1
         const isAgreeAction = r === 'agree' || this.btnType === 'agree'
         if (isAgreeAction && flow === 3) {
-          let photo = await this.createSnapshoot(this.userId)
+          let photo = await this.createSnapshoot(this.personInfoData.id)
           // 字段需要继续添加
           const addParams = {
             tableName: 't_rydakzb',
             paramWhere: [
               {
-                bian_zhi_ren_: this.userId,
+                bian_zhi_ren_: this.personInfoData.id,
                 kuai_zhao_: photo
               }
             ]
           }
           await this.$common.request('add', addParams)
         }
+        if (r === 'agree' || r === 'sendBack') {
+          this.finishWorkflowAction()
+          return
+        }
         if (r !== 'saveWorkflow') {
           this.showTF(false)
         }
@@ -527,14 +532,12 @@ export default {
         '/人员/人员档案.rpx',
         `id_=${id}&org_=${first}`
       )
+      const name = this.userList.filter((obj) => obj.userId === id)[0].userName
       return new Promise((resolve, reject) => {
         this.$common
           .snapshoot({
             url: url,
-            name:
-              this.userInfo.user.name +
-              '人员档案' +
-              this.$common.getDateNow(10),
+            name: name + '的人员档案' + this.$common.getDateNow(10),
             type: 'pdf'
           })
           .then((res) => {