Browse Source

提交按周填报

Lijy 1 year ago
parent
commit
71c77df25b

+ 3 - 2
fhKeeper/formulahousekeeper/timesheet/src/views/workReport/daily.vue

@@ -135,7 +135,8 @@
                                 <span style="float:right;">
                                     <el-link type="primary" style="margin-right:10px;" :underline="false" @click="isSubstitude=false;fillInReport(-1,0)">{{$t('textLink.fillInTheWork')}}</el-link>
                                     <el-link v-if="reportTimeType.type != 0 && user.companyId != yuzhongCompId" type="primary" style="margin-right:10px;" :underline="false" @click="isSubstitude=false;fillInReportss()">{{$t('textLink.fillInAWeek')}}</el-link>
-                                    <el-link v-if="reportTimeType.type != 0 && user.companyId != yuzhongCompId" type="primary" style="margin-right:10px;" :underline="false" @click="isSubstitude=false;fillInReportCustom()">按周填报2</el-link>
+                                    <el-link v-if="user.timeType.enableNewWeeklyfill == 1" type="primary" style="margin-right:10px;" :underline="false" @click="isSubstitude=false;fillInReportCustom()">按周填报</el-link>
+                                    <!-- <el-link type="primary" style="margin-right:10px;" :underline="false" @click="isSubstitude=false;fillInReportCustom()">按周填报</el-link> -->
                                     <el-link type="primary" v-if="permissions.reportsFillOut" style="margin-right:10px;" :underline="false" @click="isSubstitude=true; fillInReport(-1,2)">{{$t('textLink.helpToFillIn')}}</el-link>
                                     <el-link type="primary" v-if="permissions.reportBatch" style="margin-right:10px;" :underline="false" @click="isSubstitude=false;fillInReport(-1,1)">{{$t('textLink.batchFillIn')}}</el-link>
                                     <el-link type="primary" v-if="user.companyId != yuzhongCompId && (permissions.importReport || user.manageDeptId != 0)" style="margin-right:10px;" :underline="false" @click="imports()">{{$t('textLink.workHoursImport')}}</el-link>
@@ -266,7 +267,7 @@
                                                     <!--任务分组和阶段 -->
                                                     <p v-if="item2.groupId != 0">
                                                         {{$t('other.taskGroup')}}:{{item2.groupName}} 
-                                                        <span v-if="item2.stage != null && item2.stage != '-' && user.companyId != yuzhongCompId" style="margin-left:10px;">{{$t('other.inputStage')}}:{{item2.stage}}</span>
+                                                        <span v-if="item2.stage != null && item2.stage != '-' && user.companyId != yuzhongCompId && user.timeType.enableNewWeeklyfill != 1" style="margin-left:10px;">{{$t('other.inputStage')}}:{{item2.stage}}</span>
                                                     </p>
                                                     <p v-if="user.timeType.customDegreeActive==1 && item2.degree_id != null && item2.degree_id != -1">{{user.timeType.customDegreeName}}:{{item2.degreeName}}</p>
                                                     <p v-if="user.timeType.customDataActive==1">{{user.timeType.customDataName}}:{{item2.customData}}</p>

+ 4 - 3
fhKeeper/formulahousekeeper/timesheet/src/views/workReport/weeklyCustomization.vue

@@ -120,10 +120,10 @@ export default {
             const newWeekData = cloneDeep(this.weekTableData)
 
             let strArr = this.judgmentData(newWeekData)
-            console.log(strArr, '<===== strArr')
+            const { allday } = this.user.timeType // 系统设置的每日工作时间
             if (strArr.length > 0) {
                 this.$message({
-                    message: `【${strArr.join('、')}】日期填写工作时长小于系统设置的每日工作时长`,
+                    message: `【${strArr.join('、')}】填写工时合计非 ${allday} 小时`,
                     type: "error"
                 });
                 return
@@ -200,6 +200,7 @@ export default {
         // 判断是否小于系统设置的每日工作时间
         judgmentData(data) {
             const { allday } = this.user.timeType // 系统设置的每日工作时间
+            console.log(allday, '<======= 填写日报时长allday')
             const result = [];
             data.forEach((item) => {
                 const date = item.dateTime;
@@ -215,7 +216,7 @@ export default {
             const strArr = result
                 .filter((arr) => arr[0].projectId)
                 .filter(
-                    (arr) => arr.reduce((sum, item) => sum + (+item.workingTime || 0), 0) < allday
+                    (arr) => arr.reduce((sum, item) => sum + (+item.workingTime || 0), 0) != allday
                 )
                 .map((arr) => arr[0].dateTime);