visual_query.jsp
上传用户:jhtang88
上传日期:2014-01-27
资源大小:28528k
文件大小:5k
源码类别:

Jsp/Servlet

开发平台:

Java

  1. <%@ page contentType="text/html; charset=utf-8" %>
  2. <%@ page import="cn.js.fan.util.*"%>
  3. <%@ page import="java.util.*"%>
  4. <%@ page import="cn.js.fan.web.*"%>
  5. <%@ page import="com.redmoon.oa.visual.*"%>
  6. <%@ page import="com.redmoon.oa.flow.*"%>
  7. <link href="common.css" rel="stylesheet" type="text/css">
  8. <jsp:useBean id="privilege" scope="page" class="com.redmoon.oa.pvg.Privilege"/>
  9. <%
  10. String priv="read";
  11. if (!privilege.isUserPrivValid(request,priv))
  12. {
  13. // out.println(cn.js.fan.web.SkinUtil.makeErrMsg(request, cn.js.fan.web.SkinUtil.LoadString(request, "pvg_invalid")));
  14. // return;
  15. }
  16. String myname = privilege.getUser( request );
  17. String op = ParamUtil.get(request, "op");
  18. String action = ParamUtil.get(request, "action"); // 用于有sales管理权限的人员管理时
  19. String formCode = ParamUtil.get(request, "formCode");
  20. if (formCode.equals("")) {
  21. out.print(SkinUtil.makeErrMsg(request, "编码不能为空!"));
  22. return;
  23. }
  24. FormMgr fm = new FormMgr();
  25. FormDb fd = fm.getFormDb(formCode);
  26. %>
  27. <title>智能设计-查询</title>
  28. <script src="<%=Global.getRootPath()%>/inc/flow_dispose_js.jsp"></script>
  29. <script>
  30. function setradio(myitem,v)
  31. {
  32.      var radioboxs = document.all.item(myitem);
  33.      if (radioboxs!=null)
  34.      {
  35.        for (i=0; i<radioboxs.length; i++)
  36.           {
  37.             if (radioboxs[i].type=="radio")
  38.               {
  39.                  if (radioboxs[i].value==v)
  40.   radioboxs[i].checked = true;
  41.               }
  42.           }
  43.      }
  44. }
  45. </script>
  46. <br />
  47. <table width="98%"  border="0" align="center" cellpadding="0" cellspacing="0" class="main">
  48.   <tr>
  49.     <td align="left" class="right-title">&nbsp;<%=fd.getName()%></td>
  50.   </tr>
  51.   <tr>
  52.     <td><br />
  53.       <table cellspacing="1" width="98%" align="center" border="0">
  54.   <%
  55.   com.redmoon.oa.visual.Config cfg = new com.redmoon.oa.visual.Config();
  56.   String listViewPage = Global.getRootPath() + "/" + cfg.getView(formCode, "list");
  57.   %>
  58.         <form action="<%=listViewPage%>?op=search" method="post" name="form2" id="form2">
  59.           <tr>
  60.             <td colspan="3" nowrap="nowrap"><table width="100%" border="0" cellspacing="0" cellpadding="0">
  61.                 <tr>
  62.                   <td colspan="3"><b>表单数据信息(表单名称:<%=fd.getName()%>)</b> </td>
  63.                 </tr>
  64.                 <%
  65. Iterator ir = fd.getFields().iterator();
  66. while (ir.hasNext()) {
  67. FormField ff = (FormField)ir.next();
  68. %>
  69.                 <tr>
  70.                   <td width="29%"><%=ff.getTitle()%>:</td>
  71.                   <td width="19%" nowrap="nowrap"><%if (ff.getType().equals(ff.TYPE_DATE) || ff.getType().equals(ff.TYPE_DATE_TIME)) {%>
  72.                     从
  73.                     <input size="10" name="<%=ff.getName()%>FromDate" />
  74.                     <img style="CURSOR: hand" onclick="SelectDate('<%=ff.getName()%>FromDate', 'yyyy-MM-dd')" src="<%=Global.getRootPath()%>/images/form/calendar.gif" align="absmiddle" border="0" width="26" height="26" />
  75.                 <%}else{%>
  76.                 <select name="<%=ff.getName()%>_cond">
  77.                   <option value="1">等于</option>
  78.                   <%if (ff.getType().equals(ff.TYPE_TEXTFIELD) || ff.getType().equals(ff.TYPE_TEXTAREA) || ff.getType().equals(ff.TYPE_MACRO) || ff.getType().equals(ff.TYPE_SELECT)) {%>
  79.                   <option value="0" selected="selected">包含</option>
  80.                   <%}%>
  81.                 </select>
  82.                 <%}%>                  </td>
  83.                   <td width="52%"><%if (ff.getType().equals(ff.TYPE_DATE) || ff.getType().equals(ff.TYPE_DATE_TIME)) {%>
  84.                     至
  85.                     <input size="10" name="<%=ff.getName()%>ToDate" />
  86.                     <img style="CURSOR: hand" onclick="SelectDate('<%=ff.getName()%>ToDate', 'yyyy-MM-dd')" src="<%=Global.getRootPath()%>/images/form/calendar.gif" align="absmiddle" border="0" width="26" height="26" />
  87.                 <%}else{%>
  88.                 <input name="<%=ff.getName()%>" />
  89.                 <%}%>
  90.                     (<%=ff.getTypeDesc()%>) </td>
  91.                 </tr>
  92.                 <%}%>
  93.             </table></td>
  94.           </tr>
  95.           <tr align="middle">
  96.             <td height="35" colspan="3" align="center" nowrap="nowrap"><input name="submit" type="submit" class="BigButton"  value="查  询" />
  97.             &nbsp;&nbsp;&nbsp;
  98.             <input type="hidden" name="action" value="<%=action%>" />            &nbsp;</td>
  99.           </tr>
  100.           <tr>
  101.             <td width="684"></tbody></td>
  102.           </tr>
  103.         </form>
  104.     </table></td>
  105.   </tr>
  106. </table>