<%@include file="/WEB-INF/common/layouts/common.jsp" %>
<%@ page language="java" pageEncoding="UTF-8" %>
<html>
<head>
    <title>CmAssess列表</title>
</head>
<body>
<%-- <div class="row${fluid}">
    <div class="span6">
        <h2 class="page-title">CmAssess列表</h2>
    </div>
    <div class="span6 header_buttons">
        <a href="${ctx}/cmassess?action=create" class="btn blue pull-right"><i class="icon-plus"></i></a>
    </div>
</div> --%>

<!-- 面包屑 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>CmAssess列表</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}/cmassess" method="get">
                <input type="text" name="search_LIKE_assessId" value="${param['search_LIKE_assessId']}"
                       class="m-wrap small" placeholder="编号">
                <input type="text" name="search_LIKE_city" value="${param['search_LIKE_city']}"
                       class="m-wrap small" placeholder="city编号">
                <input type="text" name="search_LIKE_blockId" value="${param['search_LIKE_blockId']}"
                       class="m-wrap small" placeholder="小区ID">
                <input type="text" name="search_LIKE_blockName" value="${param['search_LIKE_blockName']}"
                       class="m-wrap small" placeholder="小区名">
                <%--<div class="buttons pull-right"  style="margin-left:15px;">--%>
                <%--<a href="${ctx}/cmassess?action=create" class="btn blue pull-right" title="新增"><i class="icon-plus"></i></a>--%>
                <%--</div>--%>
                <%--<div class="buttons pull-right" >--%>
                <%--<a href="javascript:void(0);" onclick="deleteById('')" class="btn blue pull-right" title="删除"><i class="icon-minus"></i></a>--%>
                <%--</div>--%>
                <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>
    <table class="table table-striped table-advance table-hover">
        <thead>
        <tr>
            <th width="40" style="text-align:center"><input id="memberCheckAll" type="checkbox"
                                                            onclick="checkAll(this)"/></th>
            <th width="100">编号</th>
            <th width="100">city编号</th>
            <th width="100">小区ID</th>
            <th width="100">小区名</th>
            <th width="100">朝向</th>
            <th width="100">房间数</th>
            <th width="100">面积</th>
            <th width="100">楼层</th>
            <th width="100">总楼层</th>
            <th width="100">用户ID</th>
            <th width="100">设备标识ID</th>
            <th width="100">房屋评估总价(元)</th>
            <th width="100">房屋评估单价(元)</th>
            <th width="100">创建时间</th>
            <th width="150">操作</th>
        </tr>
        </thead>
        <c:forEach items="${cmAssesss}" var="cmAssess">
            <tr>
                <td nowrap="nowrap" style="text-align:center">
                    <input type="checkbox" name="memberCheck" value="${cmAssess.id}" onclick="checkMember(this)"/>
                </td>
                <td nowrap="nowrap">
                    <a href="${ctx}/cmassess/${cmAssess.id}"> <c:if
                            test="${null ne cmAssess.assessId && '' ne cmAssess.assessId}">
                        <c:out value="${cmAssess.assessId}"/>
                    </c:if>
                        <c:if test="${null eq cmAssess.assessId || '' eq cmAssess.assessId}">
                            &nbsp;
                        </c:if>
                    </a>
                </td>
                <td nowrap="nowrap">
                    <c:if test="${null ne cmAssess.city && '' ne cmAssess.city}">
                        <c:out value="${cmAssess.city}"/>
                    </c:if>
                    <c:if test="${null eq cmAssess.city || '' eq cmAssess.city}">
                        &nbsp;
                    </c:if>
                </td>
                <td nowrap="nowrap">
                    <c:if test="${null ne cmAssess.blockId && '' ne cmAssess.blockId}">
                        <c:out value="${cmAssess.blockId}"/>
                    </c:if>
                    <c:if test="${null eq cmAssess.blockId || '' eq cmAssess.blockId}">
                        &nbsp;
                    </c:if>
                </td>
                <td nowrap="nowrap">
                    <c:if test="${null ne cmAssess.blockName && '' ne cmAssess.blockName}">
                        <c:out value="${cmAssess.blockName}"/>
                    </c:if>
                    <c:if test="${null eq cmAssess.blockName || '' eq cmAssess.blockName}">
                        &nbsp;
                    </c:if>
                </td>
                <td nowrap="nowrap">
                    <c:if test="${null ne cmAssess.forward && '' ne cmAssess.forward}">
                        <c:out value="${cmAssess.forward}"/>
                    </c:if>
                    <c:if test="${null eq cmAssess.forward || '' eq cmAssess.forward}">
                        &nbsp;
                    </c:if>
                </td>
                <td nowrap="nowrap">
                    <c:if test="${null ne cmAssess.room && '' ne cmAssess.room}">
                        <c:out value="${cmAssess.room}"/>
                    </c:if>
                    <c:if test="${null eq cmAssess.room || '' eq cmAssess.room}">
                        &nbsp;
                    </c:if>
                </td>
                <td nowrap="nowrap">
                    <c:if test="${null ne cmAssess.buildArea && '' ne cmAssess.buildArea}">
                        <c:out value="${cmAssess.buildArea}"/>
                    </c:if>
                    <c:if test="${null eq cmAssess.buildArea || '' eq cmAssess.buildArea}">
                        &nbsp;
                    </c:if>
                </td>
                <td nowrap="nowrap">
                    <c:if test="${null ne cmAssess.floor && '' ne cmAssess.floor}">
                        <c:out value="${cmAssess.floor}"/>
                    </c:if>
                    <c:if test="${null eq cmAssess.floor || '' eq cmAssess.floor}">
                        &nbsp;
                    </c:if>
                </td>
                <td nowrap="nowrap">
                    <c:if test="${null ne cmAssess.totalFloor && '' ne cmAssess.totalFloor}">
                        <c:out value="${cmAssess.totalFloor}"/>
                    </c:if>
                    <c:if test="${null eq cmAssess.totalFloor || '' eq cmAssess.totalFloor}">
                        &nbsp;
                    </c:if>
                </td>
                <td nowrap="nowrap">
                    <c:if test="${null ne cmAssess.userId && '' ne cmAssess.userId}">
                        <c:out value="${cmAssess.userId}"/>
                    </c:if>
                    <c:if test="${null eq cmAssess.userId || '' eq cmAssess.userId}">
                        &nbsp;
                    </c:if>
                </td>
                <td nowrap="nowrap">
                    <c:if test="${null ne cmAssess.deviceid && '' ne cmAssess.deviceid}">
                        <c:out value="${cmAssess.deviceid}"/>
                    </c:if>
                    <c:if test="${null eq cmAssess.deviceid || '' eq cmAssess.deviceid}">
                        &nbsp;
                    </c:if>
                </td>
                <td nowrap="nowrap">
                    <c:if test="${null ne cmAssess.totalPrice && '' ne cmAssess.totalPrice}">
                        <c:out value="${cmAssess.totalPrice}"/>
                    </c:if>
                    <c:if test="${null eq cmAssess.totalPrice || '' eq cmAssess.totalPrice}">
                        &nbsp;
                    </c:if>
                </td>
                <td nowrap="nowrap">
                    <c:if test="${null ne cmAssess.unitPrice && '' ne cmAssess.unitPrice}">
                        <c:out value="${cmAssess.unitPrice}"/>
                    </c:if>
                    <c:if test="${null eq cmAssess.unitPrice || '' eq cmAssess.unitPrice}">
                        &nbsp;
                    </c:if>
                </td>
                <td nowrap="nowrap">
                    <c:if test="${null ne cmAssess.createTime && '' ne cmAssess.createTime}">
                        <f:formatDate value='${cmAssess.createTime}' pattern='yyyy-MM-dd HH:mm:ss'/>
                    </c:if>
                    <c:if test="${null eq cmAssess.createTime || '' eq cmAssess.createTime}">
                        &nbsp;
                    </c:if>
                </td>
                <td nowrap="nowrap">
                    <i class="icon-edit pointer icon-large"
                       onclick="window.location='${ctx}/cmassess/${cmAssess.id}?action=edit'"></i>
                    &nbsp;&nbsp;
                        <%--<i title="删除"--%>
                        <%--class="icon-minus pointer icon-large"--%>
                        <%--onclick="deleteById('${cmAssess.id}')"> </i>--%>
                </td>
            </tr>
        </c:forEach>
    </table>
    <div class="row${fluid}">
        <house365:pagination page="${page}"/>
    </div>
</div>
<script type="text/javascript">

    //全选
    function checkAll(btn) {
        if (btn.checked) {
            for (i = 0; i < document.all("memberCheck").length; i++) {
                document.all("memberCheck")[i].checked = "checked";
            }
        }
        else {
            for (i = 0; i < document.all("memberCheck").length; i++) {
                document.all("memberCheck")[i].checked = "";
            }
        }
    }

    //单选
    function checkMember(btn) {
        if (btn.checked) {
            var checkAll = true;
            for (i = 0; i < document.all("memberCheck").length; i++) {
                if (document.all("memberCheck")[i].checked == false) {
                    checkAll = false;
                }
            }

            if (checkAll) {
                document.getElementById("memberCheckAll").checked = true;
            }
        }
        else {
            document.getElementById("memberCheckAll").checked = false;
        }
    }

    <%--var deleteById = function (selectedId) {--%>
    <%--/*--%>
    <%--id为空则是多选  判断是否为空--%>
    <%--为空 提示选择--%>
    <%--不为空 确认后删除--%>
    <%--不为空单选确认后删除--%>
    <%--*/--%>
    <%--if(selectedId == "")--%>
    <%--{--%>
    <%--for(i=0;i<document.getElementsByName('memberCheck').length;i++)       --%>
    <%--{       --%>
    <%--if(document.getElementsByName('memberCheck')[i].checked)--%>
    <%--{--%>
    <%--selectedId += document.getElementsByName('memberCheck')[i].value + ",";--%>
    <%--}--%>
    <%--}     --%>
    <%----%>
    <%--var str = "";--%>
    <%--if(selectedId != "")--%>
    <%--{--%>
    <%--str = selectedId.split(",");--%>
    <%----%>
    <%--if(str[str.length-1] == "")--%>
    <%--{--%>
    <%--selectedId = selectedId.substring(0,selectedId.length-1);--%>
    <%--}--%>
    <%--}--%>
    <%--}--%>
    <%----%>
    <%--if(selectedId == "")--%>
    <%--{--%>
    <%--House365Util.createModal("删除公告", "请至少选择一条公告!", function () {--%>
    <%--});--%>
    <%--}--%>
    <%--else--%>
    <%--{--%>
    <%--House365Util.createModal("删除公告", "确定要删除该公告？", function () {--%>
    <%--$.ajax({--%>
    <%--url: '${ctx}/cmassess/' + selectedId,--%>
    <%--type: "DELETE",--%>
    <%--success: function () {--%>
    <%--window.location.reload();--%>
    <%--}--%>
    <%--});--%>
    <%--});--%>
    <%--}--%>

    <%--};--%>

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