<%@ Page Language="C#" %>
<%@ Register TagPrefix="aspxform" Namespace="XFormDesigner.Framework.Web.UI" Assembly="XFormDesigner.Framework" %>
<script runat="server">

    // Insert page code here
    //

</script>
<html xmlns:xform="xmlns:xform">
<head id="Head1" runat="server">
    <link href="/Oimec/Styles/css/StyleSheet.css" rel="Stylesheet" type="text/css" />
    <title>BPM Form</title> <style>
    BODY {FONT-SIZE: 12px; FONT-FAMILY: verdana}
    TABLE {border-collapse: collapse; FONT-SIZE: 12px; FONT-FAMILY: verdana}
    P {PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-SIZE: 12px; FONT-FAMILY: verdana}
    TD {PADDING-RIGHT: 0px; PADDING-LEFT: 2px; PADDING-BOTTOM: 0px}
    TD.NoPadding {PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; PADDING-TOP: 0px}
    INPUT {HEIGHT: 20px}
    INPUT.UL {BORDER-RIGHT: medium none; BORDER-TOP: medium none; BORDER-LEFT: medium none; BORDER-BOTTOM: #33ff33 1px solid}
    TEXTAREA {FONT-SIZE:12px}
    .yz-inp-cnt {display:inline;}
    .yz-textbox{display:inline;}
    </style>
    <script type="text/javascript">
        /*
        * 获得时间差,时间格式为 年-月-日 小时:分钟:秒 或者 年/月/日 小时：分钟：秒
        * 其中，年月日为全格式，例如 ： 2010-10-12 01:00:00
        * 返回精度为：秒，分，小时，天
        */

        function GetDateDiff(startTime, endTime, diffType) {
            //将xxxx-xx-xx的时间格式，转换为 xxxx/xx/xx的格式
            startTime = startTime.replace(/\-/g, "/");
            endTime = endTime.replace(/\-/g, "/");

            //将计算间隔类型字符转换为小写
            diffType = diffType.toLowerCase();
            var sTime = new Date(startTime);      //开始时间
            var eTime = new Date(endTime);  //结束时间
            //作为除数的数字
            var divNum = 1;
            switch (diffType) {
                case "second":
                    divNum = 1000;
                    break;
                case "minute":
                    divNum = 1000 * 60;
                    break;
                case "hour":
                    divNum = 1000 * 3600;
                    break;
                case "day":
                    divNum = 1000 * 3600 * 24;
                    break;
                default:
                    break;
            }
            if (parseFloat((eTime.getTime() - sTime.getTime()) / parseInt(divNum)) == 0) {
                return 0;
            }

            else {
                return parseFloat((eTime.getTime() - sTime.getTime()) / parseInt(divNum));
            }
        }

        //实际加班调休时间
        function ActTotalHours(type, hours) {
            var actHours;
            if (type != null && type != '') {
                if (type == "平时加班") {
                    actHours = hours * 1.5;
                }
                if (type == "周末加班") {
                    actHours = hours * 2;
                }
                if (type == "节假日加班") {
                    actHours = hours * 3;
                }
            }
            else
                actHours = hours;

            return actHours;
        }



</script>
</head>

<body>
    <form id="Form1" runat="server">
        <table width="1200" align="center" class="head" border="0" cellspacing="0" cellpadding="0">
            <tbody>
                <tr>
                    <td class="logo">
                    </td>
                    <td class="biaoti">
                        <asp:Label id="XLabel2" runat="server" text="加班调休申请单" valuetodisplaytext value></asp:Label></td>
                    <td class="formno">
                        <asp:Label id="XLabel93" runat="server" text="表单号：" valuetodisplaytext value></asp:Label>
                        <aspxform:XLabel id="XLabel94" runat="server" text="--系统自动生成--" Value ValueToDisplayText XDataBind="DF_HR_WorkOffApp.FormNo" BackColor="#8AB3DF"></aspxform:XLabel>
                    </td>
                </tr>
            </tbody>
        </table>
        <br />
        <table width="1200" align="center" class="table">
            <tbody>
                <tr>
                    <td class="title1" colspan="4">
                        <asp:Label id="XLabel1" runat="server" text="个人信息  " valuetodisplaytext value></asp:Label></td>
                </tr>
                <tr>
                    <td class="td" style="WIDTH: 10%">
                        <asp:Label id="XLabel3" runat="server" text="姓名" valuetodisplaytext value></asp:Label>
                        <aspxform:XTextBox id="XTextBox7" runat="server" ValueToDisplayText="TableName:DF_HR_EMPLOYEEINFORMATION_INFO;FilterColumn:AttendanceKakaNO;DisplayColumn:AttendanceKakaNO" ReadOnly="True" backColor="#e6f1f8" CssClass="text" width="60%" BorderWidth="1" BorderColor="#DCDCDC" HiddenInput="True" Express="DF_HR_WorkOffApp.AppAccount" DataMap="Shift->var1"></aspxform:XTextBox>
                    </td>
                    <td class="td1" style="WIDTH: 35%">
                        <aspxform:XTextBox id="XTextBox16" runat="server" ValueToDisplayText XDataBind="DF_HR_WorkOffApp.AppName" ReadOnly="True" backColor="#e6f1f8" CssClass="text" width="60%" BorderWidth="1" BorderColor="#DCDCDC"></aspxform:XTextBox>
                        <aspxform:XTextBox id="XTextBox2" runat="server" ValueToDisplayText="TableName:V_DF_HR_BasicInfo;FilterColumn:AttendanceKakaNO;DisplayColumn:Name" XDataBind="DF_HR_WorkOffApp.AppAccount" ReadOnly="True" backColor="#e6f1f8" CssClass="text" width="50px" BorderWidth="1" BorderColor="#DCDCDC" HiddenInput="True" DataMap="BUID->DF_HR_WorkOffApp.AppBU;Department->DF_HR_WorkOffApp.AppDepartment;PostName->DF_HR_WorkOffApp.AppJobs"></aspxform:XTextBox>
                    </td>
                    <td class="td" style="WIDTH: 10%">
                        <asp:Label id="XLabel5" runat="server" text="部门" valuetodisplaytext value></asp:Label></td>
                    <td class="td1" style="WIDTH: 35%">
                        <aspxform:XTextBox id="XTextBox5" runat="server" XDataBind="DF_HR_WorkOffApp.AppDepartment" ReadOnly="True" backColor="#e6f1f8" CssClass="text" width="70%" BorderWidth="1" BorderColor="#DCDCDC"></aspxform:XTextBox>
                    </td>
                </tr>
                <tr>
                    <td class="td" style="WIDTH: 10%">
                        <asp:Label id="XLabel15" runat="server" text="BU" valuetodisplaytext value></asp:Label></td>
                    <td class="td1" style="WIDTH: 35%">
                        <aspxform:XTextBox id="XTextBox15" runat="server" ValueToDisplayText="TableName:DF_HR_OrgBU;FilterColumn:BUID;DisplayColumn:BUName" XDataBind="DF_HR_WorkOffApp.AppBU" ReadOnly="True" backColor="#e6f1f8" CssClass="text" width="60%" BorderWidth="1" BorderColor="#DCDCDC"></aspxform:XTextBox>
                    </td>
                    <td class="td" style="WIDTH: 10%">
                        <asp:Label id="XLabel6" runat="server" text="岗位" valuetodisplaytext value></asp:Label></td>
                    <td class="td1" style="WIDTH: 35%">
                        <aspxform:XTextBox id="XTextBox6" runat="server" XDataBind="DF_HR_WorkOffApp.AppJobs" ReadOnly="True" backColor="#e6f1f8" CssClass="text" width="60%" BorderWidth="1" BorderColor="#DCDCDC"></aspxform:XTextBox>
                    </td>
                </tr>
            </tbody>
        </table>
        <br />
        <table width="1200" class="table" border="0" cellspacing="0" cellpadding="0">
            <tbody>
                <tr>
                    <td class="title1" colspan="6">
                        <asp:Label id="XLabel7" runat="server" text="申请明细" valuetodisplaytext value></asp:Label></td>
                </tr>
                <tr>
                    <td style="BORDER-TOP: #b2bccd 1px solid; BORDER-RIGHT: #b2bccd 1px solid; WIDTH: 10%; BORDER-BOTTOM: #b2bccd 1px solid; BORDER-LEFT: #b2bccd 1px solid" bgcolor="#d4e4f4">
                        <asp:Label id="XLabel8" runat="server" text="加班事由" valuetodisplaytext value font-size="10pt" font-names="微软雅黑"></asp:Label></td>
                    <td style="BORDER-TOP: #b2bccd 1px solid; BORDER-RIGHT: #b2bccd 1px solid; WIDTH: 80%; BORDER-BOTTOM: #b2bccd 1px solid; BORDER-LEFT: #b2bccd 1px solid" colspan="5">
                        <div align="left">
                            <aspxform:XTextBox id="XTextBox1" runat="server" Value ValueToDisplayText XDataBind="DF_HR_WorkOffApp.WorkOvertimeQeason" width="100%" BorderWidth="1px" BorderColor="Gainsboro" HiddenInput="False" Max="0" Min="0" Rows="6" TextMode="MultiLine"></aspxform:XTextBox>
                        </div>
                    </td>
                </tr>
                <tr>
                    <td style="BORDER-TOP: #b2bccd 1px solid; BORDER-RIGHT: #b2bccd 1px solid; BORDER-BOTTOM: #b2bccd 1px solid; BORDER-LEFT: #b2bccd 1px solid" bgcolor="#d4e4f4">
                        <asp:Label id="XLabel10" runat="server" text="班次" valuetodisplaytext value font-size="10pt" font-names="微软雅黑"></asp:Label></td>
                    <td style="BORDER-TOP: #b2bccd 1px solid; BORDER-RIGHT: #b2bccd 1px solid; BORDER-BOTTOM: #b2bccd 1px solid; BORDER-LEFT: #b2bccd 1px solid" colspan="5">
                        <aspxform:XTextBox id="XTextBox8" runat="server" Value ValueToDisplayText XDataBind="DF_HR_WorkOffApp.ShiftType" ReadOnly="True" BorderWidth="1px" BorderColor="Gainsboro" backColor="#e6f1f8" HiddenInput="False" Max="0" Min="0" TextAlign="Center" Width="36px"></aspxform:XTextBox>
                        <aspxform:XTextBox id="XTextBox4" runat="server" Value ValueToDisplayText XDataBind="DF_HR_WorkOffApp.ShiftStartDate" ReadOnly="True" BorderWidth="1px" BorderColor="Gainsboro" HiddenInput="False" backColor="#e6f1f8" Max="0" Min="0" Width="96px"></aspxform:XTextBox>
                        <asp:Label id="XLabel11" runat="server" text="到" valuetodisplaytext value></asp:Label>
                        <aspxform:XTextBox id="XTextBox12" runat="server" Value ValueToDisplayText XDataBind="DF_HR_WorkOffApp.ShiftEndDate" ReadOnly="True" BorderWidth="1px" BorderColor="Gainsboro" HiddenInput="False" backColor="#e6f1f8" Max="0" Min="0" Width="96px"></aspxform:XTextBox>
                    </td>
                </tr>
                <tr>
                    <td height="23" style="BORDER-TOP: #b2bccd 1px solid; BORDER-RIGHT: #b2bccd 1px solid; BORDER-BOTTOM: #b2bccd 1px solid; BORDER-LEFT: #b2bccd 1px solid" bgcolor="#d4e4f4">
                        <asp:Label id="XLabel9" runat="server" text="加班时间" valuetodisplaytext value font-size="10pt" font-names="微软雅黑"></asp:Label></td>
                    <td width="297" style="BORDER-TOP: #b2bccd 1px solid; BORDER-BOTTOM: #b2bccd 1px solid; BORDER-LEFT: #b2bccd 1px solid">
                        <aspxform:XDateTimePicker id="XDateTimePicker1" runat="server" XDataBind="DF_HR_WorkOffApp.WorkOvertimeSDate" BorderWidth="1px" BorderColor="Gainsboro" Width="295px" Type="TimeMinutes30"></aspxform:XDateTimePicker>
                    </td>
                    <td width="35">
                        <div align="center"><asp:Label id="XLabel13" runat="server" text="到" valuetodisplaytext value></asp:Label>
                        </div>
                    </td>
                    <td width="301">
                        <aspxform:XDateTimePicker id="XDateTimePicker3" runat="server" XDataBind="DF_HR_WorkOffApp.WorkOvertimeEDate" BorderWidth="1px" BorderColor="Gainsboro" Width="295px" Type="TimeMinutes30"></aspxform:XDateTimePicker>
                    </td>
                    <td width="16">
                        <div align="right"><asp:Label id="XLabel14" runat="server" text="共" valuetodisplaytext value></asp:Label>
                        </div>
                    </td>
                    <td width="453" style="BORDER-TOP: #b2bccd 1px solid; BORDER-RIGHT: #b2bccd 1px solid; BORDER-BOTTOM: #b2bccd 1px solid">
                        <aspxform:XTextBox id="XTextBox9" runat="server" Value ValueToDisplayText XDataBind="DF_HR_WorkOffApp.TotalHours" ReadOnly="True" BorderWidth="1px" BorderColor="Gainsboro" HiddenInput="False" Express='javascript("GetDateDiff",DF_HR_WorkOffApp.WorkOvertimeSDate,DF_HR_WorkOffApp.WorkOvertimeEDate,vhour)' Max="0" Min="0" Width="54px"></aspxform:XTextBox>
                        小时<aspxform:XTextBox id="XTextBox10" runat="server" Value ValueToDisplayText XDataBind="vhour" BorderWidth="1px" BorderColor="Gainsboro" HiddenInput="True" Max="0" Min="0" Width="32px">hour</aspxform:XTextBox>
                        <aspxform:XTextBox id="XTextBox3" runat="server" XDataBind="DF_HR_WorkOffApp.ActTotalHours" BorderWidth="1" BorderColor="#DCDCDC" HiddenInput="True" Express="javascript('ActTotalHours',DF_HR_WorkOffApp.WorkOvertimeType,DF_HR_WorkOffApp.TotalHours)"></aspxform:XTextBox>
                    </td>
                </tr>
                <tr>
                    <td height="22" style="BORDER-TOP: #b2bccd 1px solid; BORDER-RIGHT: #b2bccd 1px solid; BORDER-BOTTOM: #b2bccd 1px solid; BORDER-LEFT: #b2bccd 1px solid" bgcolor="#d4e4f4">
                        <asp:Label id="XLabel12" runat="server" text="加班类型" valuetodisplaytext value font-size="10pt" font-names="微软雅黑"></asp:Label></td>
                    <td style="BORDER-TOP: #b2bccd 1px solid; BORDER-RIGHT: #b2bccd 1px solid; BORDER-BOTTOM: #b2bccd 1px solid; BORDER-LEFT: #b2bccd 1px solid" colspan="5">
                        <aspxform:XDropDownList id="XDropDownList1" runat="server" XDataBind="DF_HR_WorkOffApp.WorkOvertimeType" Width="144px" DisableExpress="Global.StepName!='考勤岗审批'" PromptText="-请选择-" XDataSource>
                            <asp:ListItem>平时加班</asp:ListItem>
                            <asp:ListItem>周末加班</asp:ListItem>
                            <asp:ListItem>节假日加班</asp:ListItem>
                        </aspxform:XDropDownList>
                        <aspxform:XDropDownList id="XDropDownList2" runat="server" XDataBind="var1" DataMap="Name->DF_HR_WorkOffApp.ShiftType;StartDate->DF_HR_WorkOffApp.ShiftStartDate;EndDate->DF_HR_WorkOffApp.ShiftEndDate" XDataSource="TableName:V_DF_HR_SHIFT;BufferType:RuntimeUpdate" DisplayColumn="ItemID" ValueColumn="ItemID" HiddenExpress="1">
                            <asp:ListItem>未绑定</asp:ListItem>
                        </aspxform:XDropDownList>
                        <aspxform:XTextBox id="XTextBox11" runat="server" BorderWidth="1" BorderColor="#DCDCDC" HiddenInput="True" Express="DF_HR_WorkOffApp.WorkOvertimeSDate"></aspxform:XTextBox>
                    </td>
                </tr>
            </tbody>
        </table>
        <br />
        <table width="1200" align="center" border="0" cellspacing="0" cellpadding="0">
            <tbody>
                <tr>
                    <td width="1200">
                        <aspxform:XLabel id="XLabel16" runat="server" text="说明：按公司规定，每月申请加班时长累积不能超过 36小时，超出的小时数请申请调休（加班调休申请）" ForeColor="Blue"></aspxform:XLabel>
                    </td>
                </tr>
            </tbody>
        </table>
        <br />
        <p align="center">
            <aspxform:XSignTrace id="XSignTrace1" runat="server" BorderWidth="1" BorderColor="#dcdcdc" Width="1200px"></aspxform:XSignTrace>
            <aspxform:XRangeValidator id="XRangeValidator1" runat="server" Type="Double" ErrorMessage="加班小时不能小于0" ControlToValidate="XTextBox9" MinValueExpress="0.5"></aspxform:XRangeValidator>
            <aspxform:XRequiredFieldValidator id="XRequiredFieldValidator1" runat="server" ErrorMessage="请填写加班事由" ControlToValidate="XTextBox1"></aspxform:XRequiredFieldValidator>
            &nbsp;<aspxform:XRequiredFieldValidator id="XRequiredFieldValidator2" runat="server" ErrorMessage="请填写加班时间" ControlToValidate="XDateTimePicker1"></aspxform:XRequiredFieldValidator>
            &nbsp;<aspxform:XRequiredFieldValidator id="XRequiredFieldValidator4" runat="server" ErrorMessage="请填写加班时间" ControlToValidate="XDateTimePicker3"></aspxform:XRequiredFieldValidator>
            &nbsp;&nbsp; 
            <aspxform:XRequiredFieldValidator id="XRequiredFieldValidator3" runat="server" ErrorMessage="请填写加班类型" ControlToValidate="XDropDownList1" ValidationGroup="kaoqinggang"></aspxform:XRequiredFieldValidator>
        </p>
    </form>
</body>
</html>
