<%@ Page Title="" Language="C#" MasterPageFile="~/BackStage/SiteMaster.Master" AutoEventWireup="true" CodeBehind="Frm_UpdateBtype.aspx.cs" Inherits="AndroidSevice.Web.WLTGL.Frm_UpdateBtype" %>  
<%@ 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: ['60%', '85%'],
                fix: false, //不固定
                maxmin: true,
                content: _url
            });
        }
        function ShowDataHelpView(_url, _title, _handler) {
            layer.open({
                type: 2,
                area: ['60%', '85%'],
                fix: false, //不固定
                maxmin: true,
                content: _url
            });
        }
        function sAlert(info) {
            var message = info;
            layer.alert(message, 8); //风格一，layer弹出层特效
        }
        function SelectAll() {
            var checkboxs = document.getElementsByName("Btypecheck");
            for (var i = 0; i < checkboxs.length; i++) {
                var e = checkboxs[i];
                e.checked = !e.checked;
            }
        }
        function sAlertok(info) {
            layer.alert(info, { closeBtn: 0
            }, function () {
                parent.location.reload(); //刷新父页面
            });
        }
        function sAlertOut(info) {
            layer.alert(info, { closeBtn: 0
            }, function () {
                window.location.href = '../../default.aspx'; //刷新父页面
            });
        }

        function ShowDataHelpPLSH(_url, _title, _handler) {
            layer.confirm('确认将所有未审核数据批量审核？', {
                btn: ['确定', '取消'] //按钮
            }, function () {
                var obj = document.getElementsByName('lodecheck'); //选择所有name="'lodecheck'"的对象，返回数组 
                //取到对象数组后，我们来循环检测它是不是被选中 
                var s = '';
                for (var i = 0; i < obj.length; i++) {
                    if (obj[i].checked) s += obj[i].value + ','; //如果选中，将value添加到变量s中 
                } 

                 window.location.href = _url + "pltype=plsh&check="+s ;; //刷新父页面
            }, function () {
                return;
            });

        }

        function ShowDataHelpPLTJ(_url, _title, _handler) {
            layer.confirm('确认将所有审核数据更新到管家婆数据中？', {
                btn: ['确定', '取消'] //按钮
            }, function () {
                var obj = document.getElementsByName('lodecheck'); //选择所有name="'lodecheck'"的对象，返回数组 
                //取到对象数组后，我们来循环检测它是不是被选中 
                var s = '';
                for (var i = 0; i < obj.length; i++) {
                    if (obj[i].checked) s += obj[i].value + ','; //如果选中，将value添加到变量s中 
                }

                window.location.href = _url + "pltype=pltj&check=" + s; ; //刷新父页面
            }, function () {
                return;
            });

        }
        function ShowDataHelpPLDEL(_url, _title, _handler) {
            layer.confirm('确认批量删除数据？', {
                btn: ['确定', '取消'] //按钮
            }, function () {
                var obj = document.getElementsByName('lodecheck'); //选择所有name="'lodecheck'"的对象，返回数组 
                //取到对象数组后，我们来循环检测它是不是被选中 
                var s = '';
                for (var i = 0; i < obj.length; i++) {
                    if (obj[i].checked) s += obj[i].value + ','; //如果选中，将value添加到变量s中 
                }

                window.location.href = _url + "pltype=pldel&check=" + s; ; //刷新父页面
            }, function () {
                return;
            });

        }
    </script>
    <style type="text/css">
        .style1
        {
            height: 27px;
        }
    </style>
</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="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 class="buttons">
                                    <a href="#"><button type="button" style=" color:White; background:#00B7EE"  onclick=ShowDataHelpPLSH('Frm_UpdateBtype.aspx?','','') class="btn" >批量审核</button></a>
                                    &nbsp;&nbsp;&nbsp;&nbsp;
                                     <a href="#"><button type="button" style=" color:White; background:#00B7EE"  onclick=ShowDataHelpPLTJ('Frm_UpdateBtype.aspx?','','') class="btn" >批量提交</button></a>
                                      &nbsp;&nbsp;&nbsp;&nbsp;
                                     <a href="#"><button type="button"  style=" color:White; background:#00B7EE" onclick=ShowDataHelpPLDEL('Frm_UpdateBtype.aspx?','','') class="btn" >批量删除</button></a>
                                </div>
                                </div>
							<div class="widget-content">
                             <table id="query" class="table table-bordered table-striped table-hover">
                                    <tbody>
                                    <tr>
                                             <td>时间：
                                             <span><input type="text" class="inputwidth" style="width :80px" onFocus="WdatePicker({dateFmt: 'yyyy-MM-dd', isShowToday: false, isShowClear: false})"  name="strdate" id="strdate" value="<%=_strdate %>"/></span>
                                            <span><input type="text" class="inputwidth"  style="width :80px" onFocus="WdatePicker({dateFmt: 'yyyy-MM-dd', isShowToday: false, isShowClear: false})"  name="endate" id="endate" value="<%=_enddate %>"/></span></td>
											<td>
                                                提交状态： 
                                                <asp:DropDownList ID="dropTJ" runat="server" Width="80px" >
                                                    <asp:ListItem Value=""></asp:ListItem>
                                                    <asp:ListItem Value="0">未提交</asp:ListItem>
                                                    <asp:ListItem Value="1">已提交</asp:ListItem>
                                                </asp:DropDownList>
                                            </td>
                                            <td>
                                                审核状态：<asp:DropDownList ID="dropSH" runat="server"  Width="80px" >
                                                    <asp:ListItem Value=""></asp:ListItem>
                                                    <asp:ListItem Value="0">未审核</asp:ListItem>
                                                    <asp:ListItem Value="1">已审核</asp:ListItem>
                                                </asp:DropDownList>
                                            </td>
                                            <td>业务员：
                                                 <asp:DropDownList ID="dropUser" runat="server" Width="90px" >
                                                </asp:DropDownList>
                                            </td>
                                           
                                           <td>
                                                        <span>客户名称：
                                                   <asp:TextBox ID="customerId" runat="server" Enabled="false"></asp:TextBox>
                                                    </span>
									                <a title="" onclick=ShowDataHelp('../BBCX/Frm_CustomerData.aspx?','','') class="btn btn-mini" href="#"><i class="icon-plus"></i></a>
                                                    
								                        <button type="button" onclick="window.location.href='Frm_UpdateBtype.aspx?del=del1'" class="btn btn-mini" ><i class="icon-minus"></i></button>
                                                   
                                            </td>
                                             <td><button type="submit" name="sub" value="sub" class="btn" >查询</button>
                                                <asp:HiddenField ID="HiddenField1" runat="server" Visible="false"  />
                                                <asp:HiddenField ID="hidcustomerId" runat="server" Visible="false"  />
                                            </td>
									</tr>
                                    </tbody>
							 </table>
                             <table id="wew" class="table table-bordered table-striped table-hover">
                                    <thead>
										<tr>
                                            <th>选择</th>
                                            <th style=" width:20px">序号</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>
                                            <th>线路名</th>--%>
                                            <%--<th>原地址</th>--%>
                                            <% if (_IsCM160)
                                            {%>
                                            <th>原价格类型</th>
                                            <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 style="width:20px"><input type="checkbox" name="lodecheck" value=<%=dtList.Rows[i]["Btypeid"].ToString()%> /></td>
                                            <td style=" width:20px"><%=i+1%></td>
											<%--<td><%=dtList.Rows[i]["checkname"].ToString()%></td>--%>
                                            <td><%=dtList.Rows[i]["CheckDate"].ToString()%></td>
                                            <td>
                                                <a href="Frm_UpdateBtype.aspx?dtsh=dtsh&istj=<%=_tj %>&loginid=<%=dtList.Rows[i]["Btypeid"].ToString()%>">
                                                    <%=dtList.Rows[i]["Checkzt"].ToString() == "0" ? "×" : "√"%>
                                                </a>
                                            </td>
                                            <td><%=dtList.Rows[i]["busercode"].ToString()%></td>
                                            <td><%=dtList.Rows[i]["bfullname"].ToString()%></td>
                                            <td><%=dtList.Rows[i]["BtypeName"].ToString() %></td>
                                            <%--<td><%=dtList.Rows[i]["Area"].ToString()%></td>--%>
                                            <td><%=dtList.Rows[i]["Person"].ToString()%></td>
                                            <td><%=dtList.Rows[i]["Mobile"].ToString()%></td>
                                         <%--   <td><%=dtList.Rows[i]["Longitude"].ToString()%></td>
                                            <td><%=dtList.Rows[i]["Latitude"].ToString()%></td>
                                            <td><%=dtList.Rows[i]["Distance"].ToString()%></td>
                                            <td><%=dtList.Rows[i]["lodefullname"].ToString()%></td>--%>
                                            <%--<td><%=dtList.Rows[i]["OldAddress"].ToString()%></td>--%>
                                            <% if (_IsCM160)
                                            {%>
                                             <td><%=dtList.Rows[i]["OldPrice"].ToString()%></td>
                                             <td><%=dtList.Rows[i]["Price"].ToString()%></td>
                                            <%} %>
                                           <td><%=dtList.Rows[i]["NewAddress"].ToString()%></td>
                                           <td><%=dtList.Rows[i]["UpdateReason"].ToString()%></td>
                                           <%--<td><%=dtList.Rows[i]["uploaddate"].ToString()%></td>--%>
                                           <td><%=dtList.Rows[i]["uploadname"].ToString()%></td>
                                           <td><a ><button type="button" class="btn" onclick="ShowDataHelp('Frm_UpdateBtypeImage.aspx?Id=<%=dtList.Rows[i]["btypeid"].ToString() %>','','')">显示</button></a></td>
                                           <td><a ><button type="button" class="btn" onclick="ShowDataHelpView('Frm_UpdateBtypeModify.aspx?Id=<%=dtList.Rows[i]["btypeid"].ToString() %>','','')">详情</button></a></td>
                                           <td><a ><button onclick="javaScript:if(confirm('您确定要删除吗？')) window.location.href='Frm_UpdateBtype.aspx?del=del&Id=<%=dtList.Rows[i]["btypeid"].ToString() %>&uplode=<%=dtList.Rows[i]["btypeid"].ToString() %>'" type="button" class="btn">删除</button></a></td>
                                           <%--<td><a ><button type="button" class="btn" onclick="ShowDataHelpView('Frm_UpdateBtypeDetail.aspx?Id=<%=dtList.Rows[i]["btypeid"].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>