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

📄 win_fact_flow.jsp

📁 一个做得非常好的电子政务系统
💻 JSP
字号:
<%@ page contentType="text/html;charset=gb2312" %>
<%@ page import="java.util.*" %>
<%@ page import="java.sql.*" %>
<%@ page import="com.ijipin.tool.*" %>
<%@ page import="com.ijipin.database.*" %>
<%@ page import="com.ijipin.system.*" %>
<%@ page import="com.ijipin.property.*" %>
<%@ include file="/userinfor.jsp" %>
<%@ include file="/share/page/page_request.jsp"%>
<%@ page import="com.ijipin.flow.*" %>
<%
    ////////////////////////////列表页面所必须有的公共变量
    final String strSkin  = "../../" + userInfor_session.getPFLJ();  //皮肤路径
    final String strLevel = Template.strLevel;  //本页所在的层次
    final String strLink  = Template.strLink_update;    //本页的地址
    final String strLink_action = Template.strLink_action;
    final String strLink_back = Template.strLink_list;
    final int iModuleID= Template.iModuleID;
    //////////////iSecond_barid
    //设置查询参数
    String sTable     = "";
    String sField     = "";
    String sCondition = "";

    int iSpace = Message.SPACE;  //空格的宽度
    String sWidth = Message.WIDTH;  //第一个td的百分比宽度

    //新建一个连接
    DataConn dataConn = new DataConn();
    Statement stmt = null;
    ResultSet rs = null;
    DataList dataList = null;

    //是否可以写,如果为false,必须要取消所有的按牛
    boolean canWrite = true;
    if (strACTION.equals("VIEW")) {
        canWrite = false;
    }

    ////////////////获得事物类别
    SWLB SWLBclass = new SWLB(dataConn);
    String strSWLB = "";
    strSWLB = SWLBclass.getSWLB(iSecond_barid);

    ///
    User user = new User(dataConn);
    Position position = new Position(dataConn);
    Role role = new Role(dataConn);
%>
<html>
<head>
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Cache-Control" CONTENT="no-cache">
<META HTTP-EQUIV="Expires" CONTENT="0">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title><%=Message.COMPANY_NAME%></title>
<link href="<%=strSkin%>css.css" rel="stylesheet" type="text/css">
</head>

<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<%
    //获取本模块信息
    Module module = new Module(dataConn);
    moduleInfor_session = (ModuleInfor)module.getInfor(iModuleID);

    stmt = dataConn.getConnection().createStatement();
    dataList = new DataList(stmt);

    String sMBID = Convert.toZeroStr(request.getParameter("MBID"));
    String current_node = Convert.toZeroStr(request.getParameter("current_node"));
    int iCurrent = Integer.parseInt(current_node);
    boolean canEdit = false; ///////////////当节点值等于iCurrent开始canEdit为true;

    //取得流程模板的信息
    String MBMC = "";
    rs = dataList.getResultSet("LC_MB,LC_SJLC","MBMC","SJMB=MBID AND SJID="+sMBID);
    if (rs.next()) {
        MBMC = Convert.toSpaceStr(rs.getString(1));
    }


    //参数
    NodeInfor nodeInfor = null;
    FactNode nodeClass = new FactNode(dataConn);
    Iterator iterNode = nodeClass.getList("JDMB="+sMBID+ " ORDER BY JDSX ").iterator();

    int id_before = 0; //插入节点时带的参数,以显示节点插入的位置
    int id = 0;
    String name = "";
    String description = "";
    String person = "";
    String personName = "";
    String personDescription = "";
    int iMeetCheck = 0;
    int iJDSX = 0;

    String strZWMC = "";
    String strZWID = "";

%>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr class="toptr2">
    <td>
      <table width="100%" border=0 cellpadding=3 cellspacing=1 >
          <tr>
            <td width="5%"><input type="button" name="btnBack" value="" class="buttonClose" onClick="javaScript:WinClose();"></td>
            <td width="87%">&nbsp;</td>
          </tr>
       </table>
    </td>
  </tr>
</table>
<br>

<table border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td align="center" height="27">
      <p align="left">流程名称:<%=MBMC%>
    </td>
  </tr>

  <tr>
    <td align="center">

      <table width="330" border="1" cellpadding="3" cellspacing="0" bordercolor="#9999CC" >
        <tr class="toptr3">
          <td colspan=2>
            <table width="100%" cellpadding="0" cellspacing="1">
              <tr>
                <td align="center" width="75%" >流程模板定制&nbsp;&nbsp;</td>
              </tr>
            </table>
          </td>
        </tr>
      </table>

      <strong>↓</strong><br>
<%
      //GylcSpPro gylcSpPro = new GylcSpPro();
      while ( iterNode != null && iterNode.hasNext()) {
          nodeInfor = (NodeInfor)iterNode.next();

          id = nodeInfor.getJDID();
          name = nodeInfor.getJDLXMC();
          description = nodeInfor.getJDSM();
          person = nodeInfor.getJDBLRY();
          personDescription = nodeInfor.getJDBLSM();
          iMeetCheck = nodeInfor.getJDHQ();
          iJDSX = nodeInfor.getJDSX();

          personName = "";

          /**获取审批角色与审批职务*/
          String SPJS = null;
          String SPZW = null;
          //SPJS = gylcSpPro.getJsmcByJdid(id);
          //SPZW = gylcSpPro.getZwmcByJdid(id);
          strZWMC = position.getZWMCS(String.valueOf(nodeInfor.getZWID()));
          strZWID = role.getZWIDS(nodeInfor.getJSID(), nodeInfor.getJSBM());
          strZWMC += position.getZWMCS(strZWID);

          //人员
          personName = user.getYGXMS(person) + " " + strZWMC;

          if (nodeInfor.getSJLD() == 1) {
              personName += " 上级领导";
          }

      %>
      <% if (canEdit && canWrite) { %>
      <div id="drag<%=id%>">
      <% } %>
      <table width="330" border="1" cellpadding="3" cellspacing="0" bordercolor="#9393C6">
        <tr class="toptr3">
          <td align="center" width="200"><%=name%>&nbsp;</td>
          <td align="right" width="100">
            <% if (canEdit && canWrite) { %>
            <a href="javascript:winOpen(<%=id%>,'<%=strSWLB%>','<%=iJDSX%>','UPDATE');">修改</a>
            <a href="javaScript:goUrlConfirm('node_control.jsp?ACTION=DELETE&JDID=<%=id%>&MBID=<%=sMBID%>','确定要删除?');">删除&nbsp;</a>
            <% } else {%><font color="red">不可修改</font><%}%>&nbsp;
          </td>
        </tr>
        <tr>
          <td colspan=2><%=description%>&nbsp;</td>
        </tr>
        <tr>
          <td  width="200">
         <font color="#669900">办理人员:</font><%=personName%>
         </td>
          <td  width="100">是否会签:
            <input type="checkbox" value="1" <%if (iMeetCheck==1) {%>checked="1"<%}%> disabled></td>
        </tr>
      </table>
      <% if (canEdit && canWrite) { %>
      </div>
      <% } %>
      <%
          if (!canEdit) {
              if (id == iCurrent) {
                  canEdit = true;
              }
          }
      %>
         <% if (canEdit && canWrite) { %>
         <a href="javascript:winOpen(<%=id%>,'<%=strSWLB%>','<%=iJDSX%>','ADD');"><strong>↓</strong>←增加节点</a>
         <% } else {%><strong>↓</strong><% } %> <br>
      <%
      }
      %>

      <table width="330" border="1" cellpadding="3" cellspacing="0" bordercolor="#9999CC" >
        <tr class="toptr3">
          <td colspan=2>
            <table width="100%" cellpadding="0" cellspacing="1">
              <tr>
                <td align="center" width="75%" >流程模板结束&nbsp;&nbsp;</td>
              </tr>
            </table>
          </td>
        </tr>
      </table>

    </td>
  </tr>
</table>

<br>

<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr class="toptr2">
    <td>
      <table width="100%" border=0 cellpadding=3 cellspacing=1 >
          <tr>
            <td width="5%"><input type="button" name="btnBack" value="" class="buttonClose" onClick="javaScript:WinClose();"></td>
            <td width="87%">&nbsp;</td>
          </tr>
       </table>
    </td>
  </tr>
</table>
<%@ include file="/share/page/page_form.jsp" %>
<!--打开增加节点窗口-->
<SCRIPT LANGUAGE="JavaScript">
    function winOpen(id, swlb, jdsx, ACTION) {
        var MBID = <%=sMBID%>;
    	openWin=window.open('node_update.jsp?JDID=' + id + '&MBID=' + MBID + "&JDSX=" + jdsx + "&ACTION="+ ACTION,'','left=120,top=130,scrollbars=no,resizable=yes,status=no,width=450,height=500');
    }

    ///////////关闭窗口,并且刷新父窗口
    function WinClose() {
        window.opener.document.location.reload();
        window.close();
    }

</SCRIPT>
<!--拖动操作-->
<SCRIPT LANGUAGE="JavaScript">
<!--
    currentX = currentY = 0;
    whichEl = null;
    var activeEl;

    function grabEl() {

        whichEl = event.srcElement;
        while (whichEl.id.indexOf("drag") == -1) {
          whichEl = whichEl.parentElement;
          if (whichEl == null) { return }
        }

        if (whichEl != activeEl && activeEl != null) {
          whichEl.style.zIndex = activeEl.style.zIndex + 1;
          activeEl = whichEl;
        }


        //whichEl.style.pixelLeft = whichEl.offsetLeft;
        //whichEl.style.pixelTop = whichEl.offsetTop;
        //offsetLeft和 offsetTop,它们是相对于它的父元件左上角的垂直和水平距离
        //pixelLeft 和 pixelTop属性体现的是CSS属性left和top的值,它也是相对于文档左上角的距离

        currentX = (event.clientX + document.body.scrollLeft);
        currentY = (event.clientY + document.body.scrollTop);
        //scrollTop文档页面向上滚动后,被文档窗口遮挡部分的尺寸
      }

      function moveEl() {
        if (whichEl == null) { return };
        newX = (event.clientX + document.body.scrollLeft);
        newY = (event.clientY + document.body.scrollTop);
        distanceX = (newX - currentX);
        distanceY = (newY - currentY);
        currentX = newX;
        currentY = newY;

        whichEl.style.pixelLeft += distanceX;
        whichEl.style.pixelTop += distanceY;
        event.returnValue = false;
      }

      function checkEl() {
        if (whichEl!=null) { return false }
      }

      function dropEl() {
        document.body.style.cursor='';
        ///记录放下的id
        var tempEl = null;
        tempEl = event.srcElement;
        if (tempEl == null) {
            return false;
        }
        if (whichEl == null) {
            return false;
        }

        while (tempEl.id.indexOf("drag") == -1) {
            tempEl = tempEl.parentElement;
            if (tempEl == null && whichEl != null) {
                alert("请将节点拖到其他节点的位置");
                return ;
            }
        }
        var firstid = whichEl.id;
        var secondid = tempEl.id;
        if (firstid != secondid) {
            if (confirm("确定更换两节点的顺序?")) {
                document.location.href = "node_control.jsp?ACTION=CHANGE&MBID=<%=sMBID%>&firstid="+firstid+"&secondid="+secondid;
            }
        }
        whichEl = null;
      }

      function cursEl() {
        if (event.srcElement.id.indexOf("t") != -1) {
          event.srcElement.style.cursor = "move"
        }
      }

      document.onmousedown = grabEl;
      document.onmousemove = moveEl;
      document.onmouseup = dropEl;
      document.onmouseover = cursEl;
      document.onselectstart = checkEl;

      activeEl = document.elementName;
//-->
</SCRIPT>
<%
    try {
	if (dataConn != null) {
	    dataConn.close();
	}
    }
    catch(Exception e) {}
%>
</body>

⌨️ 快捷键说明

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