| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164 |
- <%@ page language="java" contentType="text/html;charset=GBK"
- pageEncoding="GBK"%>
- <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
- <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html;charset=GBK">
- <title>流程模版列表</title>
- <link href="${pageContext.request.contextPath }/liger/lib/ligerUI/skins/${sessionScope.css}/css/ligerui-all.css" rel="stylesheet" type="text/css" />
- <script type="text/javascript" src="/shares/js/jquery-1.8.2.js"></script>
- <script type="text/javascript" src="/shares/js/yw/bpm/promptDefine.js"></script>
- <script src="${pageContext.request.contextPath }/liger/lib/ligerUI/js/ligerui.all.js" type="text/javascript"></script>
- <link href="${pageContext.request.contextPath}/main.css" rel="stylesheet" type="text/css" />
- <script type="text/javascript" src="/shares/js/constant.js"></script>
- <script type="text/javascript" src="/shares/js/common.js"></script>
- <script type="text/javascript" src="/shares/js/yw/bpm/oa.js"></script>
- <script type="text/javascript" src="/shares/js/yw/bpm/flow/flowModel.js"></script>
- <script type="text/javascript">
- var grid = null;
- $(function () {
- grid = $("#maingrid4").ligerGrid({
- columns: [
- { display: '模版名称', name: 'modelName', width: 180 },
- { display: '模版备注', name: 'remark', width: 150 },
- { display: '流程类型', name: 'typeId.typeName', width: 130,
- render: function (row){
- var html = row.typeId.typeName;
- return html;
- }},
- { display: '状态', name: 'state.dataName', width: 80,
- render: function (row){
- var html = row.state.dataName;
- return html;
- } },
- { display: '创建时间', name: 'createdate', width: 200 },
- {
- display: '操作', isAllowHide: false, width: 350,
- render: function (row)
- {
- var html = '<a href=\"#\" onclick=\"window.parent.f_addTab(new Date().getTime(), \'修改流程模版\', \'${pageContext.request.contextPath }/FlowModelAction.do?task=toEdit&modelId='
- + row.modelId + '&tabid='+getCurrentTabId()+'\');\">编辑</a> ';
- html += '<a href=\"#\" onclick=\"window.parent.f_addTab(new Date().getTime(), \'查看流程模版\', \'${pageContext.request.contextPath }/FlowModelAction.do?task=info&modelId='
- + row.modelId + '&tabid='+getCurrentTabId()+'\');\">查看</a> ';
-
- if(row.state.value == 1){
- html += '<a href=\"#\" onclick=\"if(confirm(\'确定停用该流程?\')){stop(\''
- + row.modelId + '\');}\">停用</a> ';
- //html += '<a href=\"#\" onclick=\"alert(\'如果需要修改配置,请先停用该流程!\');\">配置</a> ';
- } else {
- html += '<a href=\"#\" onclick=\"if(confirm(\'确定启用该流程?\')){start(\''
- + row.modelId + '\');}\">启用</a> ';
- if(row.isGraph.value == 1){
- html+= '<a href=\"#\" onclick=\"window.parent.f_addTab(new Date().getTime(), \'流程模版配置\', \'${pageContext.request.contextPath }/GraphAction.do?task=toConfig&modelId='
- + row.modelId + '&tabid='+getCurrentTabId()+'\');\">图形化</a> ';
- } else {
- html += '<a href=\"#\" onclick=\"window.parent.f_addTab(new Date().getTime(), \'流程模版配置\', \'${pageContext.request.contextPath }/FlowModelAction.do?task=toConfig&modelId='
- + row.modelId + '&tabid='+getCurrentTabId()+'\');\">配置</a> ';
- }
- html += '<a href=\"#\" onclick=\"if(confirm(\'确定删除该模版?\')){deleteFlowModel('+row.modelId+');}\">删除</a> ';
- }
- var formId = row.formId.formId;
- if(formId == null || formId == ''){
- formId = 0;
- }
- html += '<a href=\"#\" onclick=\"window.parent.f_addTab(new Date().getTime(), \'配置流程表单\', \'${pageContext.request.contextPath }/FlowModelAction.do?task=toConfigFlowForm&modelId='
- + row.modelId + '&formId=' + row.formId.formId + '&tabid='+getCurrentTabId()+'\');\">表单配置</a> ';
-
- html += '<a href=\"#\" onclick=\"window.parent.f_addTab(new Date().getTime(), \'配置路径规则\', \'${pageContext.request.contextPath }/FlowModelAction.do?task=toConfigRule&modelId='
- + row.modelId + '\');\">规则配置</a> ';
- return html;
- }
- }
- ],
- pageSize:20,
- url: 'FlowModelAction.do?task=list&time=' + new Date().getTime(),
- parms: [{name: "modelName", value: ""}, {name: "state", value: ""}, {name: "control", value: "1"}],
- pageParmName: 'p', //页索引参数名,(提交给服务器)
- pagesizeParmName: 'pSize', //页记录数参数名,(提交给服务器)
- width: '99.9%',
- height: '99%',//getParentHeight()-67,
- onError: function(){alert("数据加载失败,请刷新页面!");}
- });
- $("#pageloading").hide();
-
- });
- function searchByKword(){
-
- grid.set("parms", [{name: "modelName", value: encodeURI($("#modelName").val())},
- {name: "state", value: $("#state").val()},
- {name: "control", value: $("#control").val()}]);
- grid.set("newPage", "1");
- grid.loadData(true);
- }
-
- function searchAll() {
- $("#modelName").val("");
- $("#state").val("");
- $("#control").val("1");
- searchByKword();
- }
- </script>
- </head>
- <body>
- <div class="container-layout">
- <div id="title" class="form-button" style="width : 100%;">
- <input type="button" class="l-button" style="width: 100px;" value="创建流程模版" onclick="window.parent.f_addTab(new Date().getTime(), '创建流程模版', '${pageContext.request.contextPath }/FlowModelAction.do?task=toCreate&tabid=' + getCurrentTabId());"/>
- <input onclick="closeTabUseInOA();" type="button" value="关闭" class="l-button">
- </div>
- <div class="default_search" style="margin: 0;width: 100%;">
- <ul class="list_search" style="width:250px;">
- <li class="title">模版名称:</li>
- <li class="text">
- <input type="text" id="modelName" name="modelName" value="" style="width: 130px;">
- </li>
- </ul>
- <ul class="list_search" style="width:250px;">
- <li class="title">状态:</li>
- <li class="text">
- <select name="state" id="state" style="width: 130px;">
- <option value="" >全部</option>
- <c:forEach items="${requestScope.states }" var="state">
- <option value="${state.value }" >${state.dataName }</option>
- </c:forEach>
- </select>
- </li>
- </ul>
- </div>
- <div class="default_search" style="margin: 0; width: 100%;">
- <ul class="list_search" style="width:250px;">
- <li class="title">控制方式:</li>
- <li class="text">
- <select name="control" id="control" style="width: 130px;" >
- <c:forEach items="${requestScope.controls }" var="control" varStatus="status">
- <c:choose>
- <c:when test="${control.value == 1 }">
- <option value="${control.value }" selected="selected">${control.dataName }</option>
- </c:when>
- <c:otherwise>
- <option value="${control.value }" >${control.dataName }</option>
- </c:otherwise>
- </c:choose>
- </c:forEach>
- </select>
- </li>
- </ul>
- <ul>
- <li class="search-button">
- <input type="button" class='l-button' name="search" onclick="searchByKword()" value="查询"/>
- <input type="button" class='l-button' name="search" onclick="searchAll()" value="查询全部"/>
- </li>
- </ul>
- </div><div style="clear: both;">
- <div id="maingrid4" style="margin:0; padding:0"></div>
- </div>
- <div style="display:none;">
- <!-- g data total ttt -->
- </div>
- </div>
- <%@ include file="/include/message.jsp"%>
- </body>
- </html>
|