|
|
|
|
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="LeaveLook.aspx.cs" Inherits="TradeManage.SysManage.LeaveLook" %>
|
|
|
|
|
|
|
|
|
|
<!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 DaysUint = '天';
|
|
|
|
|
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.location.href = "LeaveList.aspx";
|
|
|
|
|
});
|
|
|
|
|
$("#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("");
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
$("#a_softcheck2").bind("click", function () {
|
|
|
|
|
if ($("#div_softcheck2").css("display") == "none") {
|
|
|
|
|
$("#div_softcheck2").show();
|
|
|
|
|
$("#a_softcheckname2").html(UserName);
|
|
|
|
|
var dd = new Date();
|
|
|
|
|
$("#a_softcheckdate2").html(dd.localeFormat("yyyy-MM-dd"));
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
|
|
|
|
|
$("#div_softcheck2").hide();
|
|
|
|
|
$("#a_softcheckname2").html("");
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
$("#select_deptagree").bind("change", function () {
|
|
|
|
|
if ($(this).val() == "0") {
|
|
|
|
|
$("#tr5").hide();
|
|
|
|
|
$("#btn_Save").val("提交");
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
$("#btn_Save").val("转到下一步");
|
|
|
|
|
|
|
|
|
|
$("#tr5").show();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
$("#select_companyagree").bind("change", function () {
|
|
|
|
|
if ((Days >= 2 && DaysUint == "天") || (Days >= 16 && DaysUint == "小时")) {
|
|
|
|
|
if ($(this).val() == "0") {
|
|
|
|
|
$("#tr5").hide();
|
|
|
|
|
$("#btn_Save11").val("提交");
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
$("#btn_Save11").val("转到下一步");
|
|
|
|
|
|
|
|
|
|
$("#tr5").show();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
function GetDeptCharge() {
|
|
|
|
|
//if (UserId == 39 || UserId == 26) {
|
|
|
|
|
// $("#tr_check").hide();
|
|
|
|
|
// return;
|
|
|
|
|
//}
|
|
|
|
|
|
|
|
|
|
var param = new Object();
|
|
|
|
|
param.UserId = UserId;
|
|
|
|
|
$.ajax({
|
|
|
|
|
url: "OA_Manage.asmx/GetLeaveCharge",
|
|
|
|
|
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>");
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
function GetDeptCharge2() {
|
|
|
|
|
|
|
|
|
|
$.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/GetLeaveModel",
|
|
|
|
|
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() + data.d.DaysUint);
|
|
|
|
|
Days = data.d.Days;
|
|
|
|
|
DaysUint = data.d.DaysUint;
|
|
|
|
|
$("#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 && data.d.DaysUint=="天")||(Days >= 24 && data.d.DaysUint=="小时"))
|
|
|
|
|
// $("#tr11").show();
|
|
|
|
|
if (data.d.CompanyUserId > 0) {
|
|
|
|
|
|
|
|
|
|
$("#tr02").show();
|
|
|
|
|
if (data.d.CompanyOption != null)
|
|
|
|
|
$("#div_DeptOption2").html(data.d.CompanyOption);
|
|
|
|
|
else
|
|
|
|
|
$("#div_DeptOption2").html("未审批");
|
|
|
|
|
}
|
|
|
|
|
if (data.d.ManageUserId > 0) {
|
|
|
|
|
$("#tr11").show();
|
|
|
|
|
if (data.d.ManageOption != null)
|
|
|
|
|
$("#div_CompanyOption").html(data.d.ManageOption);
|
|
|
|
|
else
|
|
|
|
|
$("#div_CompanyOption").html("未审批");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else if (UserId == data.d.DeptUserId)//部门经理
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
if (data.d.State == 0) {
|
|
|
|
|
$("#btn_Save").show();
|
|
|
|
|
$("#tr0").show();
|
|
|
|
|
// $("#tr7").show();
|
|
|
|
|
$("#tr5").show();
|
|
|
|
|
//if ((Days >= 1 && data.d.DaysUint == "天") || (Days >= 24 && data.d.DaysUint == "小时")) {
|
|
|
|
|
// $("#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 && data.d.DaysUint == "天") || (Days >= 24 && data.d.DaysUint == "小时"))
|
|
|
|
|
// $("#tr11").show();
|
|
|
|
|
if (data.d.CompanyUserId > 0) {
|
|
|
|
|
|
|
|
|
|
$("#tr02").show();
|
|
|
|
|
if (data.d.CompanyOption != null)
|
|
|
|
|
$("#div_DeptOption2").html(data.d.CompanyOption);
|
|
|
|
|
else
|
|
|
|
|
$("#div_DeptOption2").html("未审批");
|
|
|
|
|
}
|
|
|
|
|
if (data.d.ManageUserId > 0) {
|
|
|
|
|
$("#tr11").show();
|
|
|
|
|
if (data.d.ManageOption != null)
|
|
|
|
|
$("#div_CompanyOption").html(data.d.ManageOption);
|
|
|
|
|
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) {
|
|
|
|
|
// if(UserId>1)
|
|
|
|
|
// $("#btn_Save1").show();
|
|
|
|
|
// else $("#btn_Save2").show();
|
|
|
|
|
$("#btn_Save1").show();
|
|
|
|
|
$("#tr1").show();
|
|
|
|
|
//$("#tr7").show();
|
|
|
|
|
if (data.d.ManageUserId > 0)
|
|
|
|
|
{
|
|
|
|
|
$("#tr02").show();
|
|
|
|
|
if (data.d.CompanyOption != null)
|
|
|
|
|
$("#div_DeptOption2").html(data.d.CompanyOption);
|
|
|
|
|
else
|
|
|
|
|
$("#div_DeptOption2").html("未审批");
|
|
|
|
|
$("#tr1").hide();
|
|
|
|
|
$("#tr5").hide();
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
if ((Days >= 2 && data.d.DaysUint == "天") || (Days >= 16 && data.d.DaysUint == "小时")) {
|
|
|
|
|
$("#tr5").show();
|
|
|
|
|
$("#btn_Save11").show();
|
|
|
|
|
$("#btn_Save1").hide();
|
|
|
|
|
$("#btn_Save2").hide();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
$("#btn_Save1").hide();
|
|
|
|
|
$("#btn_Save2").hide();
|
|
|
|
|
//if ((Days >= 1 && data.d.DaysUint == "天") || (Days >= 24 && data.d.DaysUint == "小时"))
|
|
|
|
|
|
|
|
|
|
if (data.d.CompanyUserId > 0) {
|
|
|
|
|
|
|
|
|
|
$("#tr02").show();
|
|
|
|
|
if (data.d.CompanyOption != null)
|
|
|
|
|
$("#div_DeptOption2").html(data.d.CompanyOption);
|
|
|
|
|
else
|
|
|
|
|
$("#div_DeptOption2").html("未审批");
|
|
|
|
|
}
|
|
|
|
|
if (data.d.ManageUserId > 0) {
|
|
|
|
|
$("#tr11").show();
|
|
|
|
|
if (data.d.ManageOption != null)
|
|
|
|
|
$("#div_CompanyOption").html(data.d.ManageOption);
|
|
|
|
|
else
|
|
|
|
|
$("#div_CompanyOption").html("未审批");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else if (UserId == data.d.ManageUserId)//总经理
|
|
|
|
|
{
|
|
|
|
|
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.CompanyUserId > 0) {
|
|
|
|
|
$("#tr02").show();
|
|
|
|
|
if (data.d.CompanyOption != null)
|
|
|
|
|
$("#div_DeptOption2").html(data.d.CompanyOption);
|
|
|
|
|
else
|
|
|
|
|
$("#div_DeptOption2").html("未审批");
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
if (data.d.ManageOption == null) {
|
|
|
|
|
$("#tr2").show();
|
|
|
|
|
$("#btn_Save2").show();
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
$("#tr11").show();
|
|
|
|
|
if (data.d.ManageOption != null)
|
|
|
|
|
$("#div_CompanyOption").html(data.d.ManageOption);
|
|
|
|
|
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 && LeaveModel.DaysUint == "天") || (LeaveModel.Days >= 24 && LeaveModel.DaysUint == "小时")) && $("#select_check").val() == "0") //领导审批
|
|
|
|
|
//{
|
|
|
|
|
// alert("请选择一个下一步的审批人");
|
|
|
|
|
// return;
|
|
|
|
|
|
|
|
|
|
//}
|
|
|
|
|
if ($("#select_deptagree").val()=="1"&&$("#select_check").val() == "0") //领导审批
|
|
|
|
|
{
|
|
|
|
|
alert("请选择一个下一步的审批人");
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
var param = new Object();
|
|
|
|
|
var model = new Object();
|
|
|
|
|
|
|
|
|
|
model = LeaveModel;
|
|
|
|
|
//if ((model.Days >= 1 && model.DaysUint == "天") || (model.Days >= 24 && model.DaysUint == "小时")) //领导审批
|
|
|
|
|
//{
|
|
|
|
|
// if (model.DeptUserId == 0) {
|
|
|
|
|
// model.State = 2;
|
|
|
|
|
// }
|
|
|
|
|
// else {
|
|
|
|
|
// model.State = 1;
|
|
|
|
|
// model.CompanyUserId = $("#select_check").val();
|
|
|
|
|
// }
|
|
|
|
|
//}
|
|
|
|
|
//else {
|
|
|
|
|
// model.State = 2;
|
|
|
|
|
|
|
|
|
|
//}
|
|
|
|
|
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/SaveLeaveDeptCheck",
|
|
|
|
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
|
|
|
|
dataType: "json",
|
|
|
|
|
cache: false,
|
|
|
|
|
success: function (data) {
|
|
|
|
|
|
|
|
|
|
alert("提交成功");
|
|
|
|
|
window.location.href = "LeaveList.aspx";
|
|
|
|
|
},
|
|
|
|
|
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/SaveLeaveCompanyCheck",
|
|
|
|
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
|
|
|
|
dataType: "json",
|
|
|
|
|
cache: false,
|
|
|
|
|
success: function (data) {
|
|
|
|
|
|
|
|
|
|
alert("提交成功");
|
|
|
|
|
window.location.href = "LeaveList.aspx";
|
|
|
|
|
},
|
|
|
|
|
error: function (xhr, status) {
|
|
|
|
|
if (status != "success") alert(xhr.responseText);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
function savefz() {
|
|
|
|
|
|
|
|
|
|
if ($("#div_softcheck").css("display") == "none") {
|
|
|
|
|
alert("请签字后再提交");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if ( $("#select_companyagree").val()=="1"&&$("#select_check").val() == "0") //领导审批
|
|
|
|
|
{
|
|
|
|
|
alert("请选择一个下一步的审批人");
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
var param = new Object();
|
|
|
|
|
var model = new Object();
|
|
|
|
|
|
|
|
|
|
model = LeaveModel;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
model.State = 1;
|
|
|
|
|
model.ManageUserId = $("#select_check").val();
|
|
|
|
|
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/SaveLeaveCompanyCheck2",
|
|
|
|
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
|
|
|
|
dataType: "json",
|
|
|
|
|
cache: false,
|
|
|
|
|
success: function (data) {
|
|
|
|
|
|
|
|
|
|
alert("提交成功");
|
|
|
|
|
window.location.href = "LeaveList.aspx";
|
|
|
|
|
},
|
|
|
|
|
error: function (xhr, status) {
|
|
|
|
|
if (status != "success") alert(xhr.responseText);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
function save2() {
|
|
|
|
|
|
|
|
|
|
if ($("#div_softcheck2").css("display") == "none") {
|
|
|
|
|
alert("请签字后再提交");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var param = new Object();
|
|
|
|
|
var model = new Object();
|
|
|
|
|
|
|
|
|
|
model = LeaveModel;
|
|
|
|
|
model.State = 2;
|
|
|
|
|
//model.ManageUserId = $("#select_check").val();
|
|
|
|
|
model.ManageOption = "<font color='Red'>" + $("#select_companyagree2 :selected").text() + "</font><br/><br/>" + $("#txt_softoption2").val() + "<br/><br/>签名:" + $("#a_softcheckname2").html() + " 日期:" + $("#a_softcheckdate2").html();
|
|
|
|
|
model.ManageAgree = $("#select_companyagree2").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/SaveLeaveManageCheck",
|
|
|
|
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
|
|
|
|
dataType: "json",
|
|
|
|
|
cache: false,
|
|
|
|
|
success: function (data) {
|
|
|
|
|
|
|
|
|
|
alert("提交成功");
|
|
|
|
|
window.location.href = "LeaveList.aspx";
|
|
|
|
|
},
|
|
|
|
|
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%">
|
|
|
|
|
<asp:Label ID="Label4" runat="server" Text="*" ForeColor="Red" Font-Bold="True"></asp:Label>
|
|
|
|
|
请假类型:
|
|
|
|
|
</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="tr02" style="display: none">
|
|
|
|
|
<td class="f1" style="width: 20%">
|
|
|
|
|
副总审批:</td>
|
|
|
|
|
<td style="width: 30%" colspan="3">
|
|
|
|
|
<div id="div_DeptOption2"></div>
|
|
|
|
|
</td></tr>
|
|
|
|
|
<tr id="tr2" style="display: none">
|
|
|
|
|
<td class="f1" style="width: 20%">
|
|
|
|
|
总经理审批: </td>
|
|
|
|
|
<td colspan="3">
|
|
|
|
|
<select id="select_companyagree2">
|
|
|
|
|
<option value="1">准假</option>
|
|
|
|
|
<option value="0">不批准</option>
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<textarea id="txt_softoption2" cols="20" rows="5" style="width: 100%"></textarea><br />
|
|
|
|
|
<a style="text-decoration: underline; color: Blue; cursor: pointer; font-size: 18px" id="a_softcheck2">
|
|
|
|
|
签名</a><br /><div id="div_softcheck2" style="display: none">
|
|
|
|
|
签名:<a id="a_softcheckname2" style="font-family: 华文行楷; font-size: 18px; font-weight: bolder"></a> 日期:<a
|
|
|
|
|
id="a_softcheckdate2" 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_Save11" type="button" value="转交到下一步" onclick="savefz();" style="display:none" class="btnClass btnClassEdit"/><input id="btn_Save1" type="button" value="提交" onclick="save1();" class="btnClass btnClassSave" style="display:none"/>
|
|
|
|
|
<input id="btn_Save2" type="button" value="提交" onclick="save2();" 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.(2天以内请假)普通员工请假(提交)---->部门经理审批(签字)--->副总经理审批(签字)--->行政备案<br />
|
|
|
|
|
b.(2天及以上请假)普通员工请假(提交)---->部门经理审批(签字)--->副总经理审批(签字)---->总经理审批(签字)--->行政备案<br /> c.部门经理请假(提交)---->副总经理审批(签字)--->行政备案<br />
|
|
|
|
|
d.副总经理请假(提交)---->总经理审批(签字)--->行政备案<br />
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
</table>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
</table>
|
|
|
|
|
|
|
|
|
|
</body>
|
|
|
|
|
</html>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|