瀏覽代碼

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,