@{
|
Layout = null;
|
}
|
<!DOCTYPE html>
|
<html>
|
<head>
|
<meta charset="utf-8">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
|
<meta name="description" content="">
|
<meta name="author" content="ThemeBucket">
|
<title>@(SiteConfig.SiteName)</title>
|
<link href="~/css/bootstrap.min.css" rel="stylesheet">
|
<link href="~/css/font-awesome.min.css" rel="stylesheet">
|
<link href="~/css/animate.min.css" rel="stylesheet">
|
|
<link href="~/css/plugins/iCheck/custom.css" rel="stylesheet">
|
<link href="~/css/style.min.css" rel="stylesheet">
|
<link href="~/css/plugins/chosen/chosen.css" rel="stylesheet">
|
<link href="~/js/plugins/layer/skin/layer.css" rel="stylesheet">
|
<link href="~/css/plugins/datapicker/datepicker3.css" rel="stylesheet">
|
<link href="~/css/style.min.css" rel="stylesheet">
|
<link href="~/css/plugins/toastr/toastr.min.css" rel="stylesheet" />
|
<link href="~/css/plugins/webuploader/webuploader.css" rel="stylesheet" />
|
|
<style type="text/css">
|
.webuploader-pick {
|
position: relative;
|
display: inline-block;
|
cursor: pointer;
|
background: #00b7ee;
|
padding: 8px 14px 7px 14px;
|
color: #fff;
|
text-align: center;
|
border-radius: 3px;
|
overflow: hidden;
|
}
|
|
div.clearfix > label {
|
padding-top: 8px;
|
}
|
|
.chosen-container {
|
border-radius: 1px;
|
border: 1px solid #e5e6e7;
|
}
|
|
.col-md-1.control-label {
|
padding-right: 0px;
|
font-weight: 400;
|
}
|
|
.type_b {
|
width: 15px;
|
height: 15px;
|
padding-bottom: 15px !important;
|
}
|
|
.addBtn{
|
top:10px;
|
}
|
</style>
|
|
<!-- jqgrid-->
|
<script language="javascript" src="~/js/jquery.min.js" type="text/javascript"></script>
|
<script src="~/js/bootstrap.min.js"></script>
|
|
<!--容器-->
|
@*<script language="javascript" src="~/js/datehelper.js" type="text/javascript"></script>*@
|
@*<script language="javascript" src="~/js/plugins/query/jquery.query-object.js" type="text/javascript"></script>*@
|
@*<script language="javascript" src="~/js/plugins/iCheck/icheck.min.js" type="text/javascript"></script>*@
|
<script language="javascript" src="~/js/plugins/chosen/chosen.jquery.js" type="text/javascript"></script>
|
<script language="javascript" src="~/js/plugins/datapicker/bootstrap-datepicker.js" type="text/javascript"></script>
|
<script language="javascript" src="~/js/plugins/layer/layer.js" type="text/javascript"></script>
|
@*<script src="~/js/plugins/jqgrid/jquery.jqGrid.min.js" type="text/javascript"></script>*@
|
@*<script src="~/js/plugins/jqgrid/i18n/grid.locale-cn.js" type="text/javascript"></script>*@
|
<script src="~/js/plugins/toastr/toastr.min.js" type="text/javascript"></script>
|
<script src="~/js/plugins/webuploader/webuploader.min.js"></script>
|
|
<script language="javascript" src="~/js/common-layout.js" type="text/javascript"></script>
|
<script src="~/js/plugins/layer/laydate/laydate.js" type="text/javascript"></script>
|
<script src="~/js/imgUpload.js"></script>
|
@*<script src="~/js/plugins/iTexbox/itextbox.js" type="text/javascript"></script>*@
|
@*<script src="~/js/plugins/iuploader/iuploader.js"></script>*@
|
<script src="~/js/TUJS.js"></script>
|
</head>
|
|
|
<body class="gray-bg" style="overflow:auto">
|
<form id="formtest">
|
<div class="wrapper wrapper-content" id="ibox-content" style="padding:15px;">
|
<div class="row">
|
<div class="col-sm-12">
|
<div class="ibox float-e-margins">
|
@*<div class="ibox-title">
|
<h5> <i class="fa fa-list"></i> 考勤规则</h5>
|
</div>*@
|
<div id="div_content" class="ibox-content" style="background-color:white;">
|
<div class="row">
|
<h5 style="color:cornflowerblue;">工作日:</h5>
|
<div class="clearfix layer-area" style="padding-bottom:15px;">
|
<div class="col-sm-6 col-md-6">
|
周 <input type="number" value="1" name="WeekStart" id="WeekStart" style="width:100px;"> -
|
周 <input type="number" value="5" name="WeekEnd" id="WeekEnd" style="width:100px;">
|
</div>
|
</div>
|
|
|
<h5 style="color:cornflowerblue;">上班时间:</h5>
|
<div class="clearfix layer-area" style="padding-bottom:15px;">
|
<div class="col-sm-6 col-md-6">
|
<span>上午:</span><input class="layui-input layer-date ldate form-control" type="text" value="09:00" name="WorkingStart" id="WorkingStart" placeholder="HH:mm:ss" style="width:100px;">-
|
<input type="text" value="12:00" class="layui-input layer-date ldate form-control" name="WorkingEnd" id="WorkingEnd" placeholder="HH:mm:ss" style="width:100px;">
|
</div>
|
|
</div>
|
|
|
<div class="clearfix layer-area" style="padding-bottom:15px;">
|
<div class="col-sm-6 col-md-6">
|
<span>下午:</span><input type="text" class="layui-input layer-date ldate form-control" value="13:00" name="OffworkStart" id="OffworkStart" style="width:100px;">-
|
<input type="text" class="layui-input layer-date ldate form-control" value="18:00" name="OffworkEnd" id="OffworkEnd" style="width:100px;">
|
</div>
|
</div>
|
|
|
<div class="clearfix layer-area" style="padding-bottom:15px;">
|
<div class="col-sm-6 col-md-6">
|
<span>全勤奖</span>
|
<input type="number" value="200.00" name="FullAttendance" id="FullAttendance" style="width:150px">元
|
</div>
|
</div>
|
|
<h5 style="color:cornflowerblue;">迟到扣款:</h5>
|
<div class="clearfix layer-area" style="padding-bottom:15px;">
|
<div class="col-sm-8 col-md-8">
|
<span>15分钟</span><input style="width:150px" type="number" min="0.01" step="0.01" max="999999" value="10.00" name="LatePayment1">元
|
<span>30分钟</span><input style="width:150px" type="number" min="0.01" step="0.01" max="999999" value="10.00" name="LatePayment2">元
|
<span>1小时</span><input style="width:150px" type="number" min="0.01" step="0.01" max="999999" value="50.00" name="LatePayment3">元
|
<span>2小时</span><input style="width:150px" type="number" min="0.01" step="0.01" max="999999" value="100.00" name="LatePayment4">元
|
|
</div>
|
</div>
|
|
<h5 style="color:cornflowerblue;">旷工扣款:</h5>
|
<div class="clearfix layer-area" style="padding-bottom:15px;">
|
<div class="col-sm-6 col-md-6">
|
<span>迟到</span><input style="width:150px" type="number" min="0" step="1" max="999999" value="120" name="Absenteeism">分钟记为旷工
|
<span>半天</span><input style="width:150px" type="number" min="0.01" step="0.01" max="999999" value="50.00" name="AbsenteeismPayment1">元
|
<span>1天</span><input style="width:150px" type="number" min="0.01" step="0.01" max="999999" value="200.00" name="AbsenteeismPayment2">元
|
</div>
|
</div>
|
|
<h5 style="color:cornflowerblue;">事假扣款:</h5>
|
<div class="clearfix layer-area" style="padding-bottom:15px;">
|
<div class="col-sm-8 col-md-8">
|
<span>1小时</span><input style="width:150px" type="number" min="0.01" step="0.01" max="999999" value="10.00" name="PersonalPayment1">元
|
<span>2小时</span><input style="width:150px" type="number" min="0.01" step="0.01" max="999999" value="10.00" name="PersonalPayment2">元
|
<span>半天</span><input style="width:150px" type="number" min="0.01" step="0.01" max="999999" value="10.00" name="PersonalPayment3">元
|
<span>1天</span><input style="width:150px" type="number" min="0.01" step="0.01" max="999999" value="50.00" name="PersonalPayment4">元
|
</div>
|
</div>
|
|
<h5 style="color:cornflowerblue;">病假扣款:</h5>
|
<div class="clearfix layer-area" style="padding-bottom:15px;">
|
<div class="col-sm-8 col-md-8">
|
<span>1小时</span><input style="width:150px" type="number" min="0.01" step="0.01" max="999999" value="10.00" name="SickPayment1">元
|
<span>2小时</span><input style="width:150px" type="number" min="0.01" step="0.01" max="999999" value="10.00" name="SickPayment2">元
|
<span>半天</span><input style="width:150px" type="number" min="0.01" step="0.01" max="999999" value="10.00" name="SickPayment3">元
|
<span>1天</span><input style="width:150px" type="number" min="0.01" step="0.01" max="999999" value="100.00" name="SickPayment4">元
|
</div>
|
</div>
|
|
<h5 style="color:red;">节假日:</h5>
|
<div class="clearfix layer-area" style="padding-bottom:15px;">
|
<div class="col-sm-3 col-md-3">
|
<div class="setSelect">
|
<input type="text" value="" class="layui-input layer-date ldate form-control " name="holiday_s[]" style="width:150px;"> -
|
<input type="text" value="" class="layui-input layer-date ldate form-control" name="holiday_e[]" style="width:150px;">
|
<button type="button" class="addBtn" style="padding-bottom:10px;" onclick="addBtn(this)" data-type="1">+</button>
|
</div>
|
</div>
|
</div>
|
|
<h5 style="color:red;">调休日:</h5>
|
<div class="clearfix layer-area" style="padding-bottom:15px;">
|
<div class="col-sm-3 col-md-3">
|
<div class="setSelect">
|
<input type="text" value="" class="layui-input layer-date ldate form-control " name="rest_s[]" style="width:150px;"> -
|
<input type="text" value="" class="layui-input layer-date ldate form-control " name="rest_e[]" style="width:150px;">
|
<button type="button" class="addBtn" style="padding-bottom:10px;" onclick="addRestBtn(this)" data-type="1">+</button>
|
</div>
|
</div>
|
</div>
|
|
<h5 style="color:cornflowerblue;">加班补助:</h5>
|
<div class="clearfix layer-area" style="padding-bottom:15px;height:45px;">
|
<div class="col-sm-6 col-md-6">
|
<span>节假日</span>
|
<label>
|
1倍
|
<input name="Gala" type="radio" checked="" value="1" class="type_b">
|
</label>
|
|
<label>
|
2倍
|
<input name="Gala" type="radio" value="2" class="type_b">
|
</label>
|
|
<label>
|
3倍
|
<input name="Gala" type="radio" value="3" class="type_b">
|
</label>
|
|
</div>
|
</div>
|
<div class="clearfix layer-area" style="padding-bottom:15px; height:45px;">
|
<div class="col-sm-6 col-md-6">
|
<span>周末</span>
|
<label>1倍 <input name="Weekend1" type="radio" checked="" value="1" class="type_b"></label>
|
|
|
<label>2倍<input name="Weekend1" type="radio" value="2" class="type_b"></label>
|
|
</div>
|
</div>
|
|
<div class="clearfix layer-area" style="padding-bottom:15px;height:45px;">
|
<div class="col-sm-6 col-md-6">
|
<span>平时</span>
|
<label for="p1">1倍/小时<input id="p1" name="usually" type="radio" checked="" value="1" class="type_b"></label>
|
|
<label for="p2">2倍/小时<input id="p2" name="usually" type="radio" value="2" class="type_b"></label>
|
</div>
|
</div>
|
<div class="clearfix layer-area" style="padding-bottom:15px;height:45px;">
|
<div class="col-sm-6 col-md-6">
|
<span></span>
|
<input name="holiday" value="" type="hidden" id="holiday">
|
<input name="rest" value="" type="hidden" id="rest">
|
</div>
|
</div>
|
</div>
|
</div>
|
</div>
|
</div>
|
</div>
|
</div>
|
<div class="wrapper wrapper-content" style="margin-top:0px"></div>
|
<div class="ibox-content" id="top" style="z-index:100; position:fixed; height:50px; width:100%;bottom:0; text-align: right; padding-top:8px ">
|
<div class="" style="float:right;" data-bootstro-width="500px" data-bootstro-content="功能按钮:“保存”,“删除”">
|
|
<a class="btn btn-success" href="javascript:void(0)" onclick="SaveAttendanceRule();" style="margin-left:4px; border-radius:4px;">
|
<i class="glyphicon glyphicon-ok"></i> <span class="bold">提交</span>
|
</a>
|
</div>
|
</div>
|
|
</form>
|
|
|
|
|
|
<script type="text/javascript">
|
var hh = document.body.clientHeight - $('.ibox-title').height() - $("#top").height() * 2 - 95;
|
$("#div_content").height(hh);
|
|
toastr.options = {
|
"closeButton": true,
|
"debug": false,
|
"progressBar": true,
|
"positionClass": "toast-bottom-right",
|
"onclick": null,
|
"showDuration": "300",
|
"hideDuration": "600",
|
"timeOut": "4500",
|
"extendedTimeOut": "600",
|
"showEasing": "swing",
|
"hideEasing": "linear",
|
"showMethod": "fadeIn",
|
"hideMethod": "fadeOut"
|
};
|
|
|
var record;
|
$(function () {
|
//$.ajax({
|
// type: "GET",
|
// url: "/Signin/GetTodaySignin",
|
// async: false,
|
// dataType: "json",
|
// success: function (data) {
|
// record = data;
|
// console.log(record);
|
// // alert("打卡成功")
|
// },
|
// error: function () {
|
// //alert("错误");
|
// }
|
//})
|
$(".ldate").each(function (el) {
|
laydate({
|
elem: "#" + $(this).attr('id'), //对应id
|
format: 'hh:mm', //日期格式 // 分隔符可以任意定义,该例子表示只显示年月
|
min: '00:00:00', //设定最小日期为当前日期
|
max: '23:59:59', //最大日期
|
type: 'datetime',
|
isInitValue: true,
|
festival: false, //显示节日
|
istime: true, //是否显示时分秒
|
istoday: true, //是否是今天
|
choose: function (datas) { //选择日期完毕的回调
|
// console.log(this);
|
// end.min = datas; //开始日选好后,重置结束日的最小日期
|
// end.start = datas //将结束日的初始值设定为开始日
|
}
|
});
|
|
});
|
|
});
|
|
var _SigninList = function () {
|
OpenWindow("我的考勤记录", "100%", "100%", "/Signin/Signin");///?userId=" + record.Id);
|
}
|
// 保存打卡信息
|
function SaveAttendanceRule(signinType) {
|
|
|
$.ajax({
|
type: "POST",
|
url: "/Signin/SaveAttendanceRule",
|
dataType: "json",
|
global: false,
|
data: $('form').serializeArray(),
|
success: function (data) {
|
toastr.success("打卡成功");
|
},
|
error: function () {
|
toastr.error("打卡失败");
|
}
|
});
|
}
|
|
function _pageAutoClose() {
|
parent.window._reloadPageData();
|
var index = parent.layer.getFrameIndex(window.name);
|
parent.layer.isRefresh = true;
|
parent.layer.closeAll('loading');
|
parent.layer.close(index);
|
return false;
|
}
|
|
|
//提交请求
|
$('#searchBtn').on('click', function () {
|
var holiday = '';
|
$('.holiday_s').each(function () {
|
var holiday_s = $(this).val();
|
var holiday_e = $(this).next('.holiday_e').val();
|
if (holiday_s != '' && holiday_e != '') {
|
holiday += ',' + holiday_s + '+' + holiday_e;
|
}
|
|
})
|
holiday = holiday.substring(1)
|
if (holiday) {
|
$('#holiday').val(holiday);
|
}
|
var rest = '';
|
$('.rest_s').each(function () {
|
var rest_s = $(this).val();
|
var rest_e = $(this).next('.rest_e').val();
|
if (rest_s != '' && rest_e != '') {
|
rest += ',' + rest_s + '+' + rest_e;
|
}
|
|
})
|
rest = rest.substring(1)
|
if (rest) {
|
$('#rest').val(rest);
|
}
|
formFile = new FormData($('#form')[0]);
|
|
$.ajax({
|
url: "/index.php/home/index/attendance.html",
|
type: 'POST',
|
data: formFile,
|
async: true,
|
cache: false,
|
contentType: false,
|
processData: false,
|
// traditional:true,
|
// dataType:'json',
|
success: function (res) {
|
console.log(res);
|
if (res.status == 1) {
|
layer.alert(res.msg)
|
} else {
|
layer.alert(res.msg)
|
}
|
}
|
})
|
});
|
//本月节假日设置
|
function addBtn(obj) {
|
var html = ' <div class="setSelect">\n' +
|
' <span></span>\n' +
|
' <input type="text" value="" class="layui-input layer-date ldate form-control" name="holiday_s[]" class="Wdate holiday_s" style="width:150px;"> -\n' +
|
' <input type="text" value="" class="layui-input layer-date ldate form-control" name="holiday_e[]" class="Wdate holiday_e" style="width:150px;">\n' +
|
' <button type="button" class="addBtn" onclick="delBtn(this,0,\'holida\')" data-type="1">-</button>\n' +
|
' </div>'
|
|
$(obj).parent('div').after(html);
|
|
}
|
function addRestBtn(obj) {
|
var html = ' <div class="setSelect">\n' +
|
' <span></span>\n' +
|
' <input type="text" value="" class="layui-input layer-date ldate form-control" name="rest_s[]" class="Wdate rest_s" style="width:150px;"> -\n' +
|
' <input type="text" value="" class="layui-input layer-date ldate form-control" name="rest_e[]" class="Wdate rest_e" style="width:150px;">\n' +
|
' <button type="button" class="addBtn" onclick="delBtn(this,0,\'rest\')" data-type="1">-</button>\n' +
|
' </div>'
|
|
$(obj).parent('div').after(html);
|
}
|
function delBtn(obj, id, tb) {
|
if (id > 0) {
|
var url = "/index.php/home/white/del.html"
|
$.post(url, { id: id, tb: tb }, function (res) {
|
if (res.status == 1) {
|
$(obj).parent().remove();
|
} else {
|
layer.alert(res.msg)
|
}
|
})
|
}
|
$(obj).parent().remove();
|
}
|
|
|
</script>
|
</body>
|
</html>
|