checkHouseList.jsp 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167
  1. <%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
  2. <jsp:include page="../../common/include.jsp" />
  3. <% String basePath = request.getScheme()+ "://" + request.getServerName() + ":" +request.getServerPort() + request.getContextPath(); %>
  4. <script type="text/javascript"><!--
  5. /**用户显示区*/
  6. $(function() {
  7. $('#checkHouseDataGrid').datagrid({
  8. rownumbers:true,
  9. fit:true,
  10. pageSize:20,
  11. pageList : [ 10, 20, 30, 40, 50 ],
  12. fitColumns:false,
  13. border:false,
  14. sortOrder:'desc',
  15. pagination:true,
  16. idField:'id',
  17. url:whzl.basePath + '/checkHouseAction_checkHouseList',
  18. toolbar:'#searchtool',
  19. checkOnSelect:true,
  20. selectOnCheck:true,
  21. nowrap:true,
  22. rowStyler:function(index,row){
  23. if(row.isLock == '1'){
  24. return 'background-color:pink;color:blue;font-weight:bold;';
  25. }
  26. },
  27. loadFilter:function(result){
  28. if(result.success){
  29. return result.obj;
  30. }else{
  31. $.messager.alert("提示",result.message);
  32. return ;
  33. }
  34. }
  35. });
  36. });
  37. /**查询*/
  38. function searchFun(){
  39. $("#checkHouseDataGrid").datagrid("load", {
  40. "checkHouse.name":$("#tblQuery").find("input[id='name']").val(),
  41. "checkHouse.idCard":$("#tblQuery").find("input[id='idCard']").val()
  42. });
  43. }
  44. /*清除查询条件**/
  45. function ClearQuery() {
  46. $("#tblQuery").find("input").val("");
  47. $("#tblQuery").find("select").val("-1");
  48. }
  49. /**详细*/
  50. var detailsFormatter = function(value , row , index){
  51. return "<img src='<%=basePath%>/js/easyui/themes/itemicon/detail.png' title='查看详情' onclick=checkHouseDetails(" + row.id +") style='cursor:pointer' />";
  52. };
  53. /**详细页面对话框*/
  54. var checkHouseDetails = function(id){
  55. $("#detailDialog").dialog({
  56. buttons : [{
  57. text : '确定',
  58. iconCls : 'icon-ok',
  59. handler : function(){
  60. $("#detailDialog").dialog("close");
  61. }
  62. }],
  63. onLoad : function(){
  64. checkHouseDetail_load(id);
  65. }
  66. });
  67. };
  68. var dateFormatter = function(value , row , index){
  69. return dealDate(value);
  70. }
  71. function add(){
  72. $("#addDialog").dialog({
  73. buttons : [{
  74. text : '确定',
  75. iconCls : 'icon-ok',
  76. handler : function(){
  77. add_submit();
  78. }
  79. },{
  80. text : '取消',
  81. iconCls : 'icon-cancel',
  82. handler : function(){
  83. $("#addDialog").dialog("close");
  84. }
  85. }],
  86. onLoad : function(){
  87. }
  88. })
  89. }
  90. var uploadPngFormatter = function(value , row , index){
  91. return "<img src='<%=basePath%>/js/easyui/themes/itemicon/detail.png' title='查看详情' onclick=uploadPng(" + row.id +") style='cursor:pointer' />";
  92. };
  93. /**详细页面对话框*/
  94. var uploadPng = function(id){
  95. window.location.href = whzl.basePath+"/checkHouseAction_uploadPng?checkHouse.id="+id;
  96. };
  97. printAllFormatter = function(value , row , index){
  98. return "<img src='<%=basePath%>/images/printer.png' title='查看详情' onclick=printAll(" + row.id +") style='cursor:pointer' />";
  99. };
  100. function printAll(id){
  101. window.open(whzl.basePath+"/checkHouseAction_toPrint?checkHouseId="+id);
  102. }
  103. --></script>
  104. <div class="easyui-layout" data-options="fit:true,border:false">
  105. <div data-options="region:'center',border:false">
  106. <div id="searchtool" data-options="region:'north' , border:false">
  107. <div class="clear"></div>
  108. <table id="tblQuery" style="width:100%;">
  109. <tr>
  110. <td align="right" ><span>姓名</span></td><td style="width: 10%;"><input id="name" name="checkHouse.name" type="text" style="width: 100px;"/></td>
  111. <td align="right"><span>身份证号</span></td><td style="width: 10%;"><input id="idCard" name="checkHouse.idCard" type="text" style="width: 140px;"/></td>
  112. <td align="left">
  113. <a href="javascript:searchFun();" class="easyui-linkbutton" data-options="iconCls:'icon-search',plain:true">查询</a>
  114. <a href="javascript:ClearQuery();" class="easyui-linkbutton" data-options="iconCls:'icon-emptied',plain:true">清空</a>
  115. <a href="javascript:add();" class="easyui-linkbutton" data-options="iconCls:'icon-add',plain:true">新增</a>
  116. </td>
  117. </tr>
  118. </table>
  119. <div class="clear"></div>
  120. </div>
  121. <table id="checkHouseDataGrid">
  122. <thead>
  123. <tr>
  124. <th data-options="field:'id',checkbox:true,width:30">ID</th>
  125. <th data-options="field:'name',width:80 ">姓名</th>
  126. <th data-options="field:'idCard',width:140">身份证号</th>
  127. <th data-options="field:'houseAddress',width:210">房屋地址</th>
  128. <th data-options="field:'houseArea',width:80">房屋面积</th>
  129. <th data-options="field:'houseLibrary',width:120">库类型</th>
  130. <th data-options="field:'entryPerson',width:80">推送人</th>
  131. <th data-options="field:'entryDate',width:80,formatter:dateFormatter">推送时间</th>
  132. <th data-options="field:'details',align:'center',width:60,formatter:detailsFormatter">查看详细</th>
  133. <th data-options="field:'uploadPng',align:'center',width:60,formatter:uploadPngFormatter">下载图片</th>
  134. <th data-options="field:'printAll',align:'center',width:60,formatter:printAllFormatter">打印所有</th>
  135. </tr>
  136. </thead>
  137. </table>
  138. </div>
  139. </div>
  140. <div id="detailDialog" data-options="title:'&nbsp;详细信息',iconCls:'icon-details',width:800,height:400,modal:true,href:'<%=basePath %>/checkHouseAction_toCheckHouseDetail'">
  141. </div>
  142. <div id="addDialog" data-options="title:'&nbsp;查询信息',iconCls:'icon-add',width:800,height:400,modal:true,href:'<%=basePath %>/checkHouseAction_toCheckHouseAdd'">
  143. </div>
  144. <script type="text/javascript">
  145. <!--
  146. parent.$.messager.progress('close');
  147. //-->
  148. </script>