岗位出勤表
parent
3bd96f4ab7
commit
bfd7bef3de
@ -0,0 +1,134 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
|
||||||
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||||
|
<el-form-item label="岗位" prop="post">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.post"
|
||||||
|
placeholder="请输入岗位"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="出勤日期" prop="deliveryTimeArray">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="queryDates"
|
||||||
|
value-format="yyyy-MM-dd"
|
||||||
|
type="daterange"
|
||||||
|
:clearable="false"
|
||||||
|
range-separator="至"
|
||||||
|
start-placeholder="开始日期"
|
||||||
|
end-placeholder="结束日期">
|
||||||
|
</el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item>
|
||||||
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||||
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
<el-row :gutter="10" class="mb8">
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="warning"
|
||||||
|
plain
|
||||||
|
icon="el-icon-download"
|
||||||
|
size="mini"
|
||||||
|
@click="handleExport"
|
||||||
|
v-hasPermi="['mes:attached:export']"
|
||||||
|
>导出</el-button>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-table v-loading="loading" :data="list" >
|
||||||
|
<el-table-column label="序号" align="center" prop="sort" width="150"/>
|
||||||
|
<el-table-column label="岗位(HR)" align="center" prop="post" width="150"/>
|
||||||
|
<el-table-column label="总人数" align="center" prop="allNum" />
|
||||||
|
<el-table-column label="当日出勤" align="center" prop="attendNum" />
|
||||||
|
<el-table-column label="当日缺勤" align="center" prop="diffNum" />
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
<pagination
|
||||||
|
v-show="total>0"
|
||||||
|
:total="total"
|
||||||
|
:page.sync="queryParams.pageNum"
|
||||||
|
:limit.sync="queryParams.pageSize"
|
||||||
|
@pagination="getList"
|
||||||
|
/>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { listAttached, getAttached, delAttached, addAttached, updateAttached } from "@/api/mes/attached";
|
||||||
|
import { getToken } from "@/utils/auth";
|
||||||
|
import {formatDate} from "@/utils";
|
||||||
|
import {getPostAttendanceList} from "@/api/mes/AttendanceRecords";
|
||||||
|
import {parseTime} from "@/utils/ruoyi";
|
||||||
|
export default {
|
||||||
|
name: "postAttached",
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
|
||||||
|
// 遮罩层
|
||||||
|
loading: true,
|
||||||
|
// 显示搜索条件
|
||||||
|
showSearch: true,
|
||||||
|
// 总条数
|
||||||
|
total: 0,
|
||||||
|
list:[],
|
||||||
|
queryDates:[parseTime(new Date(),'{y}-{m}-{d}'),parseTime(new Date(),'{y}-{m}-{d}')],
|
||||||
|
// 查询参数
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 20,
|
||||||
|
post: undefined,
|
||||||
|
beginDate:parseTime(new Date(),'{y}-{m}-{d}'),
|
||||||
|
endDate:parseTime(new Date(),'{y}-{m}-{d}'),
|
||||||
|
},
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
/** 查询物料附属信息列表 */
|
||||||
|
getList() {
|
||||||
|
this.loading = true;
|
||||||
|
|
||||||
|
this.queryParams.beginDate = this.queryDates[0];
|
||||||
|
this.queryParams.endDate = this.queryDates[1];
|
||||||
|
|
||||||
|
getPostAttendanceList(this.queryParams).then(response => {
|
||||||
|
this.list = response.rows;
|
||||||
|
this.total = response.total;
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
/** 搜索按钮操作 */
|
||||||
|
handleQuery() {
|
||||||
|
this.queryParams.pageNum = 1;
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
/** 重置按钮操作 */
|
||||||
|
resetQuery() {
|
||||||
|
this.queryDates = [parseTime(new Date(),'{y}-{m}-{d}'),parseTime(new Date(),'{y}-{m}-{d}')]
|
||||||
|
this.resetForm("queryForm");
|
||||||
|
this.handleQuery();
|
||||||
|
},
|
||||||
|
|
||||||
|
/** 导出按钮操作 */
|
||||||
|
handleExport() {
|
||||||
|
this.download('mes/AttendanceRecords/postAttendance/export', {
|
||||||
|
...this.queryParams
|
||||||
|
}, `岗位出勤人数报表_${new Date().getTime()}.xlsx`)
|
||||||
|
},
|
||||||
|
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
Loading…
Reference in New Issue