listFormula.jsp 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. <%@ page language="java" contentType="text/html;charset=GBK"
  2. pageEncoding="GBK"%>
  3. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  4. <html>
  5. <head>
  6. <meta http-equiv="Content-Type" content="text/html;charset=GBK">
  7. <title>动作列表</title>
  8. <link href="${pageContext.request.contextPath }/liger/lib/ligerUI/skins/${sessionScope.css}/css/ligerui-all.css" rel="stylesheet" type="text/css" />
  9. <script src="${pageContext.request.contextPath }/liger/lib/jquery/jquery-1.3.2.min.js" type="text/javascript"></script>
  10. <script src="${pageContext.request.contextPath }/liger/lib/ligerUI/js/ligerui.all.js" type="text/javascript"></script>
  11. <link href="${pageContext.request.contextPath}/main.css" rel="stylesheet" type="text/css" />
  12. <script type="text/javascript" src="/shares/js/constant.js"></script>
  13. <script type="text/javascript" src="/shares/js/yw/bpm/oa.js"></script>
  14. <script type="text/javascript" src="/shares/js/yw/bpm/form/formSerial.js"></script>
  15. <script type="text/javascript" src="/shares/js/common.js"></script>
  16. <script type="text/javascript" src="/shares/js/yw/bpm/promptDefine.js"></script>
  17. <script type="text/javascript">
  18. var grid = null;
  19. $(function () {
  20. grid = $("#maingrid4").ligerGrid({
  21. columns: [
  22. { display: '动作名称', name: 'formulaName', width: 120 },
  23. { display: '动作表达式', name: 'formulaText', width: 200 },
  24. { display: '备注', name: 'remark', width: 150 },
  25. { display: '动作类型', name: 'type.dataName', width: 150,render: function (row){
  26. var html = row.type.dataName;
  27. return html;
  28. } },
  29. {
  30. display: '操作', isAllowHide: false,
  31. render: function (row)
  32. {
  33. var html = '<a href=\"#\" onclick=\"window.parent.parent.f_addTab(new Date().getTime(), \'修改动作\', \'${pageContext.request.contextPath }/FormFormulaAction.do?task=toEdit&formulaId='
  34. + row.formulaId + '&formId=' + row.formId + '&tabid='+getCurrentTabId()+'\');\">编辑</a>&nbsp;';
  35. html += '<a href=\"#\" onclick=\"window.parent.parent.f_addTab(new Date().getTime(), \'查看动作\', \'${pageContext.request.contextPath }/FormFormulaAction.do?task=info&formulaId='
  36. + row.formulaId + '&formId=' + row.formId + '&tabid='+getCurrentTabId()+'\');\">查看</a>&nbsp;';
  37. html += '<a href=\"#\" onclick=\"if(confirm(\'确定删除该动作?\')){deleteFormula('+row.formulaId+','+row.formId+');}\">删除</a>';
  38. return html;
  39. }
  40. }
  41. ],
  42. pageSize:20,
  43. url: 'FormFormulaAction.do?task=listFormula&time=' + new Date().getTime()+'&formId=${requestScope.formId}',
  44. parms: [{name: "formulaName", value: ""}],
  45. pageParmName: 'p', //页索引参数名,(提交给服务器)
  46. pagesizeParmName: 'pSize', //页记录数参数名,(提交给服务器)
  47. width: '99.9%',
  48. height: '99%',//getParentHeight()-67,
  49. onError: function(){alert("数据加载失败,请刷新页面!");}
  50. });
  51. $("#pageloading").hide();
  52. });
  53. function searchByKword(){
  54. grid.set("parms", [{name: "formulaName", value: encodeURI($("#formulaName").val())}]);
  55. grid.set("newPage", "1");
  56. grid.loadData(true);
  57. }
  58. function searchAll() {
  59. $("#formulaName").val("");
  60. searchByKword();
  61. }
  62. function deleteFormula(formulaId,formId){
  63. operate("FormFormulaAction.do", {"task": "delete", "formulaId": formulaId, "formId": formId});
  64. }
  65. </script>
  66. </head>
  67. <body>
  68. <div class="container-layout">
  69. <div id="title" class="form-button" style="width: 100%;">
  70. <input type="button" class="l-button" style="width: 100px;" value="创建动作" onclick="window.parent.parent.f_addTab(new Date().getTime(), '创建动作', '${pageContext.request.contextPath }/FormFormulaAction.do?task=toCreate&formId=${requestScope.formId}&tabid=' + getCurrentTabId());"/>
  71. </div>
  72. <div class="default_search" style="margin: 0; width: 100%;">
  73. <ul class="list_search">
  74. <li class="title" style="width: 90px;">动作名称:</li>
  75. <li class="text">
  76. <input type="text" id="formulaName" name="formulaName" value="">
  77. </li>
  78. </ul>
  79. <ul>
  80. <li class="search-button">
  81. <input type="button" class='l-button' name="search" onclick="searchByKword()" value="查询"/>
  82. <input type="button" class='l-button' name="search" onclick="searchAll()" value="查询全部"/>
  83. </li>
  84. </ul>
  85. </div><div style="clear: both;">
  86. <div id="maingrid4" style="margin:0; padding:0"></div>
  87. </div>
  88. <div style="display:none;">
  89. <!-- g data total ttt -->
  90. </div>
  91. </div>
  92. <%@ include file="/include/message.jsp"%>
  93. </body>
  94. </html>