50d3818ee193a4e09e5d3d7ef18458047d6c6608.svn-base 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  1. var g;
  2. var loadParams = {
  3. "listId" : '260',
  4. "condition" : 'IS_DEL=0'
  5. };
  6. function initComplete(){
  7. /**
  8. * 工具条
  9. */
  10. var roleCons = roleButtonArr();
  11. var toolBarOpt1 = {
  12. items : [ { text: '新增' ,click:"onAdd",iconClass: 'add1_tem' },//OK
  13. { text: '删除' ,click:"onDelete",iconClass: 'delete_tem'},
  14. { text: '修改' ,click:"onEdit",iconClass: 'update_tem'},
  15. { text: '查看详情',click:"onView",iconClass: 'view_tem' },
  16. { text: '查看历史版本' ,click:"onViewHistory",iconClass: 'icon_history' },
  17. { text: '导入' , click:"onImport",iconClass: 'import_tem'},
  18. { text: '导出' , click:"exportTotalData",iconClass: 'icon_export'},
  19. { text: '下载' ,click:"onDownLoad",iconClass: 'download_tem' }
  20. ],
  21. roleCons:""
  22. };
  23. /**
  24. * 树形列
  25. */
  26. var grid_option1 = {
  27. columns:[
  28. { name: 'FD_OBJECTID260', hide : true},
  29. { display: '姓名', name: 'EXPERT_NAME_260', align: 'center', width: "10%"},
  30. { display: '所属区域', name: 'EXPERT_AREA_260', align: 'center' , width: "20%"},
  31. { display: '所属单位', name: 'EXPERT_UNIT_260', align: 'center', width: "15%" },
  32. { display: '是否南网员工', name: 'IS_SNSTAFF_260', align: 'center', width: "10%" },
  33. { display: '专业特长', name: 'EXPERT_SPECIALTY_260', align: 'center', width: "10%" },
  34. { display: '手机', name: 'EXPERT_CAL_260', align: 'center' , width: "15%"},
  35. { display: '住址', name: 'EXPERT_ADDRESS_260', align: 'center', width: "20%" }
  36. ],
  37. rownumbers : true,
  38. checkbox : true,
  39. pageSize : 10,
  40. percentWidthMode : true
  41. };
  42. var options1={
  43. url :'/nwyj/ws/crud/CRUDService/queryQui',
  44. params:loadParams,
  45. width:960,
  46. gridOptions:grid_option1,
  47. singleRecodeOptions:{a:"aa"},
  48. paperOpration:{showInput:"true"},
  49. toolBarOptions:toolBarOpt1
  50. };
  51. //
  52. g=gridAndSingleRecode=$("#maingrid").quickgridAndSingleRecode(options1);
  53. /* g = $("#maingrid").quiGrid({
  54. columns:[
  55. { name: 'FD_OBJECTID260', hide : true},
  56. { display: '姓名', name: 'EXPERT_NAME_260', align: 'center', width: "10%"},
  57. { display: '所属区域', name: 'EXPERT_AREA_260', align: 'center' , width: "20%"},
  58. { display: '所属单位', name: 'EXPERT_UNIT_260', align: 'center', width: "15%" },
  59. { display: '是否南网员工', name: 'IS_SNSTAFF_260', align: 'center', width: "10%" },
  60. { display: '专业特长', name: 'EXPERT_SPECIALTY_260', align: 'center', width: "10%" },
  61. { display: '手机', name: 'EXPERT_CAL_260', align: 'center' , width: "15%"},
  62. { display: '住址', name: 'EXPERT_ADDRESS_260', align: 'center', width: "20%" }
  63. ],
  64. url :$.pathname() + '/ws/crud/CRUDService/queryQui',
  65. params : loadParams,
  66. sortName : 'UPDATEDATE_260 ',
  67. sortOrder : 'desc nulls last',
  68. rownumbers:true,
  69. checkbox:true,
  70. height: '100%',
  71. width:"100%",
  72. pageSize: 10,
  73. percentWidthMode:true,
  74. //顶部图标按钮栏
  75. toolbar:{
  76. items:[
  77. {text: '查看详情', click: onView, iconClass: 'icon_view'},
  78. { line : true },
  79. {text: '历史维护记录', click: historyUnit, iconClass: 'icon_history'},
  80. { line : true },
  81. {text: '专家统计信息', click: sumUnit, iconClass: 'icon_poll'},
  82. { line : true }
  83. ]
  84. }
  85. });*/
  86. }
  87. //查询
  88. function searchHandler(){
  89. var name = $('#EXPERT_NAME_260').val();//专家姓名
  90. var condition = " IS_DEL='0' ";
  91. if(name!=""){
  92. condition += " AND EXPERT_NAME LIKE '%" +name+"%'";
  93. }
  94. g.setOptions({//重置加载列表的参数
  95. params : {
  96. "listId" :'260' ,
  97. "condition" : condition
  98. }
  99. });
  100. g.setNewPage(1);
  101. g.loadData();//刷新列表
  102. }
  103. //详情
  104. function onView(){
  105. var rows = g.getSelectedRows();
  106. if(rows.length==0){
  107. top.Dialog.alert("请选择一条记录");
  108. return;
  109. }
  110. if(rows.length>1){
  111. top.Dialog.alert("只能选择一条记录");
  112. return;
  113. }
  114. var fd_id = rows[0].FD_OBJECTID260;
  115. window.location.href="expertinfo.jsp?"+fd_id;
  116. }
  117. function historyUnit(){
  118. top.Dialog.alert("历史维护记录");
  119. }
  120. function sumUnit(){
  121. top.Dialog.alert("专家统计信息");
  122. }