【131031】jsp学习实例 (2013-10-31 15:29:28)

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib prefix="html" uri="/sys/sysTld/struts-html.tld"%>
<%@ taglib prefix="bean" uri="/sys/sysTld/struts-bean.tld"%>
<%@ taglib uri="/sys/sysTld/struts-nested.tld" prefix="nested"%>
<%@ taglib uri="/sys/sysTld/struts-logic.tld" prefix="logic"%>
<%@ taglib prefix="grd" uri="http://www.ziruk.com/taglib/gridlib" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions"  prefix="fn"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>

<html>
<head>
<title><bean:message key="P040BCT801" /></title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<LINK rel="stylesheet" type="text/css" href="sys/sysCss/menu/css.css">
<LINK rel=stylesheet type=text/css href="sys/sysCss/menu/style-custom.css">
<link href="sys/sysCss/menu/jquery.css" rel="stylesheet" type="text/css"
 media="screen">
 <style type="text/css">
  body {
   margin-left: 0px;
   margin-top: 0px;
   margin-right: 0px;
   margin-bottom: 0px;
   overflow-X: hidden;
  }
  .tableHeader
        {
            height: 25px;
            padding: 2px 1px 2px 1px;
            font-size:11pt;
            font-weight: bold;
        }
        .tableRow
        {
            padding: 2px 1px 2px 5px;
            font-size:11pt;
        }
  </style>
</head>
<script language="javascript" type="text/javascript"
 src="js/calendar/WdatePicker.js"></script>
<script type="text/javascript"
 src="<%=request.getContextPath()%>/sys/sysJs/iscFrameWorkUtility.js"></script>
<body>
 <html:form method="POST" action="bpf010801.do">
  <input type="hidden" value="" name="actionMethodId">
  <input type="hidden" name="screenId" value="${rcjglForm.screenId }">
  <html:hidden property="conditionMap(inparaList)" styleId="inparaList"  />
        <html:hidden property="conditionMap(saveFlag)" styleId="saveFlag"  />
       
  <table width="800px" border="0" cellspacing="0" cellpadding="0">
   <tr>
    <td height="27" class="Title style1"  colspan="2" >
     <bean:message key="P040BCT801" />
    </td>
   </tr>
   <tr >
    <!-- 检索条件区域 -->
    <td align="left" style="line-height: 20px" height="30" bgcolor="#f5f9ed"  >
     
     <table border="0">
      <tr align="left">
       <td bgcolor="#f5f9ed" style="line-height: 20px" align="right" nowrap="nowrap" >
        <bean:message key="P040BCT802" /><span style="color: red">*</span>
       </td>
       <td style="line-height: 20px" height="30" bgcolor="#f5f9ed" align="left">
        <html:text property="conditionMap(selYM)" styleId="selYM"  size="9" />
       </td>
       <td width="50PX" bgcolor="#f5f9ed" style="line-height: 20px" align="right" nowrap="nowrap" >
        <bean:message key="P040BCT803" />
       </td>
       <td width="80PX" style="line-height: 20px" height="30" bgcolor="#f5f9ed" align="left" >
        <html:text property="conditionMap(SubOrderNo)"  />
       </td>
      </tr>
      <tr align="left">
       
       <td width="50PX" bgcolor="#f5f9ed" style="line-height: 20px" align="right" nowrap="nowrap" >
        <bean:message key="P040BCT804" />
       </td>
       <td width="80PX" style="line-height: 20px" height="30" bgcolor="#f5f9ed" align="left" >
        <html:text property="conditionMap(SuppNo)"  />
       </td>
       <td width="50PX" bgcolor="#f5f9ed" style="line-height: 20px" align="right" nowrap="nowrap" >
        <bean:message key="P040BCT320" />
       </td>
       <td width="80PX" style="line-height: 20px" height="30" bgcolor="#f5f9ed" align="left" >
        <html:select property="conditionMap(dczt)" >
         <html:options name="defaultDto" property="values" labelName="defaultDto" labelProperty="labels"></html:options>
        </html:select>
       </td>
      </tr>
     </table>
    </td>
    <!-- 按钮区域 -->
    <td align="right" style="line-height: 20px" height="30" bgcolor="#f5f9ed" width="600px" >
     <table border="0">
      <tr>
       <td align="left">
        <input type="button"
         style= "background:url(‘images/btn_01.gif‘);border:0;height:25px;width:82px"
         value="<bean:message key="P040BCT005" />"
         name="search"
         onclick="doSearch();" >
        <input type="button"
         style= "background:url(‘images/btn_01.gif‘);border:0;height:25px;width:82px"
         value="<bean:message key="P040BCT805" />"
         name="search"
         onclick="doAction();">
       </td>
      </tr>
      <tr>
       <td align="left">
          <input type="button"
         style= "background:url(‘images/btn_01.gif‘);border:0;height:25px;width:82px"
         value="<bean:message key="P040BCT821" />"
         name="search"
         onclick=‘doSave("<bean:message key="P040BCI822" />" );‘>
        <input type="button"
         style= "background:url(‘images/btn_01.gif‘);border:0;height:25px;width:82px"
         value="<bean:message key="P040BCT006" />"
         name="search"
         onclick="doExport();">
        <input type="button"
         style= "background:url(‘images/btn_01.gif‘);border:0;height:25px;width:82px"
         value="<bean:message key="P040BCT890" />"
         name="search"
         onclick="doSelect();">
       </td>
      </tr>
     </table>
    </td>    
   </tr>
   <tr>
    <!-- 数据显示区域 -->
    <td colspan="2">
     <table  width="100%" bordercolor="#999999" style="border-collapse: collapse" 
                            border="1"  cellspacing="0" cellpadding="0" > 
      <tr>
       <td colspan="14" height="10" class="Title" >
        <bean:message key="P040BCT009" />
        <nested:write property="allCount" />
        <bean:message key="P040BCT010" />
       </td>
      </tr>
         <tr>
      <td align="left" style="line-height: 20px;" height="30" bgcolor="#f5f9ed" colspan="2">
       <div id="showDiv1" align="left" style="width:800px; overflow-x: scroll;clear:both;  ">
       <div style="width: 100%">
       
       <table id="titleTable" class="EOS_table" border=0 width="1620px" align=left>
           <tr bgcolor="#A4C7DD"  align="center" valign="middle">
            <th nowrap class="T2"><input type="checkbox" name="all" id="all" onclick="chooseAll(this)">
            <bean:message key="P040BCT807" /></th>
            <th nowrap class="T2" ><bean:message key="P040BCT808" /></th>
            <th  nowrap class="T2"><bean:message key="P040BCT809" /></th>
            <th nowrap class="T2" ><bean:message key="P040BCT810" /></th>
            <th nowrap class="T2" ><bean:message key="P040BCT811" /></th>
            
            <th nowrap class="T2" ><bean:message key="P040BCT933" /></th>
            
            <th width="80" nowrap class="T2"><bean:message key="P040BCT812" /></th>
            <th width="80" nowrap class="T2" ><bean:message key="P040BCT953" /></th>
            
            <th  nowrap class="T2" ><bean:message key="P040BCT934" /></th>
            
            <th  nowrap class="T2" ><bean:message key="P040BCT814" /></th>
            <th  nowrap class="T2"><bean:message key="P040BCT815" /></th>
                                 <th nowrap class="T2" ><bean:message key="P040BCT816" /></th>
            <th nowrap class="T2" ><bean:message key="P040BCT817" /></th>
            <th  nowrap class="T2"><bean:message key="P040BCT818" /></th>
            <th  nowrap class="T2"><bean:message key="P040BCT819" /></th>
            <th  nowrap class="T2"><bean:message key="P040BCT820" /></th>
                              </tr>
       </table>
       </div>
        <div id="showDiv" align="left" style="height:350px; overflow-y: scroll;">
        <table id="iscTab" class="EOS_table" border=0 width="1600px" align=left>
      <c:if test="${requestScope.rcjglForm.detail[0]!=null}" >
                       
                         </c:if>
                          <c:set var="rcjglFormNew" value="${requestScope.rcjglForm}"/>
                          <c:set var="len111" value="0"/>
                          <c:if test="${! empty rcjglFormNew.detail}">
                          <c:set var="len111" value="${fn:length(rcjglFormNew.detail)}"/>
                          </c:if>
                          <c:if test="${len111>0}">
                          <c:set var="cnt" value="0"/>
                          <c:set var="tmpInt" value="0"/> 
                          <c:set var="tmpStr" value=""/> 
                          <c:set var="sumNoAndsuppNo" value=""/>
                          <c:forEach begin="0" end="${len111-1}" var = "idx">
                                <c:set var="tmpStr" value="${rcjglFormNew.detail[idx].SUBORDERNO}${rcjglFormNew.detail[idx].SUPPNO}"/>
                                <c:choose>
                                <c:when test="${sumNoAndsuppNo != tmpStr}">
                                    <c:set var="sumNoAndsuppNo" value="${tmpStr}"/>
                                    <c:set var="tmpInt" value="${tmpInt+1}"/>
                                    <c:set var="cnt" value="${rcjglFormNew.detail[idx].ROWCNT}"/>
                                    <tr  class="tableRow">
               <td width="70" rowspan="${cnt}">
               <input type="hidden" value="${rcjglFormNew.detail[idx].ACOUNTERID}" name="acounterID" /> 
               <input type="hidden" value="${rcjglFormNew.detail[idx].SUPPNO}" name="supp_no" />
               <input type="checkbox" name="chklst" onclick="" id="${rcjglFormNew.detail[idx].SUBORDERNO}">${tmpInt}
               </td>
               <td rowspan="${cnt}">${rcjglFormNew.detail[idx].SUBORDERNO}</td>
               <td rowspan="${cnt}">${rcjglFormNew.detail[idx].SUPPNO}</td>
               <td rowspan="${cnt}">${rcjglFormNew.detail[idx].SUPPNAME}</td>
               <td >${rcjglFormNew.detail[idx].PRODUCTNAME}</td>
               <td width="80" rowspan="${cnt}">${rcjglFormNew.detail[idx].LCQF}</td>
               <td width="80" rowspan="${cnt}">${rcjglFormNew.detail[idx].ACOUNTDAY1}</td>
               <td align="right">
               <fmt:formatNumber value="${rcjglFormNew.detail[idx].SUMPRICEDIS}" pattern="#,##0.00#" type="number" var="money"/>
               <c:out value="${money}"/>
               </td>
               <td align="right">
               <fmt:formatNumber value="${rcjglFormNew.detail[idx].MOJU}" pattern="#,##0.00#" type="number" var="money2"/>
               <c:out value="${money2}"/>
               </td>
               <td rowspan="${cnt}"><input type="text" style="width:70px" name="acceptymd" value="${rcjglFormNew.detail[idx].ACCEPTYMD}"/></td>
               <td rowspan="${cnt}"><select name="status">
                   <c:if test="${rcjglFormNew.detail[idx].SHEETACCEPT == 1}">
                      <option value="1" selected><bean:message key="P040BCT854" /></option>
                      <option value="0" ><bean:message key="P040BCT855" /></option>
                   </c:if>
                   <c:if test="${rcjglFormNew.detail[idx].SHEETACCEPT != 1}">
                        <option value="1" ><bean:message key="P040BCT854" /></option>
                      <option value="0" selected ><bean:message key="P040BCT855" /></option>
                   </c:if>
               </select>
               </td>
                <td width="100" rowspan="${cnt}">
                                      <html:link   href="#" onclick="javascript:doSearchInvoice(‘${rcjglFormNew.detail[idx].SUBORDERNO}‘)" >
                                         ${rcjglFormNew.detail[idx].INVOICECNT}
                                      </html:link>
                                      
                                     </td>
               <td width="100" rowspan="${cnt}" align="center">${rcjglFormNew.detail[idx].ACOUNTDAY2}</td>
               <td width="100" rowspan="${cnt}">${rcjglFormNew.detail[idx].ACOUNTERID}</td>
               <td width="100" rowspan="${cnt}" align="center">${rcjglFormNew.detail[idx].PULLOUTDAY}</td>
               <td width="100" rowspan="${cnt}">${rcjglFormNew.detail[idx].PULLOUTID}</td>
               </tr>
                                 </c:when>
                                <c:otherwise>
                                    <tr  class="tableRow">
                                 <td >${rcjglFormNew.detail[idx].PRODUCTNAME}</td>
               <td align="right">
               <fmt:formatNumber value="${rcjglFormNew.detail[idx].SUMPRICEDIS}" pattern="#,##0.00#" type="number" var="money"/>
               <c:out value="${money}"/>
               </td>
               </tr>
                                </c:otherwise>
                                </c:choose>
                          </c:forEach>
                         </c:if>                   
     </table>
     </div>
     </div>
    </td>  
   </tr>
  </table>
  </td>  
   </tr>
  </table>  
 </html:form>
 
 <script type="text/javascript" language="Javascript">
 
     showCalendar(‘selYM‘,‘yyyy-MM‘);
  
  function doSearch() {
   objFrm = document.forms[0];
      if(objFrm.selYM.value=="")
      {
          alert(‘<bean:message key="P040BCI836"/>‘);
          return false;
      }

objFrm.actionMethodId.value = "runPageSearch";
   objFrm.submit();
  }
  
  function doAction() {
     objFrm = document.forms[0];
     var acounterID = "-1";
     var orders = "";
     var chkBoxs = document.getElementsByName("chklst");
     var acounterList = document.getElementsByName("acounterID");
     var suppnoList = document.getElementsByName("supp_no");
     var rodia = document.getElementsByName("status");
        var len = chkBoxs.length;
        var cnt = 0;
        for (var i = 0; i < len; i++) {
              if(chkBoxs[i].checked)
              {
              if(rodia[i].value=="0"){
                alert(‘<bean:message key="P040BCI843"/>‘);
                       return false;
              }
                 orders=orders+chkBoxs[i].id+","+objFrm.selYM.value+","+suppnoList[i].value+";";
               
                 if(acounterID =="-1")
                 {
                    acounterID = acounterList[i].value;
                 }else{
                    if(acounterID != acounterList[i].value)
                    {
                       alert(‘<bean:message key="P040BCI837"/>‘);
                       return false;
                    }
                 }
                 cnt++;
               // if(cnt>1)
               //  {
                //    alert(‘<bean:message key="P040BCI828"/>‘);
                //    return false;
                // }
              }
        }
        if(cnt == 0)
        {
             alert(‘<bean:message key="P040BCI829"/>‘);
             return false;
        }
    
      objFrm.action="bpf010901.do";
      objFrm.actionMethodId.value = "runAction";
      objFrm.inparaList.value = orders;
      if(acounterID == "")
      {
         objFrm.saveFlag.value = "0";
      }
      else
      {
         objFrm.saveFlag.value = "1";
      }
      objFrm.screenId.value = "BPF0109-01";
   objFrm.submit();
  }
  function doSelect()
  {
      objFrm = document.forms[0];
      if(objFrm.selYM.value=="")
      {
          alert(‘<bean:message key="P040BCI836"/>‘);
          return false;
      }
     
      objFrm.action="bpf010901.do";
      objFrm.actionMethodId.value = "runAction";
      objFrm.inparaList.value = "";
      objFrm.saveFlag.value = "1";
      
      objFrm.screenId.value = "BPF0109-01";
   objFrm.submit();
  }
  function doSearchInvoice(suborderno) {
       var url="bpf010801.do?actionMethodId=runSearchInvoice&conditionMap(SubOrderNo)="+suborderno;
       window.open(url,‘<bean:message key="P040BCT801"/>‘,"toolbar=no,menubar=no, scrollbars=no, resizable=no,location=no, status=no,top=300,left=100,height=400,width=700");
  
  }
  function doSave(msg)
  {
      choose();
   objFrm = document.forms[0];
      objFrm.actionMethodId.value = "runPageSave";

if(objFrm.inparaList.value == "")
      {
          alert(msg);
          return ;
      }
      
   objFrm.submit();
  }
  function doExport() {
   objFrm = document.forms[0];
      objFrm.actionMethodId.value = "runPageExport";
   objFrm.submit();
  }
  
     function chooseAll(chkBox) {
        
         var chkBoxs = document.getElementsByName("chklst");
         var len = chkBoxs.length;
         for (var i = 0; i < len; i++) {
              chkBoxs[i].checked = chkBox.checked;
         }
        
        }
        function choose()
        {
           var orders = "";
           var chkBoxs = document.getElementsByName("chklst");
           var txt = document.getElementsByName("acceptymd");
           var sel = document.getElementsByName("status");
        var len = chkBoxs.length;
        for (var i = 0; i < len; i++) {
              if(chkBoxs[i].checked)
              {
                 orders=orders+chkBoxs[i].id+","+sel[i].value+","+txt[i].value+";";
              }
        }

objFrm = document.forms[0];
        objFrm.inparaList.value = orders;
        }
     function InvertChoose() {
           var chkBoxs = document.getElementsByName("chklst");
           var len = chkBoxs.length;
            for (var i = 0; i < len; i++) {
             chkBoxs[i].checked = !chkBoxs[i].checked;
          }
         }
     function getInfo() {
    var showDiv = document.getElementByIdx_x("showDiv");
    if(showDiv){
     showDiv.style.height = (document.body.clientHeight - 250) +"px";
    }
    var showDiv1 = document.getElementByIdx_x("showDiv1");
    if(showDiv1){
     showDiv1.style.width = (document.body.clientWidth - 10) +"px";
    }
    
    var table1 = document.getElementByIdx_x("titleTable");
       var table2 = document.getElementByIdx_x("iscTab");
    var trs1 = table1.getElementsByTagName_r("tr");
    var tds1 = trs1[0].getElementsByTagName_r("th");
    var trs2 = table2.getElementsByTagName_r("tr");
    var tds2 = trs2[0].getElementsByTagName_r("td");
    for(var i=0;i<tds2.length-1;i++){
     
     tds1[i].style.width = tds2[i].clientWidth -6 +"px";
       }
    
   }
  getInfo();
 </script> 
</body>
<jsp:include page="/jsp/iscFrameWork/showAllTypeMessage.jsp" flush="true" />
</html>

时间: 2024-10-08 01:57:49

【131031】jsp学习实例 (2013-10-31 15:29:28)的相关文章

jsp学习(Tomcat服务器+myeclipse)

阅读前提:了解Tomcat服务器和Servlet 在web开发中我们可以通过Servlet的Response对象对浏览器输出我们的网页内容 这样虽然可以进行网页输出,但是代码编写极其繁杂,冗余很多,所以jsp就出现了: 先描述一下现象,首先我们可以在myeclipse新建Manager的web project,在WebRoot下会有index.jsp文件: 1 <%@ page language="java" import="java.util.*" page

黑马程序员_JavaSE学习总结第10天_面向对象5

------- android培训.java培训.期待与您交流! ----------  10.01 运动员和教练案例分析 教练和运动员案例:运动员分乒乓球运动员和篮球运动员,教练分乒乓球教练和篮球教练.为了出国交流,跟乒乓球相关的人员都需要学习英语. 分析:   10.02 运动员和教练案例实现 1 //定义一个说英语的接口 2 interface SpeakEnglish 3 { 4 //说英语 5 public abstract void speak(); 6 } 7 8 //定义人的抽象

JavaSE学习总结第10天_面向对象5

10.01 运动员和教练案例分析 教练和运动员案例:运动员分乒乓球运动员和篮球运动员,教练分乒乓球教练和篮球教练.为了出国交流,跟乒乓球相关的人员都需要学习英语. 分析: 10.02 运动员和教练案例实现 1 //定义一个说英语的接口 2 interface SpeakEnglish 3 { 4 //说英语 5 public abstract void speak(); 6 } 7 8 //定义人的抽象类 9 abstract class Person 10 { 11 private Strin

学习响应式设计的15个优秀网页作品

响应式的网站是指它能够适应客户端的屏幕尺寸,自动响应客户端尺寸变化.响应式设计技术用于创建可在任何设备上进行查看,并可以从桌面电脑屏幕无缝切换到智能手机的网站制作技术.下面这篇文章分享的15个国外优秀网页作品可以帮助你更好的学习响应式设计. 您可能感兴趣的相关文章 15款帮助创建响应式布局的优秀前端框架 经典网页设计:无缝过渡的响应式设计案例 让你的网站瞬间变成响应式的3个简单步骤 经典网页设计:响应式设计的国外购物网站 推荐35个新鲜出炉的响应式 Web 设计实例 Christchurch H

八周二次课(1月30日) 10.28 rsync工具介绍 10.29/10.30 rsync常用选项 10.31 rsync通过ssh同步

八周二次课(1月30日)10.28 rsync工具介绍10.29/10.30 rsync常用选项10.31 rsync通过ssh同步===================================================================================================================================================================rsync命令:是一个远程数据同步工具,可

微软企业库5.0学习笔记(10)ASP.NET模块依赖注入

您可以使用HTTP模块,一个到ASP.NET HttpApplicationState类的扩展,在Global.asax编写代码强制ASP.NET在每一个页面请求时自动注入依赖的对象,就像在ASP.NET Web窗体应用程序中讨论的一样. 下列方法显示了一个合适的方法能够获取PreRequestHandlerExecute事件将它自己注入到ASP.NET的执行流水线,在每个页面请求中通过容器的BuildUp方法运行Http模块,并获取OnPageInitComplete事件.当OnPageIni

SpringMVC学习系列(10) 之 异常处理

在项目中如何处理出现的异常,在每个可能出现异常的地方都写代码捕捉异常?这显然是不合理的,当项目越来越大是也是不可维护的.那么如何保证我们处理异常的代码精简且便于维护呢?这就是本篇要讲的内容->异常处理. 在Spring MVC中我们可以通过以下2中途径来对异常进行集中处理: 一.继承HandlerExceptionResolver接口实现自己的处理方法,如: public class MyHandlerExceptionResolver implements HandlerExceptionRe

6月15日至10月15日ACM训练计划

暑期又要开始了,去年荒废了一个暑假,不仅玩得不爽,更重要的是毁了自己的ACM之路,今年并不能像去年那样毫无顾忌的刷题了,毕竟有考研这座大山在这儿,但是为了研一那一点点的希望之火,考研第一,但也要抽出时间ACM,每天我大概11点回寝室,那我就限定自己在回寝室之后每天用一个半小时时间刷题吧,虽然进步会很慢,但是坚持下去总是会有收获的,前些天,在刷一些基础的数据结构,虽然这些算法自己以前都学过,但是在刷一遍,肯定会有不同的收获,特别是从理解的深度和难度上来说,我觉得对自己都是很有好处的. 我的三本AC

Servlet&JSP学习笔记

Servlet&JSP学习笔记 */--> Servlet&JSP学习笔记 Table of Contents 1 Web容器 2 内置对象 2.1 内置对象分类 2.1.1 out 2.1.2 request 2.1.3 application 2.1.4 response 2.1.5 session 2.1.6 其他 3 JavaBean 3.1 JSP动作元素 3.2 javabean的四个作用於范围 4 JSP状态管理 4.1 Cookie 4.2 include 指令与动作