<% if (auditStatus === 1 || auditStatus === 2) { %>
<!--变更单位-->
<div class="modal fade" id="editcompany" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <h5 class="modal-title" id="myModalLabel">变更单位</h5>
                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                </button>
            </div>
            <div class="modal-body">
                <div id="companyshow">
                    <% for (const company of companyList) { %>
                    <div class="form-group">
                        <input type="text" id="<%= company.id %>" class="form-control" value="<%= company.name %>">
                    </div>
                    <% } %>
                </div>
                <div class="alert alert-warning" role="alert">修改后，已创建的变更不受影响。</div>
                <p><button class="btn btn-primary btn-sm" id="addcompany" role="button" title="填写公司"><b class="fa fa-plus"></b></button></p>
                <div id="companyadddiv">
                    <!--<input type="text" class="form-control" placeholder="请输入公司名称">-->
                </div>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-secondary" data-dismiss="modal">取消</button>
                <button type="button" id="updatecompany" class="btn btn-primary">确定</button>
            </div>
        </div>
    </div>
</div>

<!--上报审批-->
<div class="modal fade" id="sub-ap" data-backdrop="static">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <h5 class="modal-title up-change">上报审批</h5>
                <h5 class="modal-title save-change">保存修改</h5>
            </div>
            <form method="post" action="/tender/<%- tender.id %>/change/<%- change.cid %>/save">
                <div class="modal-body">
                    <div class="form-group">
                        <label>选择审批人</label>
                        <div class="input-group">
                            <div class="input-group-prepend">
                                <select class="form-control" id="account_group">
                                    <option value="0">所有分组</option>
                                    <% for (const dw in accountGroup) { %>
                                        <option value="<%= dw %>"><%= accountGroup[dw] %></option>
                                    <% } %>
                                </select>
                            </div>
                            <select class="form-control" id="account_list">
                                <option value="0">选择审批人</option>
                                <% for (const account of accountList) { %>
                                    <option value="<%= account.id %>"><%= account.name %><% if (account.role !== '') { %>（<%= account.role %>）<% } %><% if (account.company !== '') { %> -<%= account.company %><% } %></option>
                                <% } %>
                            </select>
                        </div>
                    </div>
                    <div id="search_audit_list">
                    </div>
                    <div class="card mt-3">
                        <div class="card-header">
                            审批流程
                        </div>
                        <ul class="list-group list-group-flush" id="auditList">
                            <% for (const [index, audit] of auditList.entries()) { %>
                                <% if (audit.usite !== 0) { %>
                                <li class="list-group-item" data-auditmsg="<%= audit.uid + '/%/' + audit.name + '/%/' + audit.jobs + '/%/' + audit.company %>"
                                    data-auditid="<%= audit.uid %>">
                                    <a href="javascript:void(0)" class="text-danger pull-right remove_audit_btn">移除</a>
                                    <span><%= index %></span> <%= audit.name %>  <small class="text-muted"><%= audit.jobs %></small>
                                    <p class="m-0 ml-2"><small class="text-muted"><%= audit.company %></small></p>
                                </li>
                                <% } %>
                            <% } %>
                        </ul>
                        <input type="hidden" id="auditIdList" value="">
                    </div>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-secondary" data-dismiss="modal">关闭</button>
                    <button type="button" data-sumbit="sumbit_change" data-category="up_change" class="btn btn-primary up-change">确认上报</button>
                    <button type="button" data-sumbit="sumbit_change" data-category="save_change" class="btn btn-success save-change">保存修改</button>
                </div>
            </form>
        </div>
    </div>
</div>

<script src="/public/js/change_company.js"></script>

<!--添加清单-->
<div class="modal fade " tabindex="-1" role="dialog" aria-hidden="true" id="addlist">
    <style>
        /* 设置滚动条的样式 */
        .fixed_headers ::-webkit-scrollbar, .fixed_headers2 ::-webkit-scrollbar {
            width:5px;
        }
        .fixed_headers thead tr, .fixed_headers2 thead tr {
            display: block;
            position: relative;
            overflow-y: scroll;
        }
        .fixed_headers tbody, .fixed_headers2 tbody {
            display: block;
            overflow-y: scroll;
            height: 369px;
        }
        .fixed_headers td:nth-child(1),
        .fixed_headers th:nth-child(1) {
            width: 6%;
            min-width: 40px;
            text-overflow:ellipsis;
            white-space:nowrap;
            overflow:hidden;
        }
        .fixed_headers td:nth-child(2),
        .fixed_headers th:nth-child(2) {
            width: 20%;
            min-width: 133px;
        }
        .fixed_headers td:nth-child(3),
        .fixed_headers th:nth-child(3) {
            width: 37%;
            min-width: 247px;
        }
        .fixed_headers td:nth-child(4),
        .fixed_headers th:nth-child(4) {
            width: 10%;
            min-width: 66px;
        }
        .fixed_headers td:nth-child(5),
        .fixed_headers th:nth-child(5) {
            width: 13%;
            min-width: 86px;
        }
        .fixed_headers td:nth-child(6),
        .fixed_headers th:nth-child(6) {
            width: 13%;
            min-width: 87px;
        }

        .fixed_headers2 td:nth-child(1),
        .fixed_headers2 th:nth-child(1) {
            width: 18%;
            min-width: 100px;
            text-overflow:ellipsis;
            white-space:nowrap;
            overflow:hidden;
        }
        .fixed_headers2 td:nth-child(2),
        .fixed_headers2 th:nth-child(2) {
            width: 23%;
            min-width: 113px;
        }
        .fixed_headers2 td:nth-child(3),
        .fixed_headers2 th:nth-child(3) {
            width: 25%;
            min-width: 124px;
        }
        .fixed_headers2 td:nth-child(4),
        .fixed_headers2 th:nth-child(4) {
            width: 16%;
            min-width: 82px;
        }
        .fixed_headers2 td:nth-child(5),
        .fixed_headers2 th:nth-child(5) {
            width: 8%;
            min-width: 41px;
        }
        .fixed_headers2 .colspan_1 {
            width: 95%!important;
        }
        .fixed_headers2 .colspan_2 {
            width: 5%!important;
            min-width: 41px!important;
        }
    </style>
    <div class="modal-dialog modal-xl">
        <div class="modal-content">
            <div class="modal-header">
                <h5 class="modal-title" id="mySmallModalLabel">从清单中选择</h5>
                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                </button>
            </div>
            <div class="modal-body">
                <div class="row">
                    <div class="col-7">
                        <div style="height:400px;overflow-y:hidden">
                            <table class="table table-striped table-bordered table-hover table-sm fixed_headers">
                                <thead><tr><th>序号</th><th>清单编号</th><th>名称</th><th>单位</th><th>单价</th><th>数量</th></tr></thead>
                                <tbody id="table-list-select">
                                </tbody>
                            </table>
                        </div>
                    </div>
                    <div class="col-5">
                        <div style="height:400px;overflow-y:hidden">
                            <table class="table table-striped table-bordered table-hover table-sm fixed_headers2">
                                <thead>
                                <tr><th>项目节编号</th><th>名称</th><th>部位明细</th><th>部位数量</th><th>选择</th></tr>
                                </thead>
                                <tbody id="code-list" data-index="">
                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>
            </div>
            <div class="modal-footer">
                <!--<button type="button" class="add-list-btn btn btn-outline-primary">添加空白清单</button>-->
                <button type="button" class="btn btn-secondary" data-dismiss="modal" id="cancel-list-btn">取消</button>
                <button type="button" class="add-list-btn btn btn-primary">添加</button>
            </div>
        </div>
    </div>
</div>

<% if (auditStatus === 2) { %>
    <!--重新上报-->
    <div class="modal fade" id="sub-sp2" 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">
                            <a href="#sub-ap" data-toggle="modal" data-category="" data-target="#sub-ap" id="hideSp">修改审批流程</a>
                            <div class="card mt-3">
                                <ul class="list-group list-group-flush">
                                    <% for (const audit of auditList) { %>
                                        <% if (audit.usite === 0) { %>
                                            <li class="list-group-item">
                                                <i class="fa fa-play-circle fa-rotate-90"></i>
                                                <%= audit.name %>  <small class="text-muted"><%= audit.jobs %></small>
                                            </li>
                                        <% } %>
                                    <% } %>
                                </ul>
                                <ul class="list-group list-group-flush" id="shenpi-audit-list">
                                    <% for (const [index,a] of auditList.entries()) { %>
                                        <% if (a.usite !== 0 ) { %>
                                            <li class="list-group-item" data-auditid="<%= a.uid %>">
                                                <% if (index+1 !== auditList.length) { %>
                                                    <i class="fa fa-chevron-circle-down"></i>
                                                <% } else if (index+1 === auditList.length) { %>
                                                    <i class="fa fa-stop-circle"></i>
                                                <% } %>
                                                <%= a.name %>  <small class="text-muted"><%= a.jobs %></small>
                                            </li>
                                        <% }%>
                                    <% } %>
                                </ul>
                            </div>
                        </div>
                        <div class="col-8 modal-height-500" style="overflow: auto">
                            <% for (const time in auditList3) { %>
                            <% if (auditList3[time].length > 0) { %>
                                <div class="card mt-3">
                                    <ul class="list-group list-group-flush">
                                        <% for (const [aindex,al] of auditList3[time].entries()) { %>
                                            <li class="list-group-item">
                                                <% if (al.usite === 0 && al.status === 2) { %>
                                                    <span class="pull-right">重新上报中</span>
                                                <% } else if (al.usite === 0 && al.status === 3) { %>
                                                    <span class="text-success pull-right">上报</span>
                                                <% } else if (al.usite !== 0 && al.status === 2) { %>
                                                    <span class="pull-right">审批中</span>
                                                <% } else if (al.usite !== 0 && al.status === 3) { %>
                                                    <span class="text-success pull-right">审批通过</span>
                                                <% } else if (al.usite !== 0 && al.status === 4) { %>
                                                    <span class="text-danger pull-right">审批终止</span>
                                                <% } else if (al.usite !== 0 && (al.status === 5 || al.status === 6)) { %>
                                                    <span class="text-warning pull-right">审批退回 </span>
                                                <% } %>
                                                <h5 class="card-title">
                                                    <% if (al.usite === 0 && al.status === 2 ) { %>
                                                        <i class="fa fa-play-circle fa-rotate-90"></i>
                                                    <% } else if (al.usite === 0 && al.status === 3 ) { %>
                                                        <i class="fa fa-play-circle fa-rotate-90 text-success"></i>
                                                    <% } else if (al.status === 1 || al.status === 2) { %>
                                                        <i class="fa <% if (aindex+1 === auditList3[time].length) { %>fa-stop-circle<% } else { %>fa-chevron-circle-down<% } %> "></i>
                                                    <% } else if (al.status === 3) { %>
                                                        <i class="fa <% if (aindex+1 === auditList3[time].length) { %>fa-stop-circle<% } else { %>fa-chevron-circle-down<% } %> text-success"></i>
                                                    <% } else if (al.status === 4) { %>
                                                        <i class="fa <% if (aindex+1 === auditList3[time].length) { %>fa-stop-circle<% } else { %>fa-chevron-circle-down<% } %> text-danger"></i>
                                                    <% } else if (al.status === 5 || al.status === 6) { %>
                                                        <i class="fa <% if (aindex+1 === auditList3[time].length) { %>fa-stop-circle<% } else { %>fa-chevron-circle-down<% } %> text-warning"></i>
                                                    <% } %>
                                                    <%= al.name %>&nbsp;<small class="text-muted"><%= al.jobs %></small>
                                                </h5>
                                                <% if (al.sdesc !== '' && al.sdesc !== null) { %>
                                                    <p class="card-text mb-1"><%= al.sdesc %></p>
                                                <% } %>
                                                <% if (al.sin_time !== null) { %>
                                                    <p class="card-text"><small class="text-muted"><%= moment(al.sin_time).format('YYYY-MM-DD') %></small></p>
                                                <% } %>
                                            </li>
                                        <% } %>
                                    </ul>
                                </div>
                            <% } %>
                            <% } %>
                        </div>
                    </div>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-secondary" data-dismiss="modal">关闭</button>
                    <button type="button" data-sumbit="sumbit_change" data-category="up_change" class="btn btn-primary up-change">确认上报</button>
                    <button type="button" data-sumbit="sumbit_change" data-category="save_change" class="btn btn-success save-change">保存修改</button>
                </div>
            </div>
        </div>
    </div>
<% } %>
<% } %>

<% if (auditStatus === 3 || auditStatus === 4 || auditStatus === 5 || auditStatus === 7) { %>
<!--审批流程/结果-->
<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">
                                <% for (const [index,a] of auditList2.entries()) { %>
                                    <li class="list-group-item">
                                        <% if (a.usite === 0 ) { %>
                                            <i class="fa fa-play-circle fa-rotate-90"></i>
                                        <% } else if (index+1 !== auditList2.length) { %>
                                            <i class="fa fa-chevron-circle-down"></i>
                                        <% } else if (index+1 === auditList2.length) { %>
                                            <i class="fa fa-stop-circle"></i>
                                        <% } %>
                                        <%= a.name %>  <small class="text-muted"><%= a.jobs %></small>
                                    </li>
                                <% } %>
                            </ul>
                        </div>
                    </div>
                    <div class="col-8 modal-height-500" style="overflow: auto">
                        <% for (const time in auditList3) { %>
                        <div class="card mt-3">
                            <ul class="list-group list-group-flush">
                                <% for (const [aindex,al] of auditList3[time].entries()) { %>
                                <li class="list-group-item">
                                    <% if (al.usite === 0 && al.status === 2) { %>
                                    <span class="pull-right">重新上报中</span>
                                    <% } else if (al.usite === 0 && al.status === 3 && al.times === 1) { %>
                                    <span class="text-success pull-right">上报</span>
                                    <% } else if (al.usite === 0 && al.status === 3 && al.times !== 1) { %>
                                    <span class="text-success pull-right">重新上报</span>
                                    <% } else if (al.usite !== 0 && al.status === 2) { %>
                                    <span class="pull-right">审批中</span>
                                    <% } else if (al.usite !== 0 && al.status === 3) { %>
                                    <span class="text-success pull-right">审批通过</span>
                                    <% } else if (al.usite !== 0 && al.status === 4) { %>
                                    <span class="text-danger pull-right">审批终止</span>
                                    <% } else if (al.usite !== 0 && (al.status === 5 || al.status === 6)) { %>
                                    <span class="text-warning pull-right">审批退回 <% if (al.status === 5) {%><%= auditList3[time][0].name %><% } %></span>
                                    <% } %>
                                    <h5 class="card-title">
                                        <% if (al.usite === 0 && al.status === 2 ) { %>
                                        <i class="fa fa-play-circle fa-rotate-90"></i>
                                        <% } else if (al.usite === 0 && al.status === 3 ) { %>
                                        <i class="fa fa-play-circle fa-rotate-90 text-success"></i>
                                        <% } else if (al.status === 1 || al.status === 2) { %>
                                        <i class="fa <% if (aindex+1 === auditList3[time].length) { %>fa-stop-circle<% } else { %>fa-chevron-circle-down<% } %> "></i>
                                        <% } else if (al.status === 3) { %>
                                        <i class="fa <% if (aindex+1 === auditList3[time].length) { %>fa-stop-circle<% } else { %>fa-chevron-circle-down<% } %> text-success"></i>
                                        <% } else if (al.status === 4) { %>
                                        <i class="fa <% if (aindex+1 === auditList3[time].length) { %>fa-stop-circle<% } else { %>fa-chevron-circle-down<% } %> text-danger"></i>
                                        <% } else if (al.status === 5 || al.status === 6) { %>
                                        <i class="fa <% if (aindex+1 === auditList3[time].length) { %>fa-stop-circle<% } else { %>fa-chevron-circle-down<% } %> text-warning"></i>
                                        <% } %>
                                        <%= al.name %>&nbsp;<small class="text-muted"><%= al.jobs %></small>
                                    </h5>
                                        <% if (al.sdesc !== '' && al.sdesc !== null) { %>
                                            <p class="card-text mb-1"><%= al.sdesc %></p>
                                        <% } %>
                                        <% if (al.sin_time !== null) { %>
                                            <p class="card-text"><small class="text-muted"><%= moment(al.sin_time).format('YYYY-MM-DD') %></small></p>
                                        <% } %>
                                </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>
<% } %>

<% if (auditStatus === 6) { %>
    <!--审批通过-->
    <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>
                <form action="/change/approval?_csrf=<%= ctx.csrf %>" method="post" id="success-approval">
                <div class="modal-body">
                    <div class="card mt-3">
                        <ul class="list-group list-group-flush">
                            <% for (const [index,a] of auditList.entries()) { %>
                            <li class="list-group-item">
                                <% if (a.status === 3 && a.usort === 0 && a.times === 1) { %>
                                <span class="text-success pull-right">上报</span>
                                <% } else if (a.status === 3 && a.usort === 0 && a.times !== 1) { %>
                                <span class="text-success pull-right">重新上报</span>
                                <% } else if (a.status === 3 && a.usort !== 0) { %>
                                <span class="text-success pull-right">审批通过</span>
                                <% } else if (a.status === 2) { %>
                                <span class="pull-right">审批中</span>
                                <% } %>
                                <h5 class="card-title">
                                    <% if (a.usort === 0) { %>
                                    <i class="fa fa-play-circle fa-rotate-90 <% if (a.status === 3) { %>text-success<% } %>"></i>
                                    <% } else if (a.usort !== 0 && index+1 !== auditList.length) { %>
                                    <i class="fa fa-chevron-circle-down <% if (a.status === 3) { %>text-success<% } %>"></i>
                                    <% } else if (a.usort !== 0 && index+1 === auditList.length) { %>
                                    <i class="fa fa-stop-circle"></i>
                                    <% } %>
                                    <%= a.name %>&nbsp;<small class="text-muted"><%= a.jobs%></small>
                                </h5>
                                <% if (a.sdesc !== '' && a.sdesc !== null) { %>
                                    <p class="card-text mb-1"><%= a.sdesc %></p>
                                <% } %>
                                <% if (a.sin_time !== null) { %>
                                    <p class="card-text"><small class="text-muted"><%= moment(a.sin_time).format('YYYY-MM-DD') %></small></p>
                                <% } %>
                                <% if (a.status === 2) { %>
                                    <div class="form-group">
                                        <label>审批意见<b class="text-danger">*</b></label>
                                        <textarea class="form-control" name="sdesc">同意</textarea>
                                        <input type="hidden" name="audit_id" value="<%= a.id %>">
                                        <% if (a.usort !== 0 && index+1 === auditList.length) { %>
                                        <!--终审填写批复编号-->
                                        <div class="form-group mt-3">
                                            <label><b class="text-danger">*&nbsp;</b>变更令号（批复编号）</label>
                                            <input class="form-control" value="<%= change.code %>" name="p_code" type="text">
                                        </div>
                                        <% } else { %>
                                            <input type="hidden" name="audit_next_id" value="<%= auditList[index+1].id %>">
                                        <% } %>
                                    </div>
                                <% } %>
                            </li>
                            <% } %>
                        </ul>
                    </div>
                </div>
                <div class="modal-footer">
                    <input type="hidden" name="status" value="3">
                    <input type="hidden" name="w_code" value="<%= change.w_code %>">
                    <input type="hidden" name="change_id" value="<%= change.cid %>">
                    <input type="hidden" name="bills_list" id="change-list-approval" value="">
                    <button type="button" class="btn btn-secondary" data-dismiss="modal">关闭</button>
                    <button type="button" class="btn btn-success approval-btn">确认通过</button>
                </div>
                </form>
            </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>
                <form action="/change/approval?_csrf=<%= ctx.csrf %>" method="post" id="fail-approval">
                <div class="modal-body">
                    <div class="card mt-3">
                        <ul class="list-group list-group-flush">
                            <% for (const [index,a] of auditList.entries()) { %>
                                <li class="list-group-item">
                                    <% if (a.status === 3 && a.usort === 0 && a.times === 1) { %>
                                        <span class="text-success pull-right">上报</span>
                                    <% } else if (a.status === 3 && a.usort === 0 && a.times !== 1) { %>
                                        <span class="text-success pull-right">重新上报</span>
                                    <% } else if (a.status === 3 && a.usort !== 0) { %>
                                        <span class="text-success pull-right">审批通过</span>
                                    <% } else if (a.status === 2) { %>
                                        <span class="pull-right">审批中</span>
                                    <% } %>
                                    <h5 class="card-title">
                                        <% if (a.usort === 0) { %>
                                            <i class="fa fa-play-circle fa-rotate-90 <% if (a.status === 3) { %>text-success<% } %>"></i>
                                        <% } else if (a.usort !== 0 && index+1 !== auditList.length) { %>
                                            <i class="fa fa-chevron-circle-down <% if (a.status === 3) { %>text-success<% } %>"></i>
                                        <% } else if (a.usort !== 0 && index+1 === auditList.length) { %>
                                            <i class="fa fa-stop-circle"></i>
                                        <% } %>
                                        <%= a.name %>&nbsp;<small class="text-muted"><%= a.jobs%></small>
                                    </h5>
                                    <% if (a.sdesc !== '' && a.sdesc !== null) { %>
                                        <p class="card-text mb-1"><%= a.sdesc %></p>
                                    <% } %>
                                    <% if (a.sin_time !== null) { %>
                                        <p class="card-text"><small class="text-muted"><%= moment(a.sin_time).format('YYYY-MM-DD') %></small></p>
                                    <% } %>
                                    <% if (a.status === 2) { %>
                                        <div class="form-group">
                                            <label>审批意见<b class="text-danger">*</b></label>
                                            <textarea class="form-control" name="sdesc">不同意</textarea>
                                            <input type="hidden" name="audit_id" value="<%= a.id %>">
                                        </div>
                                        <div class="alert alert-warning">
                                            <div class="form-check form-check-inline">
                                                <input class="form-check-input" type="radio" name="status" id="change-back" value="5" <% if (index === 1) { %>checked<% } %>>
                                                <label class="form-check-label" for="change-back">退回上报 <%= auditList[0].name %></label>
                                            </div>
                                            <% if (index !== 1) { %>
                                            <div class="form-check form-check-inline">
                                                <input class="form-check-input" type="radio" name="status" id="chagne-backnew" value="6" <% if (index !== 1) { %>checked<% } %>>
                                                <label class="form-check-label" for="chagne-backnew">退回上一审批人 <%= auditList[index-1].name %></label>
                                                <input type="hidden" name="audit_last_id" value="<%= auditList[index-1].id %>">
                                            </div>
                                            <% } %>
                                            <!--<div class="form-check form-check-inline">-->
                                                <!--<input class="form-check-input" type="radio" name="status" id="change-stop" value="4">-->
                                                <!--<label class="form-check-label" for="change-stop">终止</label>-->
                                            <!--</div>-->
                                        </div>
                                        <div class="alert alert-danger change-approval-stop" style="display: none">
                                            审批终止，将结束本次审批，本条变更令作废。
                                        </div>
                                    <% } %>
                                </li>
                            <% } %>
                        </ul>
                    </div>
                </div>
                <div class="modal-footer">
                    <input type="hidden" name="w_code" value="<%= change.w_code %>">
                    <input type="hidden" name="change_id" value="<%= change.cid %>">
                    <button type="button" class="btn btn-secondary" data-dismiss="modal">关闭</button>
                    <button type="button" class="btn btn-warning change-approval-back approval-btn">确认退回</button>
                    <button type="button" class="btn btn-danger change-approval-stop approval-btn" style="display: none">确认终止</button>
                </div>
                </form>
            </div>
        </div>
    </div>
<% } %>

<!--添加附件-->
<div class="modal fade" tabindex="-1" role="dialog" aria-hidden="true" id="addfujian">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <h5 class="modal-title" id="myModalLabel">上传附件</h5>
                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                </button>
            </div>
            <div class="modal-body">
                <p>大小限制：30MB，支持office等文档格式、图片格式、压缩包格式</p>
                <p><input class="btn btn-primary" value="选择文件" type="file" id="upload-file" multiple /></p>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-secondary" data-dismiss="modal">取消</button>
                <button type="button" class="btn btn-primary" id="upload-file-btn">添加</button>
            </div>
        </div>
    </div>
</div>
