exchangeHouseIntent.jsp 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198
  1. <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
  2. <script><!--
  3. var select_load = function(){
  4. $('#area_select').combobox({
  5. url: whzl.basePath + '/houseRegisterAction_listChildrenCombobox',
  6. valueField:'value',
  7. textField:'text',
  8. onChange:function (newValue,oldValue) {
  9. $('#communityId_select').combobox("setValue","");
  10. $('#no_select').combobox("setValue","");
  11. $('#houseNumber_select').combobox("setValue","");
  12. $('#communityId_select').combobox('reload',whzl.basePath + '/communityAction_findAll?community.area='+newValue);
  13. }
  14. });
  15. $('#communityId_select').combobox({
  16. url: whzl.basePath + '/communityAction_findAll',
  17. valueField:'value',
  18. textField:'text',
  19. filter:function(q,row){
  20. var opts=$(this).combobox("options");
  21. //return row[opts.textField].indexOf(q)==0;//
  22. return row[opts.textField].indexOf(q)>-1;//将从头位置匹配改为任意匹配
  23. },
  24. onChange:function (newValue,oldValue) {
  25. $('#no_select').combobox("setValue","");
  26. $('#houseNumber_select').combobox("setValue","");
  27. $('#no_select').combobox('reload',whzl.basePath + '/houseAction_findAllNo?house.community.id='+$('#communityId_select').combobox("getValue"));
  28. }
  29. });
  30. $('#no_select').combobox({
  31. //editable:false,
  32. url: whzl.basePath + '/houseAction_findAllNo?house.community.id='+$('#communityId_select').combobox("getValue"),
  33. valueField:'value',
  34. textField:'text',
  35. filter:function(q,row){
  36. var opts=$(this).combobox("options");
  37. //return row[opts.textField].indexOf(q)==0;//
  38. return row[opts.textField].indexOf(q)>-1;//将从头位置匹配改为任意匹配
  39. },
  40. onChange:function (newValue,oldValue) {
  41. $('#houseNumber_select').combobox("setValue","");
  42. $('#houseNumber_select').combobox('reload',whzl.basePath + '/houseAction_findAllHouseNumber?house.community.id='+$('#communityId_select').combobox("getValue") + '&house.no='+newValue);
  43. }
  44. });
  45. $('#houseNumber_select').combobox({
  46. //editable:false,
  47. url: whzl.basePath + '/houseAction_findAllHouseNumber?house.community.id='+$('#communityId_select').combobox("getValue") + '&house.no='+$('#no_select').combobox("getValue"),
  48. valueField:'value',
  49. textField:'text',
  50. filter:function(q,row){
  51. var opts=$(this).combobox("options");
  52. //return row[opts.textField].indexOf(q)==0;//
  53. return row[opts.textField].indexOf(q)>-1;//将从头位置匹配改为任意匹配
  54. }
  55. });
  56. //户型
  57. $.ajax({
  58. type: "post",//使用post方法访问后台
  59. dataType: "json",//返回json格式的数据
  60. url: "aa10Action_listAa10All",//要访问的后台地址
  61. data:{"aa10.letter":"roomType" ,"aa10.name":"户型" },
  62. complete :function(){$("#load").hide();},//AJAX请求完成时隐藏loading提示
  63. success: function(msg){//msg为返回的数据,在这里做数据绑定
  64. if(msg.success){
  65. roomTypeObj = msg.obj.rows;
  66. var select_arr = [];
  67. var data = roomTypeObj;
  68. for(var nItem = 0; nItem < data.length; nItem++ ){
  69. select_arr.push("<option value="+data[nItem].code+">"+data[nItem].value+"</option>");
  70. }
  71. roomType_array = select_arr.join("");
  72. $("#roomType_select").append(roomType_array);
  73. }
  74. }
  75. });
  76. //人员类别
  77. $.ajax({
  78. type: "post",//使用post方法访问后台
  79. dataType: "json",//返回json格式的数据
  80. url: "aa10Action_listAa10All",//要访问的后台地址
  81. data:{"aa10.letter":"personType" ,"aa10.name":"保障人员类别" },
  82. complete :function(){$("#load").hide();},//AJAX请求完成时隐藏loading提示
  83. success: function(msg){//msg为返回的数据,在这里做数据绑定
  84. if(msg.success){
  85. securityPersonHousepersonTypeObj = msg.obj.rows;
  86. }
  87. }
  88. });
  89. $('#securityPersonHouseSelectDataGrid').datagrid({
  90. rownumbers:true,
  91. fit:true,
  92. fitColumns:false,
  93. border:false,
  94. sortOrder:'desc',
  95. toolbar:'#searchtoolHouse',
  96. url:whzl.basePath + '/rent10Action_houseList',
  97. pageSize:20,
  98. pageList : [ 10, 20, 30, 40, 50 ],
  99. pagination:true,
  100. checkOnSelect:true,
  101. selectOnCheck:true,
  102. singleSelect:true,
  103. nowrap:true,
  104. loadFilter:function(result){
  105. if(result.success){
  106. return result.obj;
  107. }else{
  108. return ;
  109. }
  110. }
  111. });
  112. }
  113. /**查询*/
  114. function securityPersonHouseSearchFun(){
  115. $("#securityPersonHouseSelectDataGrid").datagrid("load", {
  116. "house.community.id":trim($('#communityId_select').combobox("getValue")),
  117. "house.no":trim($('#no_select').combobox("getValue")),
  118. "house.houseNumber":trim($('#houseNumber_select').combobox("getValue"))
  119. });
  120. }
  121. /*清除查询条件**/
  122. function securityPersonHouseClearQuery() {
  123. $("#tblQuery1").find("input").val("");
  124. $("#tblQuery1").find("select").val("-1");
  125. }
  126. var select_submit = function(){
  127. var selectedItems = $('#securityPersonHouseSelectDataGrid').datagrid('getSelections');
  128. var ids = [];
  129. $.each(selectedItems,function(index,item){
  130. ids.push(item.id);
  131. })
  132. if(ids.length==0){
  133. $.messager.alert("警告","请选择至少一条记录!");
  134. return;
  135. }
  136. var idsStr = ids.join(",");
  137. return idsStr;
  138. }
  139. --></script>
  140. <div class="easyui-layout" data-options="fit:true,border:false">
  141. <div data-options="region:'center',border:false">
  142. <div id="searchtoolHouse" data-options="region:'north',border:false">
  143. <div class="clear"></div>
  144. <table id="tblQuery1" style="width:100%;">
  145. <tr>
  146. <td align="right"><span>小区名称</span></td>
  147. <td colspan="3" style="font-size:12px;">
  148. <input id="communityId_select">
  149. <input id="no_select" style="width: 60px;">幢
  150. <input id="houseNumber_select" style="width: 80px;">室
  151. </td>
  152. <td>
  153. <a href="javascript:securityPersonHouseSearchFun();" class="easyui-linkbutton" data-options="iconCls:'icon-search',plain:true">查询</a>
  154. <a href="javascript:securityPersonHouseClearQuery();" class="easyui-linkbutton" data-options="iconCls:'icon-emptied',plain:true">清空</a>
  155. </td>
  156. </tr>
  157. </table>
  158. <div class="clear"></div>
  159. </div>
  160. <table id="securityPersonHouseSelectDataGrid" >
  161. <thead frozen="true">
  162. <tr><th data-options="field:'id',checkbox:true,width:30">ID</th>
  163. </tr>
  164. </thead>
  165. <thead>
  166. <tr>
  167. <th data-options="field:'communityName',sortable:true,width:100">小区名称</th>
  168. <th data-options="field:'no',width:80">楼号</th>
  169. <th data-options="field:'houseNumber',width:80">房号</th>
  170. <th data-options="field:'area',width:60">面积</th>
  171. <th data-options="field:'garageArea',width:60">车库面积</th>
  172. <th data-options="field:'lessee',width:60">承租人</th>
  173. <th data-options="field:'lesseeId',width:160">承租人身份证号</th>
  174. <th data-options="field:'endTime',width:80,formatter:endTimeFormatter">到期时间</th>
  175. <th data-options="field:'initialPlacementTime',width:80,formatter:initialPlacementTimeFormatter">初始安置时间</th>
  176. </tr>
  177. </thead>
  178. </table>
  179. </div>
  180. </div>