<%@ page language="C#" autoeventwireup="true" inherits="Admin_NewCustomerList, App_Web_qxuvifui" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>用户列表</title>
    <script src="../JS/jquery-ui/jquery.min.js" type="text/javascript"></script>
    <script src="../JS/jquery-ui/jquery-ui.min.js" type="text/javascript"></script>
    <script src="../JS/stringBuilder/StringBuilder.js" type="text/javascript"></script>
    <script src="../JS/Page/jquery.pagination.js" type="text/javascript"></script>
    <script src="../JS/loading/jquery.loadmask.js" type="text/javascript"></script>
    <script src="../JS/myOper/CustomerList.js" type="text/javascript"></script>
    <script src="../JS/json/jquery.json-2.2.min.js" type="text/javascript"></script>
    
    <link href="../CSS/themes/redmond/jquery-ui-1.8.2.custom.css" rel="stylesheet" type="text/css" />
    <link href="../CSS/mycss/DataTable.css" rel="stylesheet" type="text/css" />
    <link href="../JS/Page/pagination.css" rel="stylesheet" type="text/css" />
    <link href="../CSS/mycss/customerlist.css" rel="stylesheet" type="text/css" />
    <script>
     var param = eval(<%=json.ToString() %>);
     $(function(){
        $(":button").button();
      
        $("#btnSelectDelete").click(function(){
           if(confirm('你确定要删除选中项吗？')){
                
           }
        });
        $(":text").each(function(){
         $(this).addClass("text ui-widget-content ui-corner-all");
        
        });
        //设置查询操作符
        var html = new StringBuilder();
        var termList = eval(param.term);
        for(var i in termList){
            html.append("<option value='"+termList[i].value+"'>"+termList[i].text+"</option>");
        }
        $("#dialogSelect select[name='term']").each(function(){
            
            $(this).html(html.tostring());
        }); 
    
        //设置表格字体
        $("#contentArea").css("font-size",param.tablefontsize);
        //设置查询事件
        $("#btnSelect").click(function(){
                $("#dialogSelect").dialog({
                width:500,
                height:550,
                title:"客户信息查询",
                buttons: {
				"OK": function() {
				    select();
				}
			}

                });
        });
        //选择事件
        $("#cbAllSelect").click(function(){
            allSelect(this);
        });
        $("#btnSelectDelete").click(function(){
            selectDelete();
        });
        $("#btnInsert").click(function(){
            showInsertDialog();
        });
        
        
        //设置日期选择
        var sroption={dayNamesShort: ['周一', '周二', '周三', '周四', '周五', '周六', '星期天'],
        monthNamesShort: ['一月','二月','三月','四月','五月','六月','七月','八月','九月','十月','十一月','十二月'],
        dateFormat: 'yy-mm-dd', changeMonth: true,
        changeYear: true, yearRange: 'c-10:c'   }
        
        $("#txtQueryIDateStart").datepicker(sroption);
        $("#txtQueryIDateEnd").datepicker(sroption);
   
        $("#Main").show();
        allPager(param.pagecount,true);
     });

     </script>
</head>
<body>
    <div id="Main" style="display:none">
        <input id="btnInsert" type="button" value="录入客户"/>
        <input id="btnSelect" type="button" value="查询客户"/>
    <!--分页-->
         <hr />
         <div id="AllPagerTop"  class="pagination" ></div>
         <br style="clear: both;">
     
         <hr />
         <div id="SelectPagerTop"  class="pagination" ></div>
         <br style="clear: both;">
    <!--内容区域-->
        <div>
        <table  id="contentArea" class="table">
        <caption>共有数据：<span id="pagecount"> </span> 行 |<span id="selectcount"></span></caption>
        <thead>
            <tr>
            <th><input id="cbAllSelect" type="checkbox"  /></th>
            <th>操作</th><th scope="col">客户名</th><th>网址</th><th>EMAIL</th><th>QQ</th><th>阿里旺旺</th><th>联系人</th><th >联系方式</th><th >所在地</th><th >客户所属</th><th>客户来源</th><th>客户类型</th><th>客户等级</th><th>行业类型</th><th>录入日期</th>
            </tr>
        </thead>
        <tbody id="content">
        </tbody>
        <tfoot>
             <tr><td><input id="btnSelectDelete" type="button" value="选中删除"  /></td><td colspan="8"> <span style="font-size: 9pt; color: gray"></span></td></tr>
        </tfoot>
        </table>
        </div>
    <!--分页--> 
         <div id="SelectPagerButtom"  class="pagination" ></div>
         <br style="clear: both;">
         <hr />
         <div id="AllPagerButtom" class="pagination" ></div>
         <br style="clear: both;">
         <hr />
    <!--查询面板-->
         <div id="dialogSelect" style=" display:none; font-size:10pt" class="font" >
         <table border="0"   >
             <tr>
                 <td style="width: 164px">
                     客户所属：</td>
                 <td colspan="2">
                     <select id="SelectQuerySales" style="width: 246px" >
                         <%=sbSales.ToString()%>
                     </select>
                 </td>
            </tr>
            <tr>
                <td style="width: 164px">
                    客户名：</td>
              <td style="width: 87px"> 
                  <select id="SelectQueryNameTerm" name="term">
                      <option selected="selected"></option>
                  </select>
              </td>
                <td style="width: 181px">
                    <input id="txtQueryName" type="text" /></td>
            </tr>
             <tr>
                 <td style="width: 164px" >
                     网址：</td>
                 <td style="width: 87px">
                     <select id="SelectQueryUrlTerm" name="term">
                         <option selected="selected"></option>
                     </select>
                 </td>
                 <td style="width: 181px">
                     <input id="txtQueryUrl" type="text"  /></td>
             </tr>
             <tr>
                 <td style="width: 164px">
                     EMAIL：</td>
                 <td style="width: 87px">
                     <select id="SelectQueryEmailTerm" name="term">
                         <option selected="selected"></option>
                     </select>
                 </td>
                 <td style="width: 181px">
                     <input id="txtQueryEmail" type="text" /></td>
             </tr>
             <tr>
                 <td style="width: 164px">
                     QQ：</td>
                 <td style="width: 87px">
                     <select id="SelectTermQQ" name="term">
                         <option selected="selected"></option>
                     </select>
                 </td>
                 <td style="width: 181px">
                     <input id="txtQueryQQ" type="text" /></td>
             </tr>
          
             <tr>
                 <td style="width: 164px; height: 17px">
                     阿里旺旺：</td>
                 <td style="width: 87px; height: 17px">
                     <select id="SelectWWTerm" name="term">
                         <option selected="selected"></option>
                     </select>
                 </td>
                 <td style="width: 181px; height: 17px">
                     <input id="txtQueryWW" type="text" /></td>
             </tr>
             <tr>
                 <td style="width: 164px">
                     联系人：</td>
                 <td style="width: 87px">
                     <select id="SelectQueryLinkManTerm" name="term">
                         <option selected="selected"></option>
                     </select>
                 </td>
                 <td style="width: 181px">
                     <input id="txtQueryLinkMan" type="text" /></td>
             </tr>
             <tr>
                 <td style="width: 164px">
                     联系方式：</td>
                 <td style="width: 87px">
                     <select id="SelectLinkPhoneTerm" name="term">
                         <option selected="selected"></option>
                     </select>
                 </td>
                 <td style="width: 181px">
                     <input id="txtQueryLinkManPhone" type="text" /></td>
             </tr>
             <tr>
                 <td style="width: 164px">
                     所在地：</td>
                 <td style="width: 87px">
                     <select id="SelectAreaTerm" name="term">
                         <option selected="selected"></option>
                     </select>
                 </td>
                 <td style="width: 181px">
                     <input id="txtQueryArea" type="text" /></td>
             </tr>
             <tr>
                 <td style="width: 164px">
                     客户来源：</td>
                 <td colspan="2">
                     <select id="SelectCustSourse" style="width: 246px" >
                         <%=sbCustSourse.ToString()%>
                     </select>
                 </td>
             </tr>
            <tr>
                 <td style="width: 164px">
                     客户类型：</td>
                 <td colspan="2">
                     <select id="SelectCustClass" style="width: 246px">
                         <%=sbCustClass.ToString()%>
                     </select>
                 </td>
             </tr>
              <tr>
                 <td style="width: 164px">
                     客户等级：</td>
                 <td colspan="2">
                     <select id="SelectCustGrade" style="width: 246px">
                        <%=sbCustGrade.ToString()%>
                     </select>
                 </td>
             </tr>
            <tr>
                 <td style="width: 164px">
                     行业类型：</td>
                 <td colspan="2">
                     <select id="SelectCustIndust" style="width: 246px" >
                        
                         <%=sbCustIndust.ToString()%>
                     </select>
                 </td>
                 
             </tr>
             <tr>
                 <td style="width: 164px">
                     录入时间（时间段）：</td>
                 <td colspan="2">
                     <input id="txtQueryIDateStart" style="width: 115px" type="text"  />-<input id="txtQueryIDateEnd"  style="width: 115px"
                         type="text" /></td>
             </tr>
         </table>
         </div>
         
    <!-- 录入面板 -->
    <div id="dialogInsert" style="display:none;font-size:10pt" class="font" >
    <form method="post" id="insertForm">
        <table cellspacing="3" cellpadding="0" border="0" id="selectCust"  >
                <tbody>
                <tr>
                    <th>
                客户名(*)：</th>
                    <td>
                        <input type="text" style="width: 265px;" id="txtCustName" maxlength="255" name="txtCustName"><span style="color: Red; visibility: hidden;" id="rfvCustName"></span></td>
                </tr>
                <tr>
                    <th>
                客户来源：</th>
                    <td>
                    
                    </td>
                </tr>
                <tr>
                    <th>
                客户类型：</th>
                    <td>
                        <select style="width: 163px;" id="ddlCustClass" name="ddlCustClass">


                        </select>
                    </td>
                </tr>
                <tr>
                    <th>
                客户等级：</th>
                    <td>
                        <select style="width: 163px;" id="ddlCustGrade" name="ddlCustGrade">


                </select>
                </td>
                </tr>
                <tr>
                    <th>
                行业类型：</th>
                    <td>
                       
                            <select style="width: 163px;" id="ddlCustIndustry" name="ddlCustIndustry">


                            </select>
                     </td>
                </tr>
                <tr>
                    <th>
                        客户归属：</th>
                    <td>
                        <select style="width: 163px;" id="ddlSales" name="ddlSales">


                        </select>
                    </td>
                </tr>
                <tr>
                    <th>
                        联系人：</th>
                    <td>
                        <input type="text" style="width: 157px;" id="txtLinkMan" maxlength="50" name="txtLinkMan"></td>
                </tr>
                <tr>
                    <th>
                 联系人手机：</th>
                    <td>
                        <input type="text" style="width: 157px;" id="txtLinkManPhone" maxlength="50" name="txtLinkManPhone"></td>
                </tr>
                <tr>
                    <th>
                电话：</th>
                    <td>
                        <input type="text" style="width: 157px;" id="txtCustPhone" maxlength="50" name="txtCustPhone"></td>
                </tr>
                <tr>
                    <th>
                        网址：</th>
                    <td>
                            <input type="text" style="width: 265px;" id="txtCustUrl" maxlength="255" value="WWW." name="txtCustUrl"></td>
                </tr>
                <tr>
                    <th>
                        城市：</th>
                    <td>
                        <input type="text" id="txtCity" name="txtCity">
                        <input type="button" onclick="showCity(this)" value="选择" style="width: 34px;" id="Button1">
                        <div style="padding: 10px; border: thin dashed silver; display: none; z-index: 101; left: 332px; position: absolute; top: 365px; background-color: rgb(255, 255, 255);" id="CitySelectPanel">
                              
                        </div>
                    </td>
                </tr>
                <tr>
                    <th>
                        地址：</th>
                    <td>
            <input type="text" style="width: 265px;" id="txtCustAddress" maxlength="255" name="txtCustAddress"></td>
                </tr>
                <tr>
                    <th>
                阿里旺旺：</th>
                    <td>
            <input type="text" style="width: 157px;" id="txtww" maxlength="50" name="txtww"></td>
                </tr>
                <tr>
                    <th>
                        EMAIL：</th>
                    <td>
            <input type="text" style="width: 157px;" id="txtCustEMAIL" maxlength="50" name="txtCustEMAIL"></td>
                </tr>
                <tr>
                    <th>
                        QQ：</th>
                    <td>
            <input type="text" style="width: 157px;" id="txtCustQQ" maxlength="50" name="txtCustQQ"></td>
                </tr>
                <tr>
                    <th>
                录入日期：</th>
                    <td>
                        <input type="text" style="width: 157px;" readonly="readonly" onclick="showDateSelect(this)" id="txtIDate" maxlength="50" name="txtIDate"></td>
                </tr>
                <tr>
                    <th>
                备注：</th>
                    <td>
                      <textarea style="height: 74px; width: 435px;" id="txtBZ" cols="20" rows="2" name="txtBZ"></textarea></td>
                </tr>
            </tbody>
          </table>
         </form>
      </div>
  
    </div>
</body>
</html>


