|
|
@@ -582,15 +582,21 @@
|
|
|
}
|
|
|
|
|
|
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();
|
|
|
- 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;
|
|
|
},
|