<%@ Page Title="" Language="C#" MasterPageFile="~/BackStage/HelperMaster.Master" AutoEventWireup="true" CodeBehind="Frm_PunchList.aspx.cs" Inherits="AndroidSevice.Web.BBCX.Frm_PunchList" %>
<%@ Register assembly="AspNetPager" namespace="Wuqi.Webdiyer" tagprefix="webdiyer" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
<script type="text/javascript">
    function sAlert(info) {
        var message = info;
        layer.alert(message, 8); //风格一，layer弹出层特效
    }

    function ShowDataHelp(_url, _title, _handler) {
        layer.open({
            type: 2,
            area: ['750px', '450px'],
            fix: false, //不固定
            maxmin: true,
            content: _url
        });
    }
    function sAlertOut(info) {
        layer.alert(info, { closeBtn: 0
        }, function () {
            window.location.href = '../../default.aspx'; //刷新父页面
        });
    }
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
	<div class="container-fluid">
				<div class="row-fluid">
					<div class="span12">
						<div class="widget-box">
							<div class="widget-title">
								<span class="icon">
									<i class="icon-th-list"></i>
								</span>
								<h5>打卡清单</h5>
                                <span style="visibility:hidden">
                                <div class="buttons">
                                <a href="Frm_PunchList.aspx?type=5&emporyid1=<%=emporyid1%>">
								    <button type="button" onclick="window.location.href='Frm_PunchList.aspx?type=5&emporyid1=<%=emporyid1%>'" class="btn btn-mini" ><i class="icon-search"></i>最近30天</button>
                                </a>
                                </div>
                                <div class="buttons">
								<a href="Frm_PunchList.aspx?type=4&emporyid1=<%=emporyid1%>">
								    <button type="button" onclick="window.location.href='Frm_PunchList.aspx?type=4&emporyid1=<%=emporyid1%>'" class="btn btn-mini" ><i class="icon-search"></i>最近7天</button>
                                </a>
                                </div>
                                <div class="buttons">
                                <a href="Frm_PunchList.aspx?type=3&emporyid1=<%=emporyid1%>">
								    <button type="button" onclick="window.location.href='Frm_PunchList.aspx?type=3&emporyid1=<%=emporyid1%>'" class="btn btn-mini" ><i class="icon-search"></i>本月</button>
                                </a>
                                </div>
								<div class="buttons">
                                <a href="Frm_PunchList.aspx?type=2&emporyid1=<%=emporyid1%>">
								    <button type="button" onclick="window.location.href='Frm_PunchList.aspx?type=2&emporyid1=<%=emporyid1%>'" class="btn btn-mini" ><i class="icon-search"></i>本周</button>
                                </a>
                                </div>
								<div class="buttons">
                                <a href="Frm_PunchList.aspx?type=1&emporyid1=<%=emporyid1%>">
								    <button type="button" onclick="window.location.href='Frm_PunchList.aspx?type=1&emporyid1=<%=emporyid1%>'" class="btn btn-mini" ><i class="icon-search"></i>昨日</button>
                                </a>
                                </div>
                                 <div class="buttons">
                                <a href="Frm_PunchList.aspx?type=0&emporyid1=<%=emporyid1%>">
								    <button type="button" onclick="window.location.href='Frm_PunchList.aspx?type=0&emporyid1=<%=emporyid1%>'" class="btn btn-mini" ><i class="icon-search"></i>今日</button>
                                </a>
                                </div>
                                </span>
                            </div>
							<div class="widget-content">
                             <table id="query" class="table table-bordered table-striped table-hover">
                                    <tbody>
                                    <tr>
										<td>
                                        <span>职员：
                                        <select class="selectstyle" name="emporyid" id="emporyid">
                                            <%
                                                if (dtEmpory1 != null && dtEmpory1.Rows.Count != 0)
                                                {
                                                    for (int i = 0; i < dtEmpory1.Rows.Count; i++)
                                                    {
                                                %>
                                        <option <%=dtEmpory1.Rows[i]["TypeID_"].ToString()==emporyid1?"selected":"" %> value="<%=dtEmpory1.Rows[i]["TypeID_"].ToString() %>"><%=dtEmpory1.Rows[i]["FullName"].ToString()%></option>
                                        <%  }
                                                }%>
                                        </select>
                                        </span>
                                        </td>
                                        <td><span>签到日期：</span><span>
                                        <input type="text"  onFocus="WdatePicker({isShowClear:false,readOnly:true})" style="width:80px"  name="strdate" id="strdate" value="<%=_strdate1 %>"/></span>
                                        <span>
                                        <input type="text"  onFocus="WdatePicker({isShowClear:false,readOnly:true})" style="width:80px"  name="endate" id="endate" value="<%=_enddate1 %>"/></span></td>
                                        <td><button type="submit" name="sub" value="sub" class="btn" >查询</button>
                                            <asp:HiddenField ID="HiddenField1" runat="server" Visible="false" />
                                            <asp:HiddenField ID="HiddenField2" runat="server" Visible="false" />
                                            <asp:HiddenField ID="HiddenField3" runat="server" Visible="false" />
                                        </td>
									</tr>
                                    </tbody>
							 </table>
                             <table id="wew" class="table table-bordered table-striped table-hover">
                                    <thead>
										<tr>
                                            <th style=" width:30px">序号</th>
											<th>姓名</th>
											<th>日期</th>
											<th>签到时间</th>
                                            <th>签到状态</th>
                                            <th>签到地点</th>
                                            <th>签到说明</th>
                                            <th>签到照片</th>
                                            <th>签退时间</th>
                                            <th>签退状态</th>
                                            <th>签退地点</th>
                                            <th>签退说明</th>
                                            <th>签退照片</th>
										</tr>
									</thead>
                                    <tbody>
                                    <%
                                        if (dtList1 != null && dtList1.Rows.Count != 0)
                                        {
                                            for (int i = 0; i < dtList1.Rows.Count; i++)
                                            {
                                        %>
                                    <tr>
                                            <td style=" width:30px"><%=i+1 %></td>
											<td><%=dtList1.Rows[i]["FullName"].ToString()%></td>
                                            <td><%=dtList1.Rows[i]["QDate"].ToString()%></td>
                                            <td><%=dtList1.Rows[i]["SignInTimer"].ToString()%></td>
                                            <% if (dtList1.Rows[i]["SignInState"].ToString() == "0")
                                               {%>
                                                <td>正常</td>
                                            <%}
                                               else if (dtList1.Rows[i]["SignInState"].ToString() == "1")
                                               {%>
                                                <td>迟到</td>
                                            <%}
                                               else if (dtList1.Rows[i]["SignInState"].ToString() == "2")
                                               {%>
                                                <td>旷工半天</td>
                                            <%}
                                               else if (dtList1.Rows[i]["SignInState"].ToString() == "3")
                                               {%>
                                                <td>旷工一天</td>
                                                <%}
                                               else
                                               {%><td>未签到</td><%} %>
                                            <td><%=dtList1.Rows[i]["QInAddress"].ToString()%></td>
                                            <td><%=dtList1.Rows[i]["SignInSay"].ToString()%></td>
                                            <td><button class="btn" type="button"  onclick="ShowDataHelp('Frm_NewPunchImages.aspx?aLoginId=<%=dtList1.Rows[i]["LoginID"].ToString() %>&qDate=<%=dtList1.Rows[i]["QDate"].ToString()%>&aFlag=1','','')">显示</button></td>
                                            <td><%=dtList1.Rows[i]["SignOutTimer"].ToString()%></td>
                                             <% if (dtList1.Rows[i]["SignOutState"].ToString() == "0")
                                                {%>
                                                <td>正常</td>
                                            <%}
                                                else if (dtList1.Rows[i]["SignOutState"].ToString() == "1")
                                                {%>
                                                <td>早退</td>
                                            <%}
                                                else if (dtList1.Rows[i]["SignOutState"].ToString() == "2")
                                                {%>
                                                <td>旷工半天</td>
                                            <%}
                                                else if (dtList1.Rows[i]["SignOutState"].ToString() == "3")
                                               {%>
                                                <td>旷工一天</td>
                                                <%}  else
                                               {%><td>未签到</td><%} %>
                                            <td><%=dtList1.Rows[i]["QOutAddress"].ToString()%></td>
                                            <td><%=dtList1.Rows[i]["SignOutSay"].ToString()%></td>
                                            <td><a ><button type="button" class="btn" onclick="ShowDataHelp('Frm_NewPunchImages.aspx?aLoginId=<%=dtList1.Rows[i]["LoginID"].ToString() %>&qDate=<%=dtList1.Rows[i]["QDate"].ToString()%>&aFlag=2','','')">显示</button></a></td>
									</tr>
                                     <%
                                            }
                                        }
                                         %>
                                    </tbody>
							</table>
                            <div class="pager">
                            <webdiyer:aspnetpager ID="AspNetPager1" runat="server" FirstPageText="首页" 
                                    LastPageText="尾页" PrevPageText="上一页" NextPageText="下一页" 
                            onpagechanging="AspNetPager1_PageChanging"
                            PageSize="10" AlwaysShow="True" />
                            </div>
						</div>
					</div>
				</div>
			</div>
    </div>
</asp:Content>
