考勤明细,月报表

This commit is contained in:
lSun 2025-05-07 18:36:09 +08:00
parent 45d532f14f
commit 724f8222e9
4 changed files with 67 additions and 5 deletions

View File

@ -174,6 +174,15 @@ export function updateMonthReportData(query) {
})
}
/*数据同步9*/
export function updateAttData(query) {
return request({
url: '/system/attHisPull/updateAttData',
method: 'get',
params: query
})
}
export function singleUploadFile(data) {
return request({
url: '/system/fileUpload/singleUploadFile',

View File

@ -18,6 +18,15 @@ export function getDetail(query) {
})
}
// 更新应该出勤天数按钮操作
export function getDays(query) {
return request({
url: '/system/attDetails/updateAttMonthDays',
method: 'get',
params: query
})
}
// 导出工程

View File

@ -321,29 +321,38 @@
</template>
<el-button style="margin-left: 10px;" type="primary" plain @click="operMethod(1)">1.模版数据必须</el-button>
</el-tooltip>
<el-tooltip placement="left">
<template #content>
1.考勤数据更新
</template>
<el-button type="primary" plain @click="operMethod(9)">3.考勤数据更新必须</el-button>
</el-tooltip>
<el-tooltip placement="left">
<template #content>
1.每日是否旷工判断<br>2.每日的数据都会在当天更新后续无需手动更新
</template>
<el-button type="primary" plain @click="operMethod(3)">3.旷工更新非必</el-button>
<el-button type="primary" plain @click="operMethod(3)">5.旷工更新非必</el-button>
</el-tooltip>
<el-tooltip placement="left">
<template #content>
1.请假数据更新<br>2.更新到前5天<br>3.范围更新只更新最后一天<br>4.日月报表必须紧随它更新
</template>
<el-button type="primary" plain @click="operMethod(5)">5.请假日更新非必</el-button>
<el-button type="primary" plain @click="operMethod(5)">7.请假日更新非必</el-button>
</el-tooltip>
<el-tooltip placement="left">
<template #content>
1.月报表模版生成<br>2.每月的数据都会月初生成
</template>
<el-button type="primary" plain @click="operMethod(7)">7.月报表模版非必</el-button>
<el-button type="primary" plain @click="operMethod(7)">9.月报表模版非必</el-button>
</el-tooltip>
</el-col>
<el-col class="button-col">
<el-tooltip placement="right">
<template #content>
1.考勤数据拉取<br>2.考勤数据更新
1.考勤数据拉取
</template>
<el-button type="primary" style="margin-left: 10px;" plain @click="operMethod(2)">2.数据拉取必须</el-button>
</el-tooltip>
@ -401,6 +410,7 @@ import {
insertDayReportData,
insertMonthReportTempData,
updateMonthReportData,
updateAttData,
singleUploadFile
} from '@/api/report/attReport'
import Treeselect from '@riophae/vue-treeselect'
@ -698,6 +708,17 @@ export default {
}).catch(err => {
loading.close()
})
}else if (type === 9) {
updateAttData(query).then(res => {
loading.close()
if(res.code === 200){
this.$message({ message: '数据同步成功', type:'success' })
}else{
this.$message({ message: '数据同步失败', type: 'error' })
}
}).catch(err => {
loading.close()
})
}
},
openData2() {

View File

@ -24,6 +24,13 @@
v-hasPermi="['att:attMonthReport:export']">导出
</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="warning" plain icon="el-icon-search" size="mini" @click="handleDays"
v-hasPermi="['system:user:admin']">更新应出勤天数
</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
@ -297,7 +304,7 @@
</template>
<script>
import { getDetail } from "@/api/report/monthlyError";
import { getDetail,getDays } from "@/api/report/monthlyError";
import { getMonthAttReport, exportMonthReport , getClockingRecordListByUserId,getRequiredDaysList} from "@/api/report/monthReport";
import { listDeptTree } from "@/api/system/userInfo";
import Treeselect from "@riophae/vue-treeselect";
@ -608,6 +615,22 @@ export default {
})
},
/** 更新应该出勤天数按钮操作 */
handleDays() {
//
this.$modal.loading("加载中...");
let query = _.cloneDeep(this.queryParams);
let month = query.month[0];
query.attCurrentMonth = month;
getDays(query).then(response => {
this.$modal.msgSuccess("更新成功");
}).finally(() => {
//
this.$modal.closeLoading();
});
},
//
openOutCountList(row) {
this.title = "工作时间外出次数";