⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 business_officeframe.jsp

📁 电信的网厅的整站代码
💻 JSP
字号:
<%@ page contentType="text/html; charset=GBK" language="java" errorPage=""%>
<%request.setCharacterEncoding("GBK");%>
<%@ page import="com.doone.uurm.Purview,
                 com.doone.data.*,
                 com.doone.uurm.WebAuth,
                 com.doone.fj1w.info_manage.*"%>
<%request.setCharacterEncoding("GBK");%>
<%String sPurvICode="NGB002007";%>
<%

    WebAuth auth = WebAuth.getInstance(request);

    if ( ! auth.IsAuthed() ) {
	    out.write("<script language=\"javascript\">self.parent.location.replace(\"" + request.getContextPath() + "/view/login/login.jsp" + "\");</script>");
	    return;
    }
	else if ( ! auth.CheckPurv(sPurvICode) ) {
	    out.write("<script language=javascript src=\"../../common/script/RightForbidden.js\"></script>");
	    return;
	}
	
Business_office bo=new Business_office();
DataTable dt=new DataTable();
int pageNum=0;

String citycode="";
String area=request.getParameter("area");
String pageno=request.getParameter("pageNo");


        if(auth.getCityCode()==null || auth.getCityCode().equals("")||auth.getCityCode().equals("null"))
        {
        if(request.getParameter("city")!=null&&!request.getParameter("city").equals("")&&!request.getParameter("city").equals("null"))
           {citycode=request.getParameter("city");}
       
        else{citycode="";}
       } 
      else{citycode=auth.getCityCode();}





if(area==null||area.equals("null")||area.equals("")){area="";}



if(pageno==null||pageno.equals("")){pageno="1";}
 if(auth.getCityCode()==null || auth.getCityCode().equals("")){
  
  dt=bo.getUnderCityInfo(citycode,pageno);
  pageNum = bo.getBusinessinfoCount(area,citycode);
}
else{
         dt=bo.getUnderAreaInfo(citycode,area,pageno);
         pageNum = bo.getBusinessinfoCount(area,citycode);
}
%>
<html>
<head>
<title>营业厅管理 </title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<link href="../../common/style/main.css" rel="stylesheet" type="text/css" />
<link href="../../common/style/Sty01.css" rel="stylesheet" type="text/css" />
<script language="JavaScript" src="../../common/script/ChangeStyle.js"></script>
<script language="JavaScript" src="../../common/mainTool.js"></script>


<SCRIPT LANGUAGE="JavaScript">
    
    function windowOpen() {


        var sURL = "Business_officeEdit.jsp?id=" + OfficeList.key+"&state=motify&citycode=<%=citycode%>&areacode=<%=area%>";
		window.open(sURL,'business','width=600,height=520,top=20,left=60,screenX=10,screenY=20,status=yes',scrollbar='yes');
	}

    function windowOpenById() {
    	//var citycode = document.form1.area.value;
        var sURL = "Business_officeEdit.jsp?citycode=<%=citycode%>&areacode=<%=area%>"+"&state=insert";
        window.open(sURL,'business','width=600,height=520,top=20,left=60,screenX=10,screenY=20,status=yes',scrollbar='yes');
    }

    function fn_onload() {
		cltScript_Toolbar();
	}
		
	function cltScript_Toolbar() {
        if ( self.parent != self ){
            var pel = parent.document.all.tags("frame");
            for ( i=0; i< pel.length; i++){
                if ( pel(i).name == "main") {
					divTop.style.width = pel(i).width;
					divMain.style.width = pel(i).width;
					divMain.style.height = pel(i).height - divTop.clientHeight;
                }
            }
         }
	 }
	 
    function onChoosed(){
		 var src = event.srcElement;
		 setButtonEnabled();
	 }
	 
	 function setButtonEnabled(){
			if ( OfficeList != undefined ) {
				if ( parseInt(OfficeList.selected) >= 0 ){
				    document.getElementById("ibtnadd").Enabled = true;
					document.getElementById("ibtndel").Enabled = true;
					document.getElementById("ibtnedit").Enabled = true;
				}
			}
		}
		
    function fnToolDel() {
			var id = "";
			var state = "del";
			
			try {
				if ( OfficeList != undefined ) {
					if ( parseInt(OfficeList.selected) >= 0 ){
						var reId = OfficeList.selectedCells[0];
						if ( reId != null && reId != "" ) id = reId;
					}
				}
			}
			catch(e){}
			if (window.confirm("您确实要删除吗?")){
				var sURL = "Business_operate.jsp?id=" + id + "&state=" + state;
				window.open(sURL,'business','width=600,height=520,top=20,left=60,screenX=10,screenY=20,status=yes',scrollbar='yes');
				return true;
			}else
				return false;
		}
		
    function submit() {
	        document.form1.submit();
        }
	 
</SCRIPT>
</head>

<body onLoad="fn_onload();">
<div onresize="cltScript_Toolbar();" style="width: 100%">
			<div id="divTop" style="overflow: hidden">
			    <table id="ibtnPanel" style="font-size: 9pt; border-bottom: #efefef 1px outset" cellspacing="0"
					cellpadding="0" width="100%" border="0">
					<tr bgcolor="#efefef" height="33">
						<td valign="middle" align="center" width="81" onClick="return windowOpenById();" id="ibtnadd" style="behavior:url(../../common/button.htc)" DefaultClass="btnDefault" OverClass="btnOver" DownClass="btnDown" title="">添加</td>
						<td valign="middle" align="center" width="81" onClick="return fnToolDel();" id="ibtndel" style="behavior:url(../../common/button.htc)" DefaultClass="btnDefault" OverClass="btnOver" DownClass="btnDown" Enabled="false" title="">删除</td>
						<td valign="middle" align="center" width="81" onClick="return windowOpen();" id="ibtnedit" style="behavior:url(../../common/button.htc)" DefaultClass="btnDefault" OverClass="btnOver" DownClass="btnDown" Enabled="false" title="">编辑</td>		
						<td>&nbsp;</td>
					</tr>
				</table>
				<jsp:include page="../../common/inc_top.jsp" >
					<jsp:param name="purvCode" value="<%=sPurvICode%>"/>
				</jsp:include>
			</div>
           <div id="divMain" style="overflow: auto">
    
    <table style="font-size: 9pt; border-bottom: #efefef 1px outset" cellspacing="0"
					cellpadding="0" width="100%" border="0" class="OuterTable">         
            <tr class="OuterHead">
              <td class="title_td" align="center" width="8%">营业厅编号</td>
		      <td class="title_td" align="center" width="10%">营业厅名称</td>
		      <td class="title_td" align="center" width="8%">营业厅地区</td>
		      <td class="title_td" align="center" width="30%">营业厅地址</td>
		      <td class="title_td" align="center" width="10%">联系电话</td>
		<!--     <td class="title_td" align="center" width="6%">编辑</td>-->
            </tr>
          </table>
          
               
           <table id="OfficeList" border=0 width=100% cellspacing=0 cellpadding=1
					style="behavior:url(../../common/table.htc)"
					DefaultClass="DefaltRow" 
					SelectedClass="SelectedRow" 
					keyName="key" 
					multiple="true" 
				    ondblclick="return windowOpen();"
				    class="InnerTable"
				    onselected="return onChoosed();" 
				    >
            
            <%
            if(dt!=null&&dt.getRows().getCount()>0){
                for(int i=0 ;i<dt.getRows().getCount();i++){ 
                    DataRow dr=dt.getRow(i);
            %>
			     <tr class="InnerMain" style="color: black" key="<%=dr.getString("businessinfoid")%>">
	             <td class="body_td" align="center"  width="8%" nowrap><%=dr.getString("businessinfoid")%>
			     </td>
			     <td class="body_td" align="center"  width="10%" nowrap><%=dr.getString("name")%>
			     </td>
			     <td class="body_td" align="center"  width="8%" nowrap><%=dr.getString("areaname")%>
			     </td>
			     <td class="body_td" align="center"  width="30%" nowrap><%=dr.getString("ADDRESS")%>
			     </td>
			     <td class="body_td" align="center"  width="10%" nowrap><%=dr.getString("relationtel")%>
			     </td>
			     <!--<td class="body_td" align="center"  width="6%" nowrap>
			     <input type="button" class="button" value="编辑" style="width:35" onClick="javascript:windowOpen('Business_officeEdit.jsp?id=<%=dr.getString("businessinfoid")%>&citycode=<%=citycode%>&areacode=<%=area%>&state=motify')"/> 
			     </td>
			     -->
                </tr>
                
                
            <%
                }
            }
            else{%>
             <tr class="InnerMain" style="color: black" >
             <td class="body_td" align="center"  width="12%" nowrap>无相应的数据</td>
            </tr>
           <% }%>
            </table>
            
            
            
            
            <form name="form1" method="post" action="Business_officeframe.jsp">
            
              <table cellpadding="0" cellspacing="0" border="0" width="100%" class="OuterTable">
      				 <tr class="OuterFoot">
      				 <td align="left" class="foot_td" nowrap width="3%">请选择地区</td>
      				 <%if(auth.getCityCode()==null || auth.getCityCode().equals("")){%>
                   <td align="left" class="foot_td" nowrap width="3%">
                   <select name="city" id="city">
                    <%out.print(bo.getCity(citycode,auth.getCityCode()));%>
                   </select>
                   </td>
      					<%}else{%>
      					
       <td align="left" class="foot_td" nowrap width="3%"><select name="area" id="area">
      <option value="">-请选择-</option>
         <%
            DataTable  dt1=bo.getarea(auth.getCityCode());
            for(int i=0;i<dt1.getRows().getCount();i++){
            DataRow dr=dt1.getRow(i);
            out.print("<option value='" + dr.getString("AREACODE") + "'");
            if(citycode.equals(dr.getString("AREACODE"))){out.print("selected>");}
            else{out.print(">");}
            out.print(dr.getString("AREANAME"));
            out.print("</option>");
           }
           
           %>
        </select></td> 
        <%}%>
        
        
        
      <td align="left" class="foot_td" nowrap width="3%">
       <input type="submit" name="Submit"  class="button"  value="查询" >
       </td>
 						
						 
  
		         <td align="right" class="foot_td" nowrap width="6%">
      			<select name="pageNo"  id="PageNo" onChange="changePageNo(this.value)">
              		<%
                            int count=(pageNum);
							out.print(bo.buildPageOptions(count,Integer.parseInt(pageno)));
              		%>
       		              </select>页     
                       </td>
      				 </tr>
      			 </table>
      			 
      	</form>
       </div>
   </div>
</body>
</html>
<script language="javascript">
function changePageNo(no){ 

var sURL="Business_officeframe.jsp?pageNo=" + no+"&city=<%=citycode%>&area=<%=area%>";
window.open(sURL,"_self");

}

</script>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -