assetFlowDirectionList.jsp 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191
  1. <%@ page contentType="text/html;charset=GBK"%>
  2. <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
  3. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  4. <HEAD>
  5. <TITLE>在用资产列表</TITLE>
  6. <link href="${pageContext.request.contextPath}/main.css" rel="stylesheet" type="text/css" />
  7. <link href="${pageContext.request.contextPath }/liger/lib/ligerUI/skins/${sessionScope.css}/css/ligerui-all.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 src="${pageContext.request.contextPath }/liger/lib/ligerUI/js/core/base.js" type="text/javascript"></script>
  10. <script src="${pageContext.request.contextPath }/liger/lib/ligerUI/js/plugins/ligerGrid.js" type="text/javascript"></script>
  11. <script src="${pageContext.request.contextPath }/liger/lib/ligerUI/js/plugins/ligerDateEditor.js" type="text/javascript"></script>
  12. <script type="text/javascript" src="/shares/js/constant.js"></script>
  13. <script type="text/javascript" src="/shares/js/common.js"></script>
  14. <script src="${pageContext.request.contextPath }/liger/lib/ligerUI/js/plugins/ligerTab.js" type="text/javascript"></script>
  15. <script src="${pageContext.request.contextPath }/liger/lib/ligerUI/js/plugins/ligerDrag.js" type="text/javascript"></script>
  16. <script type="text/javascript">
  17. var grid = null;
  18. $(document).ready(function(){
  19. searchByKword();
  20. });
  21. function loadAssetEmployList(params) {
  22. grid = $("#assetDirectionGrid")
  23. .ligerGrid(
  24. {
  25. columns : [
  26. {
  27. display : '资产编号',
  28. name : 'asset_id',
  29. width : 120
  30. },
  31. {
  32. display : '资产名称',
  33. name : 'asset_name',
  34. width : 120
  35. },
  36. {
  37. display : '当前状态',
  38. name : 'cur_state',
  39. width : 120,
  40. render : function(row){
  41. var html = "";
  42. var state = row.cur_state;
  43. if(state=='1'){
  44. html+="闲置";
  45. }else if(state=='2'){
  46. html+="领用";
  47. }else if(state=='3'){
  48. html+="维修";
  49. }else if(state=='4'){
  50. html+="借出";
  51. }else if(state=='5'){
  52. html+="报废";
  53. }
  54. return html;
  55. }
  56. },
  57. {
  58. display : '业务类型',
  59. name : 'work_type',
  60. width : 120,
  61. render : function(row){
  62. var html = "";
  63. var state = row.work_type;
  64. if(state=='1'){
  65. html+="归还";
  66. }else if(state=='2'){
  67. html+="领用";
  68. }else if(state=='3'){
  69. html+="维修";
  70. }else if(state=='4'){
  71. html+="借出";
  72. }else if(state=='5'){
  73. html+="报废";
  74. }
  75. return html;
  76. }
  77. },
  78. {
  79. display : '日期',
  80. name : 'cur_date',
  81. width : 120
  82. },
  83. {
  84. display : '负责部门',
  85. name : 'cur_dept_name',
  86. width : 180
  87. },
  88. {
  89. display : '负责人',
  90. name : 'cur_user_name',
  91. width : 120
  92. }],
  93. pageSize : 20,
  94. url : 'assetFlowDirectionAction.do?task=assetFlowDirectionList'+params
  95. + '&time='
  96. + new Date().getTime(),
  97. pageParmName : 'p', //页索引参数名,(提交给服务器)
  98. pagesizeParmName : 'pSize', //页记录数参数名,(提交给服务器)
  99. width : '99.9%',
  100. height : '98.5%'
  101. });
  102. $("#pageloading").hide();
  103. }
  104. function searchByKword(){
  105. if(grid!=null){
  106. grid.set("newPage","1");
  107. }
  108. var params="";
  109. var asset_search_id=$("#asset_search_id").val();
  110. params=params+"&asset_search_id="+encodeURI(encodeURI(asset_search_id));
  111. var asset_search_name=$("#asset_search_name").val();
  112. params=params+"&asset_search_name="+encodeURI(encodeURI(asset_search_name));
  113. loadAssetEmployList(params);
  114. }
  115. //导出报表excel
  116. function exportExcel(){
  117. $("#task").val("");
  118. $("#report").attr("target","");
  119. $("#task").val("exportExcel");
  120. $("#report").submit();
  121. }
  122. function generateReport(){
  123. $("#task").val("");
  124. $("#report").attr("target","_blank");
  125. $("#task").val("printAssetFlowDirection");
  126. $("#report").submit();
  127. }
  128. </script>
  129. <style type="text/css">
  130. body {
  131. padding: 0px;
  132. margin: 0;
  133. }
  134. #layout1 {
  135. width: 99%;
  136. margin: 0;
  137. padding: 0;
  138. }
  139. .l-button {
  140. margin-left: 1px;
  141. width:100px;
  142. }
  143. .l-layout-left {
  144. overflow-y: auto;
  145. }
  146. </style>
  147. </HEAD>
  148. <BODY>
  149. <%@ include file="/include/button.jsp"%>
  150. <%@ include file="/include/message.jsp"%>
  151. <div class="container-layout">
  152. <form id="report" action="assetFlowDirectionAction.do" method="post" target="_blank">
  153. <div id="title" class="form-button">
  154. <input type="button" class="l-button" value="生成报表" onclick="generateReport()"/>
  155. <input type="hidden" id="task" name="task" value="printAssetFlowDirection">
  156. <input type="button" class="l-button" style="width: 100px;" value="导出Excel" onclick="exportExcel()"/>
  157. <input type="reset" class="l-button" value="条件重置" style="width:60px;"/>
  158. &nbsp;
  159. </div>
  160. <div class="default_search" style="margin: 0;">
  161. <ul class="list_search" style="float:left;">
  162. <li class="title">资产编码:</li>
  163. <li class="text" ><input type="text" name="asset_search_id"
  164. id="asset_search_id" value=""/></li>
  165. </ul>
  166. <ul class="list_search" style="float:left;">
  167. <li class="title">资产名称:</li>
  168. <li class="text" ><input type="text" name="asset_search_name"
  169. id="asset_search_name" value=""/></li>
  170. </ul>
  171. <ul style="float:left;margin-left:15px;">
  172. <li class="search-button"><input type="button" class='l-button'
  173. name="search" onclick="searchByKword()" value="查询" /></li>
  174. </ul>
  175. </div>
  176. <div style="overflow: hidden; clear: both;">
  177. <div id="assetDirectionGrid" style="margin: 0; padding: 0"></div>
  178. </div>
  179. </form>
  180. </div>
  181. </BODY>
  182. </HTML>