listProjectCost.jsp 9.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183
  1. <%@ page language="java" contentType="text/html;charset=GBK"
  2. pageEncoding="GBK"%>
  3. <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
  4. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  5. <html>
  6. <head>
  7. <meta http-equiv="Content-Type" content="text/html;charset=GBK">
  8. <title>荣誉证书列表</title>
  9. <link href="${pageContext.request.contextPath }/liger/lib/ligerUI/skins/${sessionScope.css}/css/ligerui-all.css" rel="stylesheet" type="text/css" />
  10. <script src="${pageContext.request.contextPath }/liger/lib/jquery/jquery-1.3.2.min.js" type="text/javascript"></script>
  11. <script src="${pageContext.request.contextPath }/liger/lib/ligerUI/js/core/base.js" type="text/javascript"></script>
  12. <script src="${pageContext.request.contextPath }/liger/lib/ligerUI/js/plugins/ligerGrid.js" type="text/javascript"></script>
  13. <script src="${pageContext.request.contextPath }/liger/lib/ligerUI/js/plugins/ligerDateEditor.js" type="text/javascript"></script>
  14. <link href="${pageContext.request.contextPath}/main.css" rel="stylesheet" type="text/css" />
  15. <script type="text/javascript" src="/shares/js/constant.js"></script>
  16. <script type="text/javascript" src="/shares/js/common.js"></script>
  17. <script type="text/javascript" src="/shares/js/yw/yongfu/common.js"></script>
  18. <script type="text/javascript">
  19. var grid = null;
  20. function deleteRow(obj)
  21. {
  22. if(confirm("确定要删除该记录吗?")){
  23. window.parent.f_addTab(new Date().getTime(), '删除项目费用', '${pageContext.request.contextPath }/ProjectCostAction.do?task=delProjectCost&cost_id='+obj+'&tabid=' + getCurrentTabId());
  24. }
  25. }
  26. $(function () {
  27. grid = $("#maingrid4").ligerGrid({
  28. columns: [
  29. { display: '工程名称', name: 'cost_project_name', width: 100},
  30. { display: '工程造价(万元)', name: 'cost_project_price', width: 150},
  31. { display: '工程款', name: 'cost_project_funds', width: 100},
  32. { display: '管理费率', name: 'cost_mgr_ratio', width: 100},
  33. { display: '应收管理费', name: 'cost_start_mgr_price', width: 100},
  34. { display: '应交企业所得税率', name: 'cost_start_company_price_ratio', width: 150},
  35. { display: '应交企业所得税', name: 'cost_start_company_price', width: 150},
  36. { display: '项目经理补贴费用(元/月)', name: 'cost_promagr_allowance', width: 180},
  37. { display: '项目经理补贴月数', name: 'cost_promagr_allowance_count', width: 150},
  38. { display: '应交项目经理补贴费用', name: 'cost_start_promagr_allowance', width: 150},
  39. { display: '安全员补贴费(元/月)', name: 'cost_safer_allowance', width: 180},
  40. { display: '安全员补贴月数', name: 'cost_safer_count', width: 150},
  41. { display: '应交安全员补贴费用', name: 'cost_start_safer_allowance', width: 150},
  42. { display: '小计', name: 'cost_count', width: 100},
  43. { display: '创建时间', name: 'cost_create_date', width: 100},
  44. { display: '备注', name: 'cost_remark', width: 100},
  45. {
  46. display: '操作', isAllowHide: false,width: 300,
  47. render: function (row)
  48. {
  49. var html = '<a href=\"#\" onclick=\"window.parent.f_addTab(new Date().getTime(), \'查看\', \'${pageContext.request.contextPath }/ProjectCostAction.do?task=infoProjectCost&cost_id='
  50. + row.cost_id + '&tabid=' + getCurrentTabId()+'\');\">查看</a>&nbsp;';
  51. html += '<a href=\"#\" onclick=\"window.parent.f_addTab(new Date().getTime(), \'修改\', \'${pageContext.request.contextPath }/ProjectCostAction.do?task=toEditProjectCost&cost_id='
  52. + row.cost_id + '&tabid=' + getCurrentTabId()+'\');\">修改</a>&nbsp;';
  53. html += '<a href=\"#\" onclick=\"deleteRow('+row.cost_id+')\">删除</a>&nbsp;';
  54. return html;
  55. }
  56. }
  57. ],
  58. fixedCellHeight: false, //是否固定单元格的高度
  59. pageSize:20,
  60. url: 'ProjectCostAction.do?task=listProjectCost&time=' + new Date().getTime(),
  61. pageParmName: 'p', //页索引参数名,(提交给服务器)
  62. pagesizeParmName: 'pSize', //页记录数参数名,(提交给服务器)
  63. enabledSort: true, //是否允许排序
  64. width: '99.8%',
  65. height: '99%'
  66. });
  67. $("#pageloading").hide();
  68. $("#createdatebegin").ligerDateEditor({
  69. labelWidth : 100,
  70. labelAlign : 'right',
  71. initValue : ''
  72. });
  73. $("#createdateend").ligerDateEditor({
  74. labelWidth : 100,
  75. labelAlign : 'right',
  76. initValue : ''
  77. });
  78. });
  79. function searchByKword(){
  80. var cost_project_name = document.getElementById("cost_project_name");
  81. var createdatebegin = document.getElementById("createdatebegin");
  82. var createdateend = document.getElementById("createdateend");
  83. var s = "";
  84. if(cost_project_name.value != "" && typeof(cost_project_name.value) != "undefined" ){
  85. s += "&cost_project_name=" + encodeURI(encodeURI(cost_project_name.value));
  86. }
  87. if(createdatebegin.value != "" && typeof(createdatebegin.value) != "undefined" ){
  88. s += "&createdatebegin=" + encodeURI(encodeURI(createdatebegin.value));
  89. }
  90. if(createdateend.value != "" && typeof(createdateend.value) != "undefined" ){
  91. s += "&createdateend=" + encodeURI(encodeURI(createdateend.value));
  92. }
  93. grid.set("newPage", "1");
  94. grid = $("#maingrid4").ligerGrid({
  95. columns: [
  96. { display: '工程名称', name: 'cost_project_name', width: 100},
  97. { display: '工程造价(万元)', name: 'cost_project_price', width: 150},
  98. { display: '工程款', name: 'cost_project_funds', width: 100},
  99. { display: '管理费率', name: 'cost_mgr_ratio', width: 100},
  100. { display: '应收管理费', name: 'cost_start_mgr_price', width: 100},
  101. { display: '应交企业所得税率', name: 'cost_start_company_price_ratio', width: 150},
  102. { display: '应交企业所得税', name: 'cost_start_company_price', width: 150},
  103. { display: '项目经理补贴费用(元/月)', name: 'cost_promagr_allowance', width: 180},
  104. { display: '项目经理补贴月数', name: 'cost_promagr_allowance_count', width: 150},
  105. { display: '应交项目经理补贴费用', name: 'cost_start_promagr_allowance', width: 150},
  106. { display: '安全员补贴费(元/月)', name: 'cost_safer_allowance', width: 180},
  107. { display: '安全员补贴月数', name: 'cost_safer_count', width: 150},
  108. { display: '应交安全员补贴费用', name: 'cost_start_safer_allowance', width: 150},
  109. { display: '小计', name: 'cost_count', width: 100},
  110. { display: '创建时间', name: 'cost_create_date', width: 100},
  111. { display: '备注', name: 'cost_remark', width: 100},
  112. {
  113. display: '操作', isAllowHide: false,width: 300,
  114. render: function (row)
  115. {
  116. var html = '<a href=\"#\" onclick=\"window.parent.f_addTab(new Date().getTime(), \'查看\', \'${pageContext.request.contextPath }/ProjectCostAction.do?task=infoProjectCost&cost_id='
  117. + row.cost_id + '&tabid=' + getCurrentTabId()+'\');\">查看</a>&nbsp;';
  118. html += '<a href=\"#\" onclick=\"window.parent.f_addTab(new Date().getTime(), \'修改\', \'${pageContext.request.contextPath }/ProjectCostAction.do?task=toEditProjectCost&cost_id='
  119. + row.cost_id + '&tabid=' + getCurrentTabId()+'\');\">修改</a>&nbsp;';
  120. html += '<a href=\"#\" onclick=\"deleteRow('+row.cost_id+')\">删除</a>&nbsp;';
  121. return html;
  122. }
  123. }
  124. ],
  125. fixedCellHeight: false, //是否固定单元格的高度
  126. pageSize:20,
  127. url: 'ProjectCostAction.do?task=listProjectCost&time=' + new Date().getTime() + s,
  128. pageParmName: 'p', //页索引参数名,(提交给服务器)
  129. pagesizeParmName: 'pSize', //页记录数参数名,(提交给服务器)
  130. enabledSort: true, //是否允许排序
  131. width: '99.8%',
  132. height: '99%'
  133. });
  134. $("#pageloading").hide();
  135. }
  136. function searchAll() {
  137. $("#cost_project_name").val("");
  138. $("#createdatebegin").val("");
  139. $("#createdateend").val("");
  140. searchByKword();
  141. }
  142. </script>
  143. </head>
  144. <body >
  145. <div class="container-layout">
  146. <div id="title" class="form-button">
  147. <input type="button" style="width: 100px;" class="l-button" value="新增费用项目" onclick="window.parent.f_addTab(new Date().getTime(), '新增费用项目', '${pageContext.request.contextPath }/ProjectCostAction.do?task=toCreateProjectCost&tabid=' + getCurrentTabId());"/>
  148. </div>
  149. <div class="default_search" >
  150. <ul class="list_search">
  151. <li class="title">工程名称:</li>
  152. <li class="text">
  153. <input type="text" name="cost_project_name" id="cost_project_name" >
  154. </li>
  155. </ul>
  156. <ul class="list_search" style="width: 380px;">
  157. <li class="title" style="width: 80px;">创建时间:</li>
  158. <li class="text" style="width: 135px;">
  159. <input type="text" id="createdatebegin" name="createdatebegin" style="width: 130px;" />
  160. <li class="title" style="width: 15px;">至&nbsp;&nbsp;
  161. </li>
  162. <li class="text" style="width: 135px;">
  163. <input type="text" id="createdateend" name="createdateend" style="width: 130px;" />
  164. </li>
  165. </ul>
  166. <ul>
  167. <li class="search-button" >
  168. <input type="button" class='l-button' name="search" onclick="searchByKword()" value="查询"/>
  169. <input type="button" class='l-button' name="search" onclick="searchAll()" value="查询全部"/>
  170. </li>
  171. </ul>
  172. </div>
  173. <div style="clear: both;">
  174. <div id="maingrid4" style="margin: 0; padding: 0"></div>
  175. </div>
  176. </div>
  177. </body>
  178. </html>