yaohaoHouse.jsp 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  1. <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
  2. <% String basePath = request.getScheme()+ "://" + request.getServerName() + ":" +request.getServerPort() + request.getContextPath(); %>
  3. <script type="text/javascript"><!--
  4. //户型
  5. $.ajax({
  6. type: "post",//使用post方法访问后台
  7. dataType: "json",//返回json格式的数据
  8. url: "aa10Action_listAa10All",//要访问的后台地址
  9. data:{"aa10.letter":"roomType" ,"aa10.name":"户型" },
  10. complete :function(){$("#load").hide();},//AJAX请求完成时隐藏loading提示
  11. success: function(msg){//msg为返回的数据,在这里做数据绑定
  12. if(msg.success){
  13. roomTypeObj = msg.obj.rows;
  14. var select_arr = [];
  15. var data = roomTypeObj;
  16. for(var nItem = 0; nItem < data.length; nItem++ ){
  17. select_arr.push("<option value="+data[nItem].code+">"+data[nItem].value+"</option>");
  18. }
  19. roomType_array = select_arr.join("");
  20. }
  21. }
  22. });
  23. //房源状态
  24. $.ajax({
  25. type: "post",//使用post方法访问后台
  26. dataType: "json",//返回json格式的数据
  27. url: "aa10Action_listAa10All",//要访问的后台地址
  28. data:{"aa10.letter":"houseState" ,"aa10.name":"房屋状态"},
  29. complete :function(){$("#load").hide();},//AJAX请求完成时隐藏loading提示
  30. success: function(msg){//msg为返回的数据,在这里做数据绑定
  31. if(msg.success){
  32. stateObj = msg.obj.rows;
  33. var select_arr = [];
  34. var data = stateObj;
  35. for(var nItem = 0; nItem < data.length; nItem++ ){
  36. select_arr.push("<option value="+data[nItem].code+">"+data[nItem].value+"</option>");
  37. }
  38. state_array = select_arr.join("");
  39. }
  40. }
  41. });
  42. var yaohaoHouse_load = function(id){
  43. $('#houseDataGrid_yaohaoHouse').datagrid({
  44. idField:'id',
  45. rownumbers:true,
  46. border:false,
  47. sortOrder:'desc',
  48. url:whzl.basePath + '/yaohaoAction_findHousesById?yaohao.id=' + id,
  49. checkOnSelect:true,
  50. selectOnCheck:true,
  51. singleSelect: true,
  52. rowStyler:function(index,row){
  53. if(row.houseState == '4'){
  54. return 'background-color:pink;color:blue;font-weight:bold;';
  55. }
  56. },
  57. loadFilter:function(result){
  58. if(result.success){
  59. return result.obj;
  60. }else{
  61. $.messager.alert("提示",result.message);
  62. return ;
  63. }
  64. }
  65. });
  66. }
  67. //户型
  68. var roomTypeObj = null;
  69. var roomType_array = null;
  70. //房源状态
  71. var stateObj = null;
  72. var state_array = null;
  73. /**小区名称*/
  74. var communityNameFormatter_yaohaoHouse = function(value , row , index){
  75. return row.communityName;
  76. };
  77. /**居住地点*/
  78. var addressFormatter_yaohaoHouse = function(value , row , index){
  79. return row.address ;
  80. };
  81. /**房号*/
  82. var houseNumberFormatter_yaohaoHouse = function(value , row , index){
  83. return row.houseNumber;
  84. };
  85. /**面积*/
  86. var areaFormatter_yaohaoHouse = function(value , row , index){
  87. return row.area;
  88. };
  89. /**户型*/
  90. var roomTypeFormatter_yaohaoHouse = function(value , row , index){
  91. var roomType = "";
  92. for(var nItem = 0; nItem < roomTypeObj.length; nItem++ ){
  93. if(roomTypeObj[nItem].code == value){
  94. roomType = roomTypeObj[nItem].value;
  95. break;
  96. }
  97. }
  98. return roomType;
  99. };
  100. /**状态*/
  101. var stateFormatter_yaohaoHouse = function(value , row , index){
  102. var state = "";
  103. for(var nItem = 0; nItem < stateObj.length; nItem++ ){
  104. if(stateObj[nItem].code == value){
  105. state = stateObj[nItem].value;
  106. break;
  107. }
  108. }
  109. return state;
  110. };
  111. --></script>
  112. <div class="easyui-tabs" id="tabs_yaohaoHouse">
  113. <div title="房源信息" id="fyxx_yaohaoHouse">
  114. <table id="houseDataGrid_yaohaoHouse" title="房源信息" >
  115. <thead frozen="true">
  116. <tr>
  117. <th data-options="field:'id',checkbox:true,width:50">ID</th>
  118. </tr>
  119. </thead>
  120. <thead>
  121. <tr>
  122. <th data-options="field:'communityName',width:100,formatter:communityNameFormatter_yaohaoHouse">小区名称</th>
  123. <th data-options="field:'address',width:200,formatter:addressFormatter_yaohaoHouse">地址</th>
  124. <th data-options="field:'houseNumber',width:40,formatter:houseNumberFormatter_yaohaoHouse">房号</th>
  125. <th data-options="field:'area',width:60,formatter:areaFormatter_yaohaoHouse">面积</th>
  126. <th data-options="field:'roomType',width:60,formatter:roomTypeFormatter_yaohaoHouse">户型</th>
  127. <th data-options="field:'houseState',width:100,formatter:stateFormatter_yaohaoHouse">状态</th>
  128. </tr>
  129. </thead>
  130. </table>
  131. </div>
  132. </div>