Просмотр исходного кода

任务分组的日报和按周填报,在非项目模式下的处理

QuYueTing 5 дней назад
Родитель
Сommit
712156d6a2

+ 1 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/ReportServiceImpl.java

@@ -10054,6 +10054,7 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
                 Optional<Project> optional = projectList.stream().filter(p->p.getId().equals(report.getProjectId())).findFirst();
                 Optional<Project> optional = projectList.stream().filter(p->p.getId().equals(report.getProjectId())).findFirst();
                 if (optional.isPresent()) {
                 if (optional.isPresent()) {
                     report.setProjectName(optional.get().getProjectName());
                     report.setProjectName(optional.get().getProjectName());
+                    report.setIsPublic(optional.get().getIsPublic());
                 }
                 }
                 //设置ProjectAuditorName
                 //设置ProjectAuditorName
                 Optional<User> optionalUser = auditorList.stream().filter(u->u.getId().equals(report.getProjectAuditorId())).findFirst();
                 Optional<User> optionalUser = auditorList.stream().filter(u->u.getId().equals(report.getProjectAuditorId())).findFirst();

Разница между файлами не показана из-за своего большого размера
+ 97578 - 106559
fhKeeper/formulahousekeeper/management-platform/workTime.log


+ 21 - 7
fhKeeper/formulahousekeeper/timesheet/src/views/workReport/daily.vue

@@ -1297,21 +1297,21 @@
                     </el-select>
                     </el-select>
                 </div>
                 </div>
                 <!-- 任务分组 -->
                 <!-- 任务分组 -->
-                <div class="zhoFel" v-if="user.company.packageProject == 1 && !user.timeType.hideGroup">
+                <div class="zhoFel" v-if="user.company.packageProject == 1 && !user.timeType.hideGroup && !(user.company.nonProjectSimple==1&&zhoBao.isPublic)">
                     <p>{{$t('lable.taskGrouping')}}</p>
                     <p>{{$t('lable.taskGrouping')}}</p>
                     <el-select v-model="zhoBao.groupId" :placeholder="$t('defaultText.pleaseSelectaTaskGroup')" clearable="true" style="width: 355px"
                     <el-select v-model="zhoBao.groupId" :placeholder="$t('defaultText.pleaseSelectaTaskGroup')" clearable="true" style="width: 355px"
                      @change="getGroupStages(zhoBao, 0), getWeeklyTaskList(zhoBao)">
                      @change="getGroupStages(zhoBao, 0), getWeeklyTaskList(zhoBao)">
                         <el-option v-for="item in zhoBao.taskGroups" :key="item.id" :label="item.name" :value="item.id"></el-option>
                         <el-option v-for="item in zhoBao.taskGroups" :key="item.id" :label="item.name" :value="item.id"></el-option>
                     </el-select>
                     </el-select>
                 </div>
                 </div>
-                <div class="zhoFel" v-if="user.company.packageProject == 1 && !user.timeType.hideStages && zhoBao.stages != null && zhoBao.stages.length> 0">
+                <div class="zhoFel" v-if="user.company.packageProject == 1 && !user.timeType.hideStages && zhoBao.stages != null && zhoBao.stages.length> 0 && !(user.company.nonProjectSimple==1&&zhoBao.isPublic)">
                     <p>{{$t('other.inputStage')}}</p>
                     <p>{{$t('other.inputStage')}}</p>
                     <el-select v-model="zhoBao.stage" :placeholder="$t('defaultText.pleaseChoose')" style="width: 355px" clearable="true" @change="getWeeklyTaskList(zhoBao)">
                     <el-select v-model="zhoBao.stage" :placeholder="$t('defaultText.pleaseChoose')" style="width: 355px" clearable="true" @change="getWeeklyTaskList(zhoBao)">
                             <el-option v-for="item in zhoBao.stages" :key="item.id" :label="item.stagesName" :value="item.stagesName"></el-option>
                             <el-option v-for="item in zhoBao.stages" :key="item.id" :label="item.stagesName" :value="item.stagesName"></el-option>
                     </el-select>
                     </el-select>
                 </div>
                 </div>
                 <!-- 选择任务 -->
                 <!-- 选择任务 -->
-                <div class="zhoFel" v-if="user.company.packageProject==1 && !user.timeType.hideTask && (user.company.nonProjectSimple==0 || (user.company.nonProjectSimple==1&&zhoBao.isPublic!=1))">
+                <div class="zhoFel" v-if="user.company.packageProject==1 && !user.timeType.hideTask && !(user.company.nonProjectSimple==1&&zhoBao.isPublic)">
                     <p>{{ $t('renWuLiChengBei') }}</p>
                     <p>{{ $t('renWuLiChengBei') }}</p>
                     <el-select v-model="zhoBao.taskId" :placeholder="$t('defaultText.pleaseChoose')" clearable="true" style="width: 355px" filterable @change="$forceUpdate()">
                     <el-select v-model="zhoBao.taskId" :placeholder="$t('defaultText.pleaseChoose')" clearable="true" style="width: 355px" filterable @change="$forceUpdate()">
                         <el-option v-for="item in zhoBao.taskList" :key="item.taskId" :label="item.taskName" :value="item.taskId"></el-option>
                         <el-option v-for="item in zhoBao.taskList" :key="item.taskId" :label="item.taskName" :value="item.taskId"></el-option>
@@ -7996,8 +7996,9 @@
             },
             },
             // 按周填报里内容的填写点击确定
             // 按周填报里内容的填写点击确定
             setWeekProItemData() {
             setWeekProItemData() {
+                let isSimpleNonProject = this.user.company.nonProjectSimple == 1 && this.zhoBao.isPublic;
                 //专业版模式下,任务分组和阶段必填
                 //专业版模式下,任务分组和阶段必填
-                if (this.user.company.packageProject == 1 && this.user.companyId === 3917) {
+                if (this.user.company.packageProject == 1 && this.user.companyId === 3917 && !isSimpleNonProject) {
                     if (!this.zhoBao.groupId || !this.zhoBao.stage) {
                     if (!this.zhoBao.groupId || !this.zhoBao.stage) {
                         this.$message({
                         this.$message({
                             message: this.$t('renWuFenZuHeJieDuanBiTianQingJianCha'),
                             message: this.$t('renWuFenZuHeJieDuanBiTianQingJianCha'),
@@ -8007,7 +8008,7 @@
                     }
                     }
                 }
                 }
                 // 检查任务分组
                 // 检查任务分组
-                if(this.user.timeType.taskGroupRequired == 1 && !this.zhoBao.groupId){
+                if(this.user.timeType.taskGroupRequired == 1 && !this.zhoBao.groupId && !isSimpleNonProject){
                     this.$message({
                     this.$message({
                         message: this.$t('renWuFenZuBiTianQingJianCha'),
                         message: this.$t('renWuFenZuBiTianQingJianCha'),
                         type: "error"
                         type: "error"
@@ -8023,7 +8024,13 @@
                     return;
                     return;
                 }
                 }
                 if (!this.zhoBao.projectAuditorId) {
                 if (!this.zhoBao.projectAuditorId) {
-                    if ((this.user.timeType.reportAuditType == 0 && !this.user.timeType.reportWorkflow) || this.user.timeType.reportAuditType == 4) {
+                    if ((this.user.timeType.reportAuditType <= 1 && !this.user.timeType.reportWorkflow && !isSimpleNonProject)) {
+                        this.$message({
+                            message: this.$t('message.Pleaseselectareviewer'),
+                            type: "error"
+                        });
+                        return
+                    } else if (this.user.timeType.reportAuditType == 4) {
                         this.$message({
                         this.$message({
                             message: this.$t('message.Pleaseselectareviewer'),
                             message: this.$t('message.Pleaseselectareviewer'),
                             type: "error"
                             type: "error"
@@ -8541,6 +8548,7 @@
                                 obj[pName].content = ''
                                 obj[pName].content = ''
                                 obj[pName].progress = 0
                                 obj[pName].progress = 0
                                 obj[pName].workingTime = 0
                                 obj[pName].workingTime = 0
+                                obj[pName].isPublic = 0
                             }
                             }
                             arrst.push(obj)
                             arrst.push(obj)
                         }
                         }
@@ -9013,6 +9021,7 @@
                     }
                     }
 
 
                     // 对于先分组负责人审核再项目经理审核的模式,分组要必选
                     // 对于先分组负责人审核再项目经理审核的模式,分组要必选
+                    console.log(this.zhoData);
                     let { next, error } = this.handleGroupAuditorData(this.zhoData)
                     let { next, error } = this.handleGroupAuditorData(this.zhoData)
                     if(!next) {
                     if(!next) {
                         this.$message({
                         this.$message({
@@ -9065,9 +9074,14 @@
                 }
                 }
 
 
                 let arrList = [];
                 let arrList = [];
+                let simple = this.user.company.nonProjectSimple==1;
+                console.log('simple='+simple);
                 Object.entries(data).forEach(([key, obj]) => {
                 Object.entries(data).forEach(([key, obj]) => {
                     Object.entries(obj).forEach(([projectName, projectData]) => {
                     Object.entries(obj).forEach(([projectName, projectData]) => {
-                        if (projectData.workingTime && !projectData.groupId) {
+                        if (projectData.workingTime) {
+                            console.log('projectData.isPublic', projectData.isPublic);
+                        }
+                        if (projectData.workingTime && !(simple&&projectData.isPublic) && !projectData.groupId) {
                             arrList.push({
                             arrList.push({
                                 projectName,
                                 projectName,
                                 date: obj.zhoDataTime,
                                 date: obj.zhoDataTime,

+ 2 - 1
fhKeeper/formulahousekeeper/timesheet_h5/src/views/edit/index.vue

@@ -2200,7 +2200,7 @@ export default {
                                     id: list[i].id,
                                     id: list[i].id,
                                     projectId: list[i].projectId,
                                     projectId: list[i].projectId,
                                     projectName: projectName,
                                     projectName: projectName,
-                                    isPublic: isPublic,
+                                    isPublic: list[i].isPublic,
                                     workingTime: String(list[i].workingTime),
                                     workingTime: String(list[i].workingTime),
                                     content: list[i].content,
                                     content: list[i].content,
                                     state: list[i].state,
                                     state: list[i].state,
@@ -3158,6 +3158,7 @@ export default {
             //填字段
             //填字段
             for (var i in this.form.domains) {
             for (var i in this.form.domains) {
                 let isSimpleNonProject = this.user.company.nonProjectSimple==1&&this.form.domains[i].isPublic;
                 let isSimpleNonProject = this.user.company.nonProjectSimple==1&&this.form.domains[i].isPublic;
+                console.log(this.form.domains[i]);
                 // 检查任务/里程碑是否为必填
                 // 检查任务/里程碑是否为必填
                 let taskRequired = this.user.timeType.taskRequired
                 let taskRequired = this.user.timeType.taskRequired
                 if(taskRequired == 1) {
                 if(taskRequired == 1) {

+ 9 - 5
fhKeeper/formulahousekeeper/timesheet_h5/src/views/edit/weekEdit.vue

@@ -3016,7 +3016,10 @@
                 for(var i in newFrom) {
                 for(var i in newFrom) {
                     const { domains, createDate } = newFrom[i]
                     const { domains, createDate } = newFrom[i]
                     for(var j in domains) {
                     for(var j in domains) {
-                        if(domains[j].projectId && !domains[j].groupId) {
+                        if (domains[j].isPublic) {
+                            console.log('有公共项目');
+                        }
+                        if(domains[j].projectId && !(this.user.company.nonProjectSimple==1 && domains[j].isPublic) && !domains[j].groupId) {
                             arrList.push({
                             arrList.push({
                                 dateTime: createDate,
                                 dateTime: createDate,
                                 projectName: domains[j].projectName,
                                 projectName: domains[j].projectName,
@@ -3153,6 +3156,7 @@
                     progress: 100,
                     progress: 100,
                     projectId: '',
                     projectId: '',
                     projectName: '',
                     projectName: '',
+                    isPublic: 0,
                     state: 2,
                     state: 2,
                     workingTime: 8,
                     workingTime: 8,
                     worktimeList: []
                     worktimeList: []
@@ -3170,7 +3174,7 @@
                             const { 
                             const { 
                                 id,
                                 id,
                                 endTime, startTime, content, groupId, groupName,
                                 endTime, startTime, content, groupId, groupName,
-                                projectAuditorId, projectAuditorName, projectId,
+                                projectAuditorId, projectAuditorName, projectId, isPublic,
                                 projectName, state, taskId, taskName, overtimeHours,
                                 projectName, state, taskId, taskName, overtimeHours,
                                 stage, taskGroups, isOvertime, workingTime, subProjectId, progress,
                                 stage, taskGroups, isOvertime, workingTime, subProjectId, progress,
                                 multiDegrId, degreeId, degreeList, customText
                                 multiDegrId, degreeId, degreeList, customText
@@ -3200,7 +3204,7 @@
                             let newObj = {
                             let newObj = {
                                 ...objectItem, id,
                                 ...objectItem, id,
                                 endTime, startTime, content, groupId, groupName,
                                 endTime, startTime, content, groupId, groupName,
-                                projectAuditorId, projectAuditorName, projectId,
+                                projectAuditorId, projectAuditorName, projectId,isPublic,
                                 projectName, state, taskId, taskName, overtimeHours,
                                 projectName, state, taskId, taskName, overtimeHours,
                                 stage, taskGroups, workingTime, subProjectId, progress,
                                 stage, taskGroups, workingTime, subProjectId, progress,
                                 isOvertime: isOvertime == 1 ? true : false,
                                 isOvertime: isOvertime == 1 ? true : false,
@@ -3231,9 +3235,9 @@
                 let newArrItem = JSON.parse(JSON.stringify(arrItem))
                 let newArrItem = JSON.parse(JSON.stringify(arrItem))
                 const { domains } = newArrItem
                 const { domains } = newArrItem
                 for(let i in domains) {
                 for(let i in domains) {
-                    const { projectId, projectName, stage, groupId, groupName, degreeId } = domains[i]
+                    const { projectId, projectName,isPublic, stage, groupId, groupName, degreeId } = domains[i]
                     if(projectId) {
                     if(projectId) {
-                        this.fZr({ projectId, projectName }, 0, true, i)
+                        this.fZr({ projectId, projectName, isPublic }, 0, true, i)
                         // if(timeType.customDegreeActive == 1) {
                         // if(timeType.customDegreeActive == 1) {
                         //     this.dimension(projectId, 0, true, timeType.customDegreeMultiple, i)
                         //     this.dimension(projectId, 0, true, timeType.customDegreeMultiple, i)
                         // }
                         // }