考勤明细部门改为多选。日报表,月报表,月异常报表增加外勤天数字段

This commit is contained in:
lSun 2025-02-26 15:10:55 +08:00
parent 509566537e
commit 879619f383
5 changed files with 98 additions and 10 deletions

View File

@ -130,7 +130,7 @@
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="所属部门:" prop="orgId"> <!-- <el-form-item label="所属部门:" prop="orgId">
<el-select v-model="form.orgId" disabled> <el-select v-model="form.orgId" disabled>
<el-option <el-option
v-for="item in orgList" v-for="item in orgList"
@ -139,6 +139,9 @@
:value="item.id" :value="item.id"
/> />
</el-select> </el-select>
</el-form-item>-->
<el-form-item label="所属部门" prop="orgId">
<treeselect v-model="form.orgId" :multiple="false" :flat="true" :options="deptOptions" :normalizer="normalizer" placeholder="选择所属部门" @select="onSelect" />
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -153,7 +156,7 @@
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="轮休开始时间:" prop="leaveStartDate"> <el-form-item label="轮休开始时间:" prop="leaveStartDate">
<el-input v-model="form.leaveStartDate" :readonly="true" style="width: 70%;"/> <el-input v-model="form.leaveStartDate" :readonly="true" style="width: 100%;"/>
<!-- <el-select v-model="form.leaveStartInterval" style="width: 25%;margin-left: 10px;" disabled>--> <!-- <el-select v-model="form.leaveStartInterval" style="width: 25%;margin-left: 10px;" disabled>-->
<!-- <el-option--> <!-- <el-option-->
<!-- v-for="item in timeStatusList"--> <!-- v-for="item in timeStatusList"-->
@ -166,7 +169,7 @@
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="轮休结束时间:" prop="leaveEndDate"> <el-form-item label="轮休结束时间:" prop="leaveEndDate">
<el-input v-model="form.leaveEndDate" :readonly="true" style="width: 70%;"/> <el-input v-model="form.leaveEndDate" :readonly="true" style="width: 100%;"/>
<!-- <el-select v-model="form.leaveEndInterval" style="width: 25%;margin-left: 10px;" disabled>--> <!-- <el-select v-model="form.leaveEndInterval" style="width: 25%;margin-left: 10px;" disabled>-->
<!-- <el-option--> <!-- <el-option-->
<!-- v-for="item in timeStatusList"--> <!-- v-for="item in timeStatusList"-->
@ -208,7 +211,7 @@
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="代理主持工作人员:" prop="hostUserId"> <el-form-item label="代理主持工作人员:" prop="hostUserId">
<el-select v-model="form.hostUserId" multiple placeholder="请选择" filterable clearable> <el-select v-model="form.hostUserId" multiple placeholder="请选择" filterable clearable style="width: 100%;">
<el-option <el-option
v-for="item in userList" v-for="item in userList"
:key="item.userId" :key="item.userId"
@ -263,6 +266,7 @@
import { checkListHoliday,getHoliday,changeHolidayStatus,exportHoliday,getPostName,getUserList,batchLxCheckStatus } from "@/api/process/rest"; import { checkListHoliday,getHoliday,changeHolidayStatus,exportHoliday,getPostName,getUserList,batchLxCheckStatus } from "@/api/process/rest";
import Treeselect from "@riophae/vue-treeselect"; import Treeselect from "@riophae/vue-treeselect";
import "@riophae/vue-treeselect/dist/vue-treeselect.css"; import "@riophae/vue-treeselect/dist/vue-treeselect.css";
import { listDeptTree } from '@/api/system/userInfo'
export default { export default {
name: "RestExam", name: "RestExam",
dicts: ['apply_status'], dicts: ['apply_status'],
@ -328,7 +332,8 @@ export default {
// examineOpinion: [ // examineOpinion: [
// { required: true, message: "", trigger: "blur" } // { required: true, message: "", trigger: "blur" }
// ], // ],
} },
deptOptions:[],
}; };
}, },
created() { created() {
@ -338,6 +343,7 @@ export default {
} }
this.getList(); this.getList();
this.getUserLists(); this.getUserLists();
this.getDeptList();
}, },
methods: { methods: {
/** 查询列表 */ /** 查询列表 */
@ -565,6 +571,27 @@ export default {
this.getList(); this.getList();
}); });
}, },
getDeptList(){
listDeptTree().then(response => {
this.deptOptions = this.handleTree(response.data, "id");
});
},
/** 转换部门数据结构 */
normalizer(node) {
if (node.children && !node.children.length) {
delete node.children;
}
return {
id: node.id,
label: node.orgName,
children: node.children
};
},
onSelect(selectedNode) {
this.form.orgName = selectedNode.orgName;
}
} }
}; };
</script> </script>

View File

@ -6,9 +6,9 @@
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="部门" prop="orgId"> <el-form-item label="部门" prop="orgIdList">
<treeselect v-model="queryParams.orgId" :options="deptOptions" :normalizer="normalizer" placeholder="选择部门" <treeselect v-model="queryParams.orgIdList" :options="deptOptions" :normalizer="normalizer" placeholder="选择部门"
style="width: 240px" style="width: 240px" :multiple="true"
/> />
</el-form-item> </el-form-item>
<el-form-item label="状态" prop="attStatus"> <el-form-item label="状态" prop="attStatus">
@ -446,8 +446,9 @@ export default {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
userName: undefined, userName: undefined,
orgId: undefined, orgIdList: undefined,
attStatus: undefined attStatus: undefined,
orgIds:undefined
}, },
queryRecord: { queryRecord: {
pageNum: 1, pageNum: 1,
@ -544,6 +545,13 @@ export default {
this.queryParams.startDate = undefined this.queryParams.startDate = undefined
this.queryParams.endDate = undefined this.queryParams.endDate = undefined
} }
if (this.queryParams.orgIdList && this.queryParams.orgIdList.length > 0) {
//
this.queryParams.orgIds = this.queryParams.orgIdList.map(id => id.toString());
}else{
this.queryParams.orgIds = undefined
}
getDetailsList(this.queryParams).then(response => { getDetailsList(this.queryParams).then(response => {
this.typeList = response.rows this.typeList = response.rows
this.total = response.total this.total = response.total
@ -561,6 +569,9 @@ export default {
this.dateRange = [] this.dateRange = []
this.getWeekDates() this.getWeekDates()
this.resetForm('queryForm') this.resetForm('queryForm')
this.queryParams.orgIdList =undefined
this.queryParams.orgIds = undefined
this.handleQuery() this.handleQuery()
}, },
// //
@ -798,6 +809,14 @@ export default {
/** 导出按钮操作 */ /** 导出按钮操作 */
handleExport() { handleExport() {
this.queryParams.exportType = '考勤明细' this.queryParams.exportType = '考勤明细'
if (this.queryParams.orgIdList && this.queryParams.orgIdList.length > 0) {
//
this.queryParams.orgIds = this.queryParams.orgIdList.map(id => id.toString());
}else{
this.queryParams.orgIds = undefined
}
exportAttRecord(this.queryParams).then(res => { exportAttRecord(this.queryParams).then(res => {
this.downloadFile({ this.downloadFile({
fileName: `考勤记录_${new Date().getTime()}.xlsx`, fileName: `考勤记录_${new Date().getTime()}.xlsx`,
@ -810,6 +829,15 @@ export default {
/** 异常排名导出 */ /** 异常排名导出 */
abnormalRankingExport() { abnormalRankingExport() {
this.queryParams.exportType = '异常排名导出' this.queryParams.exportType = '异常排名导出'
if (this.queryParams.orgIdList && this.queryParams.orgIdList.length > 0) {
//
this.queryParams.orgIds = this.queryParams.orgIdList.map(id => id.toString());
}else{
this.queryParams.orgIds = undefined
}
exportAbnormalRanking(this.queryParams).then(res => { exportAbnormalRanking(this.queryParams).then(res => {
this.downloadFile({ this.downloadFile({
fileName: `异常排名_${new Date().getTime()}.xlsx`, fileName: `异常排名_${new Date().getTime()}.xlsx`,

View File

@ -127,6 +127,14 @@
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="外勤天数" align="center" prop="outsideAttNum">
<template slot-scope="scope">
<div @click="openRecord(scope.row,title10)" style="color: #02a7f0; cursor: pointer" >
{{ scope.row.outsideAttNum }}
</div>
</template>
</el-table-column>
</el-table> </el-table>
<pagination <pagination
@ -274,6 +282,7 @@ export default {
title7: "请假记录", title7: "请假记录",
title8: "轮休记录", title8: "轮休记录",
title9: "临时外出记录", title9: "临时外出记录",
title10: "外勤记录",
// //
open: false, open: false,
dialogQueryForm: { dialogQueryForm: {
@ -403,6 +412,8 @@ export default {
this.dialogQueryForm.attStatus = 5; this.dialogQueryForm.attStatus = 5;
} else if (titleBoss == '临时外出记录') { } else if (titleBoss == '临时外出记录') {
this.dialogQueryForm.attStatus = 7; this.dialogQueryForm.attStatus = 7;
} else if(titleBoss == '外勤记录'){
this.dialogQueryForm.attStatus = 26;
} }
this.open = true; this.open = true;
this.resetForm("dialogQueryForm"); this.resetForm("dialogQueryForm");

View File

@ -132,6 +132,14 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="外勤天数" align="center" prop="outsideAttNum">
<template slot-scope="scope">
<div @click="openRecord(scope.row,title12)" style="color: #02a7f0; cursor: pointer" >
{{ scope.row.outsideAttNum }}
</div>
</template>
</el-table-column>
</el-table> </el-table>
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
@ -291,6 +299,7 @@ export default {
title9: "临时外出记录", title9: "临时外出记录",
title10: "出差天数", title10: "出差天数",
title11: "打卡记录", title11: "打卡记录",
title12: "外勤记录",
// //
open: false, open: false,
showRecord: false, showRecord: false,
@ -456,6 +465,8 @@ export default {
this.queryRecord.attStatis = 7; this.queryRecord.attStatis = 7;
} else if (titleBoss == '出差天数') { } else if (titleBoss == '出差天数') {
this.queryRecord.attStatis = 10; this.queryRecord.attStatis = 10;
}else if(titleBoss == '外勤记录'){
this.queryRecord.attStatus = 26;
} }
this.showRecord = true; this.showRecord = true;
this.getListRecord(); this.getListRecord();

View File

@ -126,6 +126,14 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="外勤天数" align="center" prop="outsideAttNum">
<template slot-scope="scope">
<div @click="openRecord(scope.row,title10)" style="color: #02a7f0; cursor: pointer" >
{{ scope.row.outsideAttNum }}
</div>
</template>
</el-table-column>
</el-table> </el-table>
<pagination <pagination
@ -282,6 +290,7 @@ export default {
title5: '打卡地异常记录', title5: '打卡地异常记录',
title6: '出入异常记录', title6: '出入异常记录',
title7: '请假记录', title7: '请假记录',
title10: "外勤记录",
// //
open: false, open: false,
dateRange: [], dateRange: [],
@ -461,6 +470,8 @@ export default {
this.queryRecord.attStatis = 8 this.queryRecord.attStatis = 8
} else if (titleBoss == '请假记录') { } else if (titleBoss == '请假记录') {
this.queryRecord.attStatis = 6 this.queryRecord.attStatis = 6
}else if(titleBoss == '外勤记录'){
this.queryRecord.attStatus = 26;
} }
this.showRecord = true this.showRecord = true
this.getListRecord() this.getListRecord()