123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169 |
- <%--租金退还 --%>
- <%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
- <jsp:include page="../../common/include.jsp" />
- <% String basePath = request.getScheme()+ "://" + request.getServerName() + ":" +request.getServerPort() + request.getContextPath(); %>
- <script type="text/javascript">
- /**小区显示区*/
- $(function() {
- $('#rentRefundDataGrid').datagrid({
- rownumbers:true,
- fit:true,
- pageSize:10,
- pageList : [ 10, 20, 30, 40, 50 ],
- fitColumns:false,
- border:false,
- sortOrder:'desc',
- pagination:true,
- idField:'id',
- toolbar:'#searchtool',
- url:whzl.basePath + '/rentRefundAction_rentRefundList',
- pageNumber:1,
- nowrap:true,
- loadFilter:function(result){
- if(result.success){
- return result.obj;
- }else{
- $.messager.alert("提示",result.message);
- return ;
- }
- },
- });
- });
-
- /**查询*/
- function searchFun(){
- $("#rentRefundDataGrid").datagrid("load", {
- "rentRefund.houseAddress":$("#address").val(),
- "rentRefund.securityPersonName":trim($('#securityPersonName').val()),
- "rentRefund.state":$("#state").val()
- });
- }
-
- /*清除查询条件**/
- function ClearQuery() {
- $("#tblQuery").find("input").val("");
- $("#tblQuery").find("select").val("-1");
- }
-
- var endDayFormatter = function(value , row , index){
- if(row.endDay == ""||row.endDay==null){
- return "";
- }else{
- return dealDate(value);
- }
- }
-
- var stateFormatter = function(value , row , index){
- if(value =="1"){
- return "已创建";
- }else if(value =="2"){
- return "已退还";
- }
- }
- var checkFormatter = function(value , row , index){
- if(row.state == "1"){
- return "<img src='<%=basePath%>/js/easyui/themes/icons/pencil.png' title='退还' onclick=checkRentRefund(" + row.id + ") style='cursor:pointer' />"
- }else{
- return "";
- }
- }
-
- function checkRentRefund(id){
- $.messager.confirm('确认', '确认已退还租金', function(r){
- if (r){
- $.ajax({
- type: "post",//使用get方法访问后台
- dataType: "json",//返回json格式的数据
- url: "rentRefundAction_checkRentRefund",//要访问的后台地址
- data: "rentRefund.id="+id,//要发送的数据
- complete :function(){$("#load").hide();},//AJAX请求完成时隐藏loading提示
- success: function(msg){
- if(msg.success){
- $("#rentRefundDataGrid").datagrid("reload");
- }
- }
- })
- }
- });
- }
-
- var detailFormatter = function(value , row , index){
- return "<img src='<%=basePath%>/js/easyui/themes/icons/details.png' title='详情' onclick=detailRentRefund(" + row.id + ") style='cursor:pointer' />"
- }
-
- function detailRentRefund(id){
- $("#detailRentRefundDialog").dialog({
- buttons : [{
- text : '确定',
- iconCls : 'icon-ok',
- handler : function(){
- $("#detailRentRefundDialog").dialog("close")
- }
- }],
- onLoad : function(){
- detailRentRefund_load(id);
- }
- })
- }
- </script>
- <div class="easyui-layout" data-options="fit:true,border:false">
- <div data-options="region:'center',border:false">
- <div id="searchtool" data-options="region:'north',border:false">
- <div class="clear"></div>
- <table id="tblQuery" style="width:100%;font-size:12px;">
- <tr>
-
- <td style="text-align: right;">承租人姓名</td>
- <td><input id="securityPersonName" style="width: 80px;"/></td>
-
- <td style="text-align: right;">地址</td>
- <td>
- <input id="address">
- </td>
- <td style="text-align: right;">状态</td>
- <td>
- <select id="state">
- <option value=""></option>
- <option value="1">已创建</option>
- <option value="2">已退还</option>
- </select>
- </td>
- <td align="center">
- <a href="javascript:searchFun();" class="easyui-linkbutton" data-options="iconCls:'icon-search',plain:true">查询</a>
- <a href="javascript:ClearQuery();" class="easyui-linkbutton" data-options="iconCls:'icon-emptied',plain:true">清空</a>
- </td>
- </tr>
- </table>
- <div class="clear"></div>
- </div>
-
- <table id="rentRefundDataGrid">
- <thead frozen="true">
- <tr>
- <th data-options="field:'id',checkbox:true,width:30">ID</th>
- <th data-options="field:'securityPersonName',width:60">承租人</th>
- <th data-options="field:'houseAddress',sortable:true,width:150">地址</th>
- </tr>
- </thead>
- <thead>
- <tr>
-
- <th data-options="field:'idCard',width:160">承租人身份证号</th>
- <th data-options="field:'endDay',width:80,formatter:endDayFormatter">到期时间</th>
- <th data-options="field:'refundMoney',width:80">退还金额</th>
- <th data-options="field:'state',width:80,formatter:stateFormatter">状态</th>
- <th data-options="field:'detail',width:80,formatter:detailFormatter">详情</th>
- <th data-options="field:'check',width:80,formatter:checkFormatter">确认</th>
- </tr>
- </thead>
- </table>
- </div>
- </div>
- <div id="detailRentRefundDialog" data-options="title:' 退租详情信息',iconCls:'icon-detail',width:800,height:500,modal:true,href:'<%=basePath %>/rentRefundAction_toDeatilRentRefund'">
- </div>
- <script type="text/javascript">
- $(function(){
- parent.$.messager.progress('close');
- })
- </script>
|