<!--上报审批-->
<% if (ctx.stage.status === auditConst.status.uncheck) { %>
<!--上报审批-->
<div class="modal fade" id="sub-sp" data-backdrop="static">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <h5 class="modal-title">上报审批</h5>
            </div>
            <div class="modal-body">
                <div class="form-group">
                    <label>搜索审批人</label>
                    <div class="input-group">
                        <input class="form-control" placeholder="请输入姓名进行检索" type="text" id="searchName">
                        <div class="input-group-append">
                            <button class="btn btn-outline-secondary" type="button" id="searchAccount"><i class="fa fa-search"></i></button>
                        </div>
                    </div>
                </div>
                <div class="card border-primary" id="searchResult" style="display: none">
                    <div class="card-body">
                        <h5 class="card-title">
                            <a href="javascript: void(0)" class="btn btn-primary btn-sm pull-right" id="addAuditor">添加</a>
                            <span>张三</span>
                        </h5>
                        <h6 class="card-subtitle mb-2 text-muted">监理</h6>
                        <p class="card-text">XXXXX公司</p>
                    </div>
                </div>
                <div class="card mt-3">
                    <div class="card-header">
                        审批流程
                    </div>
                    <ul class="list-group list-group-flush" id="auditors">
                        <% for (let i = 0, iLen = stage.auditors.length; i < iLen; i++) { %>
                        <li class="list-group-item" auditorId="<%- stage.auditors[i].aid %>">
                            <a href="javascript: void(0)" class="text-danger pull-right">移除</a>
                            <%- stage.auditors[i].order %> <%- stage.auditors[i].name %>
                            <small class="text-muted"><%- stage.auditors[i].role %></small>
                        </li>
                        <% } %>
                    </ul>
                </div>
            </div>
            <form class="modal-footer" method="post" action="<%- preUrl %>/start">
                <button type="button" class="btn btn-secondary" data-dismiss="modal">关闭</button>
                <input type="hidden" name="_csrf" value="<%= ctx.csrf %>">
                <button class="btn btn-primary" type="submit">确认上报</button>
            </form>
        </div>
    </div>
</div>
<% } %>
<!--重新上报-->
<div class="modal fade" id="sub-sp2" data-backdrop="static">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <h5 class="modal-title">重新上报</h5>
            </div>
            <div class="modal-body">
                <!--显示上次退回意见-->
                <div class="card mt-3">
                    <ul class="list-group list-group-flush">
                        <li class="list-group-item">
                            <span class="text-success pull-right">上报</span>
                            <h5 class="card-title"><i class="fa fa-play-circle fa-rotate-90 text-success"></i> 布尔 <small class="text-muted">施工</small></h5>
                            <p class="card-text">2017-11-25</p>
                        </li>
                        <li class="list-group-item">
                            <span class="text-success pull-right">审批通过</span>
                            <h5 class="card-title"><i class="fa fa-chevron-circle-down text-success"></i> 张三 <small class="text-muted">监理</small></h5>
                            <p class="card-text">审批意见。2017-11-25</p>
                        </li>
                        <li class="list-group-item">
                            <span class="text-success pull-right">审批通过</span>
                            <h5 class="card-title"><i class="fa fa-chevron-circle-down text-success"></i> 王五 <small class="text-muted">监理</small></h5>
                            <p class="card-text">审批通过。2017-11-26</p>
                        </li>
                        <li class="list-group-item">
                            <span class="text-warning pull-right">审批退回</span>
                            <h5 class="card-title"><i class="fa fa-stop-circle text-warning"></i> 李四 <small class="text-muted">监理</small></h5>
                            <p class="card-text">审批退回，审批意见文本。2017-11-27</p>
                        </li>
                    </ul>
                </div>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-secondary" data-dismiss="modal">关闭</button>
                <button type="button" class="btn btn-primary">确认上报</button>
            </div>
        </div>
    </div>
</div>
<!--审批流程/结果-->
<div class="modal fade" id="sp-list" data-backdrop="static">
    <div class="modal-dialog modal-lg" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <h5 class="modal-title">审批流程</h5>
            </div>
            <div class="modal-body">
                <div class="row">
                    <div class="col-4">
                        <div class="card mt-3">
                            <ul class="list-group list-group-flush">
                                <li class="list-group-item"><i class="fa fa fa-play-circle fa-rotate-90"></i> 布尔  <small class="text-muted">施工</small></li>
                                <li class="list-group-item"><i class="fa fa-chevron-circle-down"></i> 张三  <small class="text-muted">监理</small></li>
                                <li class="list-group-item"><i class="fa fa-chevron-circle-down"></i> 王五 <small class="text-muted">监理</small></li>
                                <li class="list-group-item"><i class="fa fa fa-stop-circle"></i> 李四 <small class="text-muted">监理</small></li>
                            </ul>
                        </div>
                    </div>
                    <div class="col-8 modal-height-500" style="overflow: auto">
                        <div class="card mt-3">
                            <ul class="list-group list-group-flush">
                                <li class="list-group-item">
                                    <span class="text-success pull-right">上报</span>
                                    <h5 class="card-title"><i class="fa fa-play-circle fa-rotate-90 text-success"></i> 布尔 <small class="text-muted">施工</small></h5>
                                    <p class="card-text">2017-11-25</p>
                                </li>
                                <li class="list-group-item">
                                    <span class="text-success pull-right">审批通过</span>
                                    <h5 class="card-title"><i class="fa fa-chevron-circle-down text-success"></i> 张三 <small class="text-muted">监理</small></h5>
                                    <p class="card-text">审批意见。2017-11-25</p>
                                </li>
                                <li class="list-group-item">
                                    <span class="text-success pull-right">审批通过</span>
                                    <h5 class="card-title"><i class="fa fa-chevron-circle-down text-success"></i> 王五 <small class="text-muted">监理</small></h5>
                                    <p class="card-text">审批通过。2017-11-26</p>
                                </li>
                                <li class="list-group-item">
                                    <span class="text-warning pull-right">审批退回 布尔</span>
                                    <h5 class="card-title"><i class="fa fa-stop-circle text-warning"></i> 李四 <small class="text-muted">监理</small></h5>
                                    <p class="card-text">审批退回，审批意见文本。2017-11-27</p>
                                </li>
                            </ul>
                        </div>
                        <!--退回原报重新上报-->
                        <div class="card mt-3">
                            <ul class="list-group list-group-flush">
                                <li class="list-group-item">
                                    <span class="text-success pull-right">重新上报</span>
                                    <h5 class="card-title"><i class="fa fa-play-circle fa-rotate-90 text-success"></i> 布尔 <small class="text-muted">施工</small></h5>
                                    <p class="card-text">2017-12-01</p>
                                </li>
                                <li class="list-group-item">
                                    <span class="text-success pull-right">审批通过</span>
                                    <h5 class="card-title"><i class="fa fa-chevron-circle-down text-success"></i> 张三 <small class="text-muted">监理</small></h5>
                                    <p class="card-text">审批通过 2017-12-02</p>
                                </li>
                                <li class="list-group-item">
                                    <span class="text-warning pull-right">审批退回 张三</span>
                                    <h5 class="card-title"><i class="fa fa-chevron-circle-down text-warning"></i> 王五 <small class="text-muted">监理</small></h5>
                                    <p class="card-text">审批退回 2017-12-02</p>
                                </li>
                                <!--王五退回上一审批人 张三，张三重新审批-->
                                <li class="list-group-item">
                                    <span class="pull-right">审批中</span>
                                    <h5 class="card-title"><i class="fa fa-chevron-circle-down"></i> 张三 <small class="text-muted">监理</small></h5>
                                    <p class="card-text"></p>
                                </li>
                                <li class="list-group-item">
                                    <h5 class="card-title"><i class="fa fa-stop-circle"></i> 李四 <small class="text-muted">监理</small></h5>
                                </li>
                            </ul>
                        </div>
                    </div>
                </div>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-secondary" data-dismiss="modal">关闭</button>
            </div>
        </div>
    </div>
</div>
<!--审批通过-->
<div class="modal fade" id="sp-done" data-backdrop="static">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <h5 class="modal-title">审批通过</h5>
            </div>
            <div class="modal-body">
                <div class="card mt-3">
                    <ul class="list-group list-group-flush">
                        <li class="list-group-item">
                            <span class="text-success pull-right">上报</span>
                            <h5 class="card-title"><i class="fa fa-play-circle fa-rotate-90 text-success"></i> 布尔 <small class="text-muted">施工</small></h5>
                            <p class="card-text">2017-11-25</p>
                        </li>
                        <li class="list-group-item">
                            <span class="text-success pull-right">审批通过</span>
                            <h5 class="card-title"><i class="fa fa-chevron-circle-down text-success"></i> 张三 <small class="text-muted">监理</small></h5>
                            <p class="card-text">审批意见。2018-01-01</p>
                        </li>
                        <li class="list-group-item">
                            <span class="text-success pull-right">审批通过</span>
                            <h5 class="card-title"><i class="fa fa-chevron-circle-down text-success"></i> 王五 <small class="text-muted">监理</small></h5>
                            <p class="card-text">审批意见。2018-01-01</p>
                        </li>
                        <li class="list-group-item">
                            <span class="text-warning pull-right">审批退回 王五</span>
                            <h5 class="card-title"><i class="fa fa-stop-circle text-warning"></i> 李四 <small class="text-muted">监理</small></h5>
                            <p class="card-text">审批意见。2018-01-01</p>
                        </li>
                        <li class="list-group-item">
                            <span class="pull-right">审批中</span>
                            <h5 class="card-title"><i class="fa fa-chevron-circle-down"></i> 王五 <small class="text-muted">监理</small></h5>
                            <div class="form-group">
                                <label>审批意见<b class="text-danger">*</b></label>
                                <textarea class="form-control" ></textarea>
                            </div>
                        </li>
                        <li class="list-group-item">
                            <h5 class="card-title"><i class="fa fa-stop-circle"></i> 李四 <small class="text-muted">监理</small></h5>
                        </li>
                    </ul>
                </div>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-secondary" data-dismiss="modal">关闭</button>
                <button type="button" class="btn btn-success" >确认通过</button>
            </div>
        </div>
    </div>
</div>
<!--审批退回-->
<div class="modal fade" id="sp-back" data-backdrop="static">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <h5 class="modal-title">审批退回</h5>
            </div>
            <div class="modal-body">
                <div class="card mt-3">
                    <ul class="list-group list-group-flush">
                        <li class="list-group-item">
                            <span class="text-success pull-right">上报</span>
                            <h5 class="card-title"><i class="fa fa-play-circle fa-rotate-90 text-success"></i> 布尔 <small class="text-muted">施工</small></h5>
                            <p class="card-text">2017-11-25</p>
                        </li>
                        <li class="list-group-item">
                            <span class="text-success pull-right">审批通过</span>
                            <h5 class="card-title"><i class="fa fa-chevron-circle-down text-success"></i> 张三 <small class="text-muted">监理</small></h5>
                            <p class="card-text">审批意见。2018-01-01</p>
                        </li>
                        <li class="list-group-item">
                            <span class="pull-right">审批中</span>
                            <h5 class="card-title"><i class="fa fa-chevron-circle-down"></i> 王五 <small class="text-muted">监理</small></h5>
                            <div class="form-group">
                                <label>审批意见<b class="text-danger">*</b></label>
                                <textarea class="form-control" ></textarea>
                            </div>
                            <div class="alert alert-warning"><div class="form-check form-check-inline">
                                    <input class="form-check-input" type="radio" name="inlineRadioOptions" id="inlineRadio1" value="option1">
                                    <label class="form-check-label" for="inlineRadio1">退回上报 布尔</label>
                                </div>
                                <div class="form-check form-check-inline">
                                    <input class="form-check-input" type="radio" name="inlineRadioOptions" id="inlineRadio2" value="option2">
                                    <label class="form-check-label" for="inlineRadio2">退回上一审批人 张三</label>
                                </div></data-min-view>
                        </li>
                        <li class="list-group-item">
                            <h5 class="card-title"><i class="fa fa-stop-circle"></i> 李四 <small class="text-muted">监理</small></h5>
                        </li>
                    </ul>
                </div>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-secondary" data-dismiss="modal">关闭</button>
                <button type="button" class="btn btn-warning" >确认退回</button>
            </div>
        </div>
    </div>
</div>