00a212f58f22e165807695077b0d951c072b9347.svn-base 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  1. var g;
  2. //列表加载参数
  3. var loadParams = {
  4. "listId" : '261',
  5. "condition" : 'IS_DEL=0'
  6. };
  7. function initComplete(){
  8. g = $("#maingrid").quiGrid({
  9. columns: [
  10. { name: 'FD_OBJECTID261', hide : true},
  11. { display: '队伍名称', name: 'TEAM_NAME_261', align: 'center', width: "10%",
  12. render : function(rowdata, value) {
  13. return '<a href="javascript:void(0)" '
  14. + 'onclick=jumpPage("'
  15. + rowdata.FD_OBJECTID261
  16. +'")>'+ rowdata.TEAM_NAME_261 +'</a>';
  17. }
  18. },
  19. { display: '所属单位', name: 'SUB_UNIT_261', align: 'center', width: "20%" },
  20. { display: '队伍类型', name: 'TEAM_TYPE_261', align: 'center', width: "10%" },
  21. { display: '驻扎地点', name: 'INFLUENCE_261', align: 'center', width: "20%" },
  22. { display: '队长', name: 'CAPTAIN_261', align: 'center', width: "10%"},
  23. { display: '联系手机', name: 'TEAM_PHONE_261', align: 'center', width: "10%" },
  24. { display: '可用人数', name: '', align: 'center', width: "10%"},
  25. { display: '总人数', name: 'TEAM_NUMBER_261', align: 'center', width: "10%" }
  26. ],
  27. url :$.pathname() + '/ws/crud/CRUDService/queryQui',
  28. params : loadParams,
  29. sortName : 'UPDATEDATE_261 ',
  30. sortOrder : 'desc nulls last',
  31. rownumbers:true,
  32. checkbox:true,
  33. height: '100%',
  34. width:"100%",
  35. pageSize: 10,
  36. percentWidthMode:true,
  37. //顶部图标按钮栏
  38. toolbar:{
  39. items:[
  40. {text: '详情', click: onView, iconClass: 'icon_view'},
  41. { line : true },
  42. {text: '下载', click: downLoad, iconClass: 'icon_btn_down2'},
  43. { line : true },
  44. {text: '导出', click: exportTotalData, iconClass: 'icon_export'},
  45. { line : true },
  46. {text: '历史维护', click: historyUnit, iconClass: 'icon_history'},
  47. { line : true },
  48. {text: '综合汇总', click: sumUnit, iconClass: 'icon_poll'},
  49. { line : true },
  50. {text: '值班表', click: rotaUnit, iconClass: 'icon_list'},
  51. { line : true }
  52. ]
  53. }
  54. });
  55. }
  56. //查询
  57. function searchHandler(){
  58. var name = $('#TEAM_NAME_261').val();//队伍名称
  59. var condition = " IS_DEL='0' ";
  60. if(name!=""){
  61. condition += " AND TEAM_NAME LIKE '%" +name+"%'";
  62. }
  63. g.setOptions({//重置加载列表的参数
  64. params : {
  65. "listId" :'261' ,
  66. "condition" : condition
  67. }
  68. });
  69. g.setNewPage(1);
  70. g.loadData();//刷新列表
  71. }
  72. //详情
  73. function onView(){
  74. var rows = g.getSelectedRows();
  75. if(rows.length==0){
  76. top.Dialog.alert("请选择一条记录");
  77. return;
  78. }
  79. if(rows.length>1){
  80. top.Dialog.alert("只能选择一条记录");
  81. return;
  82. }
  83. var fd_id = rows[0].FD_OBJECTID261;
  84. window.location.href="teaminfo.jsp?"+fd_id;
  85. }
  86. //下载
  87. function downLoad(){
  88. }
  89. //导出
  90. function exportTotalData(){
  91. var name = $('#TEAM_NAME_261').val();//队伍名称
  92. var condition = " IS_DEL='0' ";
  93. if(name!=""){
  94. condition += " AND TEAM_NAME LIKE '%" +name+"%'";
  95. }
  96. var sql = {
  97. "listId" :'261' ,
  98. "condition" : condition
  99. };
  100. excelExport(261,sql,"应急队伍信息",['IS_DEL','UPDATEDATE','FD_OBJECTID']);
  101. }
  102. //跳转到对人人员信息页面
  103. function jumpPage(teamid){
  104. window.location.href="teamer-query.jsp?"+teamid;
  105. }
  106. function historyUnit(){
  107. }
  108. function sumUnit(){
  109. }
  110. function rotaUnit(){
  111. }
  112. $.messager=top.Dialog;