This commit is contained in:
BianLzhaoMin 2026-01-30 16:53:43 +08:00
parent 242c5eef65
commit fe4f93d2a6
2 changed files with 59 additions and 8 deletions

View File

@ -37,3 +37,23 @@ export function getAttAbnormalDetailsList(query) {
})
}
// 导出考勤率报表
export function exportAttRateTypeList(query) {
return request({
url: '/system/attRate/exportAttRateTypeList',
method: 'get',
responseType: 'blob',
params: query
})
}
// 导出异常考勤统计
export function exportAbnormalList(query) {
return request({
url: '/system/attRate/exportAttAbnormalList',
method: 'get',
responseType: 'blob',
params: query
})
}

View File

@ -169,7 +169,16 @@
v-show="showSearch"
label-width="auto"
>
<el-form-item label="选择月份">
<el-form-item label="年份">
<el-date-picker
clearable
type="year"
value-format="yyyy"
placeholder="请选择年份"
v-model="queryParamsAbnormal.year"
/>
</el-form-item>
<el-form-item label="月份">
<el-date-picker
clearable
type="month"
@ -178,7 +187,6 @@
v-model="queryParamsAbnormal.attCurrentMonth"
/>
</el-form-item>
<el-form-item label="部门" prop="orgIdList">
<treeselect
v-model="queryParamsAbnormal.orgIdList"
@ -204,17 +212,26 @@
icon="el-icon-search"
size="mini"
@click="handleQueryAbnormal"
>查询</el-button
>
</el-form-item>
<el-form-item>
查询
</el-button>
<el-button
type="primary"
icon="el-icon-search"
size="mini"
@click="resetQueryAbnormal"
>重置</el-button
>
重置
</el-button>
<el-button
type="warning"
icon="el-icon-download"
size="mini"
@click="handleExportAbnormal"
>
导出
</el-button>
</el-form-item>
</el-form>
<el-table v-loading="loading" :data="abnormalList">
@ -791,6 +808,8 @@ import {
getLateEarlyAbsentList,
getAttendanceRateDetail,
getAttAbnormalDetailsList,
exportAttRateTypeList,
exportAbnormalList,
} from '@/api/report/attendanceRate'
import { listDeptTree } from '@/api/system/userInfo'
@ -1008,6 +1027,7 @@ export default {
queryParamsAbnormal: {
pageNum: 1,
pageSize: 10,
year: '',
attCurrentMonth: new Date()
.toISOString()
.split('T')[0]
@ -1257,15 +1277,25 @@ export default {
delete query['orgIdList']
console.log(query)
exportMonthReport(query).then((res) => {
exportAttRateTypeList(query).then((res) => {
this.downloadFile({
fileName: `月报表记录_${new Date().getTime()}.xlsx`,
fileName: `考勤率报表_${new Date().getTime()}.xlsx`,
fileData: res,
fileType: 'application/vnd.ms-excel;charset=utf-8',
})
})
},
handleExportAbnormal() {
let query = _.cloneDeep(this.queryParamsAbnormal)
exportAbnormalList(query).then((res) => {
this.downloadFile({
fileName: `异常考勤统计_${new Date().getTime()}.xlsx`,
fileData: res,
fileType: 'application/vnd.ms-excel;charset=utf-8',
})
})
},
/** 更新应该出勤天数按钮操作 */
handleDays() {
//
@ -1434,6 +1464,7 @@ export default {
orgName: undefined,
pageNum: 1,
pageSize: 10,
year: '',
}
this.getAbnormalList()
},