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

📄 hadapprovebychannel.jsp

📁 OBPM是一个开源
💻 JSP
字号:
<%@ page contentType="text/html; charset=gb2312" %>
<%@ page import="com.cyberway.cms.util.CMSCommonUtil"%>
<%@ page import="com.cyberway.utility.CommonUtil,com.cyberway.billflow.engine.FlowState"%>
<%@ page import="com.cyberway.cms.site.web.SiteForm"%>
<%@ page import="com.cyberway.dynaform.document.ejb.Document"%>
<%@ page import="com.cyberway.dynaform.form.ejb.FormField"%>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-html" prefix="html" %>
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
<%@ taglib uri="/smartweb" prefix="s" %>
<%
String contextPath = request.getContextPath();

long channelid = Long.parseLong(request.getParameter("channelid"));
long defipk = CMSCommonUtil.getFlowidByChannel(channelid);
String formname = CMSCommonUtil.getFormtemplateByChannel(channelid);
String channelPathName = CMSCommonUtil.getChannelPathName(channelid);
long siteid=CMSCommonUtil.getSiteidByChannel(channelid);
String httpport=CMSCommonUtil.getSiteHttpAndPort(siteid);
String summarytmpl = (String)request.getAttribute("SUMMARYTMPL");

formname = (formname!=null&&formname.length()>0)?formname.trim():"";
summarytmpl = (summarytmpl!=null&&summarytmpl.length()>0)?summarytmpl.trim():"";
%>
<html:html>
<head>
<title> <s:Language key="list"/>  </title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="<%= contextPath %>/css/css.jsp" type="text/css">
<script src="<%= contextPath %>/js/billlist.js"></script>
<script src="<%= contextPath %>/js/util.js"></script>
<script src="<%= contextPath %>/js/category.js"></script>
<script language="JavaScript">
var contextPath = '<%= contextPath %>';
var channelid = '<%= channelid %>';
var formname = '<%= formname %>';
var defipk = '<%= defipk %>';
var summarytmpl = '<%= summarytmpl %>'
var pathname='<%= channelPathName %>'
var httpport='<%= httpport %>'

cmdNew = '/dynaform/document/newchn.do';
cmdDelete = '/dynaform/document/delete.do?channelid='+channelid;
cmdPreview = '/dynaform/document/explore.do';

function ev_new() {
  if(channelid==''){
	  alert('<s:Language key="doc_no_module"/>!');
	  return;
  }
  if(formname==''){
	  alert('<s:Language key="module_no_contenttemplate"/>!');
	  return;
  }
  if(defipk==''){
	  alert('<s:Language key="module_no_flow"/>!');
	  return;
  }
  cmdNew = addParam(cmdNew, 'defipk', defipk);
  cmdNew = addParam(cmdNew, 'formname', formname);
  cmdNew = addParam(cmdNew, 'channelid', channelid);

  doNew();
  return true;
}
function ev_check() {
  return true;
}

function ev_resetForm() {
  <c:forEach var="field" items="${requestScope.FIELDLIST}">
    <c:if test="${field.fieldtype eq 'VALUE_TYPE_VARCHAR'}" >
	  if(formList.sm_<c:out value='${field.name}'/>!=null);
        formList.sm_<c:out value='${field.name}'/>.value="";
    </c:if>
    <c:if test="${field.fieldtype eq 'VALUE_TYPE_DATE'}" >
	  if(formList.s_<c:out value='${field.name}'/>!=null);
        formList.s_<c:out value='${field.name}'/>.value="";
    </c:if>
    <c:if test="${field.fieldtype eq 'VALUE_TYPE_NUMBER'}" >
	  if(formList.i_<c:out value='${field.name}'/>!=null);
        formList.i_<c:out value='${field.name}'/>.value="";
    </c:if>
  </c:forEach>
  resetForm();
}
function ev_preview(){
  if(summarytmpl==''){
	  alert('<s:Language key="module_no_listtemplate"/>!');
	  return;
  }
  //cmdPreview = contextPath + addParam(cmdPreview, 'formname', summarytmpl);
  cmdPreview = "http://"+httpport+"/$preview$/"+pathname;
  alert(cmdPreview);
  window.open(cmdPreview);

}
</script>
</head>
<body>
<html:form styleId="formList" method="post" action="/dynaform/document/hadApproveByChannel.do">
<html:hidden property="n_channelid"/>
<html:hidden property="sm_$channelids"/>
<html:hidden property="_orderby"/>
<html:hidden property="_desc"/>
<html:hidden property="_currpage"/>
<html:hidden property="_pagelines"/>
<input type="hidden" name="_caption" value="<c:out value='${requestScope.CAPTION}' />">
<input type="hidden" name="_rowcount" value="<c:out value='${requestScope.LIST.rowCount}' />">
<input type="hidden" name="channelid" value="<%= channelid %>">
<input type="hidden" name="_channelid" value="<%= channelid %>">
<input type="hidden" name="style" value="12">
<table class="list-table" border="0" cellpadding="4" cellspacing="0">
  <tr height="45">
  	<td class="list-toolbar"  width="300"><span class="function-list"><font class="titleicon">4</font><c:out value='${requestScope.CAPTION}' /></span></td>
    <td class="list-toolbar" align="right" valign="middle"> 
	  <c:if test="${requestScope.TONEWDOCUMENT eq 'TRUE'}">
	      <input type="button" name="btnNew" value="<s:Language key="new"/>" class="bt-add" onClick="ev_new()">&nbsp;&nbsp;
	  </c:if>
      <!-- <input type="button" name="btnDelete" value="<s:Language key="delete"/>" class="bt-del" onClick="doDelete()">     -->
    </td>
  </tr>
  <tr>
    <td colspan="2" class="list-srchbar">
       <c:forEach var="field" items="${requestScope.FIELDLIST}">
	   <c:out value='${field.name}'/>:
	    <%
		  FormField formfield = (FormField) pageContext.getAttribute("field");
		  String fieldname = formfield.getName();
		  String sm_value = request.getParameter("sm_" + fieldname);
		  String s_value = request.getParameter("s_" + fieldname);
		  String i_value = request.getParameter("i_" + fieldname);
		  sm_value = (sm_value!=null)? sm_value :  "";
		  s_value = (s_value!=null)? s_value :  "";
		  i_value = (i_value!=null)? i_value :  "";

		%>
	   <c:if test="${field.fieldtype eq 'VALUE_TYPE_VARCHAR'}" >
		<input type="text" name="sm_<c:out value='${field.name}'/>" value="<%=sm_value%>" size="10">
       </c:if>
       <c:if test="${field.fieldtype eq 'VALUE_TYPE_DATE'}" >
		<input type="text" name="s_<c:out value='${field.name}'/>"  value="<%=s_value%>" size="10">
       </c:if>
       <c:if test="${field.fieldtype eq 'VALUE_TYPE_NUMBER'}" >
		<input type="text" name="i_<c:out value='${field.name}'/>"  value="<%=i_value%>" size="10">
       </c:if>
		&nbsp;
       </c:forEach>
      <html:submit value="<s:Language key="query"/>" styleClass="bt" onclick="resetPage()"/>&nbsp;
     <input type="button" name="btnReset" value="<s:Language key="reset"/>" class="bt" onclick="ev_resetForm()">&nbsp;
    </td>
  </tr>
  <tr>
    <td colspan="2" class="list-datas"> <table class="list-datas-table" border="0" cellpadding="0" cellspacing="1">
        <tr class="row-hd">
          <c:forEach var="field" items="${requestScope.FIELDLIST}">
		    <%
				FormField formfield = (FormField) pageContext.getAttribute("field");
				String fieldname = formfield.getName();
				String fieldtype = formfield.getFieldtype();
	  			String ordertag = fieldtype + "@" + fieldname;
			%>
		  <td width="100px" nowrap><a href="javascript:doOrderby('<c:out value='${field.fieldtype}'/>@<c:out value='${field.name}'/>')"><font  class="list-title-font"><c:out value="${field.name}"/></font></a><s:OrderImg form="ParamsTableWrapForm" field="<%=ordertag%>"/></td>
          </c:forEach>
          <td><font  class="list-title-font"><s:Language key="state"/></font></td>
          <td><font  class="list-title-font"><s:Language key="currprocessor"/></font></td>
          <td align="center" nowrap><font  class="list-title-font"><s:Language key="flowlog"/>||<s:Language key="view_flow"/></font></td>
          </tr>
        <c:forEach var="item" items="${requestScope.LIST.datas}">
        <c:url value="/dynaform/document/view.do" var="urlView">
          <c:param name="ISEDIT" value="TRUE"/>
          <c:param name="id" value="${item.id}"/>
          <c:param name="formname" value="${item.formname}"/>
        </c:url>
    <%
      Document documentVO = (Document) pageContext.getAttribute("item");
    %>
        <tr class="row-content" height="25"  onmouseover="this.className='row-content-mouse'" onmouseout="this.className='row-content'">
          <!-- <td><input type="checkbox" name="_selectitem" value="<c:out value='${item.id}' />" onclick="checkOne(this);"></td> -->
		  <!--list all the field value in documents -->
          <c:forEach var="field" items="${requestScope.FIELDLIST}" varStatus="status">
		  <%
			String fieldvalue = "";
			
			FormField formfield = (FormField) pageContext.getAttribute("field");
			String fieldname = formfield.getName();

			if(documentVO!=null&&fieldname!=null&&fieldname.length()>0)
			  fieldvalue = documentVO.getItemValueAsString(fieldname);
		   %>
          <td>
            <c:if test="${status.count eq '1'}">
            <a href="javascript:doView('<c:out value="${urlView}"/>')">
            </c:if>
            <%=fieldvalue%>
		    <c:if test="${status.count eq '1'}">
		    </a>
			</c:if>
          </td>
          </c:forEach>
          <td><%=FlowState.getName(documentVO.getState())%></td>
          <td><%=documentVO.get_writenames()%></td>
          <td align="center"><a href="<%= contextPath %>/billflow/bill/flowlog.jsp?id=<c:out value="${item.id}"/>" target="_blank"><s:Language key="flowlog"/></a>|<a href="<%= contextPath %>/billflow/docflow/viewByDoc.do?docid=<c:out value="${item.id}"/>" target="_blank"><s:Language key="view_flow"/></a></td>
		 </tr>
        </c:forEach> </table></td>
  </tr>
   <tr>
      <td height="25" colspan="2" bgcolor="#FFFFFF" align="right"><s:PageNav dpName="LIST"/></td>
   </tr>
</table>
<s:KeepCondition form="formList"/>
</html:form>
</body>
</html:html>

⌨️ 快捷键说明

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