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

📄 tongxun_gongsi.jsp

📁 oa办公系统
💻 JSP
字号:
<%@ page language="java" import="java.util.*,cn.jx.ecjtu.oa.ps.pojo.*" pageEncoding="GBK"%>
<html xmlns="http://www.w3.org/1999/xhtml">
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gbk" />
<title>查看公司名片</title>
<link href="../common/defaultFa/css/all.css" rel="stylesheet" type="text/css" />

<link href="../common/defaultFa/css/css.css" rel="stylesheet" type="text/css" />
<script>
<%--
function add(){
	window.showModalDialog("tongxun_gongsi_add.jsp",'',"dialogHeight:290px;dialogWidth:280px");
}
--%>
function add()
{
  document.f4.action="tongxun_gongsi_add.jsp";
  document.f4.submit();
	 
}

function Read(){
	window.showModalDialog("tongxun_yuangong_show.jsp","dialogHeight:320px;dialogWidth:520px");
}
function doCheck(){
	var selectIndex=document.form1.select1.selectedIndex;
	var v=document.form1.select1.options[selectIndex].value;
	var keyword=document.form1.text.value;
	if(v==2){
	      return true;
	}
	else{
	  if(!/^\d+$/.test(keyword)){
		alert("====输入格式不正确!请输入数字!====");
		document.form1.text.select();
		document.form1.text.focus();
		return false;
	  }
	  else{ 
		return true;
	  }
	}
}

function changePage(page){
 if(page==0){
    page=1; 
 }
	    document.form1.page.value=page;
	    document.form1.action="ListCompanyCardServlet";
	    document.form1.submit();	
}

function dossa(){ 
	    document.form1.action="ListCompanyCardServlet";
	    document.form1.submit();	
}

function remove(companyid)
{
 msg="确认要删除该公司么?";
 if(window.confirm(msg))
 {
		document.f3.action="removecompanycardServlet";
		document.f3.company_id.value=companyid;
		document.f3.submit();
	 }
}



</script>

<style type="text/css">
<!--
.STYLE1 {
	font-size: 18px;
	color: #FFFFFF;
}
.STYLE2 {font-size: 14px}
-->
</style>
</head>

<body style="overflow-y:auto"  background="summer_relaxation_JD047.jpg"s>


<form id="form1" name="form1" method="post" action="findCompanyCardServlet">
  <table width="650" border="0" cellpadding="0" cellspacing="0" class="tb_form" height="42">
  <!--DWLayoutTable-->
  <tr>
    <td height="25" align="left" valign="middle" nowrap="nowrap" bgcolor="#0099CC"><span class="STYLE1"> 公司名片</span></td>
  </tr>
  <tr>
    <td width="650" height="21" valign="top" nowrap="nowrap"><select name="select1">
         <option value="1">公司ID</option>
         <option value="2">公司名称</option>
         <option value="3">公司电话</option>
        </select>
       <select name="select2">
          <option value="=" selected="selected">精确</option>
          <option value="like">模糊</option>
       </select>
      <input name="text" type="text" value=""  style="width:100px" onChange="doCheck();"/>      
	  <input name="btn_new4" type="submit" id="btn_query" value=" 查  询 "  ></td>
  </tr>
</table>

<table width="650" border="0" cellpadding="0" cellspacing="1" class="tb_data" id="tb_query" height="30">
  <thead>
    <tr>
      <td width="21%" align="center"><span class="STYLE2">公司ID</span></td>
      <td width="16%" align="center"><span class="STYLE2">公司名称</span></td>
      <td width="16%" align="center"><span class="STYLE2">公司电话</span></td>
      <td width="16%" align="center"><span class="STYLE2">公司邮编</span></td>
      <td width="18%" align="center"><span class="STYLE2">公司地址</span></td>
      <td width="13%" align="center"><span class="STYLE2">操作</span></td>
    </tr>
  </thead>
   
   
  <%
		int pageShowUser=6;
		List<CompanyCard> companycards=(List<CompanyCard>) request.getAttribute("COMPANYCARD");
		int pagenum=1;
		int pageall=1;
		try{
		  pagenum=(Integer)request.getAttribute("pageNum");
		  pageall=(Integer)request.getAttribute("ALLPAGE");}
			catch(Exception e){
				pagenum=1;
				pageall=1;
			}
		CompanyCard companycard=null;
		for(int i=(pagenum-1)*pageShowUser;i<companycards.size() && i<pagenum*pageShowUser;i++){
				    //for(int i=0;i<usercards.size();i++){				       
		  if(companycards.get(i)!=null) {
			companycard=companycards.get(i);	
		  }
%>
  <tr>
    <td height="20"><div align="center"><%=companycard.getCompany_id()%></div></td>
    <td align="center"><%=companycard.getName()%></td>
    <td align="center" nowrap="nowrap"><%=companycard.getPhone()%></td>
    <td align="center" nowrap="nowrap"><%=companycard.getPost()%></td>
    <td align="center" nowrap="nowrap"><%=companycard.getAddress()%></td>
     <td align="center" nowrap="nowrap"><a href="javascript:remove(company_id=<%=companycard.getCompany_id()%>)">删除</a>
    <a href="premodifycompanycardServlet?company_id=<%=companycard.getCompany_id()%>" >编辑</a>    </td>
  </tr>
<%
}
 %>
</table>
<table width="650" border="0" cellpadding="0" cellspacing="0" class="tb_foot" height="1" style="width: 650px; height: 30px;">
 <tr>
					<td align="center"><a href="javascript:changePage(1)" onclick="">首页 </a>&nbsp;
                    <a href="javascript:changePage(${requestScope.pageNum-1 })">上一页</a>&nbsp;
                    <a href="javascript:changePage(${requestScope.pageNum+1 })">下一页 </a>&nbsp;
                    <a href="javascript:changePage(${requestScope.ALLPAGE})">最后一页</a>&nbsp;
                    <input name="page" type="text" value="${requestScope.pageNum }" size="3" />
                    <input name="btn_new" type="button" id="btn_new" value=" 跳转 " onClick="dossa()" /></td>
 </tr>
</table>
</form>
<form name="f4"  id="f4" action="" method="post">
<table border="0" align="center" cellpadding="0" cellspacing="0" class="tb_foot">
  <tr>
    <td align="center"><input type="submit" name="Submit2" value=" 添  加 " onClick="add()"></td>
  </tr>
</table>
</form>
<form name="f3"  id="f3" action="" method="post">
	<input type="hidden" name="company_id">
</form>


</body>
</html>

⌨️ 快捷键说明

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