소스 검색

fix:采购计划审批

liujt 2 일 전
부모
커밋
c8cd80bdc2
1개의 변경된 파일9개의 추가작업 그리고 5개의 파일을 삭제
  1. 9 5
      src/views/bpm/handleTask/components/purchasePlanManage/submit.vue

+ 9 - 5
src/views/bpm/handleTask/components/purchasePlanManage/submit.vue

@@ -280,15 +280,19 @@
         //   }
         //   await UpdateInformation(arr);
         // }
+        console.log(this.selectId, this.form.userId, 'this.selectId');
         let API = !!status ? approveTaskWithVariables : rejectTask;
+        let variables = {
+          pass: !!status
+        }
+
+        if(this.taskDefinitionKey === 'deptLeaderAssign') {
+          variables.userId = this.selectId.join(',');
+        }
         await API({
           id: this.taskId,
           reason: this.form.reason,
-          variables: {
-            // userId: this.form.userId,
-            userId: this.selectId.join(','),
-            pass: !!status
-          }
+          variables: variables
         });
         this.$emit('handleAudit', {
           status,