<%@include file="/WEB-INF/common/layouts/common.jsp" %>
<%@ page language="java" pageEncoding="UTF-8" %>
<html>
<head>
    <title>积分汇总查询</title>
</head>
<body>

<!-- 面包屑 begin -->
<div class="row-fluid">
    <div class="span12">
        <ul class="breadcrumb">
            <!-- <li><a href="/house365-hmc-web/">首页</a> <span class="divider"></span></li> -->
            <li class="active"><span class="divider" style="color:#26a0da;font-weight:bold;">/</span>积分汇总查询</li>
        </ul>
    </div>
</div>
<!-- 面包屑 begin -->

<div class="page-container">
    <div class="row${fluid}">
        <div class="span12">
            <form id="filterForm" class="form-inline filterForm" action="${ctx}/cmuser/remainingCreditsList"
                  method="get">
                <input type="hidden" name="orderColumn" value="${param['orderColumn']}"/>
                <input type="hidden" name="orderMode" value="${param['orderMode']}"/>
                <input type="text" name="search_EQ_phoneNumber" value="${param['search_EQ_phoneNumber']}"
                       style="height:20px;"
                       class="m-wrap small" placeholder="用户手机">
                <input type="text" name="search_LIKE_userName" value="${param['search_LIKE_userName']}"
                       style="height:20px;"
                       class="m-wrap small" placeholder="用户姓名">
                <%--<c:if test="${1 eq userRole}">--%>
                    <select class="span2" style="width:220px;height: 20px" name="search_EQ_cityId" id="citySelect">
                        <option value="">不限(站点)</option>
                        <option value="zbu" <c:if
                                test="${param['search_EQ_cityId'] eq 'zbu' }"> selected="selected"</c:if>>事业部
                        </option>
                        <c:forEach items="${cityList}" var="city">
                            <option value="<c:out value="${city.code}"/>" <c:if
                                    test="${param['search_EQ_cityId'] eq city.code }"> selected="selected"</c:if>><c:out
                                    value="${city.name}"/></option>
                        </c:forEach>
                    </select>
                <%--</c:if>--%>
                <div class="buttons pull-right" style="margin:3px 30px 0 0;">
                    <i class="icon-search icon-2x pointer" onclick="$('#filterForm').submit();" title="搜索"></i>
                </div>
            </form>
        </div>
    </div>
    <div class="row${fluid}">
        <div class="span12 well">
            <div class="span3"></div>
            <div class="span2">
                <h4><a href="${ctx}/cmcreditrecord" title="积分明细" class="btn btn-primary">人数合计:</a> <span
                        class="badge badge-warning" style="font-weight:bold;font-size:16px;">${userCount} </span></h4>
            </div>
            <div class="span2">
                <h4> 总余额 ：<span class="badge badge-success"
                                style="font-weight:bold;font-size:16px;">${remainingCredits}</span>淘房币</h4>
            </div>
            <div class="span5"></div>
        </div>
    </div>
    <table class="table table-striped table-advance table-hover">
        <thead>
        <tr>
            <th width="100">用户编号</th>
            <th width="100">用户手机</th>
            <th width="100">用户姓名</th>
            <th width="100" style="cursor:pointer;" onclick="sortBy('credits','
            <c:if test="${param['orderMode'] eq 'desc'}">asc</c:if>
            <c:if test="${param['orderMode'] eq 'asc' || empty param['orderMode']}">desc</c:if>')">淘房币余额↑↓
            </th>
            <th width="100">城市</th>
        </tr>
        </thead>
        <c:forEach items="${cmUsers}" var="cmUser">

            <tr>
                <td nowrap="nowrap">
                        <%--  <a href="${ctx}/cmuser/${cmUser.id}">
                         </a> --%>
                    <c:if test="${null ne cmUser.id && '' ne cmUser.id}">
                        <a href="${ctx}/cmcreditrecord?search_EQ_userId=<c:out value="${cmUser.id}" />"><c:out
                                value="${cmUser.id}"/></a>
                    </c:if>
                    <c:if test="${null eq cmUser.id || '' eq cmUser.id}">
                        &nbsp;
                    </c:if>
                </td>
                <td nowrap="nowrap">
                    <c:if test="${null ne cmUser.phoneNumber && '' ne cmUser.phoneNumber}">
                        <a href="${ctx}/cmcreditrecord?search_EQ_userId=<c:out value="${cmUser.id}" />"><c:out
                                value="${cmUser.phoneNumber}"/></a>
                    </c:if>
                    <c:if test="${null eq cmUser.phoneNumber || '' eq cmUser.phoneNumber}">
                        &nbsp;
                    </c:if>
                </td>
                <td nowrap="nowrap">
                    <c:if test="${null ne cmUser.userName && '' ne cmUser.userName}">
                        <a href="${ctx}/cmcreditrecord?search_EQ_userId=<c:out value="${cmUser.id}" />"><c:out
                                value="${cmUser.userName}"/></a>
                    </c:if>
                    <c:if test="${null eq cmUser.userName || '' eq cmUser.userName}">
                        &nbsp;
                    </c:if>
                </td>
                <td nowrap="nowrap">
                    <c:if test="${null ne cmUser.credits && '' ne cmUser.credits}">
                        <c:out value="${cmUser.credits}"/>
                    </c:if>
                    <c:if test="${null eq cmUser.credits || '' eq cmUser.credits}">
                        0&nbsp;
                    </c:if>
                </td>
                <td nowrap="nowrap">
                    <c:if test="${null ne cmUser.cityId && '' ne cmUser.cityId}">
                        <c:out value="${cmUser.cityId}"/>
                    </c:if>
                    <c:if test="${null eq cmUser.cityId || '' eq cmUser.cityId}">
                        &nbsp;
                    </c:if>
                </td>

            </tr>
        </c:forEach>
    </table>
    <div class="row${fluid}">
        <house365:pagination page="${page}"/>
    </div>
</div>
<script type="text/javascript">
    //排序
    function sortBy(column, mode) {
        $("form input[name='orderColumn']").val(column);
        $("form input[name='orderMode']").val(mode);
        $('#filterForm').submit();
    }

</script>
</body>
</html>
