|
@@ -1,8 +1,14 @@
|
|
//请假管理
|
|
//请假管理
|
|
<template>
|
|
<template>
|
|
<div>
|
|
<div>
|
|
- <BaseHeaderLayout :leftSpan="8">
|
|
|
|
|
|
+ <BaseHeaderLayout :leftSpan="12">
|
|
<template slot="left">
|
|
<template slot="left">
|
|
|
|
+ <el-col :span="24">
|
|
|
|
+ <el-button style="margin-left:20px" @click="typeChange('')" :type="searchType == ''?'primary':''">全部</el-button>
|
|
|
|
+ <el-button @click="typeChange(1)" :type="searchType == 1?'primary':''">待审核</el-button>
|
|
|
|
+ <el-button @click="typeChange(2)" :type="searchType == 2?'primary':''">已通过</el-button>
|
|
|
|
+ <el-button @click="typeChange(3)" :type="searchType == 3?'primary':''">已驳回</el-button>
|
|
|
|
+ </el-col>
|
|
<el-date-picker v-model="value2" type="daterange" align="left" unlink-panels range-separator="至"
|
|
<el-date-picker v-model="value2" type="daterange" align="left" unlink-panels range-separator="至"
|
|
start-placeholder="开始日期" end-placeholder="结束日期">
|
|
start-placeholder="开始日期" end-placeholder="结束日期">
|
|
</el-date-picker>
|
|
</el-date-picker>
|
|
@@ -32,7 +38,19 @@
|
|
<el-table-column prop="startDate" label="开始日期"></el-table-column>
|
|
<el-table-column prop="startDate" label="开始日期"></el-table-column>
|
|
<el-table-column prop="endDate" label="结束日期"> </el-table-column>
|
|
<el-table-column prop="endDate" label="结束日期"> </el-table-column>
|
|
<el-table-column prop="leaveDuration" label="时长"></el-table-column>
|
|
<el-table-column prop="leaveDuration" label="时长"></el-table-column>
|
|
- <el-table-column width='150' prop="approveStatus" label="状态"></el-table-column>
|
|
|
|
|
|
+ <el-table-column width='150' prop="approveStatus" label="状态">
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <span v-if="scope.row.approveStatus">{{scope.row.approveStatus}}</span>
|
|
|
|
+ <span v-else>{{scope.row.status}}</span>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column prop="address" label="操作">
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <el-button v-if='scope.row.approveStatus' @click="pass(scope.row)" type="primary">通过</el-button>
|
|
|
|
+ <el-button v-if='scope.row.approveStatus' @click="reject(scope.row)" type="primary">驳回</el-button>
|
|
|
|
+ <span v-if="scope.row.status">{{scope.row.status}}</span>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
</el-table>
|
|
</el-table>
|
|
<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage"
|
|
<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage"
|
|
:page-size="deptCircularPage.pageSize" layout="total, sizes, prev, pager, next, jumper" :total="deptBudgetTotal">
|
|
:page-size="deptCircularPage.pageSize" layout="total, sizes, prev, pager, next, jumper" :total="deptBudgetTotal">
|
|
@@ -43,6 +61,9 @@
|
|
import {
|
|
import {
|
|
getLeavePc,
|
|
getLeavePc,
|
|
} from '@/model/personnelManagement/index'
|
|
} from '@/model/personnelManagement/index'
|
|
|
|
+ import {
|
|
|
|
+ woekflowhandle
|
|
|
|
+ } from '@/model/tasksport/index'
|
|
import Pagination from '@/components/Pagination'
|
|
import Pagination from '@/components/Pagination'
|
|
import WsUpload from '@/components/WsUpload'
|
|
import WsUpload from '@/components/WsUpload'
|
|
|
|
|
|
@@ -82,7 +103,7 @@
|
|
outerVisibleAdd: false,
|
|
outerVisibleAdd: false,
|
|
outerVisibleReturn: false,
|
|
outerVisibleReturn: false,
|
|
contractType: 2,
|
|
contractType: 2,
|
|
- searchType: 1,
|
|
|
|
|
|
+ searchType: '',
|
|
// 提交类型
|
|
// 提交类型
|
|
submitType: true,
|
|
submitType: true,
|
|
size: 10,
|
|
size: 10,
|
|
@@ -153,6 +174,20 @@
|
|
this.searchType = state
|
|
this.searchType = state
|
|
this.getList()
|
|
this.getList()
|
|
},
|
|
},
|
|
|
|
+ typeChange(num) {
|
|
|
|
+ if (num == null || num == '') {
|
|
|
|
+ this.searchType = ''
|
|
|
|
+ }
|
|
|
|
+ else if (num == 1) {
|
|
|
|
+ this.searchType = 1
|
|
|
|
+ }else if(num == 2){
|
|
|
|
+ this.searchType = 2
|
|
|
|
+ }else{
|
|
|
|
+ this.searchType = 3
|
|
|
|
+ }
|
|
|
|
+ this.currentPage = 1
|
|
|
|
+ this.getList()
|
|
|
|
+ },
|
|
//列表查询
|
|
//列表查询
|
|
getList() {
|
|
getList() {
|
|
getLeavePc({
|
|
getLeavePc({
|
|
@@ -160,6 +195,7 @@
|
|
currentPage: this.currentPage,
|
|
currentPage: this.currentPage,
|
|
pageSize: this.pageSize,
|
|
pageSize: this.pageSize,
|
|
searchKeyWord: this.searchKeyWord,
|
|
searchKeyWord: this.searchKeyWord,
|
|
|
|
+ searchType:this.searchType,
|
|
theStartDate: this.startDate,
|
|
theStartDate: this.startDate,
|
|
theEndDate: this.endDate,
|
|
theEndDate: this.endDate,
|
|
})
|
|
})
|
|
@@ -182,6 +218,74 @@
|
|
this.currentPage = 1
|
|
this.currentPage = 1
|
|
this.getList()
|
|
this.getList()
|
|
},
|
|
},
|
|
|
|
+ pass(row){
|
|
|
|
+ if(row.taskId){
|
|
|
|
+ this.$confirm('确认通过请假申请?', '提示', {
|
|
|
|
+ confirmButtonText: '确定',
|
|
|
|
+ cancelButtonText: '取消',
|
|
|
|
+ type: 'warning'
|
|
|
|
+ })
|
|
|
|
+ .then(() => {
|
|
|
|
+ woekflowhandle({
|
|
|
|
+ taskId: row.taskId,
|
|
|
|
+ approved:true,
|
|
|
|
+ auditMind: '34',
|
|
|
|
+ needReapply: true,
|
|
|
|
+ }).toPromise()
|
|
|
|
+ .then((response) => {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: '通过成功!',
|
|
|
|
+ type: 'success',
|
|
|
|
+ })
|
|
|
|
+ this.getList()
|
|
|
|
+ }).catch((response) => {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: '通过失败!',
|
|
|
|
+ type: 'error',
|
|
|
|
+ })
|
|
|
|
+ })
|
|
|
|
+ })
|
|
|
|
+ }else{
|
|
|
|
+ this.$message({
|
|
|
|
+ message: '暂无此权限!',
|
|
|
|
+ type: 'warning',
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ reject(row){
|
|
|
|
+ if(row.taskId){
|
|
|
|
+ this.$confirm('确认驳回请假申请?', '提示', {
|
|
|
|
+ confirmButtonText: '确定',
|
|
|
|
+ cancelButtonText: '取消',
|
|
|
|
+ type: 'warning'
|
|
|
|
+ })
|
|
|
|
+ .then(() => {
|
|
|
|
+ woekflowhandle({
|
|
|
|
+ taskId: row.taskId,
|
|
|
|
+ approved:false,
|
|
|
|
+ auditMind: '34',
|
|
|
|
+ needReapply: true,
|
|
|
|
+ }).toPromise()
|
|
|
|
+ .then((response) => {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: '驳回成功!',
|
|
|
|
+ type: 'success',
|
|
|
|
+ })
|
|
|
|
+ this.getList()
|
|
|
|
+ }).catch((response) => {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: '驳回失败!',
|
|
|
|
+ type: 'error',
|
|
|
|
+ })
|
|
|
|
+ })
|
|
|
|
+ })
|
|
|
|
+ }else{
|
|
|
|
+ this.$message({
|
|
|
|
+ message: '暂无此权限!',
|
|
|
|
+ type: 'warning',
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ },
|
|
},
|
|
},
|
|
}
|
|
}
|
|
</script>
|
|
</script>
|