assetPurchaseList.jsp 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163
  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="/shares/js/yw/master1/liger/skins/ynet/css/ligerui-all.css" rel="stylesheet" type="text/css" />
  7. <script src="${pageContext.request.contextPath }/liger/lib/jquery/jquery-1.3.2.min.js" type="text/javascript"></script>
  8. <script src="${pageContext.request.contextPath }/liger/lib/ligerUI/js/core/base.js" type="text/javascript"></script>
  9. <script src="${pageContext.request.contextPath }/liger/lib/ligerUI/js/plugins/ligerGrid.js" type="text/javascript"></script>
  10. <link href="${pageContext.request.contextPath}/main.css" rel="stylesheet" type="text/css" />
  11. <script src="${pageContext.request.contextPath}/liger/lib/ligerUI/js/ligerui.all.js"
  12. type="text/javascript"></script>
  13. <script type="text/javascript" src="/shares/js/constant.js"></script>
  14. <script type="text/javascript" src="/shares/js/common.js"></script>
  15. <script type="text/javascript">
  16. $(document).ready(function(){
  17. var params="";
  18. loadAssetPurchaseList(params);
  19. });
  20. function loadAssetPurchaseList(params) {
  21. var grid = null;
  22. //var selectDeviceType = document.getElementById("selectDeviceType").value;
  23. grid = $("#assetPurchaseGrid")
  24. .ligerGrid(
  25. {
  26. columns : [
  27. {
  28. display : '方式名称',
  29. name : 'asset_purchase_name',
  30. width : 120
  31. },
  32. {
  33. display : '设定值',
  34. name : 'asset_purchase_id',
  35. width : 120
  36. },
  37. {
  38. display : '排序号',
  39. name : 'asset_purchase_order',
  40. width : 120
  41. },
  42. {
  43. display : '是否有效',
  44. name : 'asset_purchase_isvalid',
  45. width : 120,
  46. render: function (row)
  47. {
  48. var html="";
  49. if(row.asset_purchase_isvalid == '1'){
  50. html = '是';
  51. }else if(row.asset_purchase_isvalid == '0'){
  52. html = '否';
  53. }
  54. return html;
  55. }
  56. },
  57. {
  58. display : '操作',
  59. isAllowHide : false,
  60. render : function(row) {
  61. var html = '<a href=\"#\" onclick=\"editAssetPurchase('
  62. + row.universalid
  63. + ')\">编辑</a>&nbsp;';
  64. html += '<a href=\"#\" onclick=\"delAssetPurchase('
  65. + row.universalid
  66. + ')\">删除</a>&nbsp;';
  67. return html;
  68. }
  69. } ],
  70. pageSize : 20,
  71. url : 'assetPurchaseAction.do?task=assetPurchaseList'+params
  72. + '&time='
  73. + new Date().getTime(),
  74. pageParmName : 'p', //页索引参数名,(提交给服务器)
  75. pagesizeParmName : 'pSize', //页记录数参数名,(提交给服务器)
  76. width : '99.9%',
  77. height : '99.9%'
  78. });
  79. $("#pageloading").hide();
  80. }
  81. function editAssetPurchase(id){
  82. window.parent.f_addTab(new Date().getTime(), '编辑', '${pageContext.request.contextPath }/assetPurchaseAction.do?task=toEditAssetPurchase&id='+id+'&tabid=' + getCurrentTabId());
  83. }
  84. function delAssetPurchase(id){
  85. if (window.confirm("确定要删除吗?")){
  86. var param={'id':id};
  87. sendAjaxParam(param,"assetPurchaseAction.do?task=delAssetPurchase",'json',delProcess);
  88. }
  89. }
  90. function delProcess(data){
  91. var msg=data.error;
  92. if(msg!=null){
  93. showAjaxError(null, data.error);
  94. }
  95. var msg2=data.success;
  96. if(msg2!=null){
  97. $.ligerDialog.success(msg2);
  98. }
  99. var params="";
  100. loadAssetPurchaseList(params);
  101. }
  102. function searchByKword(){
  103. var purchase=$("#purchase_name").val();
  104. var params="&purchase_name="+encodeURI(encodeURI(purchase));
  105. loadAssetPurchaseList(params);
  106. }
  107. </script>
  108. <style type="text/css">
  109. body {
  110. padding: 5px;
  111. margin: 0;
  112. }
  113. #layout1 {
  114. width: 100%;
  115. margin: 0;
  116. padding: 0;
  117. }
  118. .l-button {
  119. margin-left: 1px;
  120. }
  121. #deptBtn {
  122. width: 100%;
  123. background: #e5ecf9;
  124. text-align: center;
  125. height: 25px;
  126. padding-top: 3px
  127. }
  128. .l-layout-left {
  129. overflow-y: auto;
  130. }
  131. </style>
  132. </HEAD>
  133. <BODY>
  134. <%@ include file="/include/button.jsp"%>
  135. <%@ include file="/include/message.jsp"%>
  136. <div class="container-layout">
  137. <div id="title" class="form-button">
  138. <input type="button" class="l-button" value="新增" onclick="window.parent.f_addTab(new Date().getTime(), '新增', '${pageContext.request.contextPath }/assetPurchaseAction.do?task=toCreate&tabid=' + getCurrentTabId());"/>
  139. </div>
  140. <div class="default_search" style="margin: 0;">
  141. <ul class="list_search">
  142. <li class="title">方式名称:</li>
  143. <li class="text"><input type="text" name="purchase_name"
  144. id="purchase_name" value=""/></li>
  145. </ul>
  146. <ul>
  147. <li class="search-button"><input type="button" class='l-button'
  148. name="search" onclick="searchByKword()" value="查询" /></li>
  149. </ul>
  150. </div>
  151. <div style="overflow: hidden; clear: both;">
  152. <div id="assetPurchaseGrid" style="margin: 0; padding: 0"></div>
  153. </div>
  154. </div>
  155. </BODY>
  156. </HTML>