QuYueTing 4 hete
szülő
commit
248f683382

+ 0 - 28
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/util/GsonUtils.java

@@ -1,28 +0,0 @@
-///*
-// * Copyright (C) 2017 Baidu, Inc. All Rights Reserved.
-// */
-//package com.management.platform.util;
-//
-//import com.google.gson.Gson;
-//import com.google.gson.GsonBuilder;
-//import com.google.gson.JsonParseException;
-//import java.lang.reflect.Type;
-//
-///**
-// * Json工具类.
-// */
-//public class GsonUtils {
-//    private static Gson gson = new GsonBuilder().create();
-//
-//    public static String toJson(Object value) {
-//        return gson.toJson(value);
-//    }
-//
-//    public static <T> T fromJson(String json, Class<T> classOfT) throws JsonParseException {
-//        return gson.fromJson(json, classOfT);
-//    }
-//
-//    public static <T> T fromJson(String json, Type typeOfT) throws JsonParseException {
-//        return (T) gson.fromJson(json, typeOfT);
-//    }
-//}

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

@@ -139,7 +139,7 @@
                                     <el-link v-if="user.timeType.enableNewWeeklyfill == 1" type="primary" style="margin-right:10px;" :underline="false" @click="isSubstitude=false;fillInReportCustom()">{{ $t('textLink.fillInAWeek') }}</el-link>
                                     <!-- <el-link type="primary" style="margin-right:10px;" :underline="false" @click="isSubstitude=false;fillInReportCustom()">按周填报123</el-link> -->
                                     <el-link type="primary" style="margin-right:10px;" :underline="false" @click="isSubstitude=false;weekIndex++,fillWeekDialogVisiCustomTwo=true" v-if="user.timeType.enableNewWeeklyfill==2">按周填报</el-link>
-                                    <el-link type="primary" v-if="user.companyId != 5978 && permissions.reportsFillOut && user.timeType.enableNewWeeklyfill != 1 && user.timeType.weeklyChargeFilter != 1" style="margin-right:10px;" :underline="false" @click="isSubstitude=true; fillInReport(-1,(user.companyId == 5814||user.companyId==5693 || user.companyId==4407 || user.companyId == 7812 || user.companyId == 481)?2:0)">{{$t('textLink.helpToFillIn')}}</el-link>
+                                    <el-link type="primary" v-if="user.companyId != 5978 && permissions.reportsFillOut && user.timeType.enableNewWeeklyfill != 1 && user.timeType.weeklyChargeFilter != 1" style="margin-right:10px;" :underline="false" @click="isSubstitude=true; fillInReport(-1,(user.companyId == 5814||user.companyId==5693 || user.companyId==4407 || user.companyId == 7812 || user.companyId == 481 || user.companyName == mingyiName)?2:0)">{{$t('textLink.helpToFillIn')}}</el-link>
                                     <!-- 苏州景昱,按周填报的模式进行代填日报 -->
                                     <el-link type="primary" v-if="user.companyId == 5978 && permissions.reportsFillOut && user.timeType.enableNewWeeklyfill != 1 && user.timeType.weeklyChargeFilter != 1" style="margin-right:10px;" :underline="false" @click="isSubstitude=true; fillInReportss();">{{$t('textLink.helpToFillIn')}}</el-link>
                                     
@@ -416,12 +416,18 @@
                         <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>
-
+                        <template v-if="user.company.companyName === mingyiName">
+                            <span v-if="isBatch">,考勤时长:{{this.workTimeForMinYi}}{{$t('time.hour')}}</span>
+                            <span v-if="!isBatch"> 考勤时长:<span v-if="workForm.time">{{workForm.time.startTime}}-{{workForm.time.endTime}},{{workForm.time.workHours}}{{$t('time.hour')}}</span> </span>
+                            <el-button type="default" style="margin-left:5px;" size="small" :loading="syncTimeLoading"  icon="el-icon-refresh" 
+                                    @click="refreshAttendance(workForm.createDate)"></el-button>
+                        </template>
+                        
                         <!-- AI智能填报 -->
                         <el-button type="primary" @click="getAIReport()" v-if="!hasWrittenReport" style="margin-left:5px;" >{{ $t('zhiNengTianBao') }}</el-button>
                     </el-form-item>
                     <!--考勤时长显示-->
-                    <el-form-item :label="$t('other.attendancePunch')" v-if="workForm.showRefresh">
+                    <el-form-item :label="$t('other.attendancePunch')" v-if="workForm.showRefresh && user.company.companyName != mingyiName">
                         <template v-if="user.companyId != 7536">
                             <span v-if="workForm.time">{{workForm.time.startTime}}-{{workForm.time.endTime}}, {{workForm.time.isOffiBusiness?'出差':'工作'}}{{workForm.time.workHours}}{{$t('time.hour')}}
                                 <span v-if="workForm.time.askLeaveTime">|&nbsp;{{ $t('other.AskForLeave') }}{{ workForm.time.askLeaveTime }}{{$t('time.hour')}}</span>
@@ -435,9 +441,9 @@
                         </template>
 
                         <!--批量填报不显示考勤记录-->
-                        <span v-if="!isBatch && (user.timeType.syncDingding==1 || user.timeType.syncCorpwxTime==1)&&!workForm.time" >{{$t('other.noAttendanceRecord')}}</span>
+                        <span v-if="!isBatch && (user.timeType.syncDingding==1 || user.timeType.syncCorpwxTime==1 || user.timeType.syncFanwei==1)&&!workForm.time" >{{$t('other.noAttendanceRecord')}}</span>
                         <!--针对明夷,批量填报(不含代填)情况下显示考勤时长-->
-                        <span v-if="!isSubstitude && isBatch && user.company.companyName === mingyiName">,{{ $t('workAttendance') }}:{{this.workTimeForMinYi}}{{$t('time.hour')}}</span>
+                        
                         <el-button type="default" style="margin-left:5px;" size="small" :loading="syncTimeLoading" 
                         v-if="!isBatch && user.timeType.syncCorpwxTime==1 && !isSubstitude" icon="el-icon-refresh" 
                                 @click="refreshWXCardTime(workForm.createDate)"></el-button>
@@ -445,9 +451,6 @@
                         v-if="!isBatch && user.timeType.syncDingding==1 && !isSubstitude" icon="el-icon-refresh" 
                                 @click="refreshDDCardTime(workForm.createDate)"></el-button>
                         <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>
-                        <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>
                         <el-button type="default" style="margin-left:5px;" size="small" :loading="syncTimeLoading" 
@@ -2375,7 +2378,7 @@
                 jobResponseList:[],
                 yisibeiCompId: 3092,
                 yuzhongCompId: 3385,
-                mingyiName : '成都明夷电子科技有限公司',
+                mingyiName : '成都明夷电子科技股份有限公司',
                 // mingyiName : '明夷',
                 modItemDataId: null,
                 modImportTime: null,
@@ -3356,11 +3359,26 @@
             },
              refreshAttendance(workdate) {
                  if (!workdate) return;
+                 if (this.isSubstitude && this.workForm.userId == null) return;
                 this.syncTimeLoading = true;
-                this.http.post('/user-fv-time/syncAttendanceForMingYi',{
-                    startDate: workdate[0],
-                    endDate: workdate[1]
-                },res => {
+                var param = {};
+                if (this.isBatch) {
+                    param = {
+                        startDate: workdate[0],
+                        endDate: workdate[1],
+                        userId: this.isSubstitude? this.workForm.userId[0] : this.user.id,
+                        isBatch: this.isBatch
+                    }
+                } else {
+                    param = {
+                        startDate: workdate,
+                        endDate: workdate,
+                        userId: this.user.id,
+                        isBatch: this.isBatch
+                    }
+                }
+
+                this.http.post('/user-fv-time/syncAttendanceForMingYi',param,res => {
                     this.syncTimeLoading = false;
                     if(res.code == 'ok'){
                         this.workTimeForMinYi = parseFloat(res.data.workHours);
@@ -3987,9 +4005,18 @@
                 }
             },
             getWorkTimeForMinYi(){
+                if (this.isSubstitude && this.workForm.userId == null) {
+                    this.$message({
+                        message: "请先选择代填人员",
+                        type: "error"
+                    });
+                    this.workForm.createDate = null;
+                    return;
+                }
                 this.http.post('/user-fv-time/getMinYiWorkHour',{ 
                     startDate: this.workForm.createDate[0],
-                    endDate: this.workForm.createDate[1]
+                    endDate: this.workForm.createDate[1],
+                    userId: this.isSubstitude?this.workForm.userId[0]:this.user.id
                 },
                 res => {
                     if (res.code == "ok") {