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

📄 baddebtsentersearchinfo.jsp

📁 这是一个法律事务所系统源码
💻 JSP
字号:
<%--
模块名称:费用管理
模块功能:坏账登记查询结果
版    本:V1.0
著 作 人:蔡静
著作日期:2001-10-24
使用说明:
主要技术说明:
参考文献:法律事务设计书
修改历史:= = = = = = = = = = = = = = = = = = = = = = = = = =
	修改日期:
	修 改 人:
	修改理由:
	修改出处:
	= = = = = = = = = = = = = = = = = = = = = = = = = =
--%>
<%@ page contentType= "text/html; charset=gb2312" %>
<%@ page language="java" import="java.sql.*" %>
<jsp:useBean id="db" class="dbconnection.DbConnection" scope="page" />
<%
  String bad_debt_id, customer_name, debt_count, debt_count1, debt_count2, lawyer, enter_date1, enter_date2;
  bad_debt_id = request.getParameter("bad_debt_id");
  customer_name = request.getParameter("customer_name");  
  customer_name = new String(customer_name.getBytes("ISO8859_1"));
  debt_count1 = request.getParameter("debt_count1");    
  debt_count2 = request.getParameter("debt_count2");
  lawyer = request.getParameter("lawyer");
  enter_date1 = request.getParameter("enter_date1");
  enter_date2 = request.getParameter("enter_date2");
  String condition = "";
  if ((bad_debt_id != null) && (!bad_debt_id.equals(""))) {
    condition = condition + " and bad_debt_id='" + bad_debt_id + "'";
  }
  if ((customer_name != null) && (!customer_name.equals(""))) {
    condition = condition + " and a.customer_id in (select customer_id from t_customer";
    condition = condition + " where customer_name like '%" + customer_name + "%')";
  }
  if ((debt_count1 != null) && (!debt_count1.equals(""))) {
    condition = condition + " and debt_count>='" + debt_count1 + "'";
  }              
  if ((debt_count2 != null) && (!debt_count2.equals(""))) {
    condition = condition + " and debt_count<='" + debt_count2 + "'";
  }
  if ((lawyer != null) && (!lawyer.equals(""))) {
    condition = condition + " and lawyer='" + lawyer + "'";
  }
  if ((enter_date1 != null) && (!enter_date1.equals(""))) {
    condition = condition + " and a.enter_date >= '" + enter_date1 + "'";
  }
  if ((enter_date2 != null) && (!enter_date2.equals(""))) {
    condition = condition + " and a.enter_date <= '" + enter_date2 + "'";
  }         
  String sql = "select a.bad_debt_id, a.debt_count, b.customer_name,a.enter_date ";
  sql = sql + " from t_baddebt a LEFT OUTER JOIN  t_customer b on a.customer_id = b.customer_id ";
  sql = sql + " where 1 = 1";
  sql = sql + condition + " order by bad_debt_id";
  ResultSet rs = db.executeQuery(sql);
%>
<html>
<head>
<title>坏账登记查询结果</title>
<%@ include file="../inc/config.jsp" %>
</head>

<body class=page>
<script language="javascript">
   function selectID() {
     var a = document.all.item("rel");
     var bad_debt_ids = "";
     var flag=0;
     if (a!=null)
       if (a.length!=null)
	 for (i=0; i<a.length; i++)  {
	   if(a(i).checked) {
             if (bad_debt_ids == "")
               bad_debt_ids = a(i).value;
             else
               bad_debt_ids = bad_debt_ids + "," + a(i).value;
             flag=1;
           }
	 }
	 else
	 {
	   if(a.checked) {
	     bad_debt_ids = a.value;
	     flag=1;
	   }
         }
       if (!flag)
       {
         alert("请选择一项!")
         return false;
       }
      if(!window.confirm("确定要删除选中的项目吗?"))
      {
        return false;
      }
      else {
        document.thisForm.bad_debt_ids.value=bad_debt_ids;
        document.thisForm.submit();
        return true;
      }
   }
</script>
<!--显示工具条-->
<table width="98%" align="center" cellspacing="0" cellpadding="0" border="0">
  <tr>
    <td><a href="BadDebtsEnter.jsp"><img src="../images/all.gif" height="22" border="0" width="88"></a>
    <a href="BadDebtsEnterAdd.jsp"><img src="../images/add.gif" alt="增加内容" width="79" height="22" border="0"  ></a>
    <img src="../images/delete.gif" alt="删除选中的内容" onClick="return selectID();" style="cursor:hand" width="79" height="22">
    <a href="BadDebtsEnterSearch.jsp"><img src="../images/query.gif" alt="查询内容"   width="79" height="22" border="0"></a></td>
    <td width="108" height="30" align="center" background="../images/title_bg.gif">
      <script language=JavaScript>
document.write("<span class=\"title\">"+document.title+"</span>");
</script>
    </td>
  </tr>
</table>
<table width="98%" background="../images/line.gif" border="0" cellspacing="0" cellpadding="0" height="12" align="center">
  <tr>
    <td>&nbsp;</td>
  </tr>
</table>
  <form name="thisForm" method="post" action="BadDebtsEnterDel.jsp">
  <table width="98%" cellspacing="1" cellpadding="0"  height="25" align="center" border="0" class="table_bg">
    <tr class="title_bg">
      <td height="25" width="4%" align="center">
        <input  name="chkCheckAll" type="checkbox" enabled onclick="CheckAll();">
      </td>
      <td width="12%" align="center">坏帐编号</td>
      <td width="15%" align="center">坏帐金额<br>
        </td>
      <td width="44%" align="center">客户名称[点击查看坏帐信息]</td>
      <td width="16%" align="center">登记日期</td>
      <td width="9%" align="center">操作</td>
    </tr>
  <%
    String enter_date;
    while (rs.next()) {
      bad_debt_id = rs.getString("bad_debt_id");
      debt_count = rs.getString("debt_count");
      customer_name = rs.getString("customer_name");  
      if(customer_name == null) customer_name = "";
      enter_date = rs.getString("enter_date");
      if (rs.getRow()!=(rs.getRow()/2*2)) {
  %>
  <tr  class="tr_bg1">
  <%  }
      else {
  %>
  <tr  class="tr_bg2">
  <%  }
  %>
      <td height="25" width="4%" align="center">
        <input  name="rel" type="checkbox" enabled value=<%=bad_debt_id%>>
      </td>
      <td width="12%" align="right"><%=bad_debt_id%></td>
      <td width="15%" align="right">
      <%
        if ((debt_count!=null) && (!debt_count.equals("")))
          out.print("¥" + debt_count);
      %>
      </td>
      <td width="44%" align="right"><a href="BadDebtsEnterInfo.jsp?bad_debt_id=<%=bad_debt_id%>"><%=customer_name%></a></td>
      <td width="16%" align="center">
      <%
        if ((enter_date!=null) && (!enter_date.equals("")))
          out.print(enter_date.substring(0,10));
      %>
      </td>
      <td width="9%" align="center">
      <a href="BadDebtsEnterAmend.jsp?bad_debt_id=<%=bad_debt_id%>">
      <img src="../images/edit.gif" width="18" height="13" border="0" alt="修改" ></a></td>
    </tr>
  <%
    }
  %>
  </table>
  <input type="hidden" name="bad_debt_ids">
  </form>
</body>
</html>

⌨️ 快捷键说明

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