addCandidateGroup.jsp 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. <%@ page language="java" contentType="text/html; charset=UTF-8"
  2. pageEncoding="UTF-8"%>
  3. <script type="text/javascript">
  4. <!--
  5. $(function(){
  6. _task_candidate_unselected_group_panel_obj=$('#_task_candidate_unselected_group_panel').panel({
  7. //height:600,
  8. border:false,
  9. noheader:true,
  10. top:0,
  11. left:0
  12. });
  13. _task_candidate_unselected_group_grid=$('#_task_candidate_unselected_group_table').datagrid({
  14. title:"用户组",
  15. url:'${ctx}/wf/procdef/procdef!searchCandidateGroup.action',
  16. //singleSelect:true,
  17. idField:'groupId',
  18. height:400,
  19. pagination:true,
  20. pageSize:15,
  21. pageNumber:1,
  22. pageList:[10,15],
  23. rownumbers:true,
  24. sortName:'name',
  25. sortOrder:'asc',
  26. striped:true,
  27. onLoadSuccess:function(data){
  28. var rows = data.rows;
  29. for(var i=0;i<rows.length;i++){
  30. if(task.getCandidateGroup(rows[i].name)!=null){
  31. $(this).datagrid('selectRow',i);
  32. }
  33. }
  34. },
  35. toolbar:[{
  36. text:"保存",
  37. iconCls:'icon-save',
  38. handler:function(){
  39. addCandidateGroups();
  40. }
  41. }]
  42. });
  43. });
  44. function searchTaskCandidateUnselectedGroup(){
  45. var name=document.getElementById("filter_LIKES_name").value;
  46. _task_candidate_unselected_group_grid.datagrid('reload',{
  47. filter_LIKES_name:name
  48. });
  49. }
  50. function addCandidateGroups(){
  51. var rows = _task_candidate_unselected_group_grid.datagrid("getSelections");
  52. for(var i=0;i<rows.length;i++){
  53. var group = rows[i];
  54. task.addCandidateGroup(group.name);
  55. }
  56. loadTaskCandidateGroups();
  57. _task_candidate_win.window('close');
  58. }
  59. //-->
  60. </script>
  61. <div id="_task_candidate_unselected_group_panel" style="padding:5px;">
  62. <div>
  63. <table border="0">
  64. <tr>
  65. <td>名称:</td>
  66. <td><input type="text" name="filter_LIKES_name" value="" size="9"/></td>
  67. <td><a href="#" class="easyui-linkbutton" iconCls="icon-search" onclick="searchTaskCandidateUnselectedGroup();">查询</a></td>
  68. </tr>
  69. </table>
  70. </div>
  71. <div>
  72. <table id="_task_candidate_unselected_group_table">
  73. <thead>
  74. <tr>
  75. <th field="groupId" align="middle" checkbox="true"></th>
  76. <th field="name" width="100" align="middle" sortable="true">名称</th>
  77. <th field="remark" width="300" align="middle">备注</th>
  78. </tr>
  79. </thead>
  80. </table>
  81. </div>
  82. </div>