listFiliale.jsp 9.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190
  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/core/base.js" type="text/javascript"></script>
  11. <script src="${pageContext.request.contextPath }/liger/lib/ligerUI/js/plugins/ligerGrid.js" type="text/javascript"></script>
  12. <script src="${pageContext.request.contextPath }/liger/lib/ligerUI/js/plugins/ligerDateEditor.js" type="text/javascript"></script>
  13. <link href="${pageContext.request.contextPath}/main.css" rel="stylesheet" type="text/css" />
  14. <script type="text/javascript" src="/shares/js/constant.js"></script>
  15. <script type="text/javascript" src="/shares/js/common.js"></script>
  16. <script type="text/javascript" src="/shares/js/yw/yongfu/common.js"></script>
  17. <script type="text/javascript">
  18. var grid = null;
  19. var oDialogs = [];
  20. function getTime(){
  21. return new Date().getTime();
  22. }
  23. function openODialog(owurl, name, dialogId) {
  24. // alert(owurl);
  25. // alert(dialogId);
  26. var oDialog = openTopDialog({
  27. height : $("body", window.top.document).height() - 50,
  28. width : $("body", window.top.document).width() - 600,
  29. url : owurl,
  30. showMax : false,
  31. showToggle : false,
  32. showMin : true,
  33. isResize : false,
  34. modal : false,
  35. title : name,
  36. id : dialogId,
  37. allowClose : true,
  38. isHidden: true,
  39. timeParmName : "date1"
  40. });
  41. oDialogs.push(oDialog);
  42. }
  43. function deleteRow(obj)
  44. {
  45. if(confirm("确定要删除该分公司吗?")){
  46. window.parent.f_addTab(new Date().getTime(), '删除分公司', '${pageContext.request.contextPath }/FilialeAction.do?task=delFiliale&filiale_id='+obj+'&tabid=' + getCurrentTabId());
  47. }
  48. }
  49. $(function () {
  50. grid = $("#maingrid4").ligerGrid({
  51. columns: [
  52. { display: '分公司名称', name: 'filiale_name', width: 200},
  53. { display: '分公司负责人', name: 'filiale_principal', width: 100},
  54. { display: '负责人联系电话', name: 'filiale_principal_phone', width: 100},
  55. { display: '办公地址', name: 'filiale_address', width: 150 },
  56. { display: '联系人', name: 'filiale_linkman', width: 70},
  57. { display: '联系电话', name: 'filiale_linkman_phone', width: 100},
  58. { display: '传真', name: 'filiale_linkman_fax', width: 100},
  59. { display: '备注', name: 'filiale_remark', width: 100},
  60. {
  61. display: '操作', isAllowHide: false,width: 300,
  62. render: function (row)
  63. {
  64. var html = '<a href=\"#\" onclick=\"window.parent.f_addTab(new Date().getTime(), \'修改\', \'${pageContext.request.contextPath }/FilialeAction.do?task=toEditFiliale&filiale_id='
  65. + row.filiale_id + '&tabid=' + getCurrentTabId()+'\');\">修改</a>&nbsp;';
  66. html += '<a href=\"#\" onclick=\"window.parent.f_addTab(new Date().getTime(), \'资料管理\', \'${pageContext.request.contextPath }/FilialeAction.do?task=toFilialeDetailMgr&filiale_id='
  67. + row.filiale_id + '&tabid=' + getCurrentTabId()+'\');\">资料管理</a>&nbsp;';
  68. html += '<a href=\"#\" onclick=\"openODialog(\'${pageContext.request.contextPath }/FilialeAction.do?task=downloadAffix&filiale_id='
  69. + row.filiale_id + '&tabid=' + getCurrentTabId()
  70. + '&dialogId='+row.filiale_id+'\'+getTime(), \'资料下载\', \''+row.filiale_id+'\'+getTime());\">资料下载</a>&nbsp;';
  71. html += '<a href=\"${pageContext.request.contextPath }/FilialeAction.do?task=toPrintFilialeDetail&filiale_id='+ row.filiale_id + '\" target=\"_blank\">打印资料清单</a>&nbsp;';
  72. html += '<a href=\"#\" onclick=\"deleteRow('+row.filiale_id+')\">删除</a>&nbsp;';
  73. return html;
  74. }
  75. }
  76. ],
  77. fixedCellHeight: false, //是否固定单元格的高度
  78. pageSize:20,
  79. url: 'FilialeAction.do?task=listFiliale&time=' + new Date().getTime(),
  80. pageParmName: 'p', //页索引参数名,(提交给服务器)
  81. pagesizeParmName: 'pSize', //页记录数参数名,(提交给服务器)
  82. enabledSort: true, //是否允许排序
  83. width: '99.8%',
  84. height: '99%'
  85. });
  86. $("#pageloading").hide();
  87. });
  88. function searchByKword(){
  89. var filiale_name = document.getElementById("filiale_name");
  90. var filiale_principal = document.getElementById("filiale_principal");
  91. var filiale_linkman = document.getElementById("filiale_linkman");
  92. var s = "";
  93. if(filiale_name.value != "" && typeof(filiale_name.value) != "undefined" ){
  94. s += "&filiale_name=" + encodeURI(encodeURI(filiale_name.value));
  95. }
  96. if(filiale_principal.value != "" && typeof(filiale_principal.value) != "undefined" ){
  97. s += "&filiale_principal=" + encodeURI(encodeURI(filiale_principal.value));
  98. }
  99. if(filiale_linkman.value != "" && typeof(filiale_linkman.value) != "undefined" ){
  100. s += "&filiale_linkman=" + encodeURI(encodeURI(filiale_linkman.value));
  101. }
  102. grid.set("newPage", "1");
  103. grid = $("#maingrid4").ligerGrid({
  104. columns: [
  105. { display: '分公司名称', name: 'filiale_name', width: 200},
  106. { display: '分公司负责人', name: 'filiale_principal', width: 100},
  107. { display: '负责人联系电话', name: 'filiale_principal_phone', width: 100},
  108. { display: '办公地址', name: 'filiale_address', width: 150 },
  109. { display: '联系人', name: 'filiale_linkman', width: 70},
  110. { display: '联系电话', name: 'filiale_linkman_phone', width: 100},
  111. { display: '传真', name: 'filiale_linkman_fax', width: 100},
  112. { display: '备注', name: 'filiale_remark', width: 100},
  113. {
  114. display: '操作', isAllowHide: false,width: 300,
  115. render: function (row)
  116. {
  117. var html = '<a href=\"#\" onclick=\"window.parent.f_addTab(new Date().getTime(), \'修改\', \'${pageContext.request.contextPath }/FilialeAction.do?task=toEditFiliale&filiale_id='
  118. + row.filiale_id + '&tabid=' + getCurrentTabId()+'\');\">修改</a>&nbsp;';
  119. html += '<a href=\"#\" onclick=\"window.parent.f_addTab(new Date().getTime(), \'资料管理\', \'${pageContext.request.contextPath }/FilialeAction.do?task=toFilialeDetailMgr&filiale_id='
  120. + row.filiale_id + '&tabid=' + getCurrentTabId()+'\');\">资料管理</a>&nbsp;';
  121. html += '<a href=\"#\" onclick=\"openODialog(\'${pageContext.request.contextPath }/FilialeAction.do?task=downloadAffix&filiale_id='
  122. + row.filiale_id + '&tabid=' + getCurrentTabId()
  123. + '&dialogId='+row.filiale_id+'\'+getTime(), \'资料下载\', \''+row.filiale_id+'\'+getTime());\">资料下载</a>&nbsp;';
  124. html += '<a href=\"${pageContext.request.contextPath }/FilialeAction.do?task=toPrintFilialeDetail&filiale_id='+ row.filiale_id + '\" target=\"_blank\">打印资料清单</a>&nbsp;';
  125. html += '<a href=\"#\" onclick=\"deleteRow('+row.filiale_id+')\">删除</a>&nbsp;';
  126. return html;
  127. }
  128. }
  129. ],
  130. fixedCellHeight: false, //是否固定单元格的高度
  131. pageSize:20,
  132. url: 'FilialeAction.do?task=listFiliale&time=' + new Date().getTime()+s,
  133. pageParmName: 'p', //页索引参数名,(提交给服务器)
  134. pagesizeParmName: 'pSize', //页记录数参数名,(提交给服务器)
  135. enabledSort: true, //是否允许排序
  136. width: '99.8%',
  137. height: '99%'
  138. });
  139. $("#pageloading").hide();
  140. }
  141. function searchAll() {
  142. $("#filiale_name").val("");
  143. $("#filiale_principal").val("");
  144. $("#filiale_linkman").val("");
  145. searchByKword();
  146. }
  147. </script>
  148. </head>
  149. <body >
  150. <div class="container-layout">
  151. <div id="title" class="form-button">
  152. <input type="button" class="l-button" value="新增分公司" onclick="window.parent.f_addTab(new Date().getTime(), '新增分公司', '${pageContext.request.contextPath }/FilialeAction.do?task=toCreateFiliale&tabid=' + getCurrentTabId());"/>
  153. </div>
  154. <div class="default_search" >
  155. <ul class="list_search">
  156. <li class="title">分公司名称:</li>
  157. <li class="text">
  158. <input type="text" name="filiale_name" id="filiale_name" >
  159. </li>
  160. </ul>
  161. <ul class="list_search" >
  162. <li class="title">负责人:</li>
  163. <li class="text">
  164. <input type="text" name="filiale_principal" id="filiale_principal" >
  165. </li>
  166. </ul>
  167. <ul class="list_search" >
  168. <li class="title">联系人:</li>
  169. <li class="text">
  170. <input type="text" name="filiale_linkman" id="filiale_linkman" >
  171. </li>
  172. </ul>
  173. <ul>
  174. <li class="search-button" >
  175. <input type="button" class='l-button' name="search" onclick="searchByKword()" value="查询"/>
  176. <input type="button" class='l-button' name="search" onclick="searchAll()" value="查询全部"/>
  177. </li>
  178. </ul>
  179. </div>
  180. <div style="clear: both;">
  181. <div id="maingrid4" style="margin: 0; padding: 0"></div>
  182. </div>
  183. </div>
  184. </body>
  185. </html>