rentRefundList.jsp 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169
  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. $(function() {
  8. $('#rentRefundDataGrid').datagrid({
  9. rownumbers:true,
  10. fit:true,
  11. pageSize:10,
  12. pageList : [ 10, 20, 30, 40, 50 ],
  13. fitColumns:false,
  14. border:false,
  15. sortOrder:'desc',
  16. pagination:true,
  17. idField:'id',
  18. toolbar:'#searchtool',
  19. url:whzl.basePath + '/rentRefundAction_rentRefundList',
  20. pageNumber:1,
  21. nowrap:true,
  22. loadFilter:function(result){
  23. if(result.success){
  24. return result.obj;
  25. }else{
  26. $.messager.alert("提示",result.message);
  27. return ;
  28. }
  29. },
  30. });
  31. });
  32. /**查询*/
  33. function searchFun(){
  34. $("#rentRefundDataGrid").datagrid("load", {
  35. "rentRefund.houseAddress":$("#address").val(),
  36. "rentRefund.securityPersonName":trim($('#securityPersonName').val()),
  37. "rentRefund.state":$("#state").val()
  38. });
  39. }
  40. /*清除查询条件**/
  41. function ClearQuery() {
  42. $("#tblQuery").find("input").val("");
  43. $("#tblQuery").find("select").val("-1");
  44. }
  45. var endDayFormatter = function(value , row , index){
  46. if(row.endDay == ""||row.endDay==null){
  47. return "";
  48. }else{
  49. return dealDate(value);
  50. }
  51. }
  52. var stateFormatter = function(value , row , index){
  53. if(value =="1"){
  54. return "已创建";
  55. }else if(value =="2"){
  56. return "已退还";
  57. }
  58. }
  59. var checkFormatter = function(value , row , index){
  60. if(row.state == "1"){
  61. return "<img src='<%=basePath%>/js/easyui/themes/icons/pencil.png' title='退还' onclick=checkRentRefund(" + row.id + ") style='cursor:pointer' />"
  62. }else{
  63. return "";
  64. }
  65. }
  66. function checkRentRefund(id){
  67. $.messager.confirm('确认', '确认已退还租金', function(r){
  68. if (r){
  69. $.ajax({
  70. type: "post",//使用get方法访问后台
  71. dataType: "json",//返回json格式的数据
  72. url: "rentRefundAction_checkRentRefund",//要访问的后台地址
  73. data: "rentRefund.id="+id,//要发送的数据
  74. complete :function(){$("#load").hide();},//AJAX请求完成时隐藏loading提示
  75. success: function(msg){
  76. if(msg.success){
  77. $("#rentRefundDataGrid").datagrid("reload");
  78. }
  79. }
  80. })
  81. }
  82. });
  83. }
  84. var detailFormatter = function(value , row , index){
  85. return "<img src='<%=basePath%>/js/easyui/themes/icons/details.png' title='详情' onclick=detailRentRefund(" + row.id + ") style='cursor:pointer' />"
  86. }
  87. function detailRentRefund(id){
  88. $("#detailRentRefundDialog").dialog({
  89. buttons : [{
  90. text : '确定',
  91. iconCls : 'icon-ok',
  92. handler : function(){
  93. $("#detailRentRefundDialog").dialog("close")
  94. }
  95. }],
  96. onLoad : function(){
  97. detailRentRefund_load(id);
  98. }
  99. })
  100. }
  101. </script>
  102. <div class="easyui-layout" data-options="fit:true,border:false">
  103. <div data-options="region:'center',border:false">
  104. <div id="searchtool" data-options="region:'north',border:false">
  105. <div class="clear"></div>
  106. <table id="tblQuery" style="width:100%;font-size:12px;">
  107. <tr>
  108. <td style="text-align: right;">承租人姓名</td>
  109. <td><input id="securityPersonName" style="width: 80px;"/></td>
  110. <td style="text-align: right;">地址</td>
  111. <td>
  112. <input id="address">
  113. </td>
  114. <td style="text-align: right;">状态</td>
  115. <td>
  116. <select id="state">
  117. <option value=""></option>
  118. <option value="1">已创建</option>
  119. <option value="2">已退还</option>
  120. </select>
  121. </td>
  122. <td align="center">
  123. <a href="javascript:searchFun();" class="easyui-linkbutton" data-options="iconCls:'icon-search',plain:true">查询</a>
  124. <a href="javascript:ClearQuery();" class="easyui-linkbutton" data-options="iconCls:'icon-emptied',plain:true">清空</a>
  125. </td>
  126. </tr>
  127. </table>
  128. <div class="clear"></div>
  129. </div>
  130. <table id="rentRefundDataGrid">
  131. <thead frozen="true">
  132. <tr>
  133. <th data-options="field:'id',checkbox:true,width:30">ID</th>
  134. <th data-options="field:'securityPersonName',width:60">承租人</th>
  135. <th data-options="field:'houseAddress',sortable:true,width:150">地址</th>
  136. </tr>
  137. </thead>
  138. <thead>
  139. <tr>
  140. <th data-options="field:'idCard',width:160">承租人身份证号</th>
  141. <th data-options="field:'endDay',width:80,formatter:endDayFormatter">到期时间</th>
  142. <th data-options="field:'refundMoney',width:80">退还金额</th>
  143. <th data-options="field:'state',width:80,formatter:stateFormatter">状态</th>
  144. <th data-options="field:'detail',width:80,formatter:detailFormatter">详情</th>
  145. <th data-options="field:'check',width:80,formatter:checkFormatter">确认</th>
  146. </tr>
  147. </thead>
  148. </table>
  149. </div>
  150. </div>
  151. <div id="detailRentRefundDialog" data-options="title:'&nbsp;退租详情信息',iconCls:'icon-detail',width:800,height:500,modal:true,href:'<%=basePath %>/rentRefundAction_toDeatilRentRefund'">
  152. </div>
  153. <script type="text/javascript">
  154. $(function(){
  155. parent.$.messager.progress('close');
  156. })
  157. </script>