فهرست منبع

非项目审核人

QuYueTing 7 ماه پیش
والد
کامیت
b5bce3f5b1

+ 16 - 5
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/ProjectAuditorController.java

@@ -6,6 +6,7 @@ import com.management.platform.entity.*;
 import com.management.platform.mapper.*;
 import com.management.platform.service.ProjectAuditorService;
 import com.management.platform.util.HttpRespMsg;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.RequestMapping;
 
 import org.springframework.web.bind.annotation.RestController;
@@ -41,6 +42,8 @@ public class ProjectAuditorController {
     private DepartmentMapper departmentMapper;
     @Resource
     HttpServletRequest request;
+    @Autowired
+    private TimeTypeMapper timeTypeMapper;
 
     @RequestMapping("/getList")
     private HttpRespMsg getList(Integer projectId) {
@@ -57,10 +60,18 @@ public class ProjectAuditorController {
                 //非项目,该员工的部门主要负责人审核
                 mode = 1;
                 String superiorId = null;
-                Integer departmentId = user.getDepartmentId();
-                Department department = departmentMapper.selectById(departmentId);
-                if (department != null) {
-                    superiorId = department.getManagerId();
+                TimeType timeType = timeTypeMapper.selectById(user.getCompanyId());
+                //优先取员工的上级领导
+                if (timeType.getReportAuditType() == 0) {
+                    superiorId = user.getSuperiorId();
+                }
+                //其次取员工的部门主要负责人
+                if (superiorId == null) {
+                    Integer departmentId = user.getDepartmentId();
+                    Department department = departmentMapper.selectById(departmentId);
+                    if (department != null) {
+                        superiorId = department.getManagerId();
+                    }
                 }
                 if (superiorId != null) {
                     User superior = userMapper.selectById(superiorId);
@@ -69,9 +80,9 @@ public class ProjectAuditorController {
                         auditor.setAuditorId(superiorId);
                         auditor.setAuditorName(superior.getName());
                         auditorList.add(auditor);
-
                     }
                 }
+
                 msg.data = auditorList;
             }
         }

+ 4 - 4
fhKeeper/formulahousekeeper/timesheet/src/views/team/index.vue

@@ -416,9 +416,9 @@
         </el-dialog>
 
         <!-- 新增/编辑人员的Dialog -->
-        <el-dialog :title="title" :visible.sync="dialogVisible" width="580px" :top="'7.5vh'">
+        <el-dialog :title="title" :visible.sync="dialogVisible" width="600px" :top="'7.5vh'">
             <div style="height: 62vh;overflow: auto;">
-              <el-form ref="form12" :model="insertForm" :rules="rules" label-width="100px">
+              <el-form ref="form12" :model="insertForm" :rules="rules" label-width="120px">
                   <el-form-item :label="$t('lable.name')" prop="name" v-if="user.userNameNeedTranslate != '1'">
                       <el-input v-model="insertForm.name" :placeholder="$t('peaseenterthe')" clearable :disabled="user.userNameNeedTranslate == '1'"></el-input>
                   </el-form-item>
@@ -472,9 +472,9 @@
                       <el-radio  :label="1">{{ $t('yiCengShenHe') }}</el-radio>
                       </el-radio-group>
                   </el-form-item>
-                  <el-form-item v-if="user.timeType.reportAuditType == 5 || user.timeType.reportAuditType == 6">
+                  <el-form-item v-if="user.timeType.reportAuditType == 5 || user.timeType.reportAuditType == 6 || (user.timeType.reportAuditType == 0 && user.company.nonProjectSimple == 1)">
                       <span slot="label">
-                        <span>{{ $t('immediatesuperior') }}</span>
+                        <span>{{ (user.timeType.reportAuditType == 0 && user.company.nonProjectSimple == 1)?'非项目审核人':$t('immediatesuperior') }}</span>
                         <el-tooltip effect="dark" :content="$t('weiSheZhiShiYouSuoShuBuMenFuZeRenShenHe')" placement="top-start">
                           <i class="el-icon-question" style="color:#606266"></i>
                         </el-tooltip>