listRoom.jsp 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210
  1. <%@ page language="java" contentType="text/html;charset=GBK" pageEncoding="GBK"%>
  2. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  3. <html>
  4. <head>
  5. <meta http-equiv="Content-Type" content="text/html;charset=GBK">
  6. <title>会议室管理</title>
  7. <link href="/shares/css/yw/master1/reset.css" rel="stylesheet" type="text/css" />
  8. <script src="${pageContext.request.contextPath }/liger/lib/jquery/jquery-1.3.2.min.js" type="text/javascript"></script>
  9. <script type="text/javascript" src="/shares/js/common.js"></script>
  10. <script type="text/javascript" src="/shares/js/constant.js"></script>
  11. <script type="text/javascript" src="/shares/js/yw/master1/page.js"></script>
  12. <script type="text/javascript" src="/shares/js/yw/master1/common.js"></script>
  13. <script src="${pageContext.request.contextPath}/liger/lib/ligerUI/js/ligerui.all.js" type="text/javascript"></script>
  14. <script type="text/javascript" src="/shares/js/yw/master1/searchBox.js"></script>
  15. <script type="text/javascript">
  16. $(function () {
  17. searchByKword();
  18. });
  19. function search(s){
  20. var p = $("#p").val();
  21. var pSize = getPize();
  22. var param={"p":p,"pSize":pSize};
  23. sendAsyncAjax(param, "MTMeetingRoomAction.do?task=list"+s, "json", function(data) {
  24. var num = data.Total;
  25. page(num,pSize,p);
  26. var datas = data.Rows;
  27. var item_name = $('#contentDiv');
  28. $(item_name).empty();//初始化table,清空table
  29. var html = '';
  30. if(datas.length == 0){
  31. html = notquery();
  32. }else{
  33. var j=0;
  34. for (var i = 0; i < datas.length; i++){
  35. var arr = datas[i];
  36. var bdiv = 1;
  37. bdiv = 1 + j;
  38. if (j < 7) {j++} else {j = 0;};
  39. html += '<div class="tr_cont_new mar4 f5_new">';
  40. html+= '<a href="#" onclick="viewMeetingRoom('+arr["meeting_room_id"]+')">';
  41. html += '<div class="wdrw_tiao_new bn'+bdiv+' fl"></div>';
  42. html += '<div class="tr_rw_d_new fl">';
  43. var s = arr.meeting_room_create_date;
  44. var date = s.substr(0,10);
  45. html+= '<p><img src="/shares/images/master1/rw_ico_menu.png" width="17" height="15" />';
  46. html+= '【'+arr.desc+'】'+arr.name+'&nbsp;&nbsp;'+date+'</p>';
  47. html+= '<p class="mar5">'+arr.meeting_room_name+'</p>';
  48. html+= '</div>';
  49. html+= '</a>';
  50. html+= '<div class="tr_rw_btn_new fr">';
  51. html+= '<div class="div_btn"><input type="button" class="btn_c" value="删 除" onclick="delMeetingRoom('+arr["meeting_room_id"]+')"/></div>';
  52. html+= '<div class="div_btn"><input type="button" class="btn_c" value="编 辑" onclick="editMeetingRoom('+arr["meeting_room_id"]+')" /></div>';
  53. html+= '</div>';
  54. html+= '</div>';
  55. }
  56. }
  57. $(item_name).html(html);
  58. });
  59. }
  60. var dialog = "";
  61. //新增
  62. function addMeetingRoom(id){
  63. dialog = $.ligerDialog.open({ height: 420,width:550,title:"新增新闻",url: 'mtNews.do?task=toAddNews'});
  64. }
  65. //编辑
  66. function editMeetingRoom(id){
  67. item('MTMeetingRoomAction.do?task=toEdit&meeting_room_id='+id+'');
  68. //openMsg("编辑新闻","${pageContext.request.contextPath }/mtNews.do?task=toEdit&news_id="+id+"&tabid="+ getCurrentTabId()+"","400","500");
  69. //dialog = $.ligerDialog.open({ height: 420,width:550,title:"编辑新闻",url: 'mtNews.do?task=toEdit&news_id='+id+''});
  70. }
  71. //查看
  72. function viewMeetingRoom(id){
  73. item('MTMeetingRoomAction.do?task=info&meeting_room_id='+id+'');
  74. //dialog = $.ligerDialog.open({ height: 500,width:650,title:"新闻查看",url: 'mtNews.do?task=info&news_id='+id+''});
  75. }
  76. //删除
  77. function delMeetingRoom(id){
  78. if (confirm("确定要删除吗?")){
  79. $.ajax({
  80. type : "POST",
  81. url:'MTMeetingRoomAction.do?task=dels',
  82. data : {"meeting_room_id":id},
  83. timeout : 10000,
  84. cache : false,
  85. dataType : "json",
  86. success: function (data) {
  87. var success = data.success;
  88. if (success != undefined) {
  89. item('MTMeetingRoomAction.do?task=succeedSkip2');
  90. }else{
  91. item('MTMeetingRoomAction.do?task=failSkip2');
  92. }
  93. },
  94. error : showAjaxError
  95. });
  96. }
  97. }
  98. /* function delMeetingRoom(id){
  99. $.ajax({
  100. type : "POST",
  101. url:'MTMeetingRoomAction.do?task=delExamine',
  102. data : {"meeting_room_id":id},
  103. timeout : 10000,
  104. cache : false,
  105. dataType : "json",
  106. success: function (data) {
  107. var success = data.success;
  108. if (success == undefined) {
  109. if (confirm("确定要删除吗?")){
  110. $.ajax({
  111. type : "POST",
  112. url:'MTMeetingRoomAction.do?task=dels&type=1',
  113. data : {"meeting_room_id":id},
  114. timeout : 10000,
  115. cache : false,
  116. dataType : "json",
  117. success: function (data) {
  118. var success = data.success;
  119. if (success != undefined) {
  120. item('MTMeetingRoomAction.do?task=succeedSkip2');
  121. }else{
  122. item('MTMeetingRoomAction.do?task=failSkip3');
  123. }
  124. },
  125. error : showAjaxError
  126. });
  127. }
  128. } else {
  129. if (confirm("确定要删除吗?")){
  130. $.ajax({
  131. type : "POST",
  132. url:'MTMeetingRoomAction.do?task=dels',
  133. data : {"meeting_room_id":id},
  134. success: function (data) {
  135. item('MTMeetingRoomAction.do?task=succeedSkip2');
  136. },
  137. error: function(data){
  138. item('MTMeetingRoomAction.do?task=failSkip2');
  139. }
  140. });
  141. }
  142. }
  143. },
  144. error : showAjaxError
  145. });
  146. } */
  147. //查询
  148. function searchByKword(){
  149. var meeting_room_name = searchBox.getValue();
  150. var s = "";
  151. if(meeting_room_name != "" && typeof(meeting_room_name) != "undefined" ){
  152. s += "&meeting_room_name=" + encodeURI(encodeURI(meeting_room_name));
  153. }
  154. search(s);
  155. }
  156. //查询全部
  157. function searchAll(){
  158. $("#news_title").val("");
  159. $("#news_type_id").val("");
  160. $("#news_sort").val("");
  161. var s = "";
  162. submitItemName(s);
  163. }
  164. //获取焦点
  165. $(document).ready(function() {
  166. $("[id='news_title']").focus();
  167. });
  168. </script>
  169. </head>
  170. <span style="float:none;"></span>
  171. <body>
  172. <input type="hidden" id="news_sort" name="news_sort" value="${news_sort}">
  173. <div class="tc_b">
  174. <div id="left" style="float:left;width:100%;">
  175. <div class="tc_r">
  176. <div class="tr_con b5 f4">
  177. <div class="fl">
  178. <img src="/shares/images/master1/wdrw_ico.png" width="25" height="31" />&nbsp;会议室管理
  179. </div>
  180. <div class="div_ck_k fr">
  181. <input class="div_cx fl" name="meeting_room_name" id="meeting_room_name" type="text" />
  182. <input class="btn_ck fl" type="button" id="button" onclick="searchByKword()"/>
  183. </div>
  184. </div>
  185. <div class="tr_right_bg">
  186. <div id="contentDiv"></div>
  187. <jsp:include page="/yw/master1/page.jsp">
  188. <jsp:param name="functionName" value="searchByKword"/>
  189. <jsp:param name="p" value="1"/>
  190. <jsp:param name="pSize" value="7"/>
  191. </jsp:include>
  192. </div>
  193. </div>
  194. </div>
  195. <%@ include file="/yw/master1_oa/meeting/leftMeetingRoom.jsp"%>
  196. </div>
  197. </body>
  198. </html>