| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798 | <% if (scheduleLedgerList.length === 0 && ctx.url !== '/tender/' + ctx.tender.id + '/schedule/ledger') { %><!--首次使用提示--><div class="modal fade" id="first" data-backdrop="static">    <div class="modal-dialog" role="document">        <div class="modal-content">            <div class="modal-header">                <h5 class="modal-title">进度台账</h5>            </div>            <% if (tender.user_id !== ctx.session.sessionUser.accountId) { %>            <div class="modal-body">                <h5>未设置进度台账无法查看</h5>            </div>            <div class="modal-footer">                <a href="/tender/<%- ctx.tender.id %>" class="btn btn-sm btn-primary">回到标段概况</a>            </div>            <% } else { %>            <div class="modal-body">                <h5>首次使用投资进度需要进行进度台账初始化设置</h5>            </div>            <div class="modal-footer">                <a href="/tender/<%- ctx.tender.id %>/schedule/ledger" class="btn btn-sm btn-primary">开始设置</a>            </div>            <% } %>        </div>    </div></div><% } %><% if (revising) { %>    <!--正在修订提示-->    <div class="modal fade" id="unedit" 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">                    <h5>台账正在进行修订,投资进度无法进行任何操作。</h5>                </div>                <div class="modal-footer">                    <button type="button" class="btn btn-secondary btn-sm" data-dismiss="modal">好的</button>                </div>            </div>        </div>    </div>    <script type="text/javascript">$('#unedit').modal('show');</script><% } %><% if (!revising && schedule && schedule.revising === 1) { %>    <!--正在修订提示-->    <div class="modal fade" id="okedit" 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">                    <% if (ctx.url === '/tender/' + ctx.tender.id + '/schedule/ledger') { %>                        <h5>正在更新台账,请等待...</h5>                        <div class="progress">                            <div id="schedule-progress" class="progress-bar" role="progressbar" style="width: 0%;" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100">0%</div>                        </div>                        <div style="display: none"><button type="text" class="btn btn-primary" id="update-ledger">更新进度台账</button></div>                    <% } else { %>                        <h5>台账已完成修订,进入进度台账并更新最新台账数据。</h5>                    <% } %>                </div>                <% if (ctx.url !== '/tender/' + ctx.tender.id + '/schedule/ledger') { %>                <div class="modal-footer">                    <a href="/tender/<%- ctx.tender.id %>/schedule/ledger" class="btn btn-primary btn-sm">进入进度台账</a>                </div>                <% } %>            </div>        </div>    </div>    <script type="text/javascript">$('#okedit').modal('show');</script><% } %><script>    const selectedLedgerList = JSON.parse('<%- JSON.stringify(scheduleLedgerList) %>');    const revising = <%- revising %>;</script><script type="text/javascript">    $(function () {        if (selectedLedgerList.length === 0 && !revising) {            $('#first').modal('show');        }        <% if (!revising && schedule && schedule.revising === 1 && ctx.url === '/tender/' + ctx.tender.id + '/schedule/ledger') { %>        let value = 0;        setInterval(function(e){            if (value < 100) {                value = parseInt(value) + 1;                $("#schedule-progress").css("width", value + "%").text(value + "%");            } else if (value === 100) {                value = parseInt(value) + 1;                $('#update-ledger').click();            }        }, 50);        <% } %>    })</script>
 |