listSalayInsuranceProject.jsp 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  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="${pageContext.request.contextPath}/main.css" rel="stylesheet" type="text/css" />
  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/ligerDrag.js" type="text/javascript"></script>
  12. <script src="${pageContext.request.contextPath }/liger/lib/ligerUI/js/plugins/ligerDialog.js" type="text/javascript"></script>
  13. <script src="${pageContext.request.contextPath }/liger/lib/ligerUI/js/plugins/ligerResizable.js" type="text/javascript"></script>
  14. <script src="${pageContext.request.contextPath }/liger/lib/ligerUI/js/plugins/ligerGrid.js" type="text/javascript"></script>
  15. <%-- <script src="${pageContext.request.contextPath}/liger/lib/ligerUI/js/ligerui.all.js" type="text/javascript"></script> --%>
  16. <script type="text/javascript" src="/shares/js/constant.js"></script>
  17. <script type="text/javascript" src="/shares/js/common.js"></script>
  18. <script type="text/javascript">
  19. var grid = null;
  20. var dialog = null;
  21. $(function() {
  22. initSalayInsuranceProjectList();
  23. });
  24. function initSalayInsuranceProjectList(params) {
  25. var columns = [
  26. {
  27. display : '项目名称',
  28. name : 'project_name'
  29. },
  30. {
  31. display : '项目类型',
  32. name : 'project_type_name'
  33. },
  34. {
  35. display : '小数位数',
  36. name : 'digits'
  37. },
  38. {
  39. display : '操作',
  40. name : 'remark',
  41. render : function(row) {
  42. var html = "";
  43. html = "<a href=\"#\" onclick=\"addSalInsProj("
  44. + row.universalid + ")\">编辑</a>";
  45. if (row.is_default == "1") {
  46. html += "&nbsp;&nbsp;<a href=\"#\" onclick=\"delProductType("
  47. + row.universalid + ")\">删除</a>";
  48. }
  49. return html;
  50. }
  51. } ];
  52. grid = $("#maingrid4")
  53. .ligerGrid(
  54. {
  55. columns : columns,
  56. pageSize : 20,
  57. url : 'hrSalaryInsuranceProjectAction.do?task=querySalInsProjData&time='
  58. + new Date().getTime() + params,
  59. pageParmName : 'p', //页索引参数名,(提交给服务器)
  60. pagesizeParmName : 'pSize', //页记录数参数名,(提交给服务器)
  61. width : '99.9%',
  62. height : '99%'
  63. });
  64. $("#pageloading").hide();
  65. }
  66. //查询
  67. function searchByKword() {
  68. var s = "";
  69. var att_date_start = $("#att_date_start").val();//规则名称
  70. if (att_date_start != "" && typeof (att_date_start) != "undefined") {
  71. s += "&att_date_start=" + att_date_start;
  72. }
  73. var att_date_end = $("#att_date_end").val();//规则名称
  74. if (att_date_end != "" && typeof (att_date_end) != "undefined") {
  75. s += "&att_date_end=" + att_date_end;
  76. }
  77. grid.set("newPage", "1");
  78. initSalayInsuranceProjectList(s);
  79. }
  80. function addSalInsProj(universalid) {
  81. dialog = $.ligerDialog
  82. .open({
  83. height : 260,
  84. width : 480,
  85. isResize: true,
  86. url : 'hrSalaryInsuranceProjectAction.do?task=toEditSalInsProj&universalid='
  87. + universalid
  88. });
  89. }
  90. function delProductType(universalid) {
  91. $.ligerDialog
  92. .confirm(
  93. '是否确认删除?',
  94. function(yes) {
  95. if (yes) {
  96. $
  97. .ajax({
  98. type : "POST",
  99. url : "hrSalaryInsuranceProjectAction.do?task=delSalInsProj",
  100. data : {
  101. "universalid" : universalid
  102. },
  103. timeout : 10000,
  104. cache : false,
  105. dataType : "json",
  106. success : function(data) {
  107. var success = data.success;
  108. if (success) {
  109. $.ligerDialog
  110. .success(success);
  111. initSalayInsuranceProjectList();
  112. } else {
  113. showAjaxError(null,
  114. data.error);
  115. }
  116. },
  117. error : showAjaxError
  118. });
  119. }
  120. });
  121. }
  122. </script>
  123. </head>
  124. <body>
  125. <div class="container">
  126. <div id="title" class="form-button">
  127. <input type="button" class="l-button" value="新增" onclick="addSalInsProj('');" style="width: 70px" />
  128. </div>
  129. <div class="default_search" style="margin: 0; height: 30px;"></div>
  130. <div style="clear: both;"></div>
  131. <div id="searchbar">
  132. <div style="overflow: hidden; clear: both;">
  133. <div id="maingrid4" style="margin: 0; padding: 0"></div>
  134. </div>
  135. </div>
  136. </div>
  137. </body>
  138. </html>