Browse Source

增加审核模式9, 分组负责人审核到项目日报审核人审核。

seyason 9 months ago
parent
commit
487ddeb0be

+ 20 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/ReportController.java

@@ -621,6 +621,26 @@ public class ReportController {
                     System.out.println("第"+(i+1)+"个项目的第一审核人是:" +projectAuditorId[i]);
                 }
             }
+        } else if (comTimeType.getReportAuditType() == 1 || comTimeType.getReportAuditType() == 2 || comTimeType.getReportAuditType() == 9) {
+            List<TaskGroup> groupList = taskGroupService.list(new QueryWrapper<TaskGroup>().in("id", Arrays.asList(groupId)));
+
+            for (int i=0;i<projectAuditorId.length; i++) {
+                if (projectAuditorId[i] == null) {
+                    //取分组的负责人进行审核
+                    int finalPid = projectId[i];
+                    Integer finalGroupId = groupId[i];
+                    TaskGroup targetGroup = groupList.stream().filter(g->g.getId().equals(finalGroupId)).findFirst().orElse(null);
+                    if (targetGroup != null) {
+                        projectAuditorId[i] = targetGroup.getInchargerId();
+                    } else {
+                        //没有分组的情况,返回错误信息
+                        HttpRespMsg msg = new HttpRespMsg();
+                        msg.setError("请设置"+projectList.stream().filter(project -> project.getId().equals(finalPid)).findFirst().get().getProjectName()+
+                                "项目下"+targetGroup.getName()+"分组的负责人");
+                        return msg;
+                    }
+                }
+            }
         } else {
             //自动填充项目审核人
             for (int i=0;i<projectAuditorId.length; i++) {

+ 8 - 11
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/entity/TimeType.java

@@ -17,7 +17,7 @@ import lombok.experimental.Accessors;
  * </p>
  *
  * @author Seyason
- * @since 2024-07-24
+ * @since 2024-08-18
  */
 @Data
 @EqualsAndHashCode(callSuper = false)
@@ -297,7 +297,7 @@ public class TimeType extends Model<TimeType> {
     private Integer mainProjectState;
 
     /**
-     * 日报的审核类型, 0-项目审核人审核,1-分组负责人审核,2-先分组负责人审核再项目负责人(PM)审核;3-员工自由选择审批人 4-项目所属BU审核 5-直属审核人或部门负责人审核,6-直属或部门负责人审核->项目日报审核人审核,7-项目和部门并行审核
+     * 日报的审核类型, 0-项目审核人审核,1-分组负责人审核,2-先分组负责人审核再项目负责人(PM)审核;3-员工自由选择审批人 4-项目所属BU审核 5-直属审核人或部门负责人审核,6-直属或部门负责人审核->项目日报审核人审核,7-项目和部门并行审核;8-项目设置复审人;9-分组负责人审核->项目日报审核人审核
      */
     @TableField("report_audit_type")
     private Integer reportAuditType;
@@ -590,14 +590,6 @@ public class TimeType extends Model<TimeType> {
     @TableField("import_report_audit_normal")
     private Integer importReportAuditNormal;
 
-
-    @TableField(exist = false)
-    private List<User> userList;
-    @TableField(exist = false)
-    private List<TimeAutoExclude> excludeTimeList;
-    @TableField(exist = false)
-    private Integer saasSyncContact;
-
     /**
      * 日报第二审核人;在reportAuditType5时有效
      */
@@ -610,13 +602,18 @@ public class TimeType extends Model<TimeType> {
     @TableField("third_auditor")
     private String thirdAuditor;
 
-
     /**
      * 工时报告页面,查看时仅显示比例;
      */
     @TableField("only_show_percent")
     private Integer onlyShowPercent;
 
+    @TableField(exist = false)
+    private List<User> userList;
+    @TableField(exist = false)
+    private List<TimeAutoExclude> excludeTimeList;
+    @TableField(exist = false)
+    private Integer saasSyncContact;
 
     @Override
     protected Serializable pkVal() {

+ 46 - 12
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/ReportServiceImpl.java

@@ -1970,12 +1970,16 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
             int oldState = oneReport.getState();
             String creatorId = oneReport.getCreatorId();
             User auditTargetUser = userMapper.selectById(creatorId);
-            if (timeType.getReportAuditType() == 2) {
-                //先按分组审核,再进行项目经理审核
+            if (timeType.getReportAuditType() == 2 || timeType.getReportAuditType() == 9) {
+                //先按分组审核,再进行项目经理或者日报审核人审核
                 List<Report> reportList = reportMapper.selectList(new QueryWrapper<Report>().select("id, state, group_audit_state, project_id, project_audit_state, project_auditor_id").in("id", ids));
                 List<Integer> assProjectIds = reportList.stream().map(Report::getProjectId).collect(Collectors.toList());
                 List<Project> projectList = projectMapper.selectList(new QueryWrapper<Project>().select("id, incharger_id").in("id", assProjectIds));
                 Optional<Project> first = projectList.stream().filter(p -> StringUtils.isEmpty(p.getInchargerId())).findFirst();
+                List<ProjectAuditor> projectAuditorList = null;
+                if (timeType.getReportAuditType() == 9) {
+                    projectAuditorList = projectAuditorMapper.selectList(new QueryWrapper<ProjectAuditor>().in("project_id", assProjectIds));
+                }
                 if (first.isPresent()) {
                     String projectName = first.get().getProjectName();
                     //httpRespMsg.setError("请给["+projectName+"]项目设置项目负责人");
@@ -1991,17 +1995,29 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
                         r.setProjectAuditTime(LocalDateTime.now());
 
                         //分组审核完,该项目的pm审核了
-                        Project project1 = projectList.stream().filter(project -> project.getId().equals(r.getProjectId())).findFirst().get();
-
+                        String nextAuditor = null;
+                        if (timeType.getReportAuditType() == 2) {
+                            Project project1 = projectList.stream().filter(project -> project.getId().equals(r.getProjectId())).findFirst().get();
+                            nextAuditor = project1.getInchargerId();
+                        } else {
+                            //9的情况,取第一个日报审核人
+                            ProjectAuditor projectAuditor = projectAuditorList.stream().filter(pa -> pa.getProjectId().equals(r.getProjectId())).findFirst().orElse(null);
+                            if (projectAuditor != null) {
+                                nextAuditor = projectAuditor.getAuditorId();
+                            } else {
+                                //没有设置的话,还是选择项目经理
+                                Project project1 = projectList.stream().filter(project -> project.getId().equals(r.getProjectId())).findFirst().get();
+                                nextAuditor = project1.getInchargerId();
+                            }
+                        }
                         //如果分组负责人和项目经理是同一个人,那么就不需要项目经理审核了
-                        if (r.getProjectAuditorId().equals(project1.getInchargerId())) {
+                        if (r.getProjectAuditorId().equals(nextAuditor)) {
                             r.setProjectAuditState(1);
                             r.setProjectAuditTime(LocalDateTime.now());
                             r.setState(1);
                         } else {
                             //不是同一个人,那么就需要项目经理审核
-                            r.setProjectAuditorId(project1.getInchargerId());
-                            r.setProjectAuditorName(userMapper.selectById(project1.getInchargerId()).getName());
+                            r.setProjectAuditorId(nextAuditor);
                         }
                     } else if (r.getProjectAuditState() == 0) {
                         r.setProjectAuditState(1);
@@ -3269,14 +3285,18 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
             int oldState = oneReport.getState();
             List<User> allUsers = null;
             List<Report> allReports = null;
-            if (timeType.getReportAuditType() == 2) {
+            if (timeType.getReportAuditType() == 2 || timeType.getReportAuditType() == 9) {
                 allUsers = userMapper.selectList(new QueryWrapper<User>().select("id, name, department_id").eq("company_id", company.getId()));
-                //先分组负责人审核,再项目负责人审核
+                //先分组负责人审核,再项目负责人审核或者日报审核人审核
                 List<Report> reportList = reportMapper.selectList(new QueryWrapper<Report>().select("id, state, group_audit_state, project_id, project_audit_state, project_auditor_id, creator_id, create_date, company_id").in("id", ids));
                 allReports = reportList;
                 List<Integer> assProjectIds = reportList.stream().map(Report::getProjectId).collect(Collectors.toList());
                 List<Project> projectList = projectMapper.selectList(new QueryWrapper<Project>().select("id, incharger_id").in("id", assProjectIds));
                 Optional<Project> first = projectList.stream().filter(p -> StringUtils.isEmpty(p.getInchargerId())).findFirst();
+                List<ProjectAuditor> projectAuditorList = null;
+                if (timeType.getReportAuditType() == 9) {
+                    projectAuditorList = projectAuditorMapper.selectList(new QueryWrapper<ProjectAuditor>().in("project_id", assProjectIds));
+                }
                 if (first.isPresent()) {
                     String projectName = first.get().getProjectName();
                     //httpRespMsg.setError("请给["+projectName+"]项目设置项目负责人");
@@ -3297,15 +3317,29 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
                             httpRespMsg.setError(MessageUtils.message("project.masterError",project1.getProjectName()));
                             return httpRespMsg;
                         }
+                        //分组审核完,该项目的pm审核了
+                        String nextAuditor = null;
+                        if (timeType.getReportAuditType() == 2) {
+                            nextAuditor = project1.getInchargerId();
+                        } else {
+                            //9的情况,取第一个日报审核人
+                            ProjectAuditor projectAuditor = projectAuditorList.stream().filter(pa -> pa.getProjectId().equals(r.getProjectId())).findFirst().orElse(null);
+                            if (projectAuditor != null) {
+                                nextAuditor = projectAuditor.getAuditorId();
+                            } else {
+                                //没有设置的话,还是选择项目经理
+                                nextAuditor = project1.getInchargerId();
+                            }
+                        }
+
                         //如果分组负责人和项目经理是同一个人,那么就不需要项目经理审核了
-                        if (r.getProjectAuditorId().equals(project1.getInchargerId())) {
+                        if (r.getProjectAuditorId().equals(nextAuditor)) {
                             r.setProjectAuditState(1);
                             r.setProjectAuditTime(LocalDateTime.now());
                             r.setState(1);
                         } else {
                             //分组审核完,该项目的pm审核了
-                            r.setProjectAuditorId(project1.getInchargerId());
-                            r.setProjectAuditorName(pmFirst.get().getName());
+                            r.setProjectAuditorId(nextAuditor);
                         }
                     } else if (r.getProjectAuditState() == 0) {
                         r.setProjectAuditState(1);

+ 2 - 0
fhKeeper/formulahousekeeper/timesheet/src/i18n/en.json

@@ -1920,6 +1920,8 @@
   "anZhaoQiYeQingKuangTiaoZheng": "Adjust according to the situation of the enterprise",
   "buFenChengYuan": "Some members",
   "buMenHeXiangMuRiBaoShenHeRenBingHangShenHe": "Department and project daily report reviewers conduct parallel reviews",
+  "projectSetSecReviewer": "project set second reviewer",
+  "groupManagerAuditorToProjectReportAuditor": "Group manager audit first and then report auditor review",
   "eWaiGongZuoRiSheZhi": "Extra working days setting:",
   "feiGongZuoRiHanZhouMoWeiFaDingGongZuoRiJinZhiTianBao": "Non working days (including weekends as legal working days) are prohibited from filling in",
   "fenZuFuZeRenShenHe": "Group leader review",

+ 2 - 0
fhKeeper/formulahousekeeper/timesheet/src/i18n/zh.json

@@ -1955,6 +1955,8 @@
   "zhiShuShenHeRenHuoBuMenFuZeRenShenHe": "直属审核人或部门负责人审核",
   "zhiShuHuoBuMenFuZeRenShenHeXiangMuRiBaoShenHeRenShenHe": "直属或部门负责人审核->项目日报审核人审核",
   "buMenHeXiangMuRiBaoShenHeRenBingHangShenHe": "部门和项目日报审核人并行审核",
+  "projectSetSecReviewer": "项目设置复审人",
+  "groupManagerAuditorToProjectReportAuditor": "分组负责人审核->项目日报审核人审核",
   "anZhaoQiYeQingKuangTiaoZheng": "按照企业情况调整",
   "qingXianDianJiXiTongJiChuSheZhi": "请先点击系统基础设置",
   "tiaoGuo": "跳过",

+ 2 - 2
fhKeeper/formulahousekeeper/timesheet/src/views/project/info.vue

@@ -128,11 +128,11 @@
                         <span v-else><TranslationOpenDataText type='userName' :openid='project.reviwerName'></TranslationOpenDataText></span>
                     </el-link></div>
                     <!-- <div v-if="user.timeType.reportAuditType != 8" style="margin-top:10px;color:#999;"> -->
-                    <div v-if="user.timeType.reportAuditType == 0 || user.timeType.reportAuditType == 4 || user.timeType.reportAuditType == 6" style="margin-top:10px;color:#999;">
+                    <div v-if="user.timeType.reportAuditType == 0 || user.timeType.reportAuditType == 4 || user.timeType.reportAuditType == 6 || user.timeType.reportAuditType == 9" style="margin-top:10px;color:#999;">
                         {{ user.timeType.reportCc == 1?'日报抄送人':$t('newspaperauditor') }}
                     </div>
                     <!-- <div v-if="user.timeType.reportAuditType != 8"> -->
-                    <div v-if="user.timeType.reportAuditType == 0 || user.timeType.reportAuditType == 4 || user.timeType.reportAuditType == 6">
+                    <div v-if="user.timeType.reportAuditType == 0 || user.timeType.reportAuditType == 4 || user.timeType.reportAuditType == 6 || user.timeType.reportAuditType == 9">
                         <span v-if="project.auditorList.length == 0" style="margin:10px;">-</span>
                         <el-link v-for="item in project.auditorList" :key="item.id" style="margin:10px;" @click="showUser(item.auditorId)">
                             <span v-if="user.userNameNeedTranslate != 1">

+ 7 - 36
fhKeeper/formulahousekeeper/timesheet/src/views/project/list.vue

@@ -582,11 +582,11 @@
                     </el-form-item>
 
                     <span v-if="user.companyId != 469">
-                        <el-form-item :label="$t('newspaperauditor')" v-show="user.timeType.reportAuditType == 0 || user.timeType.reportAuditType == 4 || user.timeType.reportAuditType == 6" v-if="user.company.nonProjectSimple == 0 || (user.company.nonProjectSimple == 1 && addForm.isPublic == 0)">
-                            <el-select v-if="user.userNameNeedTranslate != '1'" @change="$forceUpdate()" v-model="addForm.auditUserIds"  :disabled="!(permissions.projectManagement|| user.id == addForm.inchargerId || user.id == addForm.creatorId)" filterable :placeholder="$t('defaultistheprojectleader')" style="width:100%;" :multiple="user.timeType.reportAuditType != 6" >
+                        <el-form-item :label="$t('newspaperauditor')" v-show="user.timeType.reportAuditType == 0 || user.timeType.reportAuditType == 4 || user.timeType.reportAuditType == 6 || user.timeType.reportAuditType == 9" v-if="user.company.nonProjectSimple == 0 || (user.company.nonProjectSimple == 1 && addForm.isPublic == 0)">
+                            <el-select v-if="user.userNameNeedTranslate != '1'" @change="$forceUpdate()" v-model="addForm.auditUserIds"  :disabled="!(permissions.projectManagement|| user.id == addForm.inchargerId || user.id == addForm.creatorId)" filterable :placeholder="$t('defaultistheprojectleader')" style="width:100%;" :multiple="user.timeType.reportAuditType != 6 && user.timeType.reportAuditType != 9" >
                                 <el-option v-for="item in participator" :key="item.id" :label="item.name" :value="item.id"></el-option>
                             </el-select>
-                            <selectCat v-if="user.userNameNeedTranslate == '1'" :size="'medium'" :tile="true" :filterable="true" :widthStr="'800'" :disabled="!(permissions.projectManagement|| user.id == addForm.inchargerId || user.id == addForm.creatorId)" :subjectId="addForm.auditUserIds" :subject="participator" :clearable="false" :distinction="'10'"  :multiSelect="user.timeType.reportAuditType != 6" @selectCal="selectCal"></selectCat>
+                            <selectCat v-if="user.userNameNeedTranslate == '1'" :size="'medium'" :tile="true" :filterable="true" :widthStr="'800'" :disabled="!(permissions.projectManagement|| user.id == addForm.inchargerId || user.id == addForm.creatorId)" :subjectId="addForm.auditUserIds" :subject="participator" :clearable="false" :distinction="'10'"  :multiSelect="user.timeType.reportAuditType != 6 && user.timeType.reportAuditType != 9" @selectCal="selectCal"></selectCat>
                         </el-form-item>
                     </span>
                     
@@ -5104,7 +5104,6 @@ a {
                         // console.log(this.projectKeyNodesData, '节点值')
                     }
                 } else {
-                    console.log('点击来编辑执行')
                     const usersJson = JSON.parse(sessionStorage.getItem("user"))
                     if(usersJson.companyId == '936') {
                         if(usersJson.roleName != this.$t('role.superAdministrator') && usersJson.roleName != this.$t('role.systemAdministrator')) {
@@ -5113,7 +5112,6 @@ a {
                             this.isShowProjectName = false
                         }
                     }
-                    console.log(this.isShowProjectName, '看看值')
                     this.http.post('/project/detailTwo', {id: item.id},
                     res => {
                     if (res.code == "ok") {
@@ -5235,18 +5233,9 @@ a {
                             this.$set(this.addForm, 'bu', '')
                         }
                     }
-
-                    // if(this.user.companyId == '428') {
-                    //     if(item.projectSeparate) {
-                    //         this.$set(this.addForm, 'projectCategorySub', item.projectSeparate.projectCategorySub)
-                    //     } else {
-                    //         this.$set(this.addForm, 'projectCategorySub', '')
-                    //     }
-                    // }
-
+                    console.log(111111)
                     // 判断是否有供应商
                     if(this.user.company.packageProvider) {
-                        // this.addForm.supplierId = item.providerIds.split(',')
                         if(item.providerIds) {
                             let arr = [] 
                             let zhhi = item.providerIds.split(',')
@@ -5254,17 +5243,13 @@ a {
                                 arr.push(+zhhi[i] + 0)
                             }
                             this.$set(this.addForm, 'supplierId', arr)
-                            // console.log( this.addForm.supplierId)
                         } else {
                             this.$set(this.addForm, 'supplierId', [])
                         }
                        
                     }
                     // 判断是否有供应商结尾
-
-
                     this.deleteVif = item.creatorId
-                    // console.log("handleadd",this.deleteVif,this.addForm)
                     if(item.associateDegrees != null && item.associateDegrees != 'null' && item.associateDegrees != '') {
                         var spli = item.associateDegrees.split(',')
                         var sl  = []
@@ -5273,33 +5258,20 @@ a {
                             sl.push(num)
                         }
                         this.auseList = sl
-                        // console.log(this.auseList)
                     } else {
                         this.auseList = []
                     }
-                    // var spli = item.associateDegrees.split(',')
-                    // var sl  = []
-                    // for(var i in spli) {
-                    //     var num = +spli[i] + 0
-                    //     sl.push(num)
-                    // }
-                    // this.auseList = sl
-                    // console.log(this.auseList)
                     this.changeParticipator();
                     this.getProjectBaseData(item.id);
                     this.getProjectKeyNodeData(item.id)
                     if (this.user.company.packageEngineering == 1) {
                         this.getProjectProfessions(item.id);
-                        
                     }
-                    //获取项目的相关领导
-                    // this.getProjectNotifyUserList(item.id);
+                    //获取审核人
                     this.getProjectAutorList(item.id);
                     if (this.user.timeType.reportCc == 1) {
                         this.getProjectCcUserList(item.id);
                     }
-
-                    // this.findUserInTree()
                 }
                 this.addFormVisible = true;
                 if (this.user.timeType.projectManDay == 1) {
@@ -5310,7 +5282,6 @@ a {
                         this.getProfessionList();
                     }
                 }
-
             },
             //获取项目日报抄送人
             getProjectCcUserList(projectId) {
@@ -5342,7 +5313,7 @@ a {
                 this.http.post('/project-auditor/getList',{projectId: projectId},
                         res => {
                             if (res.code == "ok") {
-                                if (this.user.timeType.reportAuditType == 6) {
+                                if (this.user.timeType.reportAuditType == 6 || this.user.timeType.reportAuditType == 9) {
                                     //单个日报审核人,单选
                                     var arr = res.data.map(function(item) {
                                         return item.auditorId;
@@ -5563,7 +5534,7 @@ a {
                         formData.append("associateDegreeNames", listName)
                         //日报审核人
                         if (this.addForm.auditUserIds) {
-                            if (this.user.timeType.reportAuditType == 6) {
+                            if (this.user.timeType.reportAuditType == 6 || this.user.timeType.reportAuditType == 9) {
                                 formData.append("auditUserIds", this.addForm.auditUserIds);
                             } else {
                                 formData.append("auditUserIds", JSON.stringify(this.addForm.auditUserIds));

+ 1 - 1
fhKeeper/formulahousekeeper/timesheet/src/views/settings/timetype.vue

@@ -753,7 +753,7 @@
         },
         data() {
             return {
-                reportAuditTypeArray:[this.$t('xiangMuShenHeRenShenHe'),this.$t('fenZuFuZeRenShenHe'),this.$t('xianFenZuFuZeRenShenHeZaiXiangMuJingLiShenHe'),this.$t('yuanGongZiYouXuanZeShenPiRen'),this.$t('xiangMuSuoShuBuShenHe'),this.$t('zhiShuShenHeRenHuoBuMenFuZeRenShenHe'),this.$t('zhiShuHuoBuMenFuZeRenShenHeXiangMuRiBaoShenHeRenShenHe'),this.$t('buMenHeXiangMuRiBaoShenHeRenBingHangShenHe')],
+                reportAuditTypeArray:[this.$t('xiangMuShenHeRenShenHe'),this.$t('fenZuFuZeRenShenHe'),this.$t('xianFenZuFuZeRenShenHeZaiXiangMuJingLiShenHe'),this.$t('yuanGongZiYouXuanZeShenPiRen'),this.$t('xiangMuSuoShuBuShenHe'),this.$t('zhiShuShenHeRenHuoBuMenFuZeRenShenHe'),this.$t('zhiShuHuoBuMenFuZeRenShenHeXiangMuRiBaoShenHeRenShenHe'),this.$t('buMenHeXiangMuRiBaoShenHeRenBingHangShenHe'), this.$t('projectSetSecReviewer'),this.$t('groupManagerAuditorToProjectReportAuditor')],
                 expandedKeys: [],
                 checkStrictly: false,
                 checkedKeys:[],

+ 14 - 18
fhKeeper/formulahousekeeper/timesheet/src/views/workReport/daily.vue

@@ -564,7 +564,7 @@
                         </el-form-item>
                         <el-form-item v-if="user.company.packageProject == 1&& (user.company.nonProjectSimple==0 || (user.company.nonProjectSimple==1&&domain.isPublic != 1))">
                             <template slot="label">
-                                <span style="color:#FF0000;" v-if="user.timeType.taskGroupRequired == 1 || user.timeType.reportAuditType == 1 || user.timeType.reportAuditType == 2">*</span>
+                                <span style="color:#FF0000;" v-if="user.timeType.taskGroupRequired == 1 || user.timeType.reportAuditType == 1 || user.timeType.reportAuditType == 2 || user.timeType.reportAuditType == 9">*</span>
                                 <span >{{$t('lable.taskGrouping')}}</span>
                             </template>
                             <!-- 任务分组 -->
@@ -594,7 +594,7 @@
                                 </el-select>
                             </template>
                         </el-form-item>
-                        <div v-if="user.timeType.reportAuditType != 3 && user.timeType.reportAuditType != 5 && domain.auditUserList">
+                        <div v-if="user.timeType.reportAuditType != 1 && user.timeType.reportAuditType != 2 && user.timeType.reportAuditType != 3 && user.timeType.reportAuditType != 5 && user.timeType.reportAuditType != 9 && domain.auditUserList">
                             <el-form-item v-if="user.timeType.reportAuditType != 3 && user.timeType.reportAuditType != 5 && domain.auditUserList.length > 0">
                                 <template slot="label">
                                     <span style="color:#FF0000;">*</span>
@@ -4898,7 +4898,7 @@
                         });
                     });
                 //检查当前的项目是否需要获取分组的负责人
-                if (this.user.timeType.reportAuditType == 1 || this.user.timeType.reportAuditType == 2 ) {
+                if (this.user.timeType.reportAuditType == 1 || this.user.timeType.reportAuditType == 2 || this.user.timeType.reportAuditType == 9) {
                     this.http.post("/task-group/getGroupIncharger", {groupId: domain.groupId},
                         res => {
                             if (res.code == "ok") {
@@ -6160,7 +6160,7 @@
                                     var isPublic = targetP[0].isPublic;
                                     filteredRespList = this.jobResponseList.filter(j=>j.timeType == (isPublic?this.$t('fei-xiang-mu-gong-shi'):this.$t('xiangMuGongShi')) && j.role == this.roleList.filter(r=>r.value == list.report[i].extraField1)[0].label);
                                 }
-                                arr.push({
+                                let copyData = {
                                     id: list.report[i].id,
                                     projectId: list.report[i].projectId,
                                     workingTime: list.report[i].workingTime,
@@ -6190,8 +6190,6 @@
                                     taskGroups:list.report[i].taskGroups,
                                     customData: list.report[i].customData,//自定义的数值
                                     auditUserList: list.report[i].auditUserList,
-                                    projectAuditorId: list.report[i].projectAuditorId,
-                                    projectAuditorName: list.report[i].projectAuditorName,
                                     overtimeHours: list.report[i].overtimeHours,
                                     customText: list.report[i].customText,
                                     basecostId: list.report[i].basecostId,
@@ -6208,7 +6206,13 @@
                                     serviceList: list.report[i].serviceList,
                                     sapServiceId: list.report[i].sapServiceId,
                                     reportTargetDeptId: list.report[i].deptId
-                                })
+                                }
+                                if (this.user.timeType.reportAuditType != 1 && this.user.timeType.reportAuditType != 2 && this.user.timeType.reportAuditType != 9) {
+                                    //分组负责人审核的情况下,前端不需要显示,无需设置
+                                    copyData.projectAuditorId = list.report[i].projectAuditorId;
+                                    copyData.projectAuditorName = list.report[i].projectAuditorName;
+                                }
+                                arr.push(copyData);
                                 if (list.report[i].state >= 2) {
                                     this.canEdit = true;
                                 }
@@ -8327,40 +8331,32 @@
                             } else {
                                 formData.append("stage", "-");
                             }
-                            // console.log(this.workForm.domains[i].projectAuditorId, '审核人的id')
                             if (this.workForm.domains[i].projectAuditorId) {
                                 formData.append("projectAuditorId", this.workForm.domains[i].projectAuditorId);
                             } else {
-                                // console.log('执行到了这里')
-                                // console.log(this.user.timeType.reportAuditType)
                                 if (this.user.timeType.reportAuditType == 0 || this.user.timeType.reportAuditType == 4) {
                                     this.$message({
                                         message: this.$t('message.Pleasespecifyaprojectreviewer'),
                                         type: "error"
                                     });
                                     return;
-                                } else if(this.user.timeType.reportAuditType == 1 || this.user.timeType.reportAuditType == 2){
+                                } else if(this.user.timeType.reportAuditType == 1 || this.user.timeType.reportAuditType == 2 || this.user.timeType.reportAuditType == 9){
                                     //分组负责人先审核, 确定是选择了任务分组
                                     if (this.workForm.domains[i].taskGroups.length == 0) {
                                         this.$message({
                                             message: "["+this.workForm.domains[i].projectName+"]"+this.$t('message.involvedintheproject'),
                                             type: "error"
                                         });
+                                        return;
                                     } else if (!this.workForm.domains[i].groupId) {
                                         // console.log(this.workForm.domains[i]);
                                         this.$message({
                                             message: this.$t('defaultText.pleaseChoose') + "["+this.workForm.domains[i].projectName+"]"+this.$t('message.Taskgroupingfortheproject'),
                                             type: "error"
                                         });
-                                    } else {
-                                        this.$message({
-                                            message: this.$t('defaultText.pleaseset') + "["+this.workForm.domains[i].projectName+"]"+this.$t('message.Projectgroupleader'),
-                                            type: "error"
-                                        });
+                                        return;
                                     }
-                                    return;
                                 }
-                                
                             }
                             if (this.user.companyId == this.yuzhongCompId) {
                                 formData.append('extraField1', this.workForm.domains[i].extraField1);

+ 9 - 11
fhKeeper/formulahousekeeper/timesheet_h5/src/views/edit/index.vue

@@ -1718,7 +1718,7 @@ export default {
                                         list[i].extraField3Name = list[i].workContentList.find(w => w.id == list[i].extraField3).workContext;
                                     }
                                 }
-                                array.push({
+                                let copyData = {
                                     id: list[i].id,
                                     projectId: list[i].projectId,
                                     projectName: projectName,
@@ -1753,15 +1753,12 @@ export default {
                                     stages: list[i].stages,
                                     stage: list[i].stage == '-' ? null : list[i].stage,
                                     customData: list[i].customData,
-                                    projectAuditorId: list[i].projectAuditorId,
-                                    projectAuditorName: list[i].projectAuditorName,
                                     auditUserList: list[i].auditUserList,
                                     overtimeHours: list[i].overtimeHours,
                                     customText: list[i].customText,
                                     basecostId: list[i].basecostId,
                                     basecostName: basecostName,
                                     canEdit: list[i].state >= 2 ? true : false,
-
                                     auditorFirst: list[i].auditorFirst ? list[i].auditorFirst : { name: '', id: '' },
                                     auditorSec: list[i].auditorSec ? list[i].auditorSec : { name: '', id: '' },
                                     auditorThird: list[i].auditorThird ? list[i].auditorThird : { name: '', id: '' },
@@ -1779,7 +1776,13 @@ export default {
                                     serviceList: list[i].serviceList,
                                     userReportDeptName: list[i].userReportDeptName,
                                     reportTargetDeptId: list[i].deptId
-                                })
+                                }
+                                if (this.user.timeType.reportAuditType != 1 && this.user.timeType.reportAuditType != 2 && this.user.timeType.reportAuditType != 9) {
+                                    //分组负责人审核的情况下,前端不需要显示,无需设置
+                                    copyData.projectAuditorId = list.report[i].projectAuditorId;
+                                    copyData.projectAuditorName = list.report[i].projectAuditorName;
+                                }
+                                array.push(copyData);
                                 if (list[i].state >= 2) {
                                     this.canEdit = true;
                                 } else {
@@ -2626,20 +2629,15 @@ export default {
                     if (this.user.timeType.reportAuditType == 0) {
                         this.$toast.fail("请指定[" + this.form.domains[i].projectName + ']项目的审核人');
                         return;
-                    } else if (this.user.timeType.reportAuditType == 1 || this.user.timeType.reportAuditType == 2) {
+                    } else if (this.user.timeType.reportAuditType == 1 || this.user.timeType.reportAuditType == 2 ||  this.user.timeType.reportAuditType == 9) {
                         if (this.form.domains[i].taskGroups.length == 0) {
                             this.$toast.fail("您在[" + this.form.domains[i].projectName + "]项目上尚无参与的任务分组");
                             return;
                         } else if (!this.form.domains[i].groupId) {
                             this.$toast.fail("请选择[" + this.form.domains[i].projectName + "]项目的任务分组");
                             return;
-                        } else {
-                            this.$toast.fail("请先设置[" + this.form.domains[i].projectName + ']-[' + this.form.domains[i].groupName + ']的分组负责人');
-                            return;
                         }
-
                     }
-
                 }
                 if (this.user.companyId == this.yuzhongCompId) {
                     formData.append('extraField1', this.form.domains[i].extraField1);