<#assign title="业委会"/>
<#include "/home/frag.head.ftl" />

<div class="page__bd">
    <header class="demos-header">
        <h1 class="demos-title">每日上报</h1>
    </header>
    <div class="weui-tab">
        <div class="weui-navbar">
        <div class="weui-navbar__item weui-bar__item_on">
            <a id="mrDate"></a><br/>
            <span style="background-color: #75859f">&nbsp;&nbsp;&nbsp</span>待报&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp
            <span style="background-color: yellow">&nbsp;&nbsp;&nbsp</span>异常&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp
            <span style="background-color: #0bb20c">&nbsp;&nbsp;&nbsp</span>已报
        </div>
        </div>
    </div>
    <br/>
    <br/>
    <br/>
    <div class="weui-tab" style="height: 400px">
        <div class="weui-navbar">
            <table border="1" cellspacing="0" cellpadding="0" style="width: 100%">
                <tbody id="tableId">
                    <tr id="btnRBmp"><#--//colspan="2"-->
                        <#--<td &lt;#&ndash;rowspan="4"&ndash;&gt; style="border-top-color: #75859f" bgcolor="greenyellow" bordercolor =“＃007eff”>101</td>-->
                        <#--<td &lt;#&ndash;rowspan="2"&ndash;&gt; style="border-top-color: #75859f" bordercolor =“＃007eff”>102</td>-->
                        <#--<td style="border-top-color: #75859f" ><a href="javascript:void(0);">101</a></td>-->
                        <#--<td style="border-top-color: #75859f"> 102</td>-->
                        <#--<td style="border-top-color: #75859f"> 103</td>-->
                        <#--<td style="border-top-color: #75859f"> 104</td>-->
                        <#--<td style="border-top-color: #75859f"> 201</td>-->
                        <#--<td style="border-top-color: #75859f"> 302</td>-->
                        <#--<td style="border-top-color: #75859f"> 303</td>-->
                        <#--<td style="border-top-color: #75859f"> 304</td>-->
                        <#--<td style="border-top-color: #75859f"> 201</td>-->
                    </tr>
                </tbody>
            </table>
        </div>
    </div>
    <br/>

    <div class="weui-btn-area"  style="display: grid;">
        <#--<p id="btnRB" class="weui-btn weui-btn_primary" href="javascript:" type="hidden">一键通知</p>-->
        <p id="return" class="weui-btn weui-btn_primary" href="javascript:">返&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;回</p>
    </div>
</div>
<#include "/home/frag.foot.ftl" />
<script>
    (function ($) {
        $(function(){
            var userId = $("#userId").val;
            var date2 = new Date();
            date2.setTime(date2.getTime());
            var month = date2.getMonth()+1;
            var day = date2.getDate();
            $("#mrDate").text('小区最新填报情况('+month+'/'+day+')');
            // $("#mrDate").text(month);
            var search = location.search;
            var s;
            if(search.indexOf("?")!=-1){
                s = search.substr(1);
            }
            var ii =0;
        $.ajax({
            url: '/yeweihui/ribaoDy',
            type: "get",
            data: {
                str:s
            },success: function(data){
                console.log(data.data);
                var tr = $("<tr></tr>");
                for (var i = 0; i < data.data.length; i++) {
                    var v = data.data[i];
                    if(ii%5==0 && ii !=0){
                        tr = $("<tr></tr>");
                    }
                    var td;
                    if(v.msStatus == 2){//异常
                        td = '<td style="background-color: yellow" align="center">'+v.doorplate+'</td>';
                    }else if(v.msStatus != 2 && v.reportId != 0 && v.msStatus != null && v.reportId !=null){//已报
                        td = '<td style="background-color: #0bb20c" align="center">'+v.doorplate+'</td>';
                    }else if(v.reportId == null){//待报
                        td = '<td style="background-color: #75859f" align="center">'+v.doorplate+'</td>';
                    }
                    tr.append(td);
                    $("#tableId").append(tr);
                    ii++;
                }

            }
        });
        });
    })(jQuery);

    $('#return').on('click', function () {
        window.location.href = "/user/home.html#tab2"
        // alert("日报");
    });
</script>

