|
@@ -1,10 +1,10 @@
|
|
|
<template>
|
|
|
<section>
|
|
|
- <div class="sidebars" ref="sidebars" style="width: 200px;display: block;background: #fff" v-if="!isDingding">
|
|
|
+ <div class="sidebars" ref="sidebars" style="width: 200px;display: block;background: #fff">
|
|
|
<h3><i class="iconfont firerock-iconbaoxiao" style="padding-right: 10px"></i>请假管理</h3>
|
|
|
<el-divider ></el-divider>
|
|
|
<el-col :span="12">
|
|
|
- <el-menu default-active="1" class="el-menu-vertical-demo" @select="staffs" background-color="#ffffff" text-color="#666666" active-text-color="#20A0FF" style="width:100%">
|
|
|
+ <el-menu :default-active="isDingding ? '7' : '1'" class="el-menu-vertical-demo" @select="staffs" background-color="#ffffff" text-color="#666666" active-text-color="#20A0FF" style="width:100%">
|
|
|
<!-- <el-submenu index="1">
|
|
|
<template slot="title">
|
|
|
<i class="iconfont firerock-icontianbao"></i>
|
|
@@ -15,6 +15,7 @@
|
|
|
<el-menu-item index="1-3"><p @click="ssl(2)">请年假</p></el-menu-item>
|
|
|
<el-menu-item index="1-4"><p @click="ssl(3)">请产假</p></el-menu-item>
|
|
|
</el-submenu> -->
|
|
|
+ <template v-if="!isDingding">
|
|
|
<el-menu-item index="1" v-if="permissions.leaveFil">
|
|
|
<i class="iconfont firerock-icontianbao"></i>
|
|
|
<span slot="title">员工请假填报</span>
|
|
@@ -51,6 +52,23 @@
|
|
|
<span slot="title">年假管理</span>
|
|
|
</template>
|
|
|
</el-menu-item>
|
|
|
+ </template>
|
|
|
+
|
|
|
+ <!-- 钉钉环境对接 -->
|
|
|
+ <template v-if="isDingding">
|
|
|
+ <el-menu-item index="7">
|
|
|
+ <template slot="title">
|
|
|
+ <i class="iconfont firerock-iconbaoxiaodan"></i>
|
|
|
+ <span slot="title">请假单列表</span>
|
|
|
+ </template>
|
|
|
+ </el-menu-item>
|
|
|
+ <el-menu-item index="8">
|
|
|
+ <template slot="title">
|
|
|
+ <i class="iconfont firerock-iconbaoxiaodan"></i>
|
|
|
+ <span slot="title">假期剩余表</span>
|
|
|
+ </template>
|
|
|
+ </el-menu-item>
|
|
|
+ </template>
|
|
|
|
|
|
|
|
|
</el-menu>
|
|
@@ -152,7 +170,7 @@
|
|
|
</div>
|
|
|
|
|
|
<!-- 下面部分 -->
|
|
|
- <div v-if="displayTable && apk == false" class="tops" :style="isDingding ? 'padding-left:20px' : ''">
|
|
|
+ <div v-if="displayTable && apk == false" class="tops">
|
|
|
<!-- 公共 -->
|
|
|
<div class="ctons">
|
|
|
<div class="flex">
|
|
@@ -475,6 +493,62 @@
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
</div>
|
|
|
+
|
|
|
+ <div v-if="displayTable && apk && apk2 == 8" class="tops">
|
|
|
+ <!-- 公共 -->
|
|
|
+ <div class="ctons">
|
|
|
+ <div class="flex">
|
|
|
+ <div>
|
|
|
+ <el-select v-model="leaveTypeItem" placeholder="请选择请假类型" @change="leaveTypeChange()" style="width: 180px" size="small" v-show="permissions.leaveAll" filterable="true">
|
|
|
+ <span v-for="item in leaveTypeList" :key="item.leaveCode">
|
|
|
+ <el-option :label="item.leaveName" :value="item.leaveCode"></el-option>
|
|
|
+ </span>
|
|
|
+ </el-select>
|
|
|
+ </div>
|
|
|
+ <div>
|
|
|
+ <el-select v-model="ownerIds" placeholder="请选择请假人" clearable @change="chufas()" style="width: 180px" size="small" v-show="permissions.leaveAll" filterable="true">
|
|
|
+ <span v-for="(item, index) in users" :key="index">
|
|
|
+ <el-option :label="item.name" :value="item.id"></el-option>
|
|
|
+ </span>
|
|
|
+ </el-select>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <el-table key="apk2is8" v-loading="loading" :data="vacationList" style="width: 100%" height="90%">
|
|
|
+ <el-table-column prop="name" label="员工姓名" min-width="120" fixed="left"></el-table-column>
|
|
|
+ <el-table-column label="有效期" min-width="250" align="center">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span>{{scope.row.startTime + '\u3000~\u3000' + scope.row.endTime}}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="总额度" min-width="100" align="center">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span>{{scope.row.quotaInDays == null ? scope.row.quotaInHours + '小时' : scope.row.quotaInDays + '天'}}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="已使用" min-width="100" align="center">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span>{{scope.row.usedInDays == null ? scope.row.usedInHours + '小时' : scope.row.usedInDays + '天'}}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="剩余额度" min-width="100" align="center">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span>{{scope.row.leftInDays == null ? scope.row.leftInHours + '小时' : scope.row.leftInDays + '天'}}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ <div class="poss">
|
|
|
+ <el-pagination
|
|
|
+ @size-change="vacationSizeChange"
|
|
|
+ @current-change="vacationCurrentChange"
|
|
|
+ :current-page="currentPage4"
|
|
|
+ :page-sizes="[20, 50, 100, 200]"
|
|
|
+ :page-size="20"
|
|
|
+ layout="total, sizes, prev, pager, next"
|
|
|
+ :total="total">
|
|
|
+ </el-pagination>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
<!-- --------- -->
|
|
|
</div>
|
|
|
<!-- 请假单详情 -->
|
|
@@ -722,7 +796,10 @@ export default {
|
|
|
|
|
|
approverList: [],
|
|
|
mustApprover: '',
|
|
|
- isDingding: 0
|
|
|
+ isDingding: 0,
|
|
|
+ vacationList: [],
|
|
|
+ leaveTypeList: [],
|
|
|
+ leaveTypeItem: '',
|
|
|
};
|
|
|
},
|
|
|
computed: {},
|
|
@@ -741,7 +818,7 @@ export default {
|
|
|
mounted() {
|
|
|
if(this.isDingding){
|
|
|
this.bills(false,2)
|
|
|
- this.staffs(2,['2'])
|
|
|
+ this.staffs(7,['7'])
|
|
|
this.getUsers()
|
|
|
}else{
|
|
|
this.getUsers() // 获取人员信息
|
|
@@ -749,10 +826,63 @@ export default {
|
|
|
this.getAl();
|
|
|
this.getApproverList()
|
|
|
}
|
|
|
-
|
|
|
},
|
|
|
filters: {},
|
|
|
methods: {
|
|
|
+ // 获取剩余假期信息列表
|
|
|
+ getVacationList(e){
|
|
|
+ this.loading = true
|
|
|
+ let item = {}
|
|
|
+ if(e){
|
|
|
+ item = {
|
|
|
+ companyId: this.user.companyId,
|
|
|
+ offset: 0,
|
|
|
+ leaveCode: this.leaveTypeItem,
|
|
|
+ userIds: '2221645448842951,1626196355494406127,4846011135382072,32394905661239307'
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ item = {
|
|
|
+ companyId: this.user.companyId,
|
|
|
+ // leaveCode: '',
|
|
|
+ // userId: '',
|
|
|
+ pageIndex: 1,
|
|
|
+ // departmentId: ''
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.http.post('/user-yearleave-setting/getDingDingLeaveQt',item,
|
|
|
+ res => {
|
|
|
+ if(res.code == 'ok'){
|
|
|
+ this.vacationList = res.data.records
|
|
|
+ this.total = res.data.total
|
|
|
+ if(!e){
|
|
|
+ this.leaveTypeList = res.data.leaveTypeList
|
|
|
+ this.leaveTypeItem = res.data.defaultLeaveType.leaveCode
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ this.loading = false
|
|
|
+ }else {
|
|
|
+ this.loading = false
|
|
|
+ this.$message({
|
|
|
+ message: res.msg,
|
|
|
+ type: 'error'
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },err => {
|
|
|
+ this.loading = false
|
|
|
+ this.$message({
|
|
|
+ message: err,
|
|
|
+ type: 'error'
|
|
|
+ })
|
|
|
+ })
|
|
|
+ },
|
|
|
+ leaveTypeChange(){
|
|
|
+ this.getVacationList(1)
|
|
|
+ },
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
getApproverList(){
|
|
|
this.http.post('/project/getMyParticiPMList',{
|
|
|
},res => {
|
|
@@ -1120,7 +1250,7 @@ export default {
|
|
|
this.addForm.leaveType = index
|
|
|
},
|
|
|
staffs(key, keyPath) {
|
|
|
- // console.log("keypath",keyPath)
|
|
|
+ // console.log("keypath",key,keyPath)
|
|
|
if (keyPath[0] == '1') {
|
|
|
this.displayTable = false;
|
|
|
this.apk = false
|
|
@@ -1136,12 +1266,21 @@ export default {
|
|
|
this.displayTable = true;
|
|
|
this.apk2 = 5
|
|
|
this.apk = true
|
|
|
- } else {
|
|
|
+ } else if(keyPath[0] == '6'){
|
|
|
this.NcurDeptId = []
|
|
|
this.displayTable = true;
|
|
|
this.apk2 = 6
|
|
|
this.apk = true
|
|
|
this.getAl()
|
|
|
+ } else if(keyPath[0] == '7'){
|
|
|
+ this.displayTable = true;
|
|
|
+ this.apk = false
|
|
|
+ this.bills(false,2)
|
|
|
+ } else if(keyPath[0] == '8'){
|
|
|
+ this.apk2 = 8
|
|
|
+ this.displayTable = true
|
|
|
+ this.apk = true
|
|
|
+ this.getVacationList()
|
|
|
}
|
|
|
},
|
|
|
bills(audit, tr){
|
|
@@ -1423,6 +1562,14 @@ export default {
|
|
|
this.page = val;
|
|
|
this.bills()
|
|
|
},
|
|
|
+ vacationSizeChange(){
|
|
|
+ this.size = val
|
|
|
+ this.getVacationList()
|
|
|
+ },
|
|
|
+ vacationCurrentChange(){
|
|
|
+ this.page = val
|
|
|
+ this.getVacationList()
|
|
|
+ },
|
|
|
statistical() {
|
|
|
this.loading = true
|
|
|
this.http.post('/leave-sheet/summaryData', {
|