Min 1 gadu atpakaļ
vecāks
revīzija
48d0abfb87

+ 32 - 33
fhKeeper/formulahousekeeper/timesheet/src/views/workReport/daily.vue

@@ -1380,7 +1380,7 @@
               :default-time="['12:00:00', '12:00:00']"
               size="small"
               popper-class="selecteorktime_datapick_popper"
-              @change="showMonthWorkTime('first')"
+              @change="showMonthWorkTime()"
             >
               </el-date-picker>
               <el-button size="small" @click="getDoubleLastWeek(1)">{{$t('time.twoWeeksAgo')}}</el-button>
@@ -1630,7 +1630,7 @@
 
         <el-tab-pane v-if="user.companyId==5978" :label="'工时异常明细'" name="third">
           <div class="selectworktime_export" style="margin-top:10px;">
-            <!-- <div class="selectworktime_export_l">
+            <div class="selectworktime_export_l">
               <el-date-picker
               class="selecteworktime_datapick"
               v-model="WorktimeDatepickValue"
@@ -1644,13 +1644,13 @@
               :default-time="['12:00:00', '12:00:00']"
               size="small"
               popper-class="selecteorktime_datapick_popper"
-              @change="showMonthWorkTime()"
+              @change="showMonthWorkTimeReminder()"
             >
               </el-date-picker>
-              <el-button size="small" @click="getDoubleLastWeek(1)">{{$t('time.twoWeeksAgo')}}</el-button>
-              <el-button size="small" @click="getLastWeek(1)">{{$t('time.lastWeek')}}</el-button>
-              <el-button size="small" @click="getThisWeek(1)">{{$t('time.nextWeek')}}</el-button>
-            </div> -->
+              <el-button size="small" @click="getDoubleLastWeek(2)">{{$t('time.twoWeeksAgo')}}</el-button>
+              <el-button size="small" @click="getLastWeek(2)">{{$t('time.lastWeek')}}</el-button>
+              <el-button size="small" @click="getThisWeek(2)">{{$t('time.nextWeek')}}</el-button>
+            </div>
             <div>
                 <el-input style="float:left;width:22%" v-if="user.userNameNeedTranslate != '1'" v-model="searchKeyword" class="input-with-select" :placeholder="$t('defaultText.pleaseEnterNametoSearch')" clearable="true" size="small">
                     <el-button slot="append" @click="searchScreen(0)" icon="el-icon-search"></el-button>
@@ -2417,7 +2417,6 @@
                 ],
                 pushWorkTimeLogDig:false,
                 pushWorkTimeLogData:[],
-                WorktimeDatepickValueForMonth:[],
 
                 userReportDeptList: []
             };
@@ -3843,14 +3842,14 @@
         let nowwd = [getauto[0],getauto[6]]
         this.WorktimeDatepickValue = nowwd
       }
-      this.showMonthWorkTime('first')
+      this.showMonthWorkTime()
     },
 
     handleClick(t,e){
       if (t.name == "second") {
         this.showMonthNotWorkTime()
       }else if(t.name == "first"){
-        this.showMonthWorkTime(t.name)
+        this.showMonthWorkTime()
       }else if(t.name == "third"){
         this.showMonthWorkTimeReminder()
       }
@@ -3883,8 +3882,8 @@
         "/report/exportUserDailyWorkTimeReminder",
         {
           // month: this.date,
-          startDate: this.WorktimeDatepickValueForMonth[0],
-          endDate: this.WorktimeDatepickValueForMonth[1],
+          startDate: this.WorktimeDatepickValue[0],
+          endDate: this.WorktimeDatepickValue[1],
         },
         (res) => {
           if (res.code == "ok") {
@@ -3949,20 +3948,12 @@
         }
     },
 
-    showMonthWorkTime(t) {
+    showMonthWorkTime() {
       this.monthTotalPage = 0,
         this.tbload = true
-        let parameter={}
-        if(t == "first"){
-            parameter={
-                startDate: this.WorktimeDatepickValue[0],
-                endDate: this.WorktimeDatepickValue[1],
-            }
-        }else{
-            parameter={
-                startDate: this.WorktimeDatepickValueForMonth[0],
-                endDate: this.WorktimeDatepickValueForMonth[1],
-            }
+        let parameter={
+            startDate: this.WorktimeDatepickValue[0],
+            endDate: this.WorktimeDatepickValue[1],
         }
       this.http.post(
         "/report/getUserDailyWorkTime",
@@ -4011,8 +4002,8 @@
         this.tbload = true
         let parameter={}
         parameter={
-            startDate: this.WorktimeDatepickValueForMonth[0],
-            endDate: this.WorktimeDatepickValueForMonth[1],
+            startDate: this.WorktimeDatepickValue[0],
+            endDate: this.WorktimeDatepickValue[1],
         }
       this.http.post(
         "/report/getUserDailyWorkTimeReminder",
@@ -4180,10 +4171,12 @@
       let newdate = new Date()
       let lastdate = newdate.toLocaleDateString(newdate.setDate(newdate.getDate() - 7))
       let lastwd = [this.getAutoWeekDate(lastdate)[0],this.getAutoWeekDate(lastdate)[6]]
-      if(e){
+      if(e==1){
         this.WorktimeDatepickValue = lastwd 
-        this.showMonthWorkTime('first')
-        
+        this.showMonthWorkTime()
+      }else if(e==2){
+        this.WorktimeDatepickValue = lastwd 
+        this.showMonthWorkTimeReminder()
       }else{
         this.WorktimeDatepickValue = lastwd 
         this.showMonthNotWorkTime()
@@ -4193,9 +4186,12 @@
       let newdate = new Date();
       let nowdate = newdate.toLocaleDateString();
       let nowwd = [this.getAutoWeekDate(nowdate)[0],this.getAutoWeekDate(nowdate)[6]]
-      if(e){
+      if(e==1){
+        this.WorktimeDatepickValue = nowwd 
+        this.showMonthWorkTime()
+      }else if(e==2){
         this.WorktimeDatepickValue = nowwd 
-        this.showMonthWorkTime('first')
+        this.showMonthWorkTimeReminder()
       }else{
         this.WorktimeDatepickValue = nowwd 
         this.showMonthNotWorkTime()
@@ -4205,9 +4201,12 @@
       let newdate = new Date()
       let nextdate = newdate.toLocaleDateString(newdate.setDate(newdate.getDate() - 14))
       let nextwd = [this.getAutoWeekDate(nextdate)[0],this.getAutoWeekDate(nextdate)[6]]
-      if(e){
+      if(e==1){
         this.WorktimeDatepickValue = nextwd 
-        this.showMonthWorkTime('first')
+        this.showMonthWorkTime()
+      }else if(e==2){
+        this.WorktimeDatepickValue = nextwd 
+        this.showMonthWorkTimeReminder()
       }else{
         this.WorktimeDatepickValue = nextwd 
         this.showMonthNotWorkTime()