| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688 | <% 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">×</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 form-control-sm" 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 form-control-sm" placeholder="请输入公司名称">-->                </div>            </div>            <div class="modal-footer">                <button type="button" class="btn btn-secondary btn-sm" data-dismiss="modal">取消</button>                <button type="button" id="updatecompany" class="btn btn-primary btn-sm">确定</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 form-control-sm" id="account_group">                                    <option value="0">所有分组</option>                                    <% for (const dw in accountGroup) { %>                                        <option value="<%= dw %>"><%= accountGroup[dw] %></option>                                    <% } %>                                </select>                            </div>                            <select class="form-control form-control-sm" 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>                        <div class="modal-height-500" style="overflow: auto">                        <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>                        </div>                        <input type="hidden" id="auditIdList" value="">                    </div>                </div>                <div class="modal-footer">                    <button type="button" class="btn btn-secondary btn-sm" data-dismiss="modal">关闭</button>                    <button type="button" data-sumbit="sumbit_change" data-category="up_change" class="btn btn-primary btn-sm up-change">确认上报</button>                    <button type="button" data-sumbit="sumbit_change" data-category="save_change" class="btn btn-success btn-sm 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" data-backdrop="static">    <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">×</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-sm btn-outline-primary">添加空白清单</button>-->                <button type="button" class="btn btn-secondary btn-sm" data-dismiss="modal" id="cancel-list-btn">取消</button>                <button type="button" class="add-list-btn btn btn-primary btn-sm">添加</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 modal-height-500" style="overflow: auto">                            <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" id="shenpi-audit-list">                                    <% for (const [index,a] of auditList.entries()) { %>                                        <% if (a.usite === 0) { %>                                            <li class="list-group-item">                                                <i class="fa fa-play-circle fa-rotate-90"></i>                                                <%= a.name %>  <small class="text-muted"><%= a.jobs %></small><span class="pull-right">原报</span>                                            </li>                                        <% } else { %>                                            <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><span class="pull-right"><%= index+1 === auditList.length ? '终' : ctx.helper.transFormToChinese(index) %>审</span>                                            </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">                                                <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>                                                    <% } else if (al.status === 7) { %>                                                        <i class="fa fa-chevron-circle-down text-warning"></i>                                                    <% } %>                                                    <%= al.name %> <small class="text-muted"><%= al.jobs %></small><span class="pull-right"><%= al.usite === 0 ? '原报' : (al.max_sort === al.usite ? '终审' : ctx.helper.transFormToChinese(al.usite) + '审') %></span>                                                </h5>                                                <div class="ml-3">                                                    <% if (al.usite === 0 && al.status === 2) { %>                                                        <span>重新上报中</span>                                                    <% } else if (al.usite === 0 && al.status === 3) { %>                                                        <span class="text-success"><% if (al.sin_time !== null) { %><small><%= moment(al.sin_time).format('YYYY-MM-DD') %></small> <% } %>上报</span>                                                    <% } else if (al.usite !== 0 && al.status === 2) { %>                                                        <span>审批中</span>                                                    <% } else if (al.usite !== 0 && al.status === 3) { %>                                                        <span class="text-success"><% if (al.sin_time !== null) { %><small><%= moment(al.sin_time).format('YYYY-MM-DD') %></small> <% } %>审批通过</span>                                                    <% } else if (al.usite !== 0 && al.status === 4) { %>                                                        <span class="text-danger"><% if (al.sin_time !== null) { %><small><%= moment(al.sin_time).format('YYYY-MM-DD') %></small> <% } %>审批终止</span>                                                    <% } else if (al.usite !== 0 && (al.status === 5 || al.status === 6)) { %>                                                        <span class="text-warning"><% if (al.sin_time !== null) { %><small><%= moment(al.sin_time).format('YYYY-MM-DD') %></small> <% } %>审批退回 <% if (al.status === 5) {%><%= auditList3[time][0].name %><% } %></span>                                                    <% } else if (al.usite !== 0 && al.status === 7) { %>                                                        <span class="text-warning"><% if (al.sin_time !== null) { %><small><%= moment(al.sin_time).format('YYYY-MM-DD') %></small> <% } %>重新审批 </span>                                                    <% } %>                                                    <% if (al.sdesc !== '' && al.sdesc !== null) { %>                                                        <p class="card-text"><%- al.sdesc %></p>                                                    <% } %>                                                </div>                                            </li>                                        <% } %>                                    </ul>                                </div>                            <% } %>                            <% } %>                                <div class="card mt-3">                                    <ul class="list-group list-group-flush" id="shenpi-audit-list2">                                        <% for (const [index, audit] of auditList.entries()) { %>                                            <% if (audit.usite === 0) { %>                                            <li class="list-group-item">                                                <h5 class="card-title">                                                    <i class="fa fa-play-circle fa-rotate-90"></i>                                                    <%= audit.name %>  <small class="text-muted"><%= audit.jobs %></small><span class="pull-right">原报</span>                                                </h5>                                            </li>                                            <% } else { %>                                            <li class="list-group-item" data-auditid="<%= audit.uid %>">                                                <h5 class="card-title">                                                    <% 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>                                                    <% } %>                                                    <%= audit.name %>  <small class="text-muted"><%= audit.jobs %></small><span class="pull-right"><%= index+1 === auditList.length ? '终' : ctx.helper.transFormToChinese(index) %>审</span>                                                </h5>                                            </li>                                            <% } %>                                        <% } %>                                    </ul>                                </div>                        </div>                    </div>                </div>                <div class="modal-footer">                    <button type="button" class="btn btn-secondary btn-sm" data-dismiss="modal">关闭</button>                    <button type="button" data-sumbit="sumbit_change" data-category="up_change" class="btn btn-primary btn-sm up-change">确认上报</button>                    <button type="button" data-sumbit="sumbit_change" data-category="save_change" class="btn btn-success btn-sm 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 modal-height-500" style="overflow: auto">                        <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><span class="pull-right"><%= a.usite === 0 ? '原报' : (index+1 === auditList2.length ? '终审' : ctx.helper.transFormToChinese(a.usite) + '审') %></span>                                    </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">                                    <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>                                        <% } else if (al.status === 7) { %>                                        <i class="fa fa-chevron-circle-down text-warning"></i>                                        <% } %>                                        <%= al.name %> <small class="text-muted"><%= al.jobs %></small><span class="pull-right"><%= al.usite === 0 ? '原报' : (al.max_sort === al.usite ? '终审' : ctx.helper.transFormToChinese(al.usite) + '审')  %></span>                                    </h5>                                    <div class="ml-3">                                        <% if (al.usite === 0 && al.status === 2) { %>                                            <span>重新上报中</span>                                        <% } else if (al.usite === 0 && al.status === 3 && al.times === 1) { %>                                            <span class="text-success"><% if (al.sin_time !== null) { %><small><%= moment(al.sin_time).format('YYYY-MM-DD') %></small> <% } %>上报</span>                                        <% } else if (al.usite === 0 && al.status === 3 && al.times !== 1) { %>                                            <span class="text-success"><% if (al.sin_time !== null) { %><small><%= moment(al.sin_time).format('YYYY-MM-DD') %></small> <% } %>重新上报</span>                                        <% } else if (al.usite !== 0 && al.status === 2) { %>                                            <span>审批中</span>                                        <% } else if (al.usite !== 0 && al.status === 3) { %>                                            <span class="text-success"><% if (al.sin_time !== null) { %><small><%= moment(al.sin_time).format('YYYY-MM-DD') %></small> <% } %>审批通过</span>                                        <% } else if (al.usite !== 0 && al.status === 4) { %>                                            <span class="text-danger"><% if (al.sin_time !== null) { %><small><%= moment(al.sin_time).format('YYYY-MM-DD') %></small> <% } %>审批终止</span>                                        <% } else if (al.usite !== 0 && (al.status === 5 || al.status === 6)) { %>                                            <span class="text-warning"><% if (al.sin_time !== null) { %><small><%= moment(al.sin_time).format('YYYY-MM-DD') %></small> <% } %>审批退回 <% if (al.status === 5) {%><%= auditList3[time][0].name %><% } %></span>                                        <% } else if (al.usite !== 0 && al.status === 7) { %>                                            <span class="text-warning"><% if (al.sin_time !== null) { %><small><%= moment(al.sin_time).format('YYYY-MM-DD') %></small> <% } %>重新审批</span>                                        <% } %>                                        <% if (al.sdesc !== '' && al.sdesc !== null) { %>                                            <p class="card-text"><%- al.sdesc %></p>                                        <% } %>                                    </div>                                </li>                                <% } %>                            </ul>                        </div>                        <% } %>                    </div>                </div>            </div>            <div class="modal-footer">                <button type="button" class="btn btn-secondary btn-sm" 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 modal-lg" role="document">            <form class="modal-content" action="/change/approval?_csrf=<%= ctx.csrf %>" method="post" id="success-approval">                <div class="modal-header">                    <h5 class="modal-title">审批通过</h5>                </div>                <div class="modal-body">                    <div class="row">                        <div class="col-4 modal-height-500" style="overflow: auto">                            <div class="card mt-3">                                <ul class="list-group list-group-flush">                                    <% for (const [index,a] of auditList2.entries()) { %>                                        <% if (a.usite === 0) { %>                                            <li class="list-group-item">                                                <i class="fa fa-play-circle fa-rotate-90"></i>                                                <%= a.name %> <small class="text-muted"><%= a.jobs %></small><span class="pull-right">原报</span>                                            </li>                                        <% } else { %>                                            <li class="list-group-item">                                                <% 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><span class="pull-right"><%= index+1 === auditList2.length ? '终' : ctx.helper.transFormToChinese(index) %>审</span>                                            </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">                                    <% for (const [index,a] of auditList3.entries()) { %>                                        <li class="list-group-item">                                        <% if (a.usite === 0 ) { %>                                            <h5 class="card-title">                                                <i class="fa fa-play-circle fa-rotate-90 text-success"></i>                                                <%= a.name %> <small class="text-muted"><%= a.jobs%></small><span class="pull-right">原报</span>                                            </h5>                                            <div class="ml-3">                                                <span class="text-success"><small><%= moment(a.sin_time).format('YYYY-MM-DD') %> </small><span class="text-success"><% if (a.status === 3 && a.usite === 0 && a.times !== 1) { %>重新<% } %>上报</span></span>                                            </div>                                        <% } else { %>                                            <h5 class="card-title">                                                <i class="fa <% if (index+1 !== auditList3.length) { %>fa-chevron-circle-down <% } else { %>fa-stop-circle <% } %><% if (a.status === 3) { %>text-success<% } else if (a.status === 4) { %>text-danger<% } else if (a.status === 6 || a.status === 7) { %>text-warning<% } %>"></i>                                                <%= a.name %> <small class="text-muted"><%= a.jobs%></small><span class="pull-right"><%= a.max_sort === a.usite ? '终' : ctx.helper.transFormToChinese(a.usite) %>审</span>                                            </h5>                                            <div class="ml-3">                                                <% if (a.status === 3) { %>                                                    <span class="text-success"><% if (a.sin_time !== null) { %><small><%= moment(a.sin_time).format('YYYY-MM-DD') %></small> <% } %>审批通过</span>                                                <% } else if (a.status === 4) { %>                                                    <span class="text-danger"><% if (a.sin_time !== null) { %><small><%= moment(a.sin_time).format('YYYY-MM-DD') %></small> <% } %>审批终止</span>                                                <% } else if (a.status === 6) { %>                                                <span class="text-warning"><% if (a.sin_time !== null) { %><small><%= moment(a.sin_time).format('YYYY-MM-DD') %></small> <% } %>审批退回</span>                                                <% } else if (a.status === 7) { %>                                                    <span class="text-warning"><% if (a.sin_time !== null) { %><small><%= moment(a.sin_time).format('YYYY-MM-DD') %></small> <% } %>重新审批</span>                                                <% } %>                                                <p class="card-text"><%- a.sdesc %></p>                                            </div>                                            <% if (a.status === 2) { %>                                                <div class="form-group">                                                    <label>审批意见<b class="text-danger">*</b></label>                                                    <textarea class="form-control form-control-sm" name="sdesc">同意</textarea>                                                    <input type="hidden" name="audit_id" value="<%= a.id %>">                                                    <% if (a.usort !== 0 && index+1 === auditList3.length) { %>                                                        <!--终审填写批复编号-->                                                        <div class="form-group mt-3">                                                            <label><b class="text-danger">* </b>变更令号(批复编号)</label>                                                            <input class="form-control form-control-sm" value="<%= change.code %>" name="p_code" type="text">                                                        </div>                                                    <% } else { %>                                                        <input type="hidden" name="audit_next_id" value="<%= auditList3[index+1].id %>">                                                    <% } %>                                                </div>                                            <% } %>                                        <% } %>                                        </li>                                    <% } %>                                </ul>                            </div>                        </div>                    </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 btn-sm" data-dismiss="modal">关闭</button>                    <button type="button" class="btn btn-success btn-sm approval-btn">确认通过</button>                </div>            </form>        </div>    </div>    <!--审批退回-->    <div class="modal fade" id="sp-back" data-backdrop="static">        <div class="modal-dialog modal-lg" role="document">            <form class="modal-content" action="/change/approval?_csrf=<%= ctx.csrf %>" method="post" id="fail-approval">                <div class="modal-header">                    <h5 class="modal-title">审批退回</h5>                </div>                <div class="modal-body">                    <div class="row">                        <div class="col-4 modal-height-500" style="overflow: auto">                            <div class="card mt-3">                                <ul class="list-group list-group-flush">                                    <% for (const [index,a] of auditList2.entries()) { %>                                        <% if (a.usite === 0) { %>                                            <li class="list-group-item">                                                <i class="fa fa-play-circle fa-rotate-90"></i>                                                <%= a.name %> <small class="text-muted"><%= a.jobs %></small><span class="pull-right">原报</span>                                            </li>                                        <% } else { %>                                            <li class="list-group-item">                                                <% 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><span class="pull-right"><%= index+1 === auditList2.length ? '终' : ctx.helper.transFormToChinese(index) %>审</span>                                            </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">                                    <% for (const [index,a] of auditList3.entries()) { %>                                        <li class="list-group-item">                                            <% if (a.usite === 0 ) { %>                                                <h5 class="card-title">                                                    <i class="fa fa-play-circle fa-rotate-90 text-success"></i>                                                    <%= a.name %> <small class="text-muted"><%= a.jobs%></small><span class="pull-right">原报</span>                                                </h5>                                                <div class="ml-3">                                                    <span class="text-success"><small><%= moment(a.sin_time).format('YYYY-MM-DD') %> </small><span class="text-success"><% if (a.status === 3 && a.usite === 0 && a.times !== 1) { %>重新<% } %>上报</span></span>                                                </div>                                            <% } else { %>                                                <h5 class="card-title">                                                    <i class="fa <% if (index+1 !== auditList3.length) { %>fa-chevron-circle-down <% } else { %>fa-stop-circle <% } %><% if (a.status === 3) { %>text-success<% } else if (a.status === 4) { %>text-danger<% } else if (a.status === 6 || a.status === 7) { %>text-warning<% } %>"></i>                                                    <%= a.name %> <small class="text-muted"><%= a.jobs%></small><span class="pull-right"><%= a.max_sort === a.usite ? '终' : ctx.helper.transFormToChinese(a.usite) %>审</span>                                                </h5>                                                <div class="ml-3">                                                    <% if (a.status === 3) { %>                                                        <span class="text-success"><% if (a.sin_time !== null) { %><small><%= moment(a.sin_time).format('YYYY-MM-DD') %></small> <% } %>审批通过</span>                                                    <% } else if (a.status === 4) { %>                                                        <span class="text-danger"><% if (a.sin_time !== null) { %><small><%= moment(a.sin_time).format('YYYY-MM-DD') %></small> <% } %>审批终止</span>                                                    <% } else if (a.status === 6) { %>                                                        <span class="text-warning"><% if (a.sin_time !== null) { %><small><%= moment(a.sin_time).format('YYYY-MM-DD') %></small> <% } %>审批退回</span>                                                    <% } else if (a.status === 7) { %>                                                        <span class="text-warning"><% if (a.sin_time !== null) { %><small><%= moment(a.sin_time).format('YYYY-MM-DD') %></small> <% } %>重新审批</span>                                                    <% } %>                                                    <p class="card-text"><%- a.sdesc %></p>                                                </div>                                                <% if (a.status === 2) { %>                                                    <div class="form-group">                                                        <label>审批意见<b class="text-danger">*</b></label>                                                        <textarea class="form-control form-control-sm" 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 (a.usite === 1) { %>checked<% } %>>                                                            <label class="form-check-label" for="change-back">退回上报 <%= auditList3[0].name %></label>                                                        </div>                                                        <% if (a.usite !== 1) { %>                                                            <div class="form-check form-check-inline">                                                                <input class="form-check-input" type="radio" name="status" id="chagne-backnew" value="6" <% if (a.usite !== 1) { %>checked<% } %>>                                                                <label class="form-check-label" for="chagne-backnew">退回上一审批人 <%= auditList2[a.usite-1].name %></label>                                                                <input type="hidden" name="audit_last_id" value="<%= auditList2[a.usite-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>                </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 btn-sm" data-dismiss="modal">关闭</button>                    <button type="button" class="btn btn-warning btn-sm change-approval-back approval-btn">确认退回</button>                    <button type="button" class="btn btn-danger btn-sm change-approval-stop approval-btn" style="display: none">确认终止</button>                </div>            </form>        </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">×</span>                </button>            </div>            <div class="modal-body">                <p>大小限制:30MB,支持office等文档格式、图片格式、压缩包格式</p>                <p><input value="选择文件" type="file" id="upload-file" multiple /></p>            </div>            <div class="modal-footer">                <button type="button" class="btn btn-secondary btn-sm" data-dismiss="modal">取消</button>                <button type="button" class="btn btn-primary btn-sm" id="upload-file-btn">添加</button>            </div>        </div>    </div></div><% if (auditStatus === 4 && ctx.session.sessionUser.accountId === auditList[auditList.length-1].uid && stageChangeNum === 0) { %><!--重新审批--><div class="modal fade" id="sp-down-back" data-backdrop="static">    <div class="modal-dialog" role="document">        <form class="modal-content" method="post" action="/change/check/again">            <div class="modal-header">                <h5 class="modal-title">重新审批</h5>            </div>            <div class="modal-body">                <h5>确认由「终审-<%= auditList[auditList.length-1].name %>」重新审批「<%= change.code %>」?</h5>            </div>            <div class="modal-footer">                <input type="hidden" name="cid" value="<%= change.cid %>">                <input type="hidden" name="_csrf" value="<%= ctx.csrf %>" />                <button type="button" class="btn btn-secondary btn-sm" data-dismiss="modal">关闭</button>                <button type="submit" class="btn btn-warning btn-sm">确定重审</button>            </div>        </form>    </div></div><% } %>
 |