listProject.jsp 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305
  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. var oDialogs = [];
  21. function getTime(){
  22. return new Date().getTime();
  23. }
  24. function openODialog(owurl, name, dialogId) {
  25. // alert(owurl);
  26. // alert(dialogId);
  27. var oDialog = openTopDialog({
  28. height : $("body", window.top.document).height() - 50,
  29. width : $("body", window.top.document).width() - 600,
  30. url : owurl,
  31. showMax : false,
  32. showToggle : false,
  33. showMin : true,
  34. isResize : false,
  35. modal : false,
  36. title : name,
  37. id : dialogId,
  38. allowClose : true,
  39. isHidden: true,
  40. timeParmName : "date1"
  41. });
  42. oDialogs.push(oDialog);
  43. }
  44. function deleteRow(obj)
  45. {
  46. if(confirm("确定要删除该项目吗?")){
  47. window.parent.f_addTab(new Date().getTime(), '删除项目', '${pageContext.request.contextPath }/ProjectAction.do?task=delProject&universalid='+obj+'&tabid=' + getCurrentTabId());
  48. }
  49. }
  50. $(function () {
  51. grid = $("#maingrid4").ligerGrid({
  52. columns: [
  53. { display: '建设单位', name: 'project_build_unit', width: 150},
  54. { display: '工程名称', name: 'project_name', width: 150},
  55. { display: '合同造价(万元)', name: 'project_cost', width: 150},
  56. { display: '工程地点', name: 'project_place', width: 70},
  57. { display: '合同签订日期', name: 'project_contract_date', width: 100
  58. ,render: function (row) {
  59. var html = subDate(row.project_contract_date);
  60. return html;
  61. }
  62. },
  63. { display: '项目经理', name: 'project_pm', width: 130},
  64. { display: '安全员', name: 'project_safety', width: 70},
  65. { display: '项目责任人', name: 'record_duty_man', width: 100},
  66. { display: '联系电话', name: 'project_tel', width: 100},
  67. { display: '结构质式', name: 'project_structure', width: 100},
  68. { display: '建筑面积', name: 'project_area', width: 70},
  69. { display: '工期', name: 'project_time', width: 50},
  70. { display: '开工时间', name: 'project_start_date', width: 100
  71. ,render: function (row) {
  72. var html = subDate(row.project_start_date);
  73. return html;
  74. }
  75. },
  76. { display: '项目状态', name: 'project_type', width: 70},
  77. { display: '竣工时间', name: 'project_end_date', width: 100
  78. ,render: function (row) {
  79. var html = subDate(row.project_end_date);
  80. return html;
  81. }
  82. },
  83. { display: '工程质量', name: 'project_quality', width: 100},
  84. { display: '结算造价(万元)', name: 'project_pay_cost', width: 100},
  85. { display: '所属分公司', name: 'branch_company', width: 100},
  86. { display: '备注', name: 'project_remark', width: 100},
  87. {
  88. display: '操作', isAllowHide: false,width: 300,
  89. render: function (row)
  90. {
  91. //var html = '<a href=\"#\" onclick=\"window.parent.f_addTab(new Date().getTime(), \'修改\', \'${pageContext.request.contextPath }/ProjectAction.do?task=toEditProject&universalid='
  92. // + row.universalid + '&tabid=' + getCurrentTabId()+'\');\">修改</a>&nbsp;';
  93. // html += '<a href=\"#\" onclick=\"window.parent.f_addTab(new Date().getTime(), \'档案管理\', \'${pageContext.request.contextPath }/ProjectAction.do?task=toProjectRecordMgr&universalid='
  94. // + row.universalid + '&tabid=' + getCurrentTabId()+'\');\">档案管理</a>&nbsp;';
  95. var html = '<a href=\"#\" onclick=\"openODialog(\'${pageContext.request.contextPath }/ProjectAction.do?task=downloadAffix&universalid='
  96. + row.universalid + '&tabid=' + getCurrentTabId()
  97. + '&dialogId='+row.universalid+'\'+getTime(), \'资料下载\', \''+row.universalid+'\'+getTime());\">资料下载</a>&nbsp;';
  98. html += '<a href=\"${pageContext.request.contextPath }/ProjectAction.do?task=toPrintProjectRecord&universalid='+ row.universalid + '\" target=\"_blank\">打印资料清单</a>&nbsp;';
  99. //html += '<a href=\"#\" onclick=\"deleteRow('+row.universalid+')\">删除</a>&nbsp;';
  100. return html;
  101. }
  102. }
  103. ],
  104. fixedCellHeight: false, //是否固定单元格的高度
  105. pageSize:20,
  106. url: 'ProjectAction.do?task=listProject&time=' + new Date().getTime(),
  107. pageParmName: 'p', //页索引参数名,(提交给服务器)
  108. pagesizeParmName: 'pSize', //页记录数参数名,(提交给服务器)
  109. enabledSort: true, //是否允许排序
  110. width: '99.8%',
  111. height: '99%'
  112. });
  113. $("#pageloading").hide();
  114. $("#createdatebegin").ligerDateEditor({
  115. labelWidth : 100,
  116. labelAlign : 'right',
  117. initValue : ''
  118. });
  119. $("#createdateend").ligerDateEditor({
  120. labelWidth : 100,
  121. labelAlign : 'right',
  122. initValue : ''
  123. });
  124. });
  125. function searchByKword(){
  126. var project_build_unit = document.getElementById("project_build_unit");
  127. var createdatebegin = document.getElementById("createdatebegin");
  128. var createdateend = document.getElementById("createdateend");
  129. var project_type = document.getElementById("project_type");
  130. var branch_company = document.getElementById("branch_company");
  131. var project_name = document.getElementById("project_name");
  132. var project_pm = document.getElementById("project_pm");
  133. var s = "";
  134. if(project_build_unit.value != "" && typeof(project_build_unit.value) != "undefined" ){
  135. s += "&project_build_unit=" + encodeURI(encodeURI(project_build_unit.value));
  136. }
  137. if(createdatebegin.value != "" && typeof(createdatebegin.value) != "undefined" ){
  138. s += "&createdatebegin=" + createdatebegin.value;
  139. }
  140. if(createdateend.value != "" && typeof(createdateend.value) != "undefined" ){
  141. s += "&createdateend=" + createdateend.value;
  142. }
  143. if(project_type.value != "" && typeof(project_type.value) != "undefined" ){
  144. s += "&project_type=" + project_type.value;
  145. }
  146. if(branch_company.value != "" && typeof(branch_company.value) != "undefined" ){
  147. s += "&branch_company=" + encodeURI(encodeURI(branch_company.value));
  148. }
  149. if(project_name.value != "" && typeof(project_name.value) != "undefined" ){
  150. s += "&project_name=" + encodeURI(encodeURI(project_name.value));
  151. }
  152. if(project_pm.value != "" && typeof(project_pm.value) != "undefined" ){
  153. s += "&project_pm=" + encodeURI(encodeURI(project_pm.value));
  154. }
  155. grid.set("newPage", "1");
  156. grid = $("#maingrid4").ligerGrid({
  157. columns: [
  158. { display: '建设单位', name: 'project_build_unit', width: 150},
  159. { display: '工程名称', name: 'project_name', width: 150},
  160. { display: '合同造价(万元)', name: 'project_cost', width: 150},
  161. { display: '工程地点', name: 'project_place', width: 70},
  162. { display: '合同签订日期', name: 'project_contract_date', width: 100
  163. ,render: function (row) {
  164. var html = subDate(row.project_contract_date);
  165. return html;
  166. }
  167. },
  168. { display: '项目经理', name: 'project_pm', width: 130},
  169. { display: '安全员', name: 'project_safety', width: 70},
  170. { display: '项目责任人', name: 'record_duty_man', width: 100},
  171. { display: '联系电话', name: 'project_tel', width: 100},
  172. { display: '结构质式', name: 'project_structure', width: 100},
  173. { display: '建筑面积', name: 'project_area', width: 70},
  174. { display: '工期', name: 'project_time', width: 50},
  175. { display: '开工时间', name: 'project_start_date', width: 100
  176. ,render: function (row) {
  177. var html = subDate(row.project_start_date);
  178. return html;
  179. }
  180. },
  181. { display: '项目状态', name: 'project_type', width: 70},
  182. { display: '竣工时间', name: 'project_end_date', width: 100
  183. ,render: function (row) {
  184. var html = subDate(row.project_end_date);
  185. return html;
  186. }
  187. },
  188. { display: '工程质量', name: 'project_quality', width: 100},
  189. { display: '结算造价(万元)', name: 'project_pay_cost', width: 100},
  190. { display: '所属分公司', name: 'branch_company', width: 100},
  191. { display: '备注', name: 'project_remark', width: 100},
  192. {
  193. display: '操作', isAllowHide: false,width: 300,
  194. render: function (row)
  195. {
  196. //var html = '<a href=\"#\" onclick=\"window.parent.f_addTab(new Date().getTime(), \'修改\', \'${pageContext.request.contextPath }/ProjectAction.do?task=toEditProject&universalid='
  197. // + row.universalid + '&tabid=' + getCurrentTabId()+'\');\">修改</a>&nbsp;';
  198. // html += '<a href=\"#\" onclick=\"window.parent.f_addTab(new Date().getTime(), \'档案管理\', \'${pageContext.request.contextPath }/ProjectAction.do?task=toProjectRecordMgr&universalid='
  199. // + row.universalid + '&tabid=' + getCurrentTabId()+'\');\">档案管理</a>&nbsp;';
  200. var html = '<a href=\"#\" onclick=\"openODialog(\'${pageContext.request.contextPath }/ProjectAction.do?task=downloadAffix&universalid='
  201. + row.universalid + '&tabid=' + getCurrentTabId()
  202. + '&dialogId='+row.universalid+'\'+getTime(), \'资料下载\', \''+row.universalid+'\'+getTime());\">资料下载</a>&nbsp;';
  203. html += '<a href=\"${pageContext.request.contextPath }/ProjectAction.do?task=toPrintProjectRecord&universalid='+ row.universalid + '\" target=\"_blank\">打印资料清单</a>&nbsp;';
  204. //html += '<a href=\"#\" onclick=\"deleteRow('+row.universalid+')\">删除</a>&nbsp;';
  205. return html;
  206. }
  207. }
  208. ],
  209. fixedCellHeight: false, //是否固定单元格的高度
  210. pageSize:20,
  211. url: 'ProjectAction.do?task=listProject&time=' + new Date().getTime()+s,
  212. pageParmName: 'p', //页索引参数名,(提交给服务器)
  213. pagesizeParmName: 'pSize', //页记录数参数名,(提交给服务器)
  214. enabledSort: true, //是否允许排序
  215. width: '99.8%',
  216. height: '99%'
  217. });
  218. $("#pageloading").hide();
  219. }
  220. function searchAll() {
  221. $("#project_build_unit").val("");
  222. $("#createdatebegin").val("");
  223. $("#createdateend").val("");
  224. $("#project_type").val("");
  225. $("#branch_company").val("");
  226. $("#project_name").val("");
  227. $("#project_pm").val("");
  228. searchByKword();
  229. }
  230. //导出提交
  231. function exportExcel(){
  232. document.temp.action="ProjectAction.do?task=exportExcel";
  233. document.temp.submit();
  234. }
  235. </script>
  236. </head>
  237. <body >
  238. <form action="ProjectAction.do" method="post" target="_blank" name="temp">
  239. <div class="default_search" >
  240. <ul class="list_search">
  241. <li class="title">建设单位:</li>
  242. <li class="text">
  243. <input type="text" name="project_build_unit" id="project_build_unit" >
  244. </li>
  245. </ul>
  246. <ul class="list_search" style="width: 380px;">
  247. <li class="title" style="width: 80px;">开工时间:</li>
  248. <li class="text" style="width: 135px;">
  249. <input type="text" id="createdatebegin" name="createdatebegin" style="width: 130px;" />
  250. <li class="title" style="width: 15px;">至&nbsp;&nbsp;
  251. </li>
  252. <li class="text" style="width: 135px;">
  253. <input type="text" id="createdateend" name="createdateend" style="width: 130px;" />
  254. </li>
  255. </ul>
  256. <ul class="list_search" >
  257. <li class="title">项目状态:</li>
  258. <li class="text">
  259. <select name="project_type" id="project_type">
  260. <option value="">==请选择==</option>
  261. <c:forEach var="list" items="${listProjectType}">
  262. <option value="${list.data_id }">${list.value_name }</option>
  263. </c:forEach>
  264. </select>
  265. </li>
  266. </ul>
  267. <ul class="list_search" >
  268. <li class="title">所属分公司:</li>
  269. <li class="text">
  270. <input type="text" name="branch_company" id="branch_company" >
  271. </li>
  272. </ul>
  273. <ul class="list_search" >
  274. <li class="title">工程名称:</li>
  275. <li class="text">
  276. <input type="text" name="project_name" id="project_name" >
  277. </li>
  278. </ul>
  279. <ul class="list_search" >
  280. <li class="title">项目经理:</li>
  281. <li class="text">
  282. <input type="text" name="project_pm" id="project_pm" >
  283. </li>
  284. </ul>
  285. <ul>
  286. <li class="search-button" >
  287. <input type="button" class='l-button' name="search" onclick="searchByKword()" value="查询"/>
  288. <input type="button" class='l-button' name="search" onclick="searchAll()" value="查询全部"/>
  289. <input type="button" class="l-button" value="导出Excel" onclick="exportExcel();"/>
  290. </li>
  291. </ul>
  292. </div>
  293. </form>
  294. <div style="clear: both;">
  295. <div id="maingrid4" style="margin: 0; padding: 0"></div>
  296. </div>
  297. </body>
  298. </html>