houseSelectList.jsp 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
  2. <script>
  3. //小区名称
  4. var communityNameSelectFormatter = function(value , row , index){
  5. return row.house.communityName;
  6. }
  7. //居住地点
  8. var addressSelectFormatter = function(value , row , index){
  9. return row.house.address;
  10. }
  11. //房号
  12. var houseNumberSelectFormatter = function(value , row , index){
  13. return row.house.houseNumber;
  14. }
  15. //面积
  16. var areaSelectFormatter = function(value , row , index){
  17. return row.house.area;
  18. }
  19. var house_select_load = function(id){
  20. $('#houseSelectDataGrid').datagrid({
  21. rownumbers:true,
  22. fit:true,
  23. fitColumns:false,
  24. border:false,
  25. sortOrder:'desc',
  26. url:whzl.basePath + '/rentPlanAction_listRentPlanHouseItem?rentPlanHouseItem.rentPlan.id=' + id + '&rentPlanHouseItem.house.houseState=' + 2,
  27. checkOnSelect:true,
  28. selectOnCheck:true,
  29. nowrap:true,
  30. loadFilter:function(result){
  31. if(result.success){
  32. return result.obj;
  33. }else{
  34. return ;
  35. }
  36. }
  37. });
  38. }
  39. var house_select_submit = function(){
  40. var houseIds = "";
  41. $("input[name='houseId']:checkbox").each(function(){
  42. if($(this).attr("checked")){
  43. houseIds += $(this).val() + ",";
  44. }
  45. });
  46. houseIds = houseIds.substring(0,houseIds.length-1);
  47. return houseIds;
  48. }
  49. </script>
  50. <div class="easyui-layout" data-options="fit:true,border:false">
  51. <div data-options="region:'center',border:false">
  52. <table id="houseSelectDataGrid" >
  53. <thead frozen="true">
  54. <tr><th data-options="field:'houseId',checkbox:true,width:30">ID</th>
  55. </tr>
  56. </thead>
  57. <thead>
  58. <tr>
  59. <th data-options="field:'communityName',width:100,formatter:communityNameSelectFormatter">小区名称</th>
  60. <th data-options="field:'address',width:200,formatter:addressSelectFormatter">居住地点</th>
  61. <th data-options="field:'houseNumber',width:40,formatter:houseNumberSelectFormatter">房号</th>
  62. <th data-options="field:'area',width:60,formatter:areaSelectFormatter">面积</th>
  63. </tr>
  64. </thead>
  65. </table>
  66. </div>
  67. </div>