<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <title>广州医院预约抢号系统</title>
    <link rel="stylesheet" href="{{ url_for('static',filename='css/iconfont.css') }}">
    <link rel="stylesheet" href="{{ url_for('static',filename='css/style.css') }}">
</head>

<body>
<div class="container" id="container">
    <aside class="left-bar" id="leftBar">
        <div class="title">
            <p>上海医院预约抢号系统</p>
        </div>
        <nav class="nav">
            <div class="item active"><a href=""><i class="iconfont icon-daohang2"></i>可预约时间</a><i class="line"></i></div>
            <ul class="nav-item" id="navItem">
            </ul>
        </nav>
    </aside>
    <section class="main">
        <div id="mainContent">
            <div id="menu"><a href="#">菜单</a></div>
            <div class="box">
                <a href="#" name="hp"></a>
                <div class="sub-category">
                    <div><i class="iconfont icon-yunying"></i>医生：{{ doctor_work_info.appointSources[0].doctorIdText }}</div>
                </div>
                <div>
                    {% for source in doctor_work_info['appointSources'] %}
                        {% if source.remainder == 0 %}
                            <a target="_blank" href="{{ url_for('refresh_appoint',hospital_id=source.organId,
                        sitem_id=doctor_work_info.departId, doctor_id=source.doctorId, appoint_id=source.appointSourceId) }}">
                                <div class="item">
                                    <div class="no-logo">{{ source.workDate }}</div>
                                    <br>
                                    <div class="no-logo">{{ source.week }}&nbsp;&nbsp;&nbsp;{{ source.workTypeText }}</div>
                                    <br>

                                    <div class="no-logo">
                                        <div style="color:#EA0000">该时间段已被预约满，点击可开始抢号</div>
                                    </div>
                                </div>
                            </a>
                        {% else %}
                            {% for one in source['body'] %}
                                <a target="_blank" href="{{ url_for('get_appoint',organ_id=one.organId, appoint_depart_code=one.appointDepartCode,
                         doctor_id=one.doctorId, appoint_source_id=one.appointSourceId, source_level=one.sourceLevel,
                                 start_time=one.startTime, end_time=one.endTime, work_type=one.workType, work_date=one.workDate,
                                 order_num=one.orderNum, appoint_depart_name=one.appointDepartName, source_type=one.sourceType) }}">
                                    <div class="item">
                                        <div class="no-logo">{{ one.startTime }}&nbsp;&nbsp;至</div>
                                        <div class="no-logo">{{ one.endTime }}</div>
                                        <br>
                                        <div class="no-logo">{{ one.week }}&nbsp;&nbsp;&nbsp;{{ one.workTypeText }}</div>
                                        <br>
                                        <div class="no-logo">
                                            <div style="color:#53FF53">
                                                该时间段未被预约满，点击可直接预约挂号。剩余：{{ one.sourceNum - one.usedNum }}</div>
                                        </div>
                                    </div>
                                </a>
                            {% endfor %}
                        {% endif %}
                    {% endfor %}
                    {% if doctor_work_info['appointSources']|length > 0 %}
                        <a target="_blank" href="{{ url_for('refresh_appoint',hospital_id=doctor_work_info.organId,
                        sitem_id=doctor_work_info.departId, doctor_id=doctor_work_info.appointSources[0].doctorId, appoint_id='monitor') }}">
                            <div class="item">
                                <div class="no-logo">monitor模式</div>
                                <br>
                                <div class="no-logo">WEEK 全天</div>
                                <br>
                                <div class="no-logo">
                                    <div style="color:#00FF00">时刻监督监督所有号源，当有号源时立马预约挂号</div>
                                </div>
                            </div>
                        </a>
                    {% endif %}
                </div>
            </div>

        </div>
        <footer class="footer">
            <div class="copyright">
                <div>
                    Copyright © 2018- 2050
                    <a href="http://www.ixxooi.com">博客</a>
                </div>
            </div>
        </footer>
    </section>
</div>
</body>
</html>