<%@ Page Title="" Language="C#" MasterPageFile="~/BackStage/SiteMaster.Master" AutoEventWireup="true" CodeBehind="Frm_ViewCusBaiFang.aspx.cs" Inherits="AndroidSevice.Web.BackStage.XDGL.Frm_ViewCusBaiFang" %>
<%@ Register assembly="AspNetPager" namespace="Wuqi.Webdiyer" tagprefix="webdiyer" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <script type="text/javascript">
    function ShowDataHelp(_url, _title, _handler) {
        layer.open({
            type: 2,
            area: ['80%', '90%'],
            fix: false, //不固定
            maxmin: true,
            content: _url
        });
    }
    function ShowDataHelp1(_url, _title, _handler) {
        layer.open({
            type: 2,
            area: ['80%', '90%'],
            fix: false, //不固定
            maxmin: true,
            content: _url
        });
    }
    function sAlert(info) {
        var message = info;
        layer.alert(message, 8); //风格一，layer弹出层特效
    }
    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 id="content-header">
				<div class="btn-group">
				</div>
			</div>
	  <div id="breadcrumb">
				<a href="#" title="Go to Home" class="tip-bottom"><i class="icon-home"></i>巡店管理</a>
				<a href="#" class="current">查看拜访</a>
	  </div>
          <div class="btn-group">
                </div>
	<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>
							</div>
							<div class="widget-content">
                                <table id="Table1" class="table table-bordered table-striped table-hover">
                                    <tbody>
                                    <tr>
                                            <td>业务员：<span>
                                            <select class="selectstyle inputwidth" name="empory" id="empory">
                                            <option value=""></option>
                                            <%
                                                if (dtempory != null && dtempory.Rows.Count != 0)
                                                {
                                                    for (int i = 0; i < dtempory.Rows.Count; i++)
                                                    {
                                                 %>
                                            <option <%=dtempory.Rows[i]["TypeID_"].ToString()==_empory?"selected":"" %> value="<%=dtempory.Rows[i]["TypeID_"].ToString() %>"><%=dtempory.Rows[i]["FullName"].ToString()%></option>
                                             <%  }
                                                }%>
                                            </select>
                                            </span></td>
                                            <td><span>时间段：</span><span><input type="text" class="inputwidth" onFocus="WdatePicker({dateFmt: 'yyyy-MM-dd', isShowToday: false, isShowClear: false})"  name="strdate" id="strdate" value="<%=_strdate %>"/></span>
                                            <span><input type="text" class="inputwidth" onFocus="WdatePicker({dateFmt: 'yyyy-MM-dd', isShowToday: false, isShowClear: false})" name="endate" id="endate" value="<%=_endate %>"/></span>
                                            </td>
                                            <td><button type="submit" name="sub" value="sub" class="btn" ><i class="icon-search"></i>查询</button>
                                                </td>
									</tr>
                                    </tbody>
							</table>

                             <table id="wew" class="table table-bordered table-striped table-hover">
                                    <thead>
										<tr>
                                            <th >序号</th>
											<th >创建时间</th>
											<th >业务员</th>
                                            <th >时间段</th>
                                            <th >客户数</th>
                                            <th >完成数</th>
                                            <th >完成率</th>
                                            <th >详情</th>
										</tr>
									</thead>
                                    <tbody>
                                    <%if(dtlist!=null&&dtlist.Rows.Count!=0)
                                      {
                                          for (int i = 0; i < dtlist.Rows.Count;i++)
                                          { %>
                                    <tr>
                                            <td ><%=i+1 %></td>
                                            <td> <%=Convert.ToDateTime(dtlist.Rows[i]["xiwamaxtime"].ToString()).ToString("yyyy-MM-dd")%></td>
                                            <td> <%=dtlist.Rows[i]["EtypeName"].ToString()%></td> 
                                            <td ><%=dtlist.Rows[i]["BillDate"].ToString()%> - 
                                                    <%=dtlist.Rows[i]["enddate"].ToString()%></td>
                                             <td>
                                                <%=dtlist.Rows[i]["cusCount"].ToString()%>
                                             </td>   
                                           <td>
                                                <%=dtlist.Rows[i]["Count"].ToString()%>
                                             </td>
                                             <td>
                                                <%=dtlist.Rows[i]["rate"].ToString()%>
                                             </td>
                                              <td><a ><button type="button" class="btn" onclick="ShowDataHelp1('Frm_ViewCusBaiFangDetail.aspx?billid=<%=dtlist.Rows[i]["billid"].ToString()%>&strdate=<%=dtlist.Rows[i]["BillDate"].ToString()%>&enddate=<%=dtlist.Rows[i]["enddate"].ToString()%>','','')">拜访详情</button></a></td>
									</tr>
                                    <% }
                                      } %>
                                    </tbody>
							</table>
                            <div class="pager">
                            <webdiyer:AspNetPager ID="AspNetPager1" runat="server" FirstPageText="首页" LastPageText="尾页" PrevPageText="上一页" NextPageText="下一页" 
                            onpagechanging="AspNetPager1_PageChanging"
                            PageSize="20" AlwaysShow="True" />
                            </div>
							</div>
						</div>
					</div>
				</div>
			</div>
</asp:Content>
