rentList.jsp 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. <%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
  2. <script type="text/javascript"><!--
  3. /**用户显示区*/
  4. var rent_detail_load = function (idCard){
  5. $('#rentDataGrid').datagrid({
  6. rownumbers:true,
  7. fit:true,
  8. pageSize:20,
  9. pageList : [ 10, 20, 30, 40, 50 ],
  10. fitColumns:false,
  11. border:false,
  12. sortOrder:'desc',
  13. pagination:true,
  14. idField:'id',
  15. url:whzl.basePath + '/rentAction_listRent?rent.securityPerson.idCard=' + idCard,
  16. checkOnSelect:true,
  17. selectOnCheck:false,
  18. nowrap:true,
  19. loadFilter:function(result){
  20. if(result.success){
  21. return result.obj;
  22. }else{
  23. $.messager.alert("提示",result.message);
  24. return ;
  25. }
  26. }
  27. });
  28. };
  29. var dateFormatter = function(value,row,index){
  30. if(value != null){
  31. return value.substring(0,10);
  32. }else{
  33. return "";
  34. }
  35. }
  36. var contractNameFormatter = function(value,row,index){
  37. return row.leaseContract.contractName;
  38. }
  39. var contractNoFormatter = function(value,row,index){
  40. return row.leaseContract.contractNo;
  41. }
  42. var securityPersonNameFormatter = function(value,row,index){
  43. return row.securityPerson.name;
  44. }
  45. var securityPersonIdCardFormatter = function(value,row,index){
  46. return row.securityPerson.idCard;
  47. }
  48. var houseAddressFormatter = function(value,row,index){
  49. return row.house.address;
  50. }
  51. /**详细*/
  52. var detailsFormatter = function(value , row , index){
  53. return "<img src='"+ whzl.basePath + "/images/details.png' title='查看详情' onclick=rentDetails(" + row.id + ") style='cursor:pointer' />";
  54. };
  55. /**详细页面对话框*/
  56. var rentDetails = function(id){
  57. $("#detailRentDialog").dialog(
  58. {
  59. buttons : [
  60. {
  61. text : '确定',
  62. iconCls : 'icon-ok',
  63. handler : function(){
  64. $("#detailRentDialog").dialog("close");
  65. }
  66. }
  67. ],
  68. onLoad : function(){
  69. detail_load(id);
  70. }
  71. }
  72. );
  73. };
  74. --></script>
  75. <div class="easyui-layout" data-options="fit:true,border:false">
  76. <div data-options="region:'center',border:false">
  77. <table id="rentDataGrid" >
  78. <thead>
  79. <tr>
  80. <th data-options="field:'contractName',sortable:true,width:155,formatter:contractNameFormatter">租赁合同名称</th>
  81. <th data-options="field:'contractNo',sortable:true,width:90,formatter:contractNoFormatter">租赁合同编号</th>
  82. <th data-options="field:'securityPersonName',sortable:true,width:80,formatter:securityPersonNameFormatter">租赁人</th>
  83. <th data-options="field:'securityPersonIdCard',sortable:true,width:160,formatter:securityPersonIdCardFormatter">租赁人身份证号码</th>
  84. <th data-options="field:'houseAddress',sortable:true,width:120,formatter:houseAddressFormatter">租赁房屋</th>
  85. <th data-options="field:'rentMonthMoney',sortable:true,width:75">月租金</th>
  86. <th data-options="field:'rentMonth',sortable:true,width:50">收取月数</th>
  87. <th data-options="field:'rentMoney',sortable:true,width:75">收取总金额</th>
  88. <th data-options="field:'startDate',sortable:true,width:75,formatter:dateFormatter">租金开始日期</th>
  89. <th data-options="field:'endDate',sortable:true,width:75,formatter:dateFormatter">租金结束日期</th>
  90. <th data-options="field:'details',align:'center',width:60,formatter:detailsFormatter">查看详情</th>
  91. </tr>
  92. </thead>
  93. </table>
  94. </div>
  95. </div>