rentList_search.jsp 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187
  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. $('#rentDataGrid').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 + '/rentAction_listRent',
  18. toolbar:'#searchtool',
  19. checkOnSelect:true,
  20. selectOnCheck:false,
  21. nowrap:true,
  22. loadFilter:function(result){
  23. if(result.success){
  24. return result.obj;
  25. }else{
  26. $.messager.alert("提示",result.message);
  27. return ;
  28. }
  29. }
  30. });
  31. });
  32. /**查询*/
  33. function searchFun(){
  34. $("#rentDataGrid").datagrid("load", {
  35. "rent.securityPerson.name":$("#tblQuery").find("input[id='securityPersonName']").val(),
  36. "rent.securityPerson.idCard":$("#tblQuery").find("input[id='securityPersonIdCard']").val()
  37. });
  38. }
  39. /*清除查询条件**/
  40. function ClearQuery() {
  41. $("#tblQuery").find("input").val("");
  42. $("#tblQuery").find("select").val("-1");
  43. }
  44. var dateFormatter = function(value,row,index){
  45. if(value != null){
  46. return value.substring(0,10);
  47. }else{
  48. return "";
  49. }
  50. }
  51. var contractNameFormatter = function(value,row,index){
  52. return row.leaseContract.contractName;
  53. }
  54. var contractNoFormatter = function(value,row,index){
  55. return row.leaseContract.contractNo;
  56. }
  57. var securityPersonNameFormatter = function(value,row,index){
  58. return row.securityPerson.name;
  59. }
  60. var securityPersonIdCardFormatter = function(value,row,index){
  61. return row.securityPerson.idCard;
  62. }
  63. var houseAddressFormatter = function(value,row,index){
  64. return row.house.address;
  65. }
  66. /**详细*/
  67. var detailsFormatter = function(value , row , index){
  68. return "<img src='<%=basePath%>/images/details.png' title='查看详情' onclick=rentDetails(" + row.id + ") style='cursor:pointer' />";
  69. };
  70. /**详细页面对话框*/
  71. var rentDetails = function(id){
  72. $("#detailRentDialog").dialog(
  73. {
  74. buttons : [
  75. {
  76. text : '确定',
  77. iconCls : 'icon-ok',
  78. handler : function(){
  79. $("#detailRentDialog").dialog("close");
  80. }
  81. }
  82. ],
  83. onLoad : function(){
  84. detail_load(id);
  85. }
  86. }
  87. );
  88. };
  89. /**增加租金收取*/
  90. function rentAdd(){
  91. $('#addRentDialog').dialog(
  92. {
  93. buttons : [
  94. {
  95. text : '提交',
  96. iconCls : 'icon-ok',
  97. handler : function(){
  98. add_submit();
  99. $("#addRentDialog").dialog("close");
  100. }
  101. },
  102. {
  103. text : '取消',
  104. iconCls : 'icon-cancel',
  105. handler : function(){
  106. $("#addRentDialog").dialog("close");
  107. }
  108. }
  109. ],
  110. onLoad : function(){
  111. add_load();
  112. }
  113. }
  114. );
  115. }
  116. --></script>
  117. <div class="easyui-layout" data-options="fit:true,border:false">
  118. <div data-options="region:'center',border:false">
  119. <div id="searchtool" data-options="region:'north' , border:false">
  120. <div class="clear"></div>
  121. <table id="tblQuery" style="width:100%;">
  122. <tr>
  123. <td align="right" style="width: 70px;"><span>租房人姓名</span></td><td style="width: 120px;"><input id="securityPersonName" name="rent.securityPerson.name" type="text" style="width: 100px;"/></td>
  124. <td align="right" style="width: 70px;"><span>租房人身份证号</span></td><td style="width: 120px;"><input id="securityPersonIdCard" name="rent.securityPerson.idCard" type="text" style="width: 140px;"/></td>
  125. <td align="left" style="width: 200px;">
  126. <a href="javascript:searchFun();" class="easyui-linkbutton" data-options="iconCls:'icon-search',plain:true">查询</a>
  127. <a href="javascript:ClearQuery();" class="easyui-linkbutton" data-options="iconCls:'icon-emptied',plain:true">清空</a>
  128. </td>
  129. </tr>
  130. </table>
  131. <div class="clear"></div>
  132. </div>
  133. <table id="rentDataGrid">
  134. <thead>
  135. <tr>
  136. <th data-options="field:'contractName',sortable:true,width:155,formatter:contractNameFormatter">租赁合同名称</th>
  137. <th data-options="field:'contractNo',sortable:true,width:90,formatter:contractNoFormatter">租赁合同编号</th>
  138. <th data-options="field:'securityPersonName',sortable:true,width:80,formatter:securityPersonNameFormatter">租赁人</th>
  139. <th data-options="field:'securityPersonIdCard',sortable:true,width:160,formatter:securityPersonIdCardFormatter">租赁人身份证号码</th>
  140. <th data-options="field:'houseAddress',sortable:true,width:120,formatter:houseAddressFormatter">租赁房屋</th>
  141. <th data-options="field:'rentMonthMoney',sortable:true,width:75">月租金</th>
  142. <th data-options="field:'rentMonth',sortable:true,width:50">收取月数</th>
  143. <th data-options="field:'rentMoney',sortable:true,width:75">收取总金额</th>
  144. <th data-options="field:'startDate',sortable:true,width:75,formatter:dateFormatter">租金开始日期</th>
  145. <th data-options="field:'endDate',sortable:true,width:75,formatter:dateFormatter">租金结束日期</th>
  146. <th data-options="field:'details',align:'center',width:60,formatter:detailsFormatter">查看详情</th>
  147. </tr>
  148. </thead>
  149. </table>
  150. </div>
  151. </div>
  152. <div id="detailRentDialog" data-options="title:'&nbsp;租金收取详情',iconCls:'icon-details',width:800,height:420,modal:true,href:'<%=basePath %>/rentAction_toDetail'">
  153. </div>
  154. <div id="addRentDialog" data-options="title:'&nbsp;添加租金收取',iconCls:'icon-add',width:800,height:420,modal:true,href:'<%=basePath %>/rentAction_toAdd'">
  155. </div>
  156. <div id="leaseContractSelectDialog" data-options="title:'&nbsp;选择合同',iconCls:'icon-details',width:800,height:420,modal:true,href:'<%=basePath %>/leaseContractAction_toLeaseContractSelect'">
  157. </div>
  158. <script type="text/javascript">
  159. <!--
  160. parent.$.messager.progress('close');
  161. //-->
  162. </script>