浏览代码

考试时长显示调整

seyason 1 年之前
父节点
当前提交
da4ba82e72

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

@@ -182,6 +182,7 @@
     "exportingTimeStatistics": "Export labor statistics"
   },
   "other": {
+    "kaoqingTimeTip": "not include pending overtime and holiday time",
     "customerService": "Customer service",
     "sweepWeChatYards": "Sweep WeChat yards",
     "messageCenter": "message center",

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

@@ -184,6 +184,7 @@
     "exportingTimeStatistics": "导出工时统计"
   },
   "other": {
+    "kaoqingTimeTip": "工作时长不包含未审批加班及休假",
     "customerService": "咨询客服",
     "sweepWeChatYards": "微信扫码",
     "messageCenter": "消息中心",

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

@@ -18,6 +18,9 @@
                                 <br>
                                 <span style="font-size:10px;text-align:center;color:#999;">{{item.weekDay}}</span>
                                 <span class="chooseDate" v-if="index == choseDay"></span>
+                                <!-- <el-tooltip v-if="index == choseDay" effect="dark" content="填报时长超过北森考勤时长" placement="top-start">
+                                <i class="el-icon-warning" style="color:red;"></i>
+                                </el-tooltip> -->
                                 </div>
                             </div>
                             </span>
@@ -401,7 +404,13 @@
                         <span v-if="reportTimeType.type == 3 && user.company.companyName != mingyiName">{{$t('time.hour')}}</span>
                         <!-- <span v-if="isBatch && user.company.companyName != mingyiName">, {{$t('other.fillInTheTotal')}} {{jsTime.toFixed(1)}} {{$t('time.hour')}}</span> -->
                         <span v-if="isBatch && user.company.companyName != mingyiName">, {{$t('other.fillInTheTotal')}} <el-input v-model="jsTime" @change="onBatchTimeChange" style="width:80px;"/> {{$t('time.hour')}}</span>
-                        <span v-if="workForm.time">{{$t('other.attendancePunch')}}: {{workForm.time.startTime}}-{{workForm.time.endTime}}, 工作{{workForm.time.workHours}}{{$t('time.hour')}}
+                        
+                        <!-- AI智能填报 -->
+                        <el-button type="primary" @click="getAIReport()" v-if="!hasWrittenReport" style="margin-left:5px;" >智能填报</el-button>
+                    </el-form-item>
+                    <!--考勤时长显示-->
+                    <el-form-item :label="$t('other.attendancePunch')" v-if="workForm.time || user.companyId == 5978">
+                        <span v-if="workForm.time">{{workForm.time.startTime}}-{{workForm.time.endTime}}, 工作{{workForm.time.workHours}}{{$t('time.hour')}}
                         <span v-if="workForm.time.askLeaveTime">|&nbsp;请假{{ workForm.time.askLeaveTime }}小时</span>
                         </span>
                         <!--批量填报和批量代填不显示考勤记录-->
@@ -414,8 +423,10 @@
                         <el-button type="default" style="margin-left:5px;" size="small" :loading="syncTimeLoading" 
                         v-if="isBatch && user.company.companyName === mingyiName" icon="el-icon-refresh" 
                                 @click="refreshAttendance(workForm.createDate)"></el-button>
-                        <!-- AI智能填报 -->
-                        <el-button type="primary" @click="getAIReport()" v-if="!hasWrittenReport" style="margin-left:5px;" >智能填报</el-button>
+                        <el-button type="default" style="margin-left:5px;" size="small" :loading="syncTimeLoading" 
+                        v-if="!isBatch && user.companyId === 5978" icon="el-icon-refresh" 
+                                @click="refreshBeiSengAttendance(workForm.createDate)"></el-button>
+                        <span v-if="user.companyId==5978" style="margin-left:5px;color:#20a0ff;"><i class="el-icon-warning"></i>{{$t('other.kaoqingTimeTip')}}</span>
                     </el-form-item>
                     <!-- 000000 -->
                     <div v-for="(domain, index) in workForm.domains" :key="domain.id" :style="index>0?'margin-top:10px;':''">
@@ -2796,6 +2807,30 @@
                     })
                 })
             },
+            refreshBeiSengAttendance(workdate) {
+                 if (!workdate) return;
+                this.syncTimeLoading = true;
+                this.http.post('/user-with-beisen/syncAttendanceFromBeisen',{
+                    startDate: workdate,
+                    endDate: workdate
+                },res => {
+                    this.syncTimeLoading = false;
+                    if(res.code == 'ok'){
+                        this.workForm.time = res.data;
+                    }else {
+                        this.$message({
+                            message: res.msg,
+                            type: 'error'
+                        })
+                    }
+                },err => {
+                    this.syncTimeLoading = false;
+                    this.$message({
+                        message: err,
+                        type: 'error'
+                    })
+                })
+            },
             weeklyFilledTimeClick(parameterDate){ //按周填报-已填工时-点击
                 this.weeklyFilledTimeDialog = true
                 this.weeklyFilledTimeLoading = true