houseList.jsp 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193
  1. <%--租金退还 --%>
  2. <%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
  3. <jsp:include page="../../common/include.jsp" />
  4. <% String basePath = request.getScheme()+ "://" + request.getServerName() + ":" +request.getServerPort() + request.getContextPath(); %>
  5. <script type="text/javascript">
  6. //家庭收入情况
  7. var incomeTypeObj = null;
  8. var incomeType_array = null;
  9. $.ajax({
  10. type: "post",//使用post方法访问后台
  11. dataType: "json",//返回json格式的数据
  12. url: "aa10Action_listAa10All",//要访问的后台地址
  13. data:{"aa10.letter":"personType" ,"aa10.name":"保障人员类别" },
  14. complete :function(){$("#load").hide();},//AJAX请求完成时隐藏loading提示
  15. success: function(msg){//msg为返回的数据,在这里做数据绑定
  16. if(msg.success){
  17. incomeTypeObj = msg.obj.rows;
  18. }
  19. }
  20. });
  21. /**小区显示区*/
  22. $(function() {
  23. $('#houseDataGrid').datagrid({
  24. rownumbers:true,
  25. fit:true,
  26. pageSize:10,
  27. pageList : [ 10, 20, 30, 40, 50 ],
  28. fitColumns:false,
  29. border:false,
  30. sortOrder:'desc',
  31. pagination:true,
  32. idField:'id',
  33. toolbar:'#searchtool',
  34. url:whzl.basePath + '/rentRefundAction_houseList',
  35. pageNumber:1,
  36. nowrap:true,
  37. loadFilter:function(result){
  38. if(result.success){
  39. return result.obj;
  40. }else{
  41. $.messager.alert("提示",result.message);
  42. return ;
  43. }
  44. },
  45. });
  46. });
  47. /**查询*/
  48. function searchFun(){
  49. $("#houseDataGrid").datagrid("load", {
  50. "house.community.id":trim($('#communityId').combobox("getValue")),
  51. "house.no":trim($('#no').combobox("getValue")),
  52. "house.houseNumber":trim($('#houseNumber').combobox("getValue")),
  53. "house.lesseeId":trim($('#lesseeId').val()),
  54. "houseState":$("#houseState").val(),
  55. "unpaidMonth":$("#unpaidMonth").val()
  56. });
  57. }
  58. /*清除查询条件**/
  59. function ClearQuery() {
  60. $("#tblQuery").find("input").val("");
  61. $("#tblQuery").find("select").val("-1");
  62. }
  63. var endTimeFormatter = function(value , row , index){
  64. if(row.endTime == ""||row.endTime==null){
  65. return "";
  66. }else{
  67. return dealDate(value);
  68. }
  69. }
  70. var refundFormatter = function(value , row , index){
  71. return "<img src='<%=basePath%>/js/easyui/themes/icons/pencil.png' title='退还' onclick=addRentRefund(" + row.id + ") style='cursor:pointer' />"
  72. }
  73. function addRentRefund(houseId){
  74. $("#addRentRefundDialog").dialog({
  75. buttons : [{
  76. text : '确定',
  77. iconCls : 'icon-ok',
  78. handler : function(){
  79. addRentRefund_submit();
  80. }
  81. },{
  82. text : '取消',
  83. iconCls : 'icon-cancel',
  84. handler : function(){
  85. $("#addRentRefundDialog").dialog("close");
  86. }
  87. }],
  88. onLoad : function(){
  89. addRentRefund_load(houseId);
  90. }
  91. })
  92. }
  93. </script>
  94. <div class="easyui-layout" data-options="fit:true,border:false">
  95. <div data-options="region:'center',border:false">
  96. <div id="searchtool" data-options="region:'north',border:false">
  97. <div class="clear"></div>
  98. <table id="tblQuery" style="width:100%;font-size:12px;">
  99. <tr>
  100. <td><span>小区名称</span></td>
  101. <td>
  102. <input id="communityId">
  103. <input id="no" style="width: 90px;">幢
  104. <input id="houseNumber" style="width: 80px;">室
  105. </td>
  106. <td>承租人身份证号</td>
  107. <td><input id="lesseeId"/></td>
  108. <td align="center">
  109. <a href="javascript:searchFun();" class="easyui-linkbutton" data-options="iconCls:'icon-search',plain:true">查询</a>
  110. <a href="javascript:ClearQuery();" class="easyui-linkbutton" data-options="iconCls:'icon-emptied',plain:true">清空</a>
  111. </td>
  112. </tr>
  113. </table>
  114. <div class="clear"></div>
  115. </div>
  116. <table id="houseDataGrid">
  117. <thead frozen="true">
  118. <tr>
  119. <th data-options="field:'id',checkbox:true,width:30">ID</th>
  120. <th data-options="field:'communityName',sortable:true,width:100">小区名称</th>
  121. </tr>
  122. </thead>
  123. <thead>
  124. <tr>
  125. <th data-options="field:'no',width:80">楼号</th>
  126. <th data-options="field:'houseNumber',width:80">房号</th>
  127. <th data-options="field:'area',width:60">面积</th>
  128. <th data-options="field:'garageArea',width:60">车库面积</th>
  129. <th data-options="field:'lessee',width:60">承租人</th>
  130. <th data-options="field:'lesseeId',width:160">承租人身份证号</th>
  131. <th data-options="field:'endTime',width:80,formatter:endTimeFormatter">到期时间</th>
  132. <th data-options="field:'refund',width:80,formatter:refundFormatter">退还</th>
  133. </tr>
  134. </thead>
  135. </table>
  136. </div>
  137. </div>
  138. <div id="addRentRefundDialog" data-options="title:'&nbsp;房源详情信息',iconCls:'icon-detail',width:800,height:500,modal:true,href:'<%=basePath %>/rentRefundAction_toAddRentRefund'">
  139. </div>
  140. <script type="text/javascript">
  141. $(function(){
  142. parent.$.messager.progress('close');
  143. $('#communityId').combobox({
  144. url: whzl.basePath + '/communityAction_findAll',
  145. valueField:'value',
  146. textField:'text',
  147. filter:function(q,row){
  148. var opts=$(this).combobox("options");
  149. //return row[opts.textField].indexOf(q)==0;//
  150. return row[opts.textField].indexOf(q)>-1;//将从头位置匹配改为任意匹配
  151. },
  152. onChange:function (newValue,oldValue) {
  153. $('#no').combobox("setValue","");
  154. $('#houseNumber').combobox("setValue","");
  155. $('#no').combobox('reload',whzl.basePath + '/houseAction_findAllNo?house.community.id='+$('#communityId').combobox("getValue"));
  156. }
  157. });
  158. $('#no').combobox({
  159. //editable:false,
  160. url: whzl.basePath + '/houseAction_findAllNo?house.community.id='+$('#communityId').combobox("getValue"),
  161. valueField:'value',
  162. textField:'text',
  163. filter:function(q,row){
  164. var opts=$(this).combobox("options");
  165. //return row[opts.textField].indexOf(q)==0;//
  166. return row[opts.textField].indexOf(q)>-1;//将从头位置匹配改为任意匹配
  167. },
  168. onChange:function (newValue,oldValue) {
  169. $('#houseNumber').combobox("setValue","");
  170. $('#houseNumber').combobox('reload',whzl.basePath + '/houseAction_findAllHouseNumber?house.community.id='+$('#communityId').combobox("getValue") + '&house.no='+encodeURIComponent(newValue));
  171. }
  172. });
  173. $('#houseNumber').combobox({
  174. //editable:false,
  175. url: whzl.basePath + '/houseAction_findAllHouseNumber?house.community.id='+$('#communityId').combobox("getValue") + '&house.no='+$('#no').combobox("getValue"),
  176. valueField:'value',
  177. textField:'text',
  178. filter:function(q,row){
  179. var opts=$(this).combobox("options");
  180. //return row[opts.textField].indexOf(q)==0;//
  181. return row[opts.textField].indexOf(q)>-1;//将从头位置匹配改为任意匹配
  182. }
  183. });
  184. })
  185. </script>