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.
496 lines
20 KiB
Plaintext
496 lines
20 KiB
Plaintext
2 months ago
|
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WorkAddLook.aspx.cs" Inherits="TradeManage.SysManage.WorkAddLook" %>
|
||
|
|
||
|
|
||
|
<!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 UserName = '<%= Session["Name"].ToString() %>';
|
||
|
|
||
|
var UserId = '<%= Session["UserId"]%>';
|
||
|
var Model = null;
|
||
|
|
||
|
var Id = 0;
|
||
|
|
||
|
var Days = 0;
|
||
|
|
||
|
var WindowLoadModel = new WindowLoad();
|
||
|
$(document).ready(function () {
|
||
|
WindowLoadModel.ApplicationPath = "../";
|
||
|
WindowLoadModel.ControlID = "WindowLoad";
|
||
|
WindowLoadModel.Isbgiframe = true;
|
||
|
WindowLoadModel.Load();
|
||
|
ajaxInit(WindowLoadModel);
|
||
|
Id = $.url.param("Id");
|
||
|
if (Id == undefined)
|
||
|
Id = 0;
|
||
|
GetModel();
|
||
|
GetDeptCharge();
|
||
|
$("#btn_Back").bind("click", function () {
|
||
|
|
||
|
window.history.go(-1);
|
||
|
});
|
||
|
$("#a_deptcheck").bind("click", function () {
|
||
|
if ($("#div1").css("display") == "none") {
|
||
|
$("#div1").show();
|
||
|
$("#a_deptchargename").html(UserName);
|
||
|
var dd = new Date();
|
||
|
$("#a_deptchargedate").html(dd.localeFormat("yyyy-MM-dd"));
|
||
|
}
|
||
|
else {
|
||
|
|
||
|
$("#div1").hide();
|
||
|
$("#a_deptchargename").html("");
|
||
|
}
|
||
|
});
|
||
|
$("#a_softcheck").bind("click", function () {
|
||
|
if ($("#div_softcheck").css("display") == "none") {
|
||
|
$("#div_softcheck").show();
|
||
|
$("#a_softcheckname").html(UserName);
|
||
|
var dd = new Date();
|
||
|
$("#a_softcheckdate").html(dd.localeFormat("yyyy-MM-dd"));
|
||
|
}
|
||
|
else {
|
||
|
|
||
|
$("#div_softcheck").hide();
|
||
|
$("#a_softcheckname").html("");
|
||
|
}
|
||
|
});
|
||
|
});
|
||
|
function GetDeptCharge() {
|
||
|
|
||
|
$.ajax({
|
||
|
url: "OA_Manage.asmx/GetLeaveMasterCharge",
|
||
|
//data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
||
|
dataType: "json",
|
||
|
async: false,
|
||
|
success: function (data) {
|
||
|
if (data.d != null) {
|
||
|
|
||
|
if (data.d.length > 1)
|
||
|
$("#select_check").append("<option value='0'>-选择-</option>");
|
||
|
|
||
|
$(data.d).each(function () {
|
||
|
$("#select_check").append("<option value='" + this.UserId + "' duty='" + this.Duty + "'>" + this.Name + "</option>");
|
||
|
|
||
|
});
|
||
|
|
||
|
|
||
|
}
|
||
|
else
|
||
|
$("#select_check").append("<option value='0'>-选择-</option>");
|
||
|
|
||
|
}
|
||
|
});
|
||
|
|
||
|
}
|
||
|
|
||
|
var LeaveModel = null;
|
||
|
function GetModel() {
|
||
|
if (Id == 0) return;
|
||
|
|
||
|
|
||
|
$.ajax({
|
||
|
async: false,
|
||
|
type: "POST",
|
||
|
contentType: "application/json",
|
||
|
url: "OA_Manage.asmx/GetWorkAddModel",
|
||
|
data: "{'Id':" + Id + "}",
|
||
|
dataType: "json",
|
||
|
cache: false,
|
||
|
success: function (data) {
|
||
|
|
||
|
if (data.d != null) {
|
||
|
|
||
|
LeaveModel = data.d;
|
||
|
$("#a_name").html(data.d.InName);
|
||
|
//$("#a_leaveType").html(data.d.LeaveType);
|
||
|
//if (data.d.AMPM != null)
|
||
|
// $("#a_days").html(data.d.SDate.localeFormat("yyyy年MM月dd日") + data.d.AMPM + "共" + data.d.Days.toString() + "天");
|
||
|
// else
|
||
|
$("#a_days").html(data.d.SDate.localeFormat("yyyy年MM月dd日HH时mm分") + "--" + data.d.EDate.localeFormat("yyyy年MM月dd日HH时mm分") + " 共" + data.d.Days.toString() + "小时");
|
||
|
Days = data.d.Days;
|
||
|
$("#div_desc").html(data.d.Reason);
|
||
|
//if (data.d.LeaveType == "运动(生理假)")
|
||
|
// return;
|
||
|
if (UserId == data.d.InUserId)//提交人
|
||
|
{
|
||
|
$("#btn_Save").hide();
|
||
|
if (data.d.DeptUserId != 0) {
|
||
|
$("#tr01").show();
|
||
|
if (data.d.DeptOption != null)
|
||
|
$("#div_DeptOption").html(data.d.DeptOption);
|
||
|
else
|
||
|
$("#div_DeptOption").html("未审批");
|
||
|
}
|
||
|
//if (Days >= 1)
|
||
|
$("#tr11").show();
|
||
|
if (data.d.CompanyOption != null)
|
||
|
$("#div_CompanyOption").html(data.d.CompanyOption);
|
||
|
else
|
||
|
$("#div_CompanyOption").html("未审批");
|
||
|
}
|
||
|
else if (UserId == data.d.DeptUserId)//部门经理
|
||
|
{
|
||
|
|
||
|
if (data.d.State == 0) {
|
||
|
$("#btn_Save").show();
|
||
|
$("#tr0").show();
|
||
|
// $("#tr7").show();
|
||
|
//if (data.d.Days >= 1) {
|
||
|
$("#tr5").show();
|
||
|
|
||
|
// }
|
||
|
//else {
|
||
|
// $("#btn_Save").val("提交");
|
||
|
|
||
|
//}
|
||
|
}
|
||
|
else {
|
||
|
$("#btn_Save").hide();
|
||
|
$("#tr01").show();
|
||
|
if (data.d.DeptOption != null)
|
||
|
$("#div_DeptOption").html(data.d.DeptOption);
|
||
|
else
|
||
|
$("#div_DeptOption").html("未审批");
|
||
|
|
||
|
// if (Days >= 1)
|
||
|
$("#tr11").show();
|
||
|
if (data.d.CompanyOption != null)
|
||
|
$("#div_CompanyOption").html(data.d.CompanyOption);
|
||
|
else
|
||
|
$("#div_CompanyOption").html("未审批");
|
||
|
}
|
||
|
|
||
|
}
|
||
|
else if (UserId == data.d.CompanyUserId)//领导
|
||
|
{
|
||
|
if (data.d.DeptUserId > 0) {
|
||
|
$("#tr01").show();
|
||
|
if (data.d.DeptOption != null)
|
||
|
$("#div_DeptOption").html(data.d.DeptOption);
|
||
|
else
|
||
|
$("#div_DeptOption").html("未审批");
|
||
|
}
|
||
|
if (data.d.State < 2) {
|
||
|
$("#btn_Save1").show();
|
||
|
|
||
|
$("#tr1").show();
|
||
|
//$("#tr7").show();
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
}
|
||
|
else {
|
||
|
$("#btn_Save1").hide();
|
||
|
|
||
|
// if (Days >= 1)
|
||
|
$("#tr11").show();
|
||
|
if (data.d.CompanyOption != null)
|
||
|
$("#div_CompanyOption").html(data.d.CompanyOption);
|
||
|
else
|
||
|
$("#div_CompanyOption").html("未审批");
|
||
|
|
||
|
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
|
||
|
},
|
||
|
error: function (xhr, status) {
|
||
|
if (status != "success") alert(xhr.responseText);
|
||
|
}
|
||
|
});
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
}
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
function GetDoState() {
|
||
|
var param = new Object();
|
||
|
param.Id = Id;
|
||
|
$.ajax({
|
||
|
url: "OA_Manage.asmx/GetDoState",
|
||
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
||
|
dataType: "json",
|
||
|
async: false,
|
||
|
success: function (data) {
|
||
|
if (data.d != null) {
|
||
|
DoSetpNo = data.d;
|
||
|
}
|
||
|
}
|
||
|
});
|
||
|
|
||
|
}
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
function save() {
|
||
|
|
||
|
if ($("#div1").css("display") == "none") {
|
||
|
alert("请签字后再提交");
|
||
|
return;
|
||
|
}
|
||
|
if (LeaveModel.Days >= 1 && $("#select_check").val() == "0") //领导审批
|
||
|
{
|
||
|
alert("请选择一个下一步的审批人");
|
||
|
return;
|
||
|
|
||
|
}
|
||
|
var param = new Object();
|
||
|
var model = new Object();
|
||
|
|
||
|
model = LeaveModel;
|
||
|
|
||
|
if (model.DeptUserId == 0) {
|
||
|
model.State = 2;
|
||
|
}
|
||
|
else {
|
||
|
model.State = 1;
|
||
|
model.CompanyUserId = $("#select_check").val();
|
||
|
}
|
||
|
|
||
|
model.DeptOption = "<font color='Red'>" + $("#select_deptagree :selected").text() + "</font><br/><br/>" + $("#txt_softoption0").val() + "<br/><br/>签名:" + $("#a_deptchargename").html() + " 日期:" + $("#a_deptchargedate").html();
|
||
|
model.DeptAgree = $("#select_deptagree").val();
|
||
|
|
||
|
|
||
|
model.IsMess = 0;
|
||
|
//if ($("#chk_mess").attr("checked") == true)
|
||
|
// model.IsMess = 1;
|
||
|
|
||
|
param.model = model;
|
||
|
|
||
|
|
||
|
$.ajax({
|
||
|
type: "POST",
|
||
|
contentType: "application/json",
|
||
|
url: "OA_Manage.asmx/SaveWorkAddDeptCheck",
|
||
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
||
|
dataType: "json",
|
||
|
cache: false,
|
||
|
success: function (data) {
|
||
|
|
||
|
alert("提交成功");
|
||
|
window.history.go(-1);
|
||
|
},
|
||
|
error: function (xhr, status) {
|
||
|
if (status != "success") alert(xhr.responseText);
|
||
|
}
|
||
|
});
|
||
|
|
||
|
|
||
|
}
|
||
|
|
||
|
|
||
|
function save1() {
|
||
|
|
||
|
if ($("#div_softcheck").css("display") == "none") {
|
||
|
alert("请签字后再提交");
|
||
|
return;
|
||
|
}
|
||
|
|
||
|
|
||
|
var param = new Object();
|
||
|
var model = new Object();
|
||
|
|
||
|
model = LeaveModel;
|
||
|
model.CompanyOption = "<font color='Red'>" + $("#select_companyagree :selected").text() + "</font><br/><br/>" + $("#txt_softoption").val() + "<br/><br/>签名:" + $("#a_softcheckname").html() + " 日期:" + $("#a_softcheckdate").html();
|
||
|
model.CompanyAgree = $("#select_companyagree").val();
|
||
|
|
||
|
|
||
|
model.IsMess = 0;
|
||
|
// if ($("#chk_mess").attr("checked") == true)
|
||
|
// model.IsMess = 1;
|
||
|
|
||
|
param.model = model;
|
||
|
|
||
|
|
||
|
$.ajax({
|
||
|
type: "POST",
|
||
|
contentType: "application/json",
|
||
|
url: "OA_Manage.asmx/SaveWorkAddCompanyCheck",
|
||
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
||
|
dataType: "json",
|
||
|
cache: false,
|
||
|
success: function (data) {
|
||
|
|
||
|
alert("提交成功");
|
||
|
window.history.go(-1);
|
||
|
},
|
||
|
error: function (xhr, status) {
|
||
|
if (status != "success") alert(xhr.responseText);
|
||
|
}
|
||
|
});
|
||
|
|
||
|
|
||
|
}
|
||
|
</script>
|
||
|
|
||
|
</head>
|
||
|
<body>
|
||
|
|
||
|
<div class="title_ico">
|
||
|
加班申请单
|
||
|
</div>
|
||
|
<table border="0" cellpadding="0" cellspacing="0" style="width: 99%;">
|
||
|
<tr>
|
||
|
<td align="center">
|
||
|
<table border="1" cellpadding="0" cellspacing="0" style="width: 80%;" class="tableAll">
|
||
|
<tr>
|
||
|
<td colspan="4" align="center" style="font-weight: bolder; font-size: 24px">
|
||
|
加班申请单
|
||
|
</td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td class="f1" style="width: 20%">
|
||
|
<asp:Label ID="Label3" runat="server" Text="*" ForeColor="Red" Font-Bold="True"></asp:Label>
|
||
|
申请人:
|
||
|
</td>
|
||
|
<td style="width: 30%">
|
||
|
<a id='a_name'></a></td>
|
||
|
<td class="f1" style="width: 20%">
|
||
|
</td>
|
||
|
<td width="30%">
|
||
|
<a id='a_leaveType'></a></td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td class="f1" style="width: 20%">
|
||
|
<asp:Label ID="Label5" runat="server" Text="*" ForeColor="Red" Font-Bold="True"></asp:Label>
|
||
|
加班起止时间/时长:
|
||
|
</td>
|
||
|
<td colspan="3">
|
||
|
<a id='a_days'></a></td>
|
||
|
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td class="f1" style="width: 20%">
|
||
|
<asp:Label ID="Label8" runat="server" Text="*" ForeColor="Red" Font-Bold="True"></asp:Label>
|
||
|
加班原因:<br />
|
||
|
</td>
|
||
|
<td colspan="3">
|
||
|
<div style="height:200px;" id="div_desc"></div></td>
|
||
|
</tr>
|
||
|
|
||
|
<tr id="tr0" style="display: none">
|
||
|
<td class="f1" style="width: 20%">
|
||
|
<asp:Label ID="Label7" runat="server" Text="*" ForeColor="Red" Font-Bold="True"></asp:Label>
|
||
|
部门审批:
|
||
|
</td>
|
||
|
<td style="width: 30%" colspan="3">
|
||
|
<select id="select_deptagree">
|
||
|
<option value="1">批准</option>
|
||
|
<option value="0">不批准</option>
|
||
|
</select>
|
||
|
<textarea id="txt_softoption0" cols="20" rows="5" style="width: 100%" name="S1"></textarea> <a style="text-decoration: underline; color: Blue; cursor: pointer; font-size: 18px;"
|
||
|
id="a_deptcheck">签名</a>
|
||
|
<br />
|
||
|
<div id="div1" style="display: none">
|
||
|
签名:<a id="a_deptchargename" style="font-family: 华文行楷; font-size: 18px; font-weight: bolder"></a> 日期:<a
|
||
|
id="a_deptchargedate" style="font-size: 18px; font-weight: bolder"></a></div></td>
|
||
|
</tr>
|
||
|
<tr id="tr01" style="display: none">
|
||
|
<td class="f1" style="width: 20%">
|
||
|
部门审批:</td>
|
||
|
<td style="width: 30%" colspan="3">
|
||
|
<div id="div_DeptOption"></div>
|
||
|
</td></tr>
|
||
|
<tr id="tr1" style="display: none">
|
||
|
<td class="f1" style="width: 20%">
|
||
|
领导审批: </td>
|
||
|
<td colspan="3">
|
||
|
<select id="select_companyagree">
|
||
|
<option value="1">批准</option>
|
||
|
<option value="0">不批准</option>
|
||
|
</select>
|
||
|
|
||
|
<textarea id="txt_softoption" cols="20" rows="5" style="width: 100%"></textarea><br />
|
||
|
<a style="text-decoration: underline; color: Blue; cursor: pointer; font-size: 18px" id="a_softcheck">
|
||
|
签名</a><br /><div id="div_softcheck" style="display: none">
|
||
|
签名:<a id="a_softcheckname" style="font-family: 华文行楷; font-size: 18px; font-weight: bolder"></a> 日期:<a
|
||
|
id="a_softcheckdate" style="font-size: 18px; font-weight: bolder"></a></div>
|
||
|
</td>
|
||
|
</tr>
|
||
|
<tr id="tr11" style="display: none">
|
||
|
<td class="f1" style="width: 20%">
|
||
|
领导审批:</td>
|
||
|
<td style="width: 30%" colspan="3">
|
||
|
<div id="div_CompanyOption"></div>
|
||
|
</td></tr>
|
||
|
<tr id="tr5" style="display: none">
|
||
|
<td class="f1" style="width: 20%">
|
||
|
下一步审批人:
|
||
|
</td>
|
||
|
<td colspan="3">
|
||
|
|
||
|
<select id="select_check" style="width:100px" name="D3">
|
||
|
|
||
|
</select></td>
|
||
|
</tr>
|
||
|
<tr id="tr7" style="display: none">
|
||
|
<td colspan="4">
|
||
|
<input id="chk_mess" type="checkbox" checked="checked" /><a id="a_mess">短信提醒</a>
|
||
|
</td>
|
||
|
</tr>
|
||
|
<tr style="display:none">
|
||
|
<td class="f1" style="width: 20%">
|
||
|
当前步骤状态:</td>
|
||
|
<td style="width: 30%" colspan="3">
|
||
|
<a id="a_state" style="color:Red"></a></td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td colspan="4" align="center">
|
||
|
<input id="btn_Save" type="button" value="转交到下一步" onclick="save();" style="display:none" class="btnClass btnClassEdit"/><input id="btn_Save1" type="button" value="提交" onclick="save1();" class="btnClass btnClassSave" style="display:none"/>
|
||
|
<input id="btn_Back" type="button" value="返回" class="btnClass btnClassBack"/>
|
||
|
</td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td colspan="4" style="color: Red">
|
||
|
注:加班申请流程:
|
||
|
<br />
|
||
|
a.普通员工申请(提交)---->部门负责人审批(签字)--->行政备案<br />
|
||
|
c.部门经理申请(提交)---->副总经理审批(签字)--->行政备案<br />
|
||
|
</td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
|
||
|
</body>
|
||
|
</html>
|
||
|
|
||
|
|
||
|
|
||
|
|