Ver Fonte

修改bug

695593266@qq.com há 2 semanas atrás
pai
commit
5d98a556f6
1 ficheiros alterados com 13 adições e 7 exclusões
  1. 13 7
      src/views/produceOrder/workReport.vue

+ 13 - 7
src/views/produceOrder/workReport.vue

@@ -582,15 +582,21 @@
         }
         }
 
 
         const teamIds = this.getUserTeamIds();
         const teamIds = this.getUserTeamIds();
-        if (!teamIds.length) {
-          return deny(`当前用户未配置班组,不能${actionName}`);
+        if (currentTask.taskId != -1) {
+          if (!teamIds.length) {
+            return deny(`当前用户未配置班组,不能${actionName}`);
+          }
         }
         }
+
         const executionTeamIdStr = String(executionTeamId).trim();
         const executionTeamIdStr = String(executionTeamId).trim();
-        if (!executionTeamIdStr) {
-          return deny(`当前工序未配置执行班组,不能${actionName}`);
-        }
-        if (!teamIds.includes(executionTeamIdStr)) {
-          return deny(`当前用户班组无权限${actionName}`);
+        if (currentTask.taskId != -1) {
+          if (!executionTeamIdStr) {
+            return deny(`当前工序未配置执行班组,不能${actionName}`);
+          }
+
+          if (!teamIds.includes(executionTeamIdStr)) {
+            return deny(`当前用户班组无权限${actionName}`);
+          }
         }
         }
         return true;
         return true;
       },
       },