<div class="panel-content">
    <div class="panel-title fluid">
        <div class="title-main"><h2>主页</h2></div>
    </div>
    <div class="content-wrap">
        <div class="c-header mt-3">
            <h4>需要你处理</h4>
        </div>
        <div class="c-body">
            <ul class="list-unstyled m-0">
                <% for (const t of auditTenders) { %>
                <% if (t.ledger_status === acLedger.status.checking) { %>
                <li class="media">
                    <img class="mr-3" src="public/images/avatar.png">
                    <div class="media-body">
                        <span class="pull-right text-muted"><%- t.begin_time.toLocaleString() %></span>
                        <h5 class="mt-0"><%- ctx.session.sessionUser.name %><small class="ml-3 text-muted"><%- role %></small></h5>
                        <p><a href="/tender/<%- t.id %>"><%- t.name %></a> 台帐 需要您 <a href="/tender/<%- t.id %>/ledger/audit">审批</a>。</p>
                    </div>
                </li>
                <% } else { %>
                <li class="media">
                    <img class="mr-3" src="public/images/avatar.png">
                    <div class="media-body">
                        <span class="pull-right text-muted"><%- t.end_time.toLocaleString() %></span>
                        <h5 class="mt-0"><%- ctx.session.sessionUser.name %><small class="ml-3 text-muted"><%- role %></small></h5>
                        <p><a href="/tender/<%- t.id %>"><%- t.name %></a> 台帐 需要您 <a href="/tender/<%- t.id %>/ledger/explode">重新上报</a>。</p>
                    </div>
                </li>
                <% } %>
                <% } %>
                <% for (const audit of auditStages) { %>
                <% if (audit.sstatus !== acStage.status.checkNo) { %>
                <li class="media">
                    <img class="mr-3" src="public/images/avatar.png">
                    <div class="media-body">
                        <span class="pull-right text-muted"><%- audit.begin_time.toLocaleString() %></span>
                        <h5 class="mt-0"><%- ctx.session.sessionUser.name %><small class="ml-3 text-muted"><%- role %></small></h5>
                        <p><a href="/tender/<%- audit.tid %>"><%- audit.name %></a>
                            第<%- audit.sorder %>期 <% if (audit.sstatus === acStage.status.checkNoPre) { %><span style="color: indianred">被退回</span> <% } %> 需要您
                            <a href="/tender/<%- audit.tid %>/measure/stage/<%- audit.sorder %>">
                                <% if (audit.sstatus === acStage.status.checkNoPre) { %>重新<% } %>审批
                            </a>。
                        </p>
                    </div>
                </li>
                <% } else { %>
                <li class="media">
                    <img class="mr-3" src="public/images/avatar.png">
                    <div class="media-body">
                        <span class="pull-right text-muted"><%- audit.end_time.toLocaleString() %></span>
                        <h5 class="mt-0"><%- ctx.session.sessionUser.name %><small class="ml-3 text-muted"><%- role %></small></h5>
                        <p><a href="/tender/<%- audit.tid %>"><%- audit.name %></a>
                            第<%- audit.sorder %>期 <% if (audit.sstatus === acStage.status.checkNoPre) { %><span style="color: indianred">被退回</span> <% } %> 需要您
                            <a href="/tender/<%- audit.tid %>/measure/stage/<%- audit.sorder %>">
                                重新上报
                            </a>。
                        </p>
                    </div>
                </li>
                <% } %>
                <% } %>
                <% for (const change of auditChanges) { %>
                <li class="media">
                    <img class="mr-3" src="public/images/avatar.png">
                    <div class="media-body">
                        <span class="pull-right text-muted"><%- (change.sin_time ? change.sin_time.toLocaleString() : '') %></span>
                        <h5 class="mt-0"><%- change.caname %><small class="ml-3 text-muted"><%- role %></small></h5>
                        <p>
                            <a href="/tender/<%- change.tid %>"><%- change.name %></a>
                            变更令 <%- change.ccode %>
                            <% if (change.cstatus === acChange.status.backnew || change.cstatus === acChange.status.back) { %>
                            <span style="color: indianred">被退回</span>
                            <% } %>
                            需要您
                            <a href="/tender/<%- change.tid %>/change/<%- change.cid %>/info">
                                <% if (change.cstatus === acChange.status.checking) { %>
                                审批
                                <% } else if (change.cstatus === acChange.status.backnew) { %>
                                重新审批
                                <% } else { %>
                                重新上报
                                <% } %>
                            </a>。
                        </p>
                    </div>
                </li>
                <% } %>
            </ul>
        </div>
        <div class="c-header mt-4">
            <h4>需要你关注</h4>
        </div>
        <div class="c-body">
            <ul class="list-unstyled m-0">
                <% for (const nl of noticeLedger) { %>
                <li class="media">
                    <img class="mr-3" src="public/images/avatar.png">
                    <div class="media-body">
                        <span class="pull-right text-muted"><%- nl.end_time.toLocaleString() %></span>
                        <h5 class="mt-0"><%- nl.lu_name %><small class="ml-3 text-muted"><%- nl.lu_role %></small></h5>
                        <p><a href="/tender/<%- nl.id %>"><%- nl.name %></a> 台帐 <%- acLedger.statusString[nl.status]%>。</p>
                    </div>
                </li>
                <% } %>
                <% for (const ns of noticeStage) { %>
                <li class="media">
                    <img class="mr-3" src="public/images/avatar.png">
                    <div class="media-body">
                        <span class="pull-right text-muted"><%- ns.end_time.toLocaleString() %></span>
                        <h5 class="mt-0"><%- ns.su_name %><small class="ml-3 text-muted"><%- ns.su_role %></small></h5>
                        <p>
                            <a href="/tender/<%- ns.tid %>"><%- ns.name %></a>
                            <a href="/tender/<%- ns.tid %>/measure/stage/<%- ns.s_order %>">第<%- ns.s_order %>期 </a>
                            <%- acStage.statusString[ns.status]%>。
                        </p>
                    </div>
                </li>
                <% } %>
                <% for (const nc of noticeChange) { %>
                <li class="media">
                    <img class="mr-3" src="public/images/avatar.png">
                    <div class="media-body">
                        <span class="pull-right text-muted"><%- nc.cu_time.toLocaleString() %></span>
                        <h5 class="mt-0"><%- nc.cu_name %><small class="ml-3 text-muted"><%- nc.cu_role %></small></h5>
                        <p>
                            <a href="/tender/<%- nc.id %>"><%- nc.name %></a>
                            <a href="/tender/<%- nc.id %>/change/<%- nc.cid %>/info"><%- nc.c_code %> </a>
                            <%- acChange.statusString[nc.cu_status]%>。
                        </p>
                    </div>
                </li>
                <% } %>
            </ul>
        </div>
    </div>
</div>
