Browse Source

补充调休前端

zhouyy 5 months ago
parent
commit
3d88e8c873

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

@@ -773,6 +773,7 @@
   "myleaveform": "我的请假单",
   "for": "请假统计",
   "leaveApprovalProcess": "请假审批流程",
+  "restTime":"调休统计",
   "annualleavemanagement": "年假管理",
   "scheduleofremainingLeave": "假期剩余表",
   "aketimeoffto": "请假填报",
@@ -798,6 +799,8 @@
   "Nstatisticpresent": "暂无请假统计",
   "totaldaysleave": "请假总天数",
   "totallengthofleave": "请假总时长",
+  "totaldaysRest": "调休总天数",
+  "totallengthofRest": "调休总时长",
   "approvalprocessforleaveofdirect staff": "直属人员请假审批流程",
   "pleaseselectapprover": "请选择审批人",
   "selectdepartmentsdesignatepersonnel": "选择部门/指定人员",

+ 80 - 1
fhKeeper/formulahousekeeper/timesheet/src/views/leave/list.vue

@@ -80,6 +80,13 @@
             </el-menu-item>
           </template>
 
+          <el-menu-item index="9" v-if="permissions.leaveStatistical">
+              <template slot="title">
+                <i class="iconfont firerock-icongongshitongji"></i>
+                <span slot="title">{{ $t('restTime') }}</span>
+              </template>
+          </el-menu-item>
+
 
           </el-menu>
       </el-col>
@@ -394,6 +401,47 @@
         </div>
     </div>
 
+        <!-- 调休 统计部分 -->
+    <div v-if="displayTable && apk && apk2 == 9" class="tops" :style="'height:' +hubs+'px'">
+      <!-- 公共 -->
+        <div class="ctons" style="width: 98%;">
+          <div style="display: flex;align-items: center;padding-bottom: 20px;border-bottom: 1px solid #f2f2f2">
+            <div style="display: inline-block;width: 350px">
+              <el-input style="float:left;" v-if="user.userNameNeedTranslate != 1" v-model="userName" class="input-with-select" @keyup.enter.native="restTime()" :placeholder="$t('pleaseenterstaffsearch')" clearable="true" size="small">
+                  <el-button slot="append" @click="restTime()" icon="el-icon-search"></el-button>
+              </el-input>
+              <selectCat v-if="user.userNameNeedTranslate == 1" :size="'small'" :widthStr="'240'" :subject="users" :distinction="'11'" :disabled="false" @selectCal="selectCal" :clearable="true"></selectCat>
+            </div>
+          </div>
+          <!-- <div style="margin-top: 30px"> -->
+          <div>
+            <el-table key="apk2is4" v-loading="loading" :data="restTimeList" height="780px" style="width: 99%">
+              <el-table-column prop="userName" :label="$t('lable.name')" width="300">
+                <template slot-scope="scope">
+                    <div v-if="scope.row.userName">
+                      <span v-if="user.userNameNeedTranslate != 1">{{scope.row.userName}}</span>
+                      <span v-if="user.userNameNeedTranslate == 1"><TranslationOpenDataText type='userName' :openid='scope.row.userName'></TranslationOpenDataText></span>
+                    </div>
+                    <div v-else>
+                      <span>{{ $t('Nstatisticpresent') }}</span>
+                    </div>
+                  </template>
+              </el-table-column>
+              <el-table-column prop="restTimeDayStr" :label="$t('totaldaysRest')" width="300">
+                <template slot-scope="scope">
+                    {{scope.row.restTimeDayStr}} / {{ $t('time.day') }}
+                  </template>
+              </el-table-column>
+              <el-table-column prop="restTimeHourStr" :label="$t('totallengthofRest')">
+                <template slot-scope="scope">
+                    {{scope.row.restTimeHourStr}}/{{ $t('time.hour') }}
+                  </template>
+              </el-table-column>
+            </el-table>
+          </div>
+        </div>
+    </div>
+
 <!-- 审批流 -->
     <div v-if="displayTable && apk && apk2 == 5" class="tops" :style="'height:' +hubs+'px'">
         
@@ -846,9 +894,11 @@ export default {
       total:0,
       apk: false,
       keyword: '',
+      userName:'',
       statData: this.getCurrentTimes(),
       endData: this.getCurrentTime(),
       statisticalList: [],
+      restTimeList:[],
       loading: false,
       timeChoose: 1,
       permissions: JSON.parse(sessionStorage.getItem("permissions")),
@@ -1702,7 +1752,12 @@ export default {
         this.departmentSel = []
         this.getVacationList()
         this.getDepartmentOptions()
-      }
+      } else if(keyPath[0] == '9'){
+        this.displayTable = true;
+        this.apk = true
+        this.apk2 = 9
+        this.restTime()
+      } 
     },
     auditList() {
       this.falg = 1
@@ -2083,6 +2138,30 @@ export default {
             });
         });
     },
+    restTime() {
+      this.loading = true
+      this.http.post('/leave-sheet/getCompanyUserTime', {
+        userName: this.userName,
+      },
+        res => {
+            if (res.code == "ok") {
+                this.restTimeList = res.data
+                this.loading = false
+            } else {
+              this.loading = false
+                this.$message({
+                message: res.msg,
+                type: "error"
+                });
+            }
+        },
+        error => {
+            this.$message({
+                message: error,
+                type: "error"
+            });
+        });
+    },
     //
     inputs() {
       var str = this.addForm.timeDays + ''