<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:sptg="http://www.thymeleaf.org">
<head>
    <script th:replace="common/head"></script>
    <style>
        .xm-toolbar .toolbar-tag {
            width: 100%;
            display: flex;
            justify-content: center;
            background-color: #1E9FFF!important;
            color: #fff!important;
        }
    </style>
</head>
<body style="position: absolute;top: 0;bottom: 0;left: 0;right: 0;">
<input type="hidden" id="org_id" th:value="${onLineUser.orgId}"/>
<input type="hidden" id="residentialId" th:value="${residentialId}" />
<div class="layui-fluid">
    <div class="layui-card">
        <div class="layui-form layui-card-header layuiadmin-card-header-auto" style="padding:0;">
            <div class="layui-form-item border-b">
                <div class="layui-inline">
                    <label class="layui-form-label">退款单号</label>
                    <div class="layui-input-block">
                        <input type="text" name="refundNo" placeholder="请输入" autocomplete="off" class="layui-input">
                    </div>
                </div>

                <div class="layui-inline">
                    <label class="layui-form-label">申请人姓名</label>
                    <div class="layui-input-block">
                        <input type="text" name="name" placeholder="请输入" autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-inline">
                    <label class="layui-form-label">申请手机号</label>
                    <div class="layui-input-block">
                        <input type="text" name="phone" placeholder="请输入" autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-inline">
                    <label class="layui-form-label">支付方式</label>
                    <div class="layui-input-block">
                        <select id="pay_type" name="payType" >
                            <option value="">全部</option>
                            <option value="wxPay">微信支付</option>
                            <option value="aliPay">支付宝支付</option>
                        </select>
                    </div>
                </div>
                <div class="layui-inline">
                    <label class="layui-form-label">审核状态</label>
                    <div class="layui-input-block">
                        <select id="check_status" name="checkStatus" >
                            <option value="">全部</option>
                            <option value="0">申请待审核</option>
                            <option value="1">申请审核通过</option>
                            <option value="2">申请审核拒绝</option>
                        </select>
                    </div>
                </div>
                <div class="layui-inline">
                    <label class="layui-form-label">退款状态</label>
                    <div class="layui-input-block">
                        <select id="refund_status" name="refundStatus" >
                            <option value="">全部</option>
                            <option value="WAIT">退款中</option>
                            <option value="SUCCESS">退款成功</option>
                            <option value="REFUNDCLOSE">退款关闭</option>
                            <option value="CHANGE">退款异常</option>
                        </select>
                    </div>
                </div>
                <div class="layui-inline">
                    <label class="layui-form-label">所属单元</label>
                    <div class="layui-input-block">
                        <div id="unit_name"></div>
                        <input id="un_name" type="hidden" />
                    </div>
                </div>
                <div class="layui-inline">
                    <label class="layui-form-label">所属房间</label>
                    <div class="layui-input-block">
                        <div id="room_name"></div>
                        <input id="ro_name" type="hidden" />
                    </div>
                </div>
                <div class="layui-inline">
                    <label class="layui-form-label">申请时间</label>
                    <div class="layui-input-block">
                        <input type="text"  class="layui-input date-icon" id="apply_date"  placeholder="请选择" autocomplete="off">
                        <input type="hidden" id="begin_date"  name="startDateCondition"/>
                        <input type="hidden" id="end_date"  name="endDateCondition" />
                    </div>
                </div>
                <div class="layui-inline" style="margin-left: 38px;">
                    <button class="layui-btn layuiadmin-btn-useradmin"  lay-submit lay-filter="query">查询</button>
                    <button class="layui-btn  layui-btn-primary"  lay-submit lay-filter="reset">重置</button>
                </div>
            </div>

            <!-- 表格+头部按钮 -->
            <div class="layui-card-body" style="padding:0;">
                <div style="padding-bottom: 10px;">
                </div>
                <table id="table_id" lay-filter="table_event"></table>
            </div>
        </div>
    </div>
</div>

<!-- 申请状态 -->
<script type="text/html" id="checkStatus">
    {{#  if(d.checkStatus == 0){ }}
    <span style="color:blue">待审核</span>
    {{#  }else if(d.checkStatus == 1){ }}
    <span style="color:green">审核通过</span>
    {{#  }else if(d.checkStatus == 2){ }}
    <span style="color:red">审核拒绝</span>
    {{#  }else { }}
    <span>未知</span>
    {{# } }}
</script>

<!-- 退款状态 -->
<script type="text/html" id="refundStatus">
    {{#  if(d.refundStatus == 'WAIT'){ }}
    <span style="color:blue">退款中</span>
    {{#  }else if(d.refundStatus == 'SUCCESS'){ }}
    <span style="color:green">退款成功</span>
    {{#  }else if(d.refundStatus == 'REFUNDCLOSE'){ }}
    <span style="color:yellow">退款关闭</span>
    {{#  }else if(d.refundStatus == 'CHANGE'){ }}
    <span style="color: red">退款异常</span>
    {{# }else { }}
    <span style="color: #292B34">未发起退款</span>
    {{# } }}
</script>


<script type="text/html" id="table-useradmin-webuser">
    {{#  if(d.checkStatus == 0){ }}
    <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="edit"
       sptg:security="estate:applyPayRefund:check">审核</a>
    {{#  } else{ }}
    <a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="detail">详情</a>
    {{# } }}
    <!--            <a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="detail" sptg:security="estate:applyPayRefund:detail">详情</a>-->
    <!--            sptg:security="estate:residential:update"-->
    <!--            <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="edit" sptg:security="estate:applyPayRefund:edit">审核</a>-->
</script>

<!-- javascript -->
<script th:src="@{'/layui/layui.js'}"></script>
<script>
    layui.config({
        base: '/' //静态资源所在路径
    });
</script>
<script th:src="@{'/js/estate/residential-apply-pay-refund.js'}"></script>
</body>
</html>
