You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
453 lines
14 KiB
Plaintext
453 lines
14 KiB
Plaintext
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WorkAddCount.aspx.cs" Inherits="TradeManage.SysManage.WorkAddCount" %>
|
|
|
|
<!DOCTYPE html>
|
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
<head id="Head1" runat="server">
|
|
<title>请假统计</title>
|
|
|
|
|
|
<link rel="stylesheet" type="text/css" href="../themes/default/easyui.css" />
|
|
<link rel="stylesheet" type="text/css" href="../themes/icon.css" />
|
|
<link rel="stylesheet" type="text/css" href="../themes/New.css" />
|
|
<link rel="stylesheet" type="text/css" href="../themes/DataGrid.css" />
|
|
<link rel="stylesheet" type="text/css" href="../Scripts/fancybox/jquery.fancybox-1.3.4.css" />
|
|
<script src="../Scripts/MicrosoftAjax.js" type="text/javascript"></script>
|
|
<script src="../Scripts/jquery.min.js" type="text/javascript"></script>
|
|
<script src="../Scripts/jquery.easyui.min.js" type="text/javascript"></script>
|
|
<script src="../Scripts/DataGrid.js" type="text/javascript"></script>
|
|
<script src="../Scripts/DataPager.js" type="text/javascript"></script>
|
|
<script src="../Scripts/jquery.bgiframe.min.js" type="text/javascript"></script>
|
|
<script src="../Scripts/Global.js" type="text/javascript"></script>
|
|
<script src="../Scripts/jquery.url.js" type="text/javascript"></script>
|
|
<script src="../Scripts/WindowLoad.js" type="text/javascript"></script>
|
|
<script src="../Scripts/DatePicker/WdatePicker.js" type="text/javascript"></script>
|
|
<script src="../Scripts/fancybox/jquery.fancybox-1.3.4.js" type="text/javascript"></script>
|
|
|
|
<script type="text/javascript">
|
|
|
|
var datagrid1 = new nblf.ui.DataGrid("DataGrid1");
|
|
var datagrid2 = new nblf.ui.DataGrid("DataGrid2");
|
|
var TeaId = 0;
|
|
var WindowLoadModel = new WindowLoad();
|
|
$(document).ready(function () {
|
|
WindowLoadModel.ApplicationPath = "../";
|
|
WindowLoadModel.ControlID = "WindowLoad";
|
|
WindowLoadModel.Isbgiframe = true;
|
|
WindowLoadModel.Load();
|
|
ajaxInit(WindowLoadModel);
|
|
|
|
CreateDataGrid();
|
|
CreateDataGrid2();
|
|
$("#btnCancel").bind("click", $.fancybox.close);
|
|
$("#" + datagrid1.TableID + " a[CommandName='cmdView']").live("click", function () {
|
|
RowIndex = $(this).parentsUntil("tr").parent().attr("index");
|
|
var model = datagrid1.Get_Model(RowIndex);
|
|
TeaId = model.InUserId;
|
|
ReadDataDetail();
|
|
|
|
});
|
|
ReadData();
|
|
|
|
$("#btn_Sch").bind("click", function () {
|
|
|
|
ReadData();
|
|
});
|
|
|
|
$('#select_LeaveType,#select_check').bind("change", function () {
|
|
|
|
ReadData();
|
|
});
|
|
});
|
|
|
|
function GetWeeks() {
|
|
var myDate = new Date();
|
|
var month = myDate.getMonth() + 1;
|
|
for (var i = 1; i < 13; i++) {
|
|
if (month == i)
|
|
$("#select_week").append("<option value=" + i + " selected='selected'>" + i.toString() + "月</option>");
|
|
else
|
|
|
|
$("#select_week").append("<option value=" + i + ">" + i.toString() + "月</option>");
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
function GetYear() {
|
|
var myDate = new Date();
|
|
var year = myDate.getFullYear();
|
|
for (var i = 2013; i < 2050; i++) {
|
|
if (i == year)
|
|
$("#select_year").append("<option value=" + i + " selected='selected'>" + i.toString() + "年</option>");
|
|
else
|
|
$("#select_year").append("<option value=" + i + ">" + i.toString() + "年</option>");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
function GetNowWeek() {
|
|
|
|
|
|
var param = new Object();
|
|
param.ReportId = 0;
|
|
param.WeekNo = WeekNo;
|
|
param.Year = $("#select_year").val();
|
|
$.ajax({
|
|
async: false,
|
|
type: "POST",
|
|
contentType: "application/json",
|
|
url: "OA_Manage.asmx/GetNowWeek",
|
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
|
dataType: "json",
|
|
cache: false,
|
|
success: function (data) {
|
|
|
|
if (data.d != null) {
|
|
|
|
WeekNo = data.d.WeekNo;
|
|
|
|
|
|
if (data.d.StartDate != null)
|
|
$("#a_sdate").html(data.d.StartDate.localeFormat("yyyy年MM月dd日"));
|
|
if (data.d.EndDate != null)
|
|
$("#a_edate").html(data.d.EndDate.localeFormat("yyyy年MM月dd日"));
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
error: function (xhr, status) {
|
|
if (status != "success") alert(xhr.responseText);
|
|
}
|
|
});
|
|
$("#" + datagrid1.TableID + " a[CommandName='cmdView']").live("click", function () {
|
|
var RowIndex = $(this).parentsUntil("tr").parent().attr("index");
|
|
var model = datagrid1.Get_Model(RowIndex);
|
|
|
|
|
|
|
|
var ReportId = model.Id;
|
|
if (model.Id != null)
|
|
document.location.href = "WorkWeekLook.aspx?Look=Look&ReportId=" + ReportId;
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
var ListMenu = new Array();
|
|
// var Shtm = new Sys.StringBuilder();
|
|
|
|
//#region 读取部门
|
|
function ReadDeptList() {
|
|
// var cudata = new Date();
|
|
|
|
ListMenu = new Array();
|
|
// Shtm = new Sys.StringBuilder();
|
|
var CompanyId = 0;
|
|
|
|
$.ajax({
|
|
type: "POST",
|
|
contentType: "application/json",
|
|
url: "../SysManage/Sys_Manage.asmx/SelectDeptNew",
|
|
data: "{'CompanyId':" + CompanyId + "}",
|
|
dataType: "json",
|
|
cache: false,
|
|
async: false,
|
|
success: function (data) {
|
|
ListMenu = data.d;
|
|
|
|
BindTreeView();
|
|
|
|
|
|
|
|
},
|
|
error: function (xhr, status) {
|
|
if (status != "success") alert(xhr.responseText);
|
|
}
|
|
});
|
|
}
|
|
//#endregion
|
|
|
|
//#region 绑定树菜单
|
|
var Treehtml;
|
|
|
|
function BindTreeView() {
|
|
TreeSource = new Array();
|
|
Treehtml = new Sys.StringBuilder();
|
|
var ListMenus = GetLists(null);
|
|
$(ListMenus).each(function () {
|
|
|
|
|
|
Treehtml.append("<option value=" + this.DeptId + ">" + this.DeptName + "</option>");
|
|
blank = "";
|
|
BindTreeChildNode(this.DeptId);
|
|
|
|
});
|
|
|
|
$("#Select_depts").empty();
|
|
|
|
$("#Select_depts").append("<option value='0'>全部</option>");
|
|
$("#Select_depts").append(Treehtml.toString());
|
|
|
|
|
|
|
|
// $("#Select_Item.tree-node").css("font-size", "14px").css("padding-top", "5px").css("padding-bottom", "5px");
|
|
|
|
|
|
}
|
|
//#endregion
|
|
//#region 绑定子菜单
|
|
|
|
//#region 读取部门
|
|
function ReadMyDeptList() {
|
|
// var cudata = new Date();
|
|
|
|
// ListMenu = new Array();
|
|
// Shtm = new Sys.StringBuilder();
|
|
// var CompanyId = 0;
|
|
|
|
$.ajax({
|
|
type: "POST",
|
|
contentType: "application/json",
|
|
url: "OA_Manage.asmx/GetDeptList",
|
|
//data: "{'CompanyId':" + CompanyId + "}",
|
|
dataType: "json",
|
|
cache: false,
|
|
async: false,
|
|
success: function (data) {
|
|
if (data.d != null) {
|
|
$(data.d).each(function () {
|
|
|
|
|
|
$("#Select_depts").append("<option value=" + this.DeptId + ">" + this.DeptName + "</option>");
|
|
|
|
|
|
});
|
|
|
|
}
|
|
},
|
|
error: function (xhr, status) {
|
|
if (status != "success") alert(xhr.responseText);
|
|
}
|
|
});
|
|
}
|
|
//#endregion
|
|
|
|
function ReadData() {
|
|
var param = new Object();
|
|
|
|
if($('#txt_SDate').val()=="")
|
|
param.SDate = null;
|
|
else
|
|
param.SDate = $('#txt_SDate').val();
|
|
if ($('#txt_EDate').val() == "")
|
|
param.EDate = null;
|
|
else
|
|
param.EDate = $('#txt_EDate').val();
|
|
//param.LeaveType = $('#select_LeaveType').val();
|
|
param.CheckState = $('#select_check').val();
|
|
$.ajax({
|
|
url: "OA_Manage.asmx/GetWorkAddCount",
|
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
|
dataType: "json",
|
|
success: function (data) {
|
|
|
|
|
|
datagrid1.DataBind(data.d);
|
|
$("#DataGrid1 a[CommandName='cmdView']").fancybox({
|
|
'width': '40%',
|
|
'height': '40%',
|
|
'autoScale': false,
|
|
'transitionIn': 'elastic',
|
|
'transitionOut': 'elastic',
|
|
'href': '#test',
|
|
'onStart': function () {
|
|
|
|
|
|
}
|
|
});
|
|
|
|
}
|
|
});
|
|
}
|
|
function ReadDataDetail() {
|
|
var param = new Object();
|
|
param.UserId = TeaId;
|
|
|
|
if ($('#txt_SDate').val() == "")
|
|
param.SDate = null;
|
|
else
|
|
param.SDate = $('#txt_SDate').val();
|
|
if ($('#txt_EDate').val() == "")
|
|
param.EDate = null;
|
|
else
|
|
param.EDate = $('#txt_EDate').val();
|
|
|
|
param.CheckState = $('#select_check').val();
|
|
|
|
$.ajax({
|
|
url: "OA_Manage.asmx/GetWorkAddCountInfo",
|
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
|
dataType: "json",
|
|
success: function (data) {
|
|
|
|
|
|
datagrid2.DataBind(data.d);
|
|
|
|
|
|
}
|
|
});
|
|
}
|
|
|
|
|
|
//#region 初始化DataGrid
|
|
function CreateDataGrid() {
|
|
|
|
var col = new nblf.ui.DataGridColumn();
|
|
col.HeaderText = "加班员工";
|
|
col.Width = "100px";
|
|
col.CreateFieldSpan("InName", "");
|
|
Array.add(datagrid1.Columns, col);
|
|
|
|
var col = new nblf.ui.DataGridColumn();
|
|
col.HeaderText = "加班小时合计";
|
|
col.Width = "100px";
|
|
|
|
col.CellTemplate = "<a title='' >{Bind Days}小时</a>";
|
|
|
|
Array.add(datagrid1.Columns, col);
|
|
|
|
|
|
var col = new nblf.ui.DataGridColumn();
|
|
col.HeaderText = "操作";
|
|
|
|
col.CellTemplate = "<a title='' CommandName='cmdView' style='color:Blue;cursor:pointer;text-decoration: underline;'>查看详细记录</a>";
|
|
|
|
Array.add(datagrid1.Columns, col);
|
|
|
|
|
|
|
|
datagrid1.DataPager.PageSize = 20;
|
|
datagrid1.IsFixHeader = false;
|
|
datagrid1.ShowIndexColumn = false;
|
|
datagrid1.AllowPaging = false;
|
|
datagrid1.SelectMode = nblf.ui.SelectMode.None;
|
|
datagrid1.Init();
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
//#region 初始化DataGrid
|
|
function CreateDataGrid2() {
|
|
|
|
var col = new nblf.ui.DataGridColumn();
|
|
col.HeaderText = "加班员工";
|
|
col.Width = "100px";
|
|
col.CreateFieldSpan("InName", "");
|
|
Array.add(datagrid2.Columns, col);
|
|
|
|
var col = new nblf.ui.DataGridColumn();
|
|
col.HeaderText = "加班时间【小时】";
|
|
|
|
col.CellTemplate = "<a title='' >{Bind SDate,yyyy-MM-dd日HH点mm分}--{Bind EDate,yyyy-MM-dd日HH点mm分}【{Bind Days}小时】</a>";
|
|
|
|
|
|
Array.add(datagrid2.Columns, col);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
datagrid2.DataPager.PageSize = 20;
|
|
datagrid2.IsFixHeader = false;
|
|
datagrid2.ShowIndexColumn = false;
|
|
datagrid2.AllowPaging = false;
|
|
datagrid2.SelectMode = nblf.ui.SelectMode.None;
|
|
datagrid2.Init();
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
|
|
|
</head>
|
|
<body>
|
|
<div style="display: none">
|
|
|
|
<div id="test" title="请假详情" style="width: 520px; height: 400px;">
|
|
<table width="95%" class="tableAll" border="1" ellspacing="0" cellpadding="2">
|
|
<tr>
|
|
|
|
<td >
|
|
<div id="DataGrid2" class="DataGridStyle" style="width: 100%;">
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="center" >
|
|
<input
|
|
id="btnCancel" type="button" value="取消" />
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="title_ico">
|
|
加班统计
|
|
</div>
|
|
|
|
<table border="1" cellpadding="0" cellspacing="0" style="width: 99%;" align="center" class="tableAll">
|
|
<tr><td width="15%" class="f1">日期范围:</td><td >
|
|
<input id="txt_SDate" type="text" onfocus="WdatePicker()" style="width:90px"/>-<input id="txt_EDate"
|
|
type="text" onfocus="WdatePicker()" style="width:90px"/>
|
|
|
|
</td> <td width="12%" class="f1">
|
|
审批状态:
|
|
</td>
|
|
<td>
|
|
<select id="select_check" name="D3" style="width: 120">
|
|
<option value="2">审批通过</option>
|
|
<option value="1">审批未通过</option>
|
|
<option value="0">未审批</option>
|
|
|
|
</select></td> <td width="12%" class="f1">
|
|
<input id="btn_Sch" type="button" value="查询" class="btnClass btnClassFind"/></td>
|
|
<td>
|
|
</td> <td> </td></tr>
|
|
<tr>
|
|
|
|
<td valign="top" colspan="7">
|
|
<div id="DataGrid1" class="DataGridStyle" style="width: 100%;">
|
|
</div>
|
|
</td>
|
|
|
|
</tr>
|
|
</table>
|
|
|
|
</body>
|
|
</html>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|