员工考勤对接前端,后端未实装
This commit is contained in:
201
src/main/webapp/jsp/administration/attendanceRecordList.jsp
Normal file
201
src/main/webapp/jsp/administration/attendanceRecordList.jsp
Normal file
@ -0,0 +1,201 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8"%>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
|
||||
<%@ page import="com.sipai.entity.base.ServerObject"%>
|
||||
<%@ taglib uri="http://www.springsecurity.org/jsp" prefix="security"%>
|
||||
<!DOCTYPE html>
|
||||
<head>
|
||||
<title><%= ServerObject.atttable.get("TOPTITLE")%></title>
|
||||
<jsp:include page="/jsp/inc.jsp"></jsp:include>
|
||||
|
||||
<script type="text/javascript">
|
||||
var dosearch = function () {
|
||||
$("#table").bootstrapTable('refresh', {pageNumber: 1});
|
||||
};
|
||||
|
||||
var resetSearch = function () {
|
||||
$('#search_name').val('');
|
||||
$('#search_dept').val('');
|
||||
$('#search_status').val('');
|
||||
$('#search_start').val('');
|
||||
$('#search_end').val('');
|
||||
dosearch();
|
||||
};
|
||||
|
||||
var statusFormatter = function (value) {
|
||||
if (value === '正常') {
|
||||
return '<span class="label label-success">正常</span>';
|
||||
}
|
||||
if (value === '迟到') {
|
||||
return '<span class="label label-warning">迟到</span>';
|
||||
}
|
||||
if (value === '早退') {
|
||||
return '<span class="label label-primary">早退</span>';
|
||||
}
|
||||
return '<span class="label label-danger">' + value + '</span>';
|
||||
};
|
||||
|
||||
$(function () {
|
||||
$('#search_start,#search_end').datepicker({
|
||||
format: 'yyyy-mm-dd',
|
||||
autoclose: true,
|
||||
language: 'zh-CN',
|
||||
clearBtn: true
|
||||
});
|
||||
|
||||
$('#table').bootstrapTable({
|
||||
url: ext.contextPath + '/administration/attendance/getList.do',
|
||||
cache: false,
|
||||
striped: true,
|
||||
pagination: true,
|
||||
pageList: [10, 20, 50],
|
||||
pageSize: 20,
|
||||
pageNumber: 1,
|
||||
sidePagination: 'server',
|
||||
sortName: 'attendanceDate',
|
||||
sortOrder: 'desc',
|
||||
queryParams: function (params) {
|
||||
return {
|
||||
rows: params.limit,
|
||||
page: params.offset / params.limit + 1,
|
||||
sort: params.sort,
|
||||
order: params.order,
|
||||
search_name: $('#search_name').val(),
|
||||
search_dept: $('#search_dept').val(),
|
||||
search_status: $('#search_status').val(),
|
||||
search_start: $('#search_start').val(),
|
||||
search_end: $('#search_end').val()
|
||||
};
|
||||
},
|
||||
columns: [{
|
||||
field: 'employeeNo',
|
||||
title: '工号',
|
||||
sortable: true,
|
||||
align: 'center',
|
||||
valign: 'middle'
|
||||
}, {
|
||||
field: 'employeeName',
|
||||
title: '姓名',
|
||||
sortable: true,
|
||||
align: 'center',
|
||||
valign: 'middle'
|
||||
}, {
|
||||
field: 'deptName',
|
||||
title: '部门',
|
||||
sortable: true,
|
||||
align: 'center',
|
||||
valign: 'middle'
|
||||
}, {
|
||||
field: 'attendanceDate',
|
||||
title: '日期',
|
||||
sortable: true,
|
||||
align: 'center',
|
||||
valign: 'middle'
|
||||
}, {
|
||||
field: 'checkInTime',
|
||||
title: '上班打卡',
|
||||
sortable: true,
|
||||
align: 'center',
|
||||
valign: 'middle'
|
||||
}, {
|
||||
field: 'checkOutTime',
|
||||
title: '下班打卡',
|
||||
align: 'center',
|
||||
valign: 'middle'
|
||||
}, {
|
||||
field: 'workHours',
|
||||
title: '工时(小时)',
|
||||
align: 'center',
|
||||
valign: 'middle'
|
||||
}, {
|
||||
field: 'status',
|
||||
title: '状态',
|
||||
sortable: true,
|
||||
align: 'center',
|
||||
valign: 'middle',
|
||||
formatter: statusFormatter
|
||||
}, {
|
||||
field: 'source',
|
||||
title: '数据来源',
|
||||
align: 'center',
|
||||
valign: 'middle'
|
||||
}],
|
||||
onLoadSuccess: function () {
|
||||
adjustBootstrapTableView("table");
|
||||
},
|
||||
onLoadError: function () {
|
||||
console.info("加载考勤数据失败");
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body onload="initMenu()" class="hold-transition ${cu.themeclass} sidebar-mini">
|
||||
<div class="wrapper">
|
||||
<div class="content-wrapper">
|
||||
<section class="content-header">
|
||||
<h1 id="head_title"></h1>
|
||||
<ol class="breadcrumb">
|
||||
<li><a id='head_firstlevel' href="#"><i class="fa fa-dashboard"></i> </a></li>
|
||||
</ol>
|
||||
</section>
|
||||
<section class="content container-fluid">
|
||||
<div id="mainAlertdiv"></div>
|
||||
<div id="subDiv"></div>
|
||||
|
||||
<div class="box box-primary">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">员工考勤记录</h3>
|
||||
<span class="text-muted" style="margin-left: 10px;">当前为第三方考勤接口模拟数据(MOCK)</span>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<div class="form-inline" style="margin-bottom: 10px;">
|
||||
<div class="form-group" style="margin-right: 8px;">
|
||||
<input type="text" id="search_name" class="form-control input-sm" style="width: 180px;"
|
||||
placeholder="姓名/工号">
|
||||
</div>
|
||||
<div class="form-group" style="margin-right: 8px;">
|
||||
<select id="search_dept" class="form-control input-sm" style="width: 120px;">
|
||||
<option value="">全部部门</option>
|
||||
<option value="生产部">生产部</option>
|
||||
<option value="设备部">设备部</option>
|
||||
<option value="品控部">品控部</option>
|
||||
<option value="仓储部">仓储部</option>
|
||||
<option value="行政部">行政部</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group" style="margin-right: 8px;">
|
||||
<select id="search_status" class="form-control input-sm" style="width: 100px;">
|
||||
<option value="">全部状态</option>
|
||||
<option value="正常">正常</option>
|
||||
<option value="迟到">迟到</option>
|
||||
<option value="早退">早退</option>
|
||||
<option value="缺卡">缺卡</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group" style="margin-right: 8px;">
|
||||
<input type="text" id="search_start" class="form-control input-sm" style="width: 120px;"
|
||||
placeholder="开始日期">
|
||||
</div>
|
||||
<div class="form-group" style="margin-right: 8px;">
|
||||
<input type="text" id="search_end" class="form-control input-sm" style="width: 120px;"
|
||||
placeholder="结束日期">
|
||||
</div>
|
||||
<div class="btn-group btn-group-sm">
|
||||
<button type="button" class="btn btn-default" onclick="dosearch();"><i
|
||||
class="fa fa-search"></i> 查询
|
||||
</button>
|
||||
<button type="button" class="btn btn-default" onclick="resetSearch();"><i
|
||||
class="fa fa-undo"></i> 重置
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<table id="table"></table>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user