{% extends 'layout/base.html' %} {% block title %}考勤管理 - CHM考勤管理系统{% endblock %} {% block content %}

考勤管理

上传数据 返回首页
搜索筛选
考勤记录
{% if attendance_records %} 共 {{ pagination.total }} 条记录 {% endif %}
{% if attendance_records %}
{% for record in attendance_records %} {% endfor %}
学号 姓名 考勤周期 出勤时长 班内工作 旷工天数 迟到次数 加班时长 记录时间 操作
{{ record.student_number }} {{ record.name }} {{ record.week_start_date.strftime('%Y-%m-%d') }}
至 {{ record.week_end_date.strftime('%Y-%m-%d') }}
{{ "%.1f"|format(record.actual_work_hours) }}h {{ "%.1f"|format(record.class_work_hours) }}h {% if record.absent_days > 0 %} {{ record.absent_days }}天 {% else %} 0天 {% endif %} {% set late_count = record.late_count if record.late_count is defined else 0 %} {% if late_count > 0 %} {{ late_count }}次 {% else %} 0次 {% endif %} {% if record.overtime_hours > 0 %} {{ "%.1f"|format(record.overtime_hours) }}h {% else %} 0h {% endif %} {{ record.created_at.strftime('%m-%d %H:%M') }}
{% if pagination.pages > 1 %} {% endif %} {% else %}
暂无考勤记录

还没有上传任何考勤数据

立即上传考勤数据
{% endif %}
{% if attendance_records %}
当前筛选统计
{{ pagination.total }}
总记录
{{ attendance_records|sum(attribute='actual_work_hours')|round(1) }}h
总出勤
{{ attendance_records|sum(attribute='absent_days') }}
旷工
{% set total_leave = statistics.total_leave_days if statistics and statistics.total_leave_days else 0 %} {{ total_leave }}
请假
{% set total_late = attendance_records|sum(attribute='late_count') if attendance_records[0].late_count is defined else 0 %} {{ total_late }}
迟到次数
{{ attendance_records|sum(attribute='overtime_hours')|round(1) }}h
总加班
{{ "%.1f"|format((attendance_records|sum(attribute='actual_work_hours')) / (attendance_records|length) if attendance_records|length > 0 else 0) }}h
平均出勤
{% endif %}
{% endblock %} {% block extra_css %} {% endblock %} {% block extra_js %} {% endblock %}