Browse Source

refactor: 审核弹窗ui、功能调整

lanjianrong 4 năm trước cách đây
mục cha
commit
4ad567c307

+ 2 - 6
app/public/css/main.css

@@ -1127,12 +1127,8 @@ a.maintain-icon:hover .fa{
   overflow-y: auto;
 }
 .book-list dt{
-  padding-left:5px;
-  background-color: #e2e6ea
-}
-.book-list dd{
-  padding-left:15px;
-  cursor: pointer;
+  padding:5px 0 5px 5px;
+  background-color: #f2f2f2;
 }
 .book-list dd:hover{
   background-color: #f2f2f2

+ 6 - 7
app/public/js/advance.js

@@ -80,10 +80,12 @@ $(document).ready(function () {
             $('#auditor-list').empty()
             $('#auditor-list').append(auditorsHTML)
             auditHistory.forEach((auditors, idx) => {
+                if(idx === auditHistory.length - 1 && auditHistory.length !== 1) {
+                    historyHTML += `<div class="text-right"><a href="javascript: void(0);" id="fold-btn" data-target="show"
+                    >展开历史审批流程</a></div>`
+                }
                 historyHTML += `<div class="${idx < auditHistory.length - 1 ? 'fold-card' : ''}">
-                <div class="text-center text-muted"
-                    ${idx === auditHistory.length - 1 ? 'id="end-target"' : ""}>
-                    ${idx === auditHistory.length - 1 ? 1 : idx+1}#</div>
+                <div class="text-center text-muted">${idx+1}#</div>
                 <ul class="timeline-list list-unstyled mt-2">`
                 auditors.forEach((auditor, index) => {
                     if (index === 0) {
@@ -200,10 +202,7 @@ $(document).ready(function () {
                     }
                 })
                 historyHTML += '</ul></div>'
-                if(idx === auditHistory.length - 1 && auditHistory.length !== 1) {
-                    historyHTML += `<div class="text-right"><a href="javascript: void(0);" id="fold-btn" data-target="show"
-                    data-idx="${idx + 1}">展开历史审批流程</a></div>`
-                }
+
             })
             $('#audit-list').empty()
             $('#audit-list').append(historyHTML)

+ 6 - 7
app/public/js/measure_material.js

@@ -41,10 +41,12 @@ $(function () {
             $('#auditor-list').empty()
             $('#auditor-list').append(auditorsHTML)
             auditHistory.forEach((auditors, idx) => {
+                if(idx === auditHistory.length - 1 && auditHistory.length !== 1) {
+                    historyHTML += `<div class="text-right"><a href="javascript: void(0);" id="fold-btn" data-target="show"
+                    >展开历史审批流程</a></div>`
+                }
                 historyHTML += `<div class="${idx < auditHistory.length - 1 ? 'fold-card' : ''}">
-                <div class="text-center text-muted"
-                    ${idx === auditHistory.length - 1 ? 'id="end-target"' : ""}>
-                    ${idx === auditHistory.length - 1 ? 1 : idx + 1}#</div>
+                <div class="text-center text-muted">${idx + 1}#</div>
                 <ul class="timeline-list list-unstyled mt-2">`
                 auditors.forEach((auditor, index) => {
                     if (index === 0) {
@@ -161,10 +163,7 @@ $(function () {
                     }
                 })
                 historyHTML += '</ul></div>'
-                if(idx === auditHistory.length - 1 && auditHistory.length !== 1) {
-                    historyHTML += `<div class="text-right"><a href="javascript: void(0);" id="fold-btn" data-target="show"
-                    data-idx="${idx + 1}">展开历史审批流程</a></div>`
-                }
+
             })
             $('#audit-list').empty()
             $('#audit-list').append(historyHTML)

+ 6 - 7
app/public/js/measure_stage.js

@@ -41,10 +41,12 @@ $('a[data-target="#sp-list" ]').on('click', function () {
         $('#auditor-list').empty()
         $('#auditor-list').append(auditorsHTML)
         auditHistory.forEach((auditors, idx) => {
+            if(idx === auditHistory.length - 1 && auditHistory.length !== 1) {
+                historyHTML += `<div class="text-right"><a href="javascript: void(0);" id="fold-btn" data-target="show"
+                >展开历史审批流程</a></div>`
+            }
             historyHTML += `<div class="${idx < auditHistory.length - 1 ? 'fold-card' : ''}">
-            <div class="text-center text-muted"
-                ${idx === auditHistory.length - 1 ? 'id="end-target"' : ""}>
-                ${idx === auditHistory.length - 1 ? 1 : idx + 1}#</div>
+            <div class="text-center text-muted">${idx + 1}#</div>
             <ul class="timeline-list list-unstyled mt-2">`
             auditors.forEach((auditor, index) => {
                 if (index === 0) {
@@ -161,10 +163,7 @@ $('a[data-target="#sp-list" ]').on('click', function () {
                 }
             })
             historyHTML += '</ul></div>'
-            if(idx === auditHistory.length - 1 && auditHistory.length !== 1) {
-                historyHTML += `<div class="text-right"><a href="javascript: void(0);" id="fold-btn" data-target="show"
-                data-idx="${idx + 1}">展开历史审批流程</a></div>`
-            }
+
         })
         $('#audit-list').empty()
         $('#audit-list').append(historyHTML)

+ 123 - 125
app/view/advance/detail.ejs

@@ -123,13 +123,13 @@
                                     </div>
                                 </td>
                                 <td width="70%">
-                                    <div class="dropdown">
+                                    <div class="dropdown text-right">
                                         <button class="btn btn-outline-primary btn-sm dropdown-toggle" type="button"
                                             id="dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true"
                                             aria-expanded="false">
                                             添加审批流程
                                         </button>
-                                        <div class="dropdown-menu" aria-labelledby="dropdownMenuButton"
+                                        <div class="dropdown-menu dropdown-menu-right" aria-labelledby="dropdownMenuButton"
                                             style="width:220px">
                                             <div class="mb-2 p-2"><input class="form-control form-control-sm"
                                                     placeholder="姓名/手机 检索" id="gr-search" autocomplete="off"></div>
@@ -212,137 +212,137 @@
                                     </div>
                                 </td>
                                 <td width="70%">
+
                                     <% auditHistory.forEach((auditors, idx) => { %>
-                                    <div class="<%- idx < auditHistory.length - 1 ? 'fold-card' : '' %>">
-                                        <div class="text-center text-muted"
-                                            <%- idx === auditHistory.length - 1 ? `id="end-target"` : "" %>>
-                                            <%- idx === auditHistory.length - 1 ? 1 : idx+1 %>#</div>
-                                        <ul class="timeline-list list-unstyled mt-2">
-                                            <% auditors.forEach((auditor, index) => { %>
-                                            <% if (index === 0) { %>
-                                            <li class="timeline-list-item pb-2">
-                                                <div class="timeline-item-date">
-                                                    <%- ctx.helper.formatDate(auditor.create_time) %>
-                                                </div>
-                                                <div class="timeline-item-tail"></div>
-                                                <div class="timeline-item-icon bg-success text-light">
-                                                    <i class="fa fa-caret-down"></i>
-                                                </div>
-                                                <div class="timeline-item-content">
-                                                    <div class="card">
-                                                        <div class="card-body p-3">
-                                                            <div class="card-text">
-                                                                <p class="mb-1"><span
-                                                                        class="h5"><%- advance.user.name %></span><span
-                                                                        class="pull-right text-success"><%- idx !== 0 ? '重新' : '' %>上报审批</span>
-                                                                </p>
-                                                                <p class="text-muted mb-0"><%- advance.user.role %></p>
+                                        <!-- 展开/收起历史流程 -->
+                                        <% if(idx === auditHistory.length - 1 && auditHistory.length !== 1) { %>
+                                            <div class="text-right">
+                                                <a href="javascript: void(0);" id="fold-btn" data-target="show">展开历史审批流程</a>
+                                            </div>
+                                        <% } %>
+                                        <div class="<%- idx < auditHistory.length - 1 ? 'fold-card' : '' %>">
+                                            <div class="text-center text-muted" ><%- idx+1 %>#</div>
+                                            <ul class="timeline-list list-unstyled mt-2">
+                                                <% auditors.forEach((auditor, index) => { %>
+                                                <% if (index === 0) { %>
+                                                <li class="timeline-list-item pb-2">
+                                                    <div class="timeline-item-date">
+                                                        <%- ctx.helper.formatDate(auditor.create_time) %>
+                                                    </div>
+                                                    <div class="timeline-item-tail"></div>
+                                                    <div class="timeline-item-icon bg-success text-light">
+                                                        <i class="fa fa-caret-down"></i>
+                                                    </div>
+                                                    <div class="timeline-item-content">
+                                                        <div class="card">
+                                                            <div class="card-body p-3">
+                                                                <div class="card-text">
+                                                                    <p class="mb-1"><span
+                                                                            class="h5"><%- advance.user.name %></span><span
+                                                                            class="pull-right text-success"><%- idx !== 0 ? '重新' : '' %>上报审批</span>
+                                                                    </p>
+                                                                    <p class="text-muted mb-0"><%- advance.user.role %></p>
+                                                                </div>
                                                             </div>
                                                         </div>
                                                     </div>
-                                                </div>
-                                            </li>
-                                            <li class="timeline-list-item pb-2">
-                                                <div class="timeline-item-date">
-                                                    <%- ctx.helper.formatDate(auditor.end_time) %>
-                                                </div>
-                                                <% if(index < auditors.length - 1) { %>
-                                                <div class="timeline-item-tail"></div>
-                                                <% } %>
-                                                <% if(auditor.status === auditConst.status.checked) { %>
-                                                <div class="timeline-item-icon bg-success text-light">
-                                                    <i class="fa fa-check"></i>
-                                                </div>
-                                                <% } else if(auditor.status === auditConst.status.checkNo || auditor.status === auditConst.status.checkNoPre) {%>
-                                                <div class="timeline-item-icon bg-warning text-light">
-                                                    <i class="fa fa-level-up"></i>
-                                                </div>
-                                                <% } else if(auditor.status === auditConst.status.checking) { %>
-                                                <div class="timeline-item-icon bg-warning text-light">
-                                                    <i class="fa fa-ellipsis-h"></i>
-                                                </div>
-                                                <% } else {%>
-                                                <div class="timeline-item-icon bg-secondary text-light">
-                                                </div>
-                                                <% } %>
-                                                <div class="timeline-item-content">
-                                                    <div class="card">
-                                                        <div class="card-body p-3">
-                                                            <div class="card-text">
-                                                                <p class="mb-1"><span
-                                                                        class="h5"><%- auditor.name %></span><span
-                                                                        class="pull-right <%- auditConst.statusClass[auditor.status] %>"><%- auditConst.statusString[auditor.status] %></span>
-                                                                </p>
-                                                                <p class="text-muted mb-0"><%- auditor.role %></p>
+                                                </li>
+                                                <li class="timeline-list-item pb-2">
+                                                    <div class="timeline-item-date">
+                                                        <%- ctx.helper.formatDate(auditor.end_time) %>
+                                                    </div>
+                                                    <% if(index < auditors.length - 1) { %>
+                                                    <div class="timeline-item-tail"></div>
+                                                    <% } %>
+                                                    <% if(auditor.status === auditConst.status.checked) { %>
+                                                    <div class="timeline-item-icon bg-success text-light">
+                                                        <i class="fa fa-check"></i>
+                                                    </div>
+                                                    <% } else if(auditor.status === auditConst.status.checkNo || auditor.status === auditConst.status.checkNoPre) {%>
+                                                    <div class="timeline-item-icon bg-warning text-light">
+                                                        <i class="fa fa-level-up"></i>
+                                                    </div>
+                                                    <% } else if(auditor.status === auditConst.status.checking) { %>
+                                                    <div class="timeline-item-icon bg-warning text-light">
+                                                        <i class="fa fa-ellipsis-h"></i>
+                                                    </div>
+                                                    <% } else {%>
+                                                    <div class="timeline-item-icon bg-secondary text-light">
+                                                    </div>
+                                                    <% } %>
+                                                    <div class="timeline-item-content">
+                                                        <div class="card">
+                                                            <div class="card-body p-3">
+                                                                <div class="card-text">
+                                                                    <p class="mb-1"><span
+                                                                            class="h5"><%- auditor.name %></span><span
+                                                                            class="pull-right <%- auditConst.statusClass[auditor.status] %>"><%- auditConst.statusString[auditor.status] %></span>
+                                                                    </p>
+                                                                    <p class="text-muted mb-0"><%- auditor.role %></p>
+                                                                </div>
                                                             </div>
+                                                            <!--审批意见-->
+                                                            <% if (auditor.opinion) { %>
+                                                            <div class="card-body p-3 border-top">
+                                                                <p style="margin: 0;"><%- auditor.opinion %></p>
+                                                            </div>
+                                                            <% } %>
                                                         </div>
-                                                        <!--审批意见-->
-                                                        <% if (auditor.opinion) { %>
-                                                        <div class="card-body p-3 border-top">
-                                                            <p style="margin: 0;"><%- auditor.opinion %></p>
-                                                        </div>
-                                                        <% } %>
                                                     </div>
-                                                </div>
-                                            </li>
-                                            <% } else {%>
-                                            <li class="timeline-list-item pb-2">
-                                                <div class="timeline-item-date">
-                                                    <%- ctx.helper.formatDate(auditor.end_time) %>
-                                                </div>
-                                                <% if(index < auditors.length - 1) { %>
-                                                <div class="timeline-item-tail"></div>
-                                                <% } %>
-                                                <% if(auditor.status === auditConst.status.checked) { %>
-                                                <div class="timeline-item-icon bg-success text-light">
-                                                    <i class="fa fa-check"></i>
-                                                </div>
-                                                <% } else if(auditor.status === auditConst.status.checkNo || auditor.status === auditConst.status.checkNoPre) {%>
-                                                <div class="timeline-item-icon bg-warning text-light">
-                                                    <i class="fa fa-level-up"></i>
-                                                </div>
-                                                <% } else if(auditor.status === auditConst.status.checking) { %>
-                                                <div class="timeline-item-icon bg-warning text-light">
-                                                    <i class="fa fa-ellipsis-h"></i>
-                                                </div>
-                                                <% } else { %>
-                                                <div class="timeline-item-icon bg-secondary text-light">
-                                                </div>
-                                                <% } %>
-                                                <div class="timeline-item-content">
-                                                    <div class="card">
-                                                        <div class="card-body p-3">
-                                                            <div class="card-text">
-                                                                <p class="mb-1"><span
-                                                                        class="h5"><%- auditor.name %></span>
-                                                                    <span
-                                                                        class="pull-right
-                                                                                    <%- auditConst.statusClass[auditor.status] %>"><%- auditor.status !== auditConst.status.uncheck ? auditConst.statusString[auditor.status] : ''%>
-                                                                        <%- auditor.status === auditConst.status.checkNo ? advance.user.name : '' %>
-                                                                        <%- auditor.status === auditConst.status.checkNoPre ? auditors[index-1].name : '' %>
-                                                                    </span>
-                                                                </p>
-                                                                <p class="text-muted mb-0"><%- auditor.role %></p>
+                                                </li>
+                                                <% } else {%>
+                                                <li class="timeline-list-item pb-2">
+                                                    <div class="timeline-item-date">
+                                                        <%- ctx.helper.formatDate(auditor.end_time) %>
+                                                    </div>
+                                                    <% if(index < auditors.length - 1) { %>
+                                                    <div class="timeline-item-tail"></div>
+                                                    <% } %>
+                                                    <% if(auditor.status === auditConst.status.checked) { %>
+                                                    <div class="timeline-item-icon bg-success text-light">
+                                                        <i class="fa fa-check"></i>
+                                                    </div>
+                                                    <% } else if(auditor.status === auditConst.status.checkNo || auditor.status === auditConst.status.checkNoPre) {%>
+                                                    <div class="timeline-item-icon bg-warning text-light">
+                                                        <i class="fa fa-level-up"></i>
+                                                    </div>
+                                                    <% } else if(auditor.status === auditConst.status.checking) { %>
+                                                    <div class="timeline-item-icon bg-warning text-light">
+                                                        <i class="fa fa-ellipsis-h"></i>
+                                                    </div>
+                                                    <% } else { %>
+                                                    <div class="timeline-item-icon bg-secondary text-light">
+                                                    </div>
+                                                    <% } %>
+                                                    <div class="timeline-item-content">
+                                                        <div class="card">
+                                                            <div class="card-body p-3">
+                                                                <div class="card-text">
+                                                                    <p class="mb-1"><span
+                                                                            class="h5"><%- auditor.name %></span>
+                                                                        <span
+                                                                            class="pull-right
+                                                                                        <%- auditConst.statusClass[auditor.status] %>"><%- auditor.status !== auditConst.status.uncheck ? auditConst.statusString[auditor.status] : ''%>
+                                                                            <%- auditor.status === auditConst.status.checkNo ? advance.user.name : '' %>
+                                                                            <%- auditor.status === auditConst.status.checkNoPre ? auditors[index-1].name : '' %>
+                                                                        </span>
+                                                                    </p>
+                                                                    <p class="text-muted mb-0"><%- auditor.role %></p>
+                                                                </div>
                                                             </div>
+                                                            <!--审批意见-->
+                                                            <% if (auditor.opinion) { %>
+                                                            <div class="card-body p-3 border-top">
+                                                                <p style="margin: 0;"><%- auditor.opinion %></p>
+                                                            </div>
+                                                            <% } %>
                                                         </div>
-                                                        <!--审批意见-->
-                                                        <% if (auditor.opinion) { %>
-                                                        <div class="card-body p-3 border-top">
-                                                            <p style="margin: 0;"><%- auditor.opinion %></p>
-                                                        </div>
-                                                        <% } %>
                                                     </div>
-                                                </div>
-                                            </li>
-                                            <% } %>
-                                            <% }) %>
-                                        </ul>
-                                    </div>
-                                    <!-- 展开/收起历史流程 -->
-                                    <% if(idx === auditHistory.length - 1 && auditHistory.length !== 1) { %>
-                                    <div class="text-right"><a href="javascript: void(0);" id="fold-btn"
-                                            data-target="show" data-idx="<%- idx + 1 %>">展开历史审批流程</a></div>
-                                    <% } %>
+                                                </li>
+                                                <% } %>
+                                                <% }) %>
+                                            </ul>
+                                        </div>
                                     <% }) %>
                                 </td>
                             </tr>
@@ -374,13 +374,11 @@
         if (type === 'show') {
             $(this).data('target', 'hide')
             auditCard.find('.fold-card').slideDown('swing', () => {
-                auditCard.find('#end-target').text($(this).data('idx') + '#')
                 auditCard.find('#fold-btn').text('收起历史审核记录')
             })
         } else {
             $(this).data('target', 'show')
             auditCard.find('.fold-card').slideUp('swing', () => {
-                auditCard.find('#end-target').text('1#')
                 auditCard.find('#fold-btn').text('展开历史审核记录')
             })
         }

+ 24 - 27
app/view/advance/modal_audit.ejs

@@ -78,10 +78,14 @@
                     </div>
                     <div class="col-8 modal-height-500" style="overflow: auto">
                         <% auditHistory.forEach((auditors, idx) => { %>
+                            <!-- 展开/收起历史流程 -->
+                        <% if(idx === auditHistory.length - 1 && auditHistory.length !== 1) { %>
+                            <div class="text-right">
+                                <a href="javascript: void(0);" id="fold-btn" data-target="show">展开历史审批流程</a>
+                            </div>
+                        <% } %>
                         <div class="<%- idx < auditHistory.length - 1 ? 'fold-card' : '' %>">
-                            <div class="text-center text-muted"
-                                <%- idx === auditHistory.length - 1 ? `id="end-target"` : "" %>>
-                                <%- idx === auditHistory.length - 1 ? 1 : idx+1 %>#</div>
+                            <div class="text-center text-muted"><%- idx+1 %>#</div>
                             <ul class="timeline-list list-unstyled mt-2">
                                 <% auditors.forEach((auditor, index) => { %>
                                 <% if (index === 0) { %>
@@ -202,12 +206,7 @@
                                 <% }) %>
                             </ul>
                         </div>
-                        <!-- 展开/收起历史流程 -->
-                        <% if(idx === auditHistory.length - 1 && auditHistory.length !== 1) { %>
-                            <div class="text-right"><a href="javascript: void(0);" id="fold-btn" data-target="show"
-                                    data-idx="<%- idx + 1 %>">展开历史审批流程</a>
-                            </div>
-                        <% } %>
+
                         <% }) %>
                     </div>
                 </div>
@@ -258,10 +257,14 @@
                             </div>
                             <div class="col-8 modal-height-500" style="overflow: auto">
                                 <% auditHistory.forEach((auditors, idx) => { %>
+                                    <!-- 展开/收起历史流程 -->
+                                <% if(idx === auditHistory.length - 1 && auditHistory.length !== 1) { %>
+                                    <div class="text-right">
+                                        <a href="javascript: void(0);" id="fold-btn" data-target="show">展开历史审批流程</a>
+                                    </div>
+                                    <% } %>
                                 <div class="<%- idx < auditHistory.length - 1 ? 'fold-card' : '' %>">
-                                    <div class="text-center text-muted"
-                                        <%- idx === auditHistory.length - 1 ? `id="end-target"` : "" %>>
-                                        <%- idx === auditHistory.length - 1 ? 1 : idx+1 %>#</div>
+                                    <div class="text-center text-muted"><%- idx+1 %>#</div>
                                     <ul class="timeline-list list-unstyled mt-2">
                                         <% auditors.forEach((auditor, index) => { %>
                                         <% if (index === 0) { %>
@@ -393,11 +396,7 @@
                                         <% }) %>
                                     </ul>
                                 </div>
-                                <!-- 展开/收起历史流程 -->
-                                <% if(idx === auditHistory.length - 1 && auditHistory.length !== 1) { %>
-                                <div class="text-right"><a href="javascript: void(0);" id="fold-btn" data-target="show"
-                                        data-idx="<%- idx + 1 %>">展开历史审批流程</a></div>
-                                <% } %>
+
                                 <% }) %>
                             </div>
                         </div>
@@ -450,10 +449,14 @@
                             </div>
                             <div class="col-8 modal-height-500" style="overflow: auto">
                                 <% auditHistory.forEach((auditors, idx) => { %>
+                                    <!-- 展开/收起历史流程 -->
+                                <% if(idx === auditHistory.length - 1 && auditHistory.length !== 1) { %>
+                                    <div class="text-right">
+                                        <a href="javascript: void(0);" id="fold-btn" data-target="show">展开历史审批流程</a>
+                                    </div>
+                                    <% } %>
                                 <div class="<%- idx < auditHistory.length - 1 ? 'fold-card' : '' %>">
-                                    <div class="text-center text-muted"
-                                        <%- idx === auditHistory.length - 1 ? `id="end-target"` : "" %>>
-                                        <%- idx === auditHistory.length - 1 ? 1 : idx+1 %>#</div>
+                                    <div class="text-center text-muted"><%- idx+1 %>#</div>
                                     <ul class="timeline-list list-unstyled mt-2">
                                         <% auditors.forEach((auditor, index) => { %>
                                         <% if (index === 0) { %>
@@ -628,11 +631,7 @@
                                         <% }) %>
                                     </ul>
                                 </div>
-                                <!-- 展开/收起历史流程 -->
-                                <% if(idx === auditHistory.length - 1 && auditHistory.length !== 1) { %>
-                                <div class="text-right"><a href="javascript: void(0);" id="fold-btn" data-target="show"
-                                        data-idx="<%- idx + 1 %>">展开历史审批流程</a></div>
-                                <% } %>
+
                                 <% }) %>
                             </div>
                         </div>
@@ -724,13 +723,11 @@
         if (type === 'show') {
             $(this).data('target', 'hide')
             auditCard.find('.fold-card').slideDown('swing', () => {
-                auditCard.find('#end-target').text($(this).data('idx') + '#')
                 auditCard.find('#fold-btn').text('收起历史审核记录')
             })
         } else {
             $(this).data('target', 'show')
             auditCard.find('.fold-card').slideUp('swing', () => {
-                auditCard.find('#end-target').text('1#')
                 auditCard.find('#fold-btn').text('展开历史审核记录')
             })
         }

+ 24 - 27
app/view/ledger/audit_modal.ejs

@@ -37,10 +37,14 @@
                     </div>
                     <div class="col-8 modal-height-500" style="overflow: auto">
                         <% auditHistory.forEach((auditors, idx) => { %>
+                            <!-- 展开/收起历史流程 -->
+                        <% if(idx === auditHistory.length - 1 && auditHistory.length !== 1) { %>
+                            <div class="text-right">
+                                <a href="javascript: void(0);" id="fold-btn" data-target="show">展开历史审批流程</a>
+                            </div>
+                            <% } %>
                         <div class="<%- idx < auditHistory.length - 1 ? 'fold-card' : '' %>">
-                            <div class="text-center text-muted"
-                                <%- idx === auditHistory.length - 1 ? `id="end-target"` : "" %>>
-                                <%- idx === auditHistory.length - 1 ? 1 : idx+1 %>#</div>
+                            <div class="text-center text-muted"><%- idx+1 %>#</div>
                             <ul class="timeline-list list-unstyled mt-2">
                                 <% auditors.forEach((auditor, index) => { %>
                                 <% if (index === 0) { %>
@@ -172,11 +176,7 @@
                                 <% }) %>
                             </ul>
                         </div>
-                        <!-- 展开/收起历史流程 -->
-                        <% if(idx === auditHistory.length - 1 && auditHistory.length !== 1) { %>
-                        <div class="text-right"><a href="javascript: void(0);" id="fold-btn" data-target="show"
-                                data-idx="<%- idx + 1 %>">展开历史审批流程</a></div>
-                        <% } %>
+
                         <% }) %>
                     </div>
                 </div>
@@ -229,10 +229,14 @@
                     </div>
                     <div class="col-8 modal-height-500" style="overflow: auto">
                         <% auditHistory.forEach((auditors, idx) => { %>
+                            <!-- 展开/收起历史流程 -->
+                        <% if(idx === auditHistory.length - 1 && auditHistory.length !== 1) { %>
+                            <div class="text-right">
+                                <a href="javascript: void(0);" id="fold-btn" data-target="show">展开历史审批流程</a>
+                            </div>
+                            <% } %>
                         <div class="<%- idx < auditHistory.length - 1 ? 'fold-card' : '' %>">
-                            <div class="text-center text-muted"
-                                <%- idx === auditHistory.length - 1 ? `id="end-target"` : "" %>>
-                                <%- idx === auditHistory.length - 1 ? 1 : idx+1 %>#</div>
+                            <div class="text-center text-muted"><%- idx+1 %>#</div>
                             <ul class="timeline-list list-unstyled mt-2">
                                 <% auditors.forEach((auditor, index) => { %>
                                 <% if (index === 0) { %>
@@ -367,11 +371,7 @@
                                 <% }) %>
                             </ul>
                         </div>
-                        <!-- 展开/收起历史流程 -->
-                        <% if(idx === auditHistory.length - 1 && auditHistory.length !== 1) { %>
-                        <div class="text-right"><a href="javascript: void(0);" id="fold-btn" data-target="show"
-                                data-idx="<%- idx + 1 %>">展开历史审批流程</a></div>
-                        <% } %>
+
                         <% }) %>
                     </div>
                 </div>
@@ -427,10 +427,14 @@
                     </div>
                     <div class="col-8 modal-height-500" style="overflow: auto">
                         <% auditHistory.forEach((auditors, idx) => { %>
+                            <!-- 展开/收起历史流程 -->
+                        <% if(idx === auditHistory.length - 1 && auditHistory.length !== 1) { %>
+                            <div class="text-right">
+                                <a href="javascript: void(0);" id="fold-btn" data-target="show">展开历史审批流程</a>
+                            </div>
+                        <% } %>
                         <div class="<%- idx < auditHistory.length - 1 ? 'fold-card' : '' %>">
-                            <div class="text-center text-muted"
-                                <%- idx === auditHistory.length - 1 ? `id="end-target"` : "" %>>
-                                <%- idx === auditHistory.length - 1 ? 1 : idx+1 %>#</div>
+                            <div class="text-center text-muted"><%- idx+1 %>#</div>
                             <ul class="timeline-list list-unstyled mt-2">
                                 <% auditors.forEach((auditor, index) => { %>
                                 <% if (index === 0) { %>
@@ -551,12 +555,7 @@
                                 <% }) %>
                             </ul>
                         </div>
-                        <!-- 展开/收起历史流程 -->
-                        <% if(idx === auditHistory.length - 1 && auditHistory.length !== 1) { %>
-                            <div class="text-right"><a href="javascript: void(0);" id="fold-btn" data-target="show"
-                                    data-idx="<%- idx + 1 %>">展开历史审批流程</a>
-                            </div>
-                        <% } %>
+
                         <% }) %>
                     </div>
                 </div>
@@ -598,13 +597,11 @@
         if (type === 'show') {
             $(this).data('target', 'hide')
             auditCard.find('.fold-card').slideDown('swing', () => {
-                auditCard.find('#end-target').text($(this).data('idx') + '#')
                 auditCard.find('#fold-btn').text('收起历史审核记录')
             })
         } else {
             $(this).data('target', 'show')
             auditCard.find('.fold-card').slideUp('swing', () => {
-                auditCard.find('#end-target').text('1#')
                 auditCard.find('#fold-btn').text('展开历史审核记录')
             })
         }

+ 2 - 4
app/view/ledger/explode_modal.ejs

@@ -93,13 +93,13 @@
                 <h5 class="modal-title">上报审批</h5>
             </div>
             <div class="modal-body">
-                <div class="dropdown">
+                <div class="dropdown text-right">
                     <button class="btn btn-outline-primary btn-sm dropdown-toggle" type="button"
                         id="dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true"
                         aria-expanded="false">
                         添加审批流程
                     </button>
-                    <div class="dropdown-menu" aria-labelledby="dropdownMenuButton"
+                    <div class="dropdown-menu dropdown-menu-right" aria-labelledby="dropdownMenuButton"
                         style="width:220px">
                         <div class="mb-2 p-2"><input class="form-control form-control-sm"
                                 placeholder="姓名/手机 检索" id="gr-search" autocomplete="off"></div>
@@ -378,13 +378,11 @@
         if (type === 'show') {
             $(this).data('target', 'hide')
             auditCard.find('.fold-card').slideDown('swing', () => {
-                auditCard.find('#end-target').text($(this).data('idx') + '#')
                 auditCard.find('#fold-btn').text('收起历史审核记录')
             })
         } else {
             $(this).data('target', 'show')
             auditCard.find('.fold-card').slideUp('swing', () => {
-                auditCard.find('#end-target').text('1#')
                 auditCard.find('#fold-btn').text('展开历史审核记录')
             })
         }

+ 2 - 4
app/view/material/audit_modal.ejs

@@ -7,13 +7,13 @@
                 <h5 class="modal-title">上报审批</h5>
             </div>
             <div class="modal-body">
-                <div class="dropdown">
+                <div class="dropdown text-right">
                     <button class="btn btn-outline-primary btn-sm dropdown-toggle" type="button"
                         id="dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true"
                         aria-expanded="false">
                         添加审批流程
                     </button>
-                    <div class="dropdown-menu" aria-labelledby="dropdownMenuButton"
+                    <div class="dropdown-menu dropdown-menu-right" aria-labelledby="dropdownMenuButton"
                         style="width:220px">
                         <div class="mb-2 p-2"><input class="form-control form-control-sm"
                                 placeholder="姓名/手机 检索" id="gr-search" autocomplete="off"></div>
@@ -707,13 +707,11 @@
         if (type === 'show') {
             $(this).data('target', 'hide')
             auditCard.find('.fold-card').slideDown('swing', () => {
-                auditCard.find('#end-target').text($(this).data('idx') + '#')
                 auditCard.find('#fold-btn').text('收起历史审核记录')
             })
         } else {
             $(this).data('target', 'show')
             auditCard.find('.fold-card').slideUp('swing', () => {
-                auditCard.find('#end-target').text('1#')
                 auditCard.find('#fold-btn').text('展开历史审核记录')
             })
         }

+ 8 - 11
app/view/revise/history_modal.ejs

@@ -36,10 +36,14 @@
                     </div>
                     <div class="col-8 modal-height-500" style="overflow: auto">
                         <% auditHistory.forEach((auditors, idx) => { %>
+                            <!-- 展开/收起历史流程 -->
+                        <% if(idx === auditHistory.length - 1 && auditHistory.length !== 1) { %>
+                            <div class="text-right">
+                                <a href="javascript: void(0);" id="fold-btn" data-target="show">展开历史审批流程</a>
+                            </div>
+                        <% } %>
                         <div class="<%- idx < auditHistory.length - 1 ? 'fold-card' : '' %>">
-                            <div class="text-center text-muted"
-                                <%- idx === auditHistory.length - 1 ? `id="end-target"` : "" %>>
-                                <%- idx === auditHistory.length - 1 ? 1 : idx+1 %>#</div>
+                            <div class="text-center text-muted"><%- idx+1 %>#</div>
                             <ul class="timeline-list list-unstyled mt-2">
                                 <% auditors.forEach((auditor, index) => { %>
                                 <% if (index === 0) { %>
@@ -160,12 +164,7 @@
                                 <% }) %>
                             </ul>
                         </div>
-                        <!-- 展开/收起历史流程 -->
-                        <% if(idx === auditHistory.length - 1 && auditHistory.length !== 1) { %>
-                            <div class="text-right"><a href="javascript: void(0);" id="fold-btn" data-target="show"
-                                    data-idx="<%- idx + 1 %>">展开历史审批流程</a>
-                            </div>
-                        <% } %>
+
                         <% }) %>
                     </div>
                 </div>
@@ -184,13 +183,11 @@
         if (type === 'show') {
             $(this).data('target', 'hide')
             auditCard.find('.fold-card').slideDown('swing', () => {
-                auditCard.find('#end-target').text($(this).data('idx') + '#')
                 auditCard.find('#fold-btn').text('收起历史审核记录')
             })
         } else {
             $(this).data('target', 'show')
             auditCard.find('.fold-card').slideUp('swing', () => {
-                auditCard.find('#end-target').text('1#')
                 auditCard.find('#fold-btn').text('展开历史审核记录')
             })
         }

+ 350 - 351
app/view/revise/info_modal.ejs

@@ -44,28 +44,28 @@
                 <h5 class="modal-title">上报审批</h5>
             </div>
             <div class="modal-body">
-                <div class="dropdown">
-                    <button class="btn btn-outline-primary btn-sm dropdown-toggle" type="button"
-                        id="dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true"
-                        aria-expanded="false">
+                <div class="dropdown text-right">
+                    <button class="btn btn-outline-primary btn-sm dropdown-toggle" type="button" id="dropdownMenuButton"
+                        data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                         添加审批流程
                     </button>
-                    <div class="dropdown-menu" aria-labelledby="dropdownMenuButton"
+                    <div class="dropdown-menu dropdown-menu-right" aria-labelledby="dropdownMenuButton"
                         style="width:220px">
-                        <div class="mb-2 p-2"><input class="form-control form-control-sm"
-                                placeholder="姓名/手机 检索" id="gr-search" autocomplete="off"></div>
+                        <div class="mb-2 p-2"><input class="form-control form-control-sm" placeholder="姓名/手机 检索"
+                                id="gr-search" autocomplete="off"></div>
                         <dl class="list-unstyled book-list">
                             <% accountGroup.forEach((group, idx) => { %>
-                                <dt><a href="javascript: void(0);" class="acc-btn" data-groupid="<%- idx %>" data-type="hide"><i class="fa fa-plus-square"></i></a> <%- group.groupName %></dt>
-                                <div class="dd-content" data-toggleid="<%- idx %>">
-                                    <% group.groupList.forEach(item => { %>
-                                        <dd class="border-bottom p-2 mb-0 " data-id="<%- item.id %>" >
-                                            <p class="mb-0 d-flex"><span class="text-primary"><%- item.name %></span><span
-                                                    class="ml-auto"><%- item.mobile %></span></p>
-                                            <span class="text-muted"><%- item.role %></span>
-                                        </dd>
-                                    <% });%>
-                                </div>
+                            <dt><a href="javascript: void(0);" class="acc-btn" data-groupid="<%- idx %>"
+                                    data-type="hide"><i class="fa fa-plus-square"></i></a> <%- group.groupName %></dt>
+                            <div class="dd-content" data-toggleid="<%- idx %>">
+                                <% group.groupList.forEach(item => { %>
+                                <dd class="border-bottom p-2 mb-0 " data-id="<%- item.id %>">
+                                    <p class="mb-0 d-flex"><span class="text-primary"><%- item.name %></span><span
+                                            class="ml-auto"><%- item.mobile %></span></p>
+                                    <span class="text-muted"><%- item.role %></span>
+                                </dd>
+                                <% });%>
+                            </div>
                             <% }) %>
                         </dl>
                     </div>
@@ -75,19 +75,20 @@
                         审批流程
                     </div>
                     <div class="modal-height-500" style="overflow: auto">
-                    <ul class="list-group list-group-flush" id="auditors">
-                        <% for (let i = 0, iLen = auditorList.length; i < iLen; i++) { %>
-                        <li class="list-group-item" auditorId="<%- auditorList[i].audit_id %>">
-                            <a href="javascript: void(0)" class="text-danger pull-right">移除</a>
-                            <%- auditorList[i].audit_order %> <%- auditorList[i].name %>
-                            <small class="text-muted"><%- auditorList[i].role %></small>
-                        </li>
-                        <% } %>
-                    </ul>
+                        <ul class="list-group list-group-flush" id="auditors">
+                            <% for (let i = 0, iLen = auditorList.length; i < iLen; i++) { %>
+                            <li class="list-group-item" auditorId="<%- auditorList[i].audit_id %>">
+                                <a href="javascript: void(0)" class="text-danger pull-right">移除</a>
+                                <%- auditorList[i].audit_order %> <%- auditorList[i].name %>
+                                <small class="text-muted"><%- auditorList[i].role %></small>
+                            </li>
+                            <% } %>
+                        </ul>
                     </div>
                 </div>
             </div>
-            <form class="modal-footer" method="post" action="/tender/<%- ctx.tender.id %>/revise/audit/start" onsubmit="return checkAuditorFrom()">
+            <form class="modal-footer" method="post" action="/tender/<%- ctx.tender.id %>/revise/audit/start"
+                onsubmit="return checkAuditorFrom()">
                 <button type="button" class="btn btn-secondary btn-sm" data-dismiss="modal">关闭</button>
                 <input type="hidden" name="_csrf" value="<%= ctx.csrf %>">
                 <button class="btn btn-primary btn-sm" type="submit">确认上报</button>
@@ -97,11 +98,12 @@
 </div>
 <% } %>
 <% if (revise.status === auditConst.status.checking || revise.status === auditConst.status.checkNoPre) { %>
-    <% if (curAuditor && curAuditor.audit_id === ctx.session.sessionUser.accountId) { %>
-    <<!--审批通过-->
+<% if (curAuditor && curAuditor.audit_id === ctx.session.sessionUser.accountId) { %>
+<<!--审批通过-->
     <div class="modal fade sp-location-list" id="sp-done" data-backdrop="static">
         <div class="modal-dialog modal-lg" role="document">
-            <form class="modal-content" action="<%- preUrl %>/revise/audit/check" method="post" onsubmit="return auditCheck(0);">
+            <form class="modal-content" action="<%- preUrl %>/revise/audit/check" method="post"
+                onsubmit="return auditCheck(0);">
                 <div class="modal-header">
                     <h5 class="modal-title">审批通过</h5>
                 </div>
@@ -136,10 +138,14 @@
                         </div>
                         <div class="col-8 modal-height-500" style="overflow: auto">
                             <% auditHistory.forEach((auditors, idx) => { %>
+                            <!-- 展开/收起历史流程 -->
+                            <% if(idx === auditHistory.length - 1 && auditHistory.length !== 1) { %>
+                            <div class="text-right">
+                                <a href="javascript: void(0);" id="fold-btn" data-target="show">展开历史审批流程</a>
+                            </div>
+                            <% } %>
                             <div class="<%- idx < auditHistory.length - 1 ? 'fold-card' : '' %>">
-                                <div class="text-center text-muted"
-                                    <%- idx === auditHistory.length - 1 ? `id="end-target"` : "" %>>
-                                    <%- idx === auditHistory.length - 1 ? 1 : idx+1 %>#</div>
+                                <div class="text-center text-muted"><%- idx+1 %>#</div>
                                 <ul class="timeline-list list-unstyled mt-2">
                                     <% auditors.forEach((auditor, index) => { %>
                                     <% if (index === 0) { %>
@@ -155,8 +161,7 @@
                                             <div class="card">
                                                 <div class="card-body p-3">
                                                     <div class="card-text">
-                                                        <p class="mb-1"><span
-                                                                class="h5"><%- user.name %></span><span
+                                                        <p class="mb-1"><span class="h5"><%- user.name %></span><span
                                                                 class="pull-right text-success"><%- idx !== 0 ? '重新' : '' %>上报审批</span>
                                                         </p>
                                                         <p class="text-muted mb-0"><%- user.role %></p>
@@ -271,11 +276,7 @@
                                     <% }) %>
                                 </ul>
                             </div>
-                            <!-- 展开/收起历史流程 -->
-                            <% if(idx === auditHistory.length - 1 && auditHistory.length !== 1) { %>
-                            <div class="text-right"><a href="javascript: void(0);" id="fold-btn" data-target="show"
-                                    data-idx="<%- idx + 1 %>">展开历史审批流程</a></div>
-                            <% } %>
+
                             <% }) %>
                         </div>
                     </div>
@@ -328,10 +329,14 @@
                         </div>
                         <div class="col-8 modal-height-500" style="overflow: auto">
                             <% auditHistory.forEach((auditors, idx) => { %>
+                            <!-- 展开/收起历史流程 -->
+                            <% if(idx === auditHistory.length - 1 && auditHistory.length !== 1) { %>
+                            <div class="text-right">
+                                <a href="javascript: void(0);" id="fold-btn" data-target="show">展开历史审批流程</a>
+                            </div>
+                            <% } %>
                             <div class="<%- idx < auditHistory.length - 1 ? 'fold-card' : '' %>">
-                                <div class="text-center text-muted"
-                                    <%- idx === auditHistory.length - 1 ? `id="end-target"` : "" %>>
-                                    <%- idx === auditHistory.length - 1 ? 1 : idx+1 %>#</div>
+                                <div class="text-center text-muted"><%- idx+1 %>#</div>
                                 <ul class="timeline-list list-unstyled mt-2">
                                     <% auditors.forEach((auditor, index) => { %>
                                     <% if (index === 0) { %>
@@ -347,8 +352,7 @@
                                             <div class="card">
                                                 <div class="card-body p-3">
                                                     <div class="card-text">
-                                                        <p class="mb-1"><span
-                                                                class="h5"><%- user.name %></span><span
+                                                        <p class="mb-1"><span class="h5"><%- user.name %></span><span
                                                                 class="pull-right text-success"><%- idx !== 0 ? '重新' : '' %>上报审批</span>
                                                         </p>
                                                         <p class="text-muted mb-0"><%- user.role %></p>
@@ -402,15 +406,16 @@
                                                     <div id="reject-process" class="alert alert-warning"
                                                         style="margin-top: 15px;">
                                                         <div class="form-check form-check-inline">
-                                                            <input class="form-check-input" type="radio" name="checkType"
-                                                                id="inlineRadio1" value="<%- auditConst.status.checkNo %>">
+                                                            <input class="form-check-input" type="radio"
+                                                                name="checkType" id="inlineRadio1"
+                                                                value="<%- auditConst.status.checkNo %>">
                                                             <label class="form-check-label" for="inlineRadio1">退回原报
                                                                 <%- user.name %></label>
                                                         </div>
                                                         <% if (auditor.order > 1 && auditor.audit_id !== auditors[0].audit_id) { %>
                                                         <div class="form-check form-check-inline">
-                                                            <input class="form-check-input" type="radio" name="checkType"
-                                                                id="inlineRadio2"
+                                                            <input class="form-check-input" type="radio"
+                                                                name="checkType" id="inlineRadio2"
                                                                 value="<%- auditConst.status.checkNoPre %>">
                                                             <label class="form-check-label" for="inlineRadio2">退回上一审批人
                                                                 <%- auditors[index-1].name %></label>
@@ -472,26 +477,27 @@
                                                     <label>审批意见<b class="text-danger">*</b></label>
                                                     <textarea class="form-control form-control-sm"
                                                         name="opinion">不同意</textarea>
-                                                        <% if (curAuditor.audit_id === auditor.audit_id ) { %>
-                                                        <div id="reject-process" class="alert alert-warning"
-                                                            style="margin-top: 15px;">
-                                                            <div class="form-check form-check-inline">
-                                                                <input class="form-check-input" type="radio" name="checkType"
-                                                                    id="inlineRadio1" value="<%- auditConst.status.checkNo %>">
-                                                                <label class="form-check-label" for="inlineRadio1">退回原报
-                                                                    <%- user.name %></label>
-                                                            </div>
-                                                            <% if (auditor.order > 1 && auditor.audit_id !== auditors[0].audit_id) { %>
-                                                            <div class="form-check form-check-inline">
-                                                                <input class="form-check-input" type="radio" name="checkType"
-                                                                    id="inlineRadio2"
-                                                                    value="<%- auditConst.status.checkNoPre %>">
-                                                                <label class="form-check-label" for="inlineRadio2">退回上一审批人
-                                                                    <%- auditors[index-1].name %></label>
-                                                            </div>
-                                                            <% } %>
+                                                    <% if (curAuditor.audit_id === auditor.audit_id ) { %>
+                                                    <div id="reject-process" class="alert alert-warning"
+                                                        style="margin-top: 15px;">
+                                                        <div class="form-check form-check-inline">
+                                                            <input class="form-check-input" type="radio"
+                                                                name="checkType" id="inlineRadio1"
+                                                                value="<%- auditConst.status.checkNo %>">
+                                                            <label class="form-check-label" for="inlineRadio1">退回原报
+                                                                <%- user.name %></label>
+                                                        </div>
+                                                        <% if (auditor.order > 1 && auditor.audit_id !== auditors[0].audit_id) { %>
+                                                        <div class="form-check form-check-inline">
+                                                            <input class="form-check-input" type="radio"
+                                                                name="checkType" id="inlineRadio2"
+                                                                value="<%- auditConst.status.checkNoPre %>">
+                                                            <label class="form-check-label" for="inlineRadio2">退回上一审批人
+                                                                <%- auditors[index-1].name %></label>
                                                         </div>
                                                         <% } %>
+                                                    </div>
+                                                    <% } %>
                                                     <% } else { %>
                                                     <p style="margin: 0;"><%- auditor.opinion %></p>
                                                     <% } %>
@@ -506,11 +512,7 @@
                                     <% }) %>
                                 </ul>
                             </div>
-                            <!-- 展开/收起历史流程 -->
-                            <% if(idx === auditHistory.length - 1 && auditHistory.length !== 1) { %>
-                            <div class="text-right"><a href="javascript: void(0);" id="fold-btn" data-target="show"
-                                    data-idx="<%- idx + 1 %>">展开历史审批流程</a></div>
-                            <% } %>
+
                             <% }) %>
                         </div>
                     </div>
@@ -524,213 +526,212 @@
         </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"><%- revise.status === auditConst.status.checking ? '审批流程' : '重新上报' %></h5>
-            </div>
-            <div class="modal-body">
-                <div class="row">
-                    <div class="col-4">
-                        <% if(revise.status === auditConst.status.checkNo) { %>
-                            <a class="sp-list-item" href="#sub-sp" data-toggle="modal" data-target="#sub-sp" id="hideSp">修改审批流程</a>
-                        <% } %>
-                        <div class="card mt-3">
-                            <ul class="list-group list-group-flush">
-                                <% auditors.forEach((item, idx) => { %>
-                                <% if (idx === 0) { %>
-                                <li class="list-group-item" data-auditorId="<%- item.audit_id %>">
-                                    <i class="fa fa fa-play-circle fa-rotate-90"></i> <%- item.name %>
-                                    <small class="text-muted"><%- item.role %></small>
-                                    <span class="pull-right">原报</span>
-                                </li>
-                                <% } else if(idx === auditors.length -1 && idx !== 0) { %>
-                                <li class="list-group-item" data-auditorId="<%- item.audit_id %>">
-                                    <i class="fa fa fa-stop-circle"></i> <%- item.name %>
-                                    <small class="text-muted"><%- item.role %></small>
-                                    <span class="pull-right">终审</span>
-                                </li>
-                                <% } else {%>
-                                <li class="list-group-item" data-auditorId="<%- item.audit_id %>">
-                                    <i class="fa fa-chevron-circle-down"></i> <%- item.name %>
-                                    <small class="text-muted"><%- item.role %></small>
-                                    <span class="pull-right"><%= ctx.helper.transFormToChinese(idx) %>审</span>
-                                </li>
-                                <% } %>
-                                <% }) %>
-                            </ul>
+    <% } %>
+    <!--审批流程/结果-->
+    <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"><%- revise.status === auditConst.status.checking ? '审批流程' : '重新上报' %></h5>
+                </div>
+                <div class="modal-body">
+                    <div class="row">
+                        <div class="col-4">
+                            <% if(revise.status === auditConst.status.checkNo) { %>
+                            <a class="sp-list-item" href="#sub-sp" data-toggle="modal" data-target="#sub-sp"
+                                id="hideSp">修改审批流程</a>
+                            <% } %>
+                            <div class="card mt-3">
+                                <ul class="list-group list-group-flush">
+                                    <% auditors.forEach((item, idx) => { %>
+                                    <% if (idx === 0) { %>
+                                    <li class="list-group-item" data-auditorId="<%- item.audit_id %>">
+                                        <i class="fa fa fa-play-circle fa-rotate-90"></i> <%- item.name %>
+                                        <small class="text-muted"><%- item.role %></small>
+                                        <span class="pull-right">原报</span>
+                                    </li>
+                                    <% } else if(idx === auditors.length -1 && idx !== 0) { %>
+                                    <li class="list-group-item" data-auditorId="<%- item.audit_id %>">
+                                        <i class="fa fa fa-stop-circle"></i> <%- item.name %>
+                                        <small class="text-muted"><%- item.role %></small>
+                                        <span class="pull-right">终审</span>
+                                    </li>
+                                    <% } else {%>
+                                    <li class="list-group-item" data-auditorId="<%- item.audit_id %>">
+                                        <i class="fa fa-chevron-circle-down"></i> <%- item.name %>
+                                        <small class="text-muted"><%- item.role %></small>
+                                        <span class="pull-right"><%= ctx.helper.transFormToChinese(idx) %>审</span>
+                                    </li>
+                                    <% } %>
+                                    <% }) %>
+                                </ul>
+                            </div>
                         </div>
-                    </div>
-                    <div class="col-8 modal-height-500" style="overflow: auto">
-                        <% auditHistory.forEach((auditors, idx) => { %>
-                        <div class="<%- idx < auditHistory.length - 1 ? 'fold-card' : '' %>">
-                            <div class="text-center text-muted"
-                                <%- idx === auditHistory.length - 1 ? `id="end-target"` : "" %>>
-                                <%- idx === auditHistory.length - 1 ? 1 : idx+1 %>#</div>
-                            <ul class="timeline-list list-unstyled mt-2">
-                                <% auditors.forEach((auditor, index) => { %>
-                                <% if (index === 0) { %>
-                                <li class="timeline-list-item pb-2">
-                                    <div class="timeline-item-date">
-                                        <%- ctx.helper.formatDate(auditor.begin_time) %>
-                                    </div>
-                                    <div class="timeline-item-tail"></div>
-                                    <div class="timeline-item-icon bg-success text-light">
-                                        <i class="fa fa-caret-down"></i>
-                                    </div>
-                                    <div class="timeline-item-content">
-                                        <div class="card">
-                                            <div class="card-body p-3">
-                                                <div class="card-text">
-                                                    <p class="mb-1"><span
-                                                            class="h5"><%- user.name %></span><span
-                                                            class="pull-right text-success"><%- idx !== 0 ? '重新' : '' %>上报审批</span>
-                                                    </p>
-                                                    <p class="text-muted mb-0"><%- user.role %></p>
+                        <div class="col-8 modal-height-500" style="overflow: auto">
+                            <% auditHistory.forEach((auditors, idx) => { %>
+                            <!-- 展开/收起历史流程 -->
+                            <% if(idx === auditHistory.length - 1 && auditHistory.length !== 1) { %>
+                            <div class="text-right">
+                                <a href="javascript: void(0);" id="fold-btn" data-target="show">展开历史审批流程</a>
+                            </div>
+                            <% } %>
+                            <div class="<%- idx < auditHistory.length - 1 ? 'fold-card' : '' %>">
+                                <div class="text-center text-muted"><%- idx+1 %>#</div>
+                                <ul class="timeline-list list-unstyled mt-2">
+                                    <% auditors.forEach((auditor, index) => { %>
+                                    <% if (index === 0) { %>
+                                    <li class="timeline-list-item pb-2">
+                                        <div class="timeline-item-date">
+                                            <%- ctx.helper.formatDate(auditor.begin_time) %>
+                                        </div>
+                                        <div class="timeline-item-tail"></div>
+                                        <div class="timeline-item-icon bg-success text-light">
+                                            <i class="fa fa-caret-down"></i>
+                                        </div>
+                                        <div class="timeline-item-content">
+                                            <div class="card">
+                                                <div class="card-body p-3">
+                                                    <div class="card-text">
+                                                        <p class="mb-1"><span class="h5"><%- user.name %></span><span
+                                                                class="pull-right text-success"><%- idx !== 0 ? '重新' : '' %>上报审批</span>
+                                                        </p>
+                                                        <p class="text-muted mb-0"><%- user.role %></p>
+                                                    </div>
                                                 </div>
                                             </div>
                                         </div>
-                                    </div>
-                                </li>
-                                <li class="timeline-list-item pb-2">
-                                    <div class="timeline-item-date">
-                                        <%- ctx.helper.formatDate(auditor.end_time) %>
-                                    </div>
-                                    <% if(index < auditors.length - 1) { %>
-                                    <div class="timeline-item-tail"></div>
-                                    <% } %>
-                                    <% if(auditor.status === auditConst.status.checked) { %>
-                                    <div class="timeline-item-icon bg-success text-light">
-                                        <i class="fa fa-check"></i>
-                                    </div>
-                                    <% } else if(auditor.status === auditConst.status.checkNo || auditor.status === auditConst.status.checkNoPre) {%>
-                                    <div class="timeline-item-icon bg-warning text-light">
-                                        <i class="fa fa-level-up"></i>
-                                    </div>
-                                    <% } else if(auditor.status === auditConst.status.checking) { %>
-                                    <div class="timeline-item-icon bg-warning text-light">
-                                        <i class="fa fa-ellipsis-h"></i>
-                                    </div>
-                                    <% } else {%>
-                                    <div class="timeline-item-icon bg-secondary text-light">
-                                    </div>
-                                    <% } %>
-                                    <div class="timeline-item-content">
-                                        <div class="card">
-                                            <div class="card-body p-3">
-                                                <div class="card-text">
-                                                    <p class="mb-1"><span class="h5"><%- auditor.name %></span><span
-                                                            class="pull-right <%- auditConst.statusClass[auditor.status] %>"><%- auditConst.statusString[auditor.status] %></span>
-                                                    </p>
-                                                    <p class="text-muted mb-0"><%- auditor.role %></p>
+                                    </li>
+                                    <li class="timeline-list-item pb-2">
+                                        <div class="timeline-item-date">
+                                            <%- ctx.helper.formatDate(auditor.end_time) %>
+                                        </div>
+                                        <% if(index < auditors.length - 1) { %>
+                                        <div class="timeline-item-tail"></div>
+                                        <% } %>
+                                        <% if(auditor.status === auditConst.status.checked) { %>
+                                        <div class="timeline-item-icon bg-success text-light">
+                                            <i class="fa fa-check"></i>
+                                        </div>
+                                        <% } else if(auditor.status === auditConst.status.checkNo || auditor.status === auditConst.status.checkNoPre) {%>
+                                        <div class="timeline-item-icon bg-warning text-light">
+                                            <i class="fa fa-level-up"></i>
+                                        </div>
+                                        <% } else if(auditor.status === auditConst.status.checking) { %>
+                                        <div class="timeline-item-icon bg-warning text-light">
+                                            <i class="fa fa-ellipsis-h"></i>
+                                        </div>
+                                        <% } else {%>
+                                        <div class="timeline-item-icon bg-secondary text-light">
+                                        </div>
+                                        <% } %>
+                                        <div class="timeline-item-content">
+                                            <div class="card">
+                                                <div class="card-body p-3">
+                                                    <div class="card-text">
+                                                        <p class="mb-1"><span class="h5"><%- auditor.name %></span><span
+                                                                class="pull-right <%- auditConst.statusClass[auditor.status] %>"><%- auditConst.statusString[auditor.status] %></span>
+                                                        </p>
+                                                        <p class="text-muted mb-0"><%- auditor.role %></p>
+                                                    </div>
                                                 </div>
-                                            </div>
 
-                                            <!--审批意见-->
-                                            <% if (auditor.opinion) { %>
-                                            <div class="card-body p-3 border-top">
-                                                <p style="margin: 0;"><%- auditor.opinion %></p>
+                                                <!--审批意见-->
+                                                <% if (auditor.opinion) { %>
+                                                <div class="card-body p-3 border-top">
+                                                    <p style="margin: 0;"><%- auditor.opinion %></p>
+                                                </div>
+                                                <% } %>
                                             </div>
-                                            <% } %>
-                                        </div>
-                                    </div>
-                                </li>
-                                <% } else {%>
-                                <li class="timeline-list-item pb-2">
-                                    <div class="timeline-item-date">
-                                        <%- ctx.helper.formatDate(auditor.end_time) %>
-                                    </div>
-                                    <% if(index < auditors.length - 1) { %>
-                                    <div class="timeline-item-tail"></div>
-                                    <% } %>
-                                    <% if(auditor.status === auditConst.status.checked) { %>
-                                    <div class="timeline-item-icon bg-success text-light">
-                                        <i class="fa fa-check"></i>
-                                    </div>
-                                    <% } else if(auditor.status === auditConst.status.checkNo || auditor.status === auditConst.status.checkNoPre) {%>
-                                    <div class="timeline-item-icon bg-warning text-light">
-                                        <i class="fa fa-level-up"></i>
-                                    </div>
-                                    <% } else if(auditor.status === auditConst.status.checking) { %>
-                                    <div class="timeline-item-icon bg-warning text-light">
-                                        <i class="fa fa-ellipsis-h"></i>
-                                    </div>
-                                    <% } else { %>
-                                    <div class="timeline-item-icon bg-secondary text-light">
-                                    </div>
-                                    <% } %>
-                                    <div class="timeline-item-content">
-                                        <div class="card">
-                                            <div class="card-body p-3">
-                                                <div class="card-text">
-                                                    <p class="mb-1"><span class="h5"><%- auditor.name %></span>
-                                                        <span
-                                                            class="pull-right
+                                        </div>
+                                    </li>
+                                    <% } else {%>
+                                    <li class="timeline-list-item pb-2">
+                                        <div class="timeline-item-date">
+                                            <%- ctx.helper.formatDate(auditor.end_time) %>
+                                        </div>
+                                        <% if(index < auditors.length - 1) { %>
+                                        <div class="timeline-item-tail"></div>
+                                        <% } %>
+                                        <% if(auditor.status === auditConst.status.checked) { %>
+                                        <div class="timeline-item-icon bg-success text-light">
+                                            <i class="fa fa-check"></i>
+                                        </div>
+                                        <% } else if(auditor.status === auditConst.status.checkNo || auditor.status === auditConst.status.checkNoPre) {%>
+                                        <div class="timeline-item-icon bg-warning text-light">
+                                            <i class="fa fa-level-up"></i>
+                                        </div>
+                                        <% } else if(auditor.status === auditConst.status.checking) { %>
+                                        <div class="timeline-item-icon bg-warning text-light">
+                                            <i class="fa fa-ellipsis-h"></i>
+                                        </div>
+                                        <% } else { %>
+                                        <div class="timeline-item-icon bg-secondary text-light">
+                                        </div>
+                                        <% } %>
+                                        <div class="timeline-item-content">
+                                            <div class="card">
+                                                <div class="card-body p-3">
+                                                    <div class="card-text">
+                                                        <p class="mb-1"><span class="h5"><%- auditor.name %></span>
+                                                            <span
+                                                                class="pull-right
                                                                             <%- auditConst.statusClass[auditor.status] %>"><%- auditor.status !== auditConst.status.uncheck ? auditConst.statusString[auditor.status] : ''%>
-                                                            <%- auditor.status === auditConst.status.checkNo ? user.name : '' %>
-                                                            <%- auditor.status === auditConst.status.checkNoPre ? auditors[index-1].name : '' %>
-                                                        </span>
-                                                    </p>
-                                                    <p class="text-muted mb-0"><%- auditor.role %></p>
+                                                                <%- auditor.status === auditConst.status.checkNo ? user.name : '' %>
+                                                                <%- auditor.status === auditConst.status.checkNoPre ? auditors[index-1].name : '' %>
+                                                            </span>
+                                                        </p>
+                                                        <p class="text-muted mb-0"><%- auditor.role %></p>
+                                                    </div>
                                                 </div>
+                                                <!--审批意见-->
+                                                <% if (auditor.opinion) { %>
+                                                <div class="card-body p-3 border-top">
+                                                    <p style="margin: 0;"><%- auditor.opinion %></p>
+                                                </div>
+                                                <% } %>
                                             </div>
-                                            <!--审批意见-->
-                                            <% if (auditor.opinion) { %>
-                                            <div class="card-body p-3 border-top">
-                                                <p style="margin: 0;"><%- auditor.opinion %></p>
-                                            </div>
-                                            <% } %>
                                         </div>
-                                    </div>
-                                </li>
-                                <% } %>
-                                <% }) %>
-                            </ul>
-                        </div>
-                        <!-- 展开/收起历史流程 -->
-                        <% if(idx === auditHistory.length - 1 && auditHistory.length !== 1) { %>
-                            <div class="text-right"><a href="javascript: void(0);" id="fold-btn" data-target="show"
-                                    data-idx="<%- idx + 1 %>">展开历史审批流程</a>
+                                    </li>
+                                    <% } %>
+                                    <% }) %>
+                                </ul>
                             </div>
-                        <% } %>
-                        <% }) %>
+                            <% }) %>
+                        </div>
                     </div>
                 </div>
-            </div>
-            <form class="modal-footer" method="post" action="<%- preUrl %>/revise/audit/start" onsubmit="return checkAuditorFrom()">
-                <input type="hidden" name="_csrf" value="<%= ctx.csrf %>">
-                <button type="button" class="btn btn-secondary btn-sm" data-dismiss="modal">关闭</button>
-                <% if(revise.status === auditConst.status.checkNo && ctx.session.sessionUser.accountId === revise.uid) { %>
+                <form class="modal-footer" method="post" action="<%- preUrl %>/revise/audit/start"
+                    onsubmit="return checkAuditorFrom()">
+                    <input type="hidden" name="_csrf" value="<%= ctx.csrf %>">
+                    <button type="button" class="btn btn-secondary btn-sm" data-dismiss="modal">关闭</button>
+                    <% if(revise.status === auditConst.status.checkNo && ctx.session.sessionUser.accountId === revise.uid) { %>
                     <button class="btn btn-primary btn-sm sp-list-item" type="submit">确认上报</button>
-                <% } %>
-            </form>
+                    <% } %>
+                </form>
+            </div>
         </div>
     </div>
-</div>
-<% include ../shares/merge_peg_modal.ejs %>
-<% include ../shares/import_excel_modal.ejs %>
-<% include ../shares/delete_hint_modal.ejs %>
-<% include ../shares/check_data_modal.ejs %>
-<% include ../shares/ledger_check_modal.ejs %>
-<% if(ctx.session.sessionUser.accountId === revise.uid && (revise.status === auditConst.status.uncheck || revise.status === auditConst.status.checkNo)) { %>
+    <% include ../shares/merge_peg_modal.ejs %>
+    <% include ../shares/import_excel_modal.ejs %>
+    <% include ../shares/delete_hint_modal.ejs %>
+    <% include ../shares/check_data_modal.ejs %>
+    <% include ../shares/ledger_check_modal.ejs %>
+    <% if(ctx.session.sessionUser.accountId === revise.uid && (revise.status === auditConst.status.uncheck || revise.status === auditConst.status.checkNo)) { %>
     <script>
         const cur_uid = '<%- ctx.session.sessionUser.accountId %>';
         const accountList = JSON.parse('<%- JSON.stringify(accountList) %>');
-        const accountGroup  = JSON.parse('<%- JSON.stringify(accountGroup ) %>');
+        const accountGroup = JSON.parse('<%- JSON.stringify(accountGroup ) %>');
         let timer = null;
         let oldSearchVal = null;
 
-        $('#gr-search').bind('input propertychange', function(e) {
+        $('#gr-search').bind('input propertychange', function (e) {
             oldSearchVal = e.target.value
             timer && clearTimeout(timer)
             timer = setTimeout(() => {
                 const newVal = $('#gr-search').val()
                 let html = ''
                 if (newVal && newVal === oldSearchVal) {
-                    accountList.filter(item => item  && (item.name.indexOf(newVal) !== -1 || (item.mobile && item.mobile.indexOf(newVal) !== -1))).forEach(item => {
+                    accountList.filter(item => item && (item.name.indexOf(newVal) !== -1 || (item.mobile && item.mobile.indexOf(newVal) !== -1))).forEach(item => {
                         html += `<dd class="border-bottom p-2 mb-0 " data-id="${item.id}" >
                             <p class="mb-0 d-flex"><span class="text-primary">${item.name}</span><span
                                     class="ml-auto">${item.mobile || ''}</span></p>
@@ -784,8 +785,8 @@
                     // 重新上报时。令其它的审批人流程图标转换
                     $('#auditors-list li i').removeClass('fa-stop-circle').addClass('fa-chevron-circle-down');
                     for (let i = 0; i < $('#auditors-list li').length; i++) {
-                        $('#auditors-list li').eq(i).find('.pull-right').text(transFormToChinese(i+1) + '审');
-                        $('#auditors-list2 li').eq(i).find('.pull-right').text(transFormToChinese(i+1) + '审');
+                        $('#auditors-list li').eq(i).find('.pull-right').text(transFormToChinese(i + 1) + '审');
+                        $('#auditors-list2 li').eq(i).find('.pull-right').text(transFormToChinese(i + 1) + '审');
                     }
                     // 添加新审批人
                     auditorshtml.push('<li class="list-group-item" data-auditid="' + data.audit_id + '">');
@@ -825,17 +826,17 @@
                 // 令最后一个图标转换
                 $('#auditors-list li[data-auditid="' + data.auditorId + '"]').remove();
                 if ($('#auditors-list li').length !== 0 && !$('#auditors-list li i').hasClass('fa-stop-circle')) {
-                    $('#auditors-list li').eq($('#auditors-list li').length-1).children('i')
+                    $('#auditors-list li').eq($('#auditors-list li').length - 1).children('i')
                         .removeClass('fa-chevron-circle-down').addClass('fa-stop-circle');
                 }
                 $('#auditors-list2 li[data-auditid="' + data.auditorId + '"]').remove();
                 if ($('#auditors-list2 li').length !== 0 && !$('#auditors-list2 li i').hasClass('fa-stop-circle')) {
-                    $('#auditors-list2 li').eq($('#auditors-list2 li').length-1).children('i')
+                    $('#auditors-list2 li').eq($('#auditors-list2 li').length - 1).children('i')
                         .removeClass('fa-chevron-circle-down').addClass('fa-stop-circle');
                 }
                 for (let i = 0; i < $('#auditors-list li').length; i++) {
-                    $('#auditors-list li').eq(i).find('.pull-right').text((i+1 === $('#auditors-list li').length ? '终' : transFormToChinese(i+1)) + '审');
-                    $('#auditors-list2 li').eq(i).find('.pull-right').text((i+1 === $('#auditors-list2 li').length ? '终' : transFormToChinese(i+1)) + '审');
+                    $('#auditors-list li').eq(i).find('.pull-right').text((i + 1 === $('#auditors-list li').length ? '终' : transFormToChinese(i + 1)) + '审');
+                    $('#auditors-list2 li').eq(i).find('.pull-right').text((i + 1 === $('#auditors-list2 li').length ? '终' : transFormToChinese(i + 1)) + '审');
                 }
             });
         });
@@ -868,108 +869,106 @@
             $(document.body).addClass('modal-open');
         });
     </script>
-<% } %>
-<script>
-    $('.sp-list-btn').click(function () {
-        const type = $(this).data('type')
-        if (type === 'hide') {
-            $('.sp-list-item').hide()
-            $('.modal-title').text('审批流程')
-        } else {
-            $('.sp-list-item').show()
-            $('.modal-title').text('重新上报')
-        }
-    });
-    // 检查上报情况
-    function checkAuditorFrom () {
-        const content = $('#content').val();
-        const orgContent = $('#content').attr('org-value');
-        if (!content || content === '') {
-            toastr.error('请先填写修订内容,再上报数据');
-            return false;
-        } else if (orgContent !== content) {
-            toastr.warning('修订内容未保存,请先保存,再上报数据');
-            return false;
-        }
-        if ($('#auditors li').length === 0) {
-            toastr.error('请先选择审批人,再上报数据');
-            return false;
+    <% } %>
+    <script>
+        $('.sp-list-btn').click(function () {
+            const type = $(this).data('type')
+            if (type === 'hide') {
+                $('.sp-list-item').hide()
+                $('.modal-title').text('审批流程')
+            } else {
+                $('.sp-list-item').show()
+                $('.modal-title').text('重新上报')
+            }
+        });
+        // 检查上报情况
+        function checkAuditorFrom() {
+            const content = $('#content').val();
+            const orgContent = $('#content').attr('org-value');
+            if (!content || content === '') {
+                toastr.error('请先填写修订内容,再上报数据');
+                return false;
+            } else if (orgContent !== content) {
+                toastr.warning('修订内容未保存,请先保存,再上报数据');
+                return false;
+            }
+            if ($('#auditors li').length === 0) {
+                toastr.error('请先选择审批人,再上报数据');
+                return false;
+            }
+            $('#hide-all').show();
+            return true;
         }
-        $('#hide-all').show();
-        return true;
-    }
 
-    // texterea换行
-    function auditCheck(i) {
-        const inlineRadio1 = $('#inlineRadio1:checked').val()
-        const inlineRadio2 = $('#inlineRadio2:checked').val()
-        const opinion = $('textarea[name="opinion"]').eq(i).val().replace(/\r\n/g, '<br/>').replace(/\n/g, '<br/>').replace(/\s/g, ' ');
-        $('textarea[name="opinion"]').eq(i).val(opinion);
-        if (i === 1) {
-            if (!inlineRadio1 && !inlineRadio2) {
-                if (!$('#warning-text').length) {
-                    $('#reject-process').prepend('<p id="warning-text" style="color: red; margin: 0;">请选择退回流程</p>');
+        // texterea换行
+        function auditCheck(i) {
+            const inlineRadio1 = $('#inlineRadio1:checked').val()
+            const inlineRadio2 = $('#inlineRadio2:checked').val()
+            const opinion = $('textarea[name="opinion"]').eq(i).val().replace(/\r\n/g, '<br/>').replace(/\n/g, '<br/>').replace(/\s/g, ' ');
+            $('textarea[name="opinion"]').eq(i).val(opinion);
+            if (i === 1) {
+                if (!inlineRadio1 && !inlineRadio2) {
+                    if (!$('#warning-text').length) {
+                        $('#reject-process').prepend('<p id="warning-text" style="color: red; margin: 0;">请选择退回流程</p>');
+                    }
+                    return false;
                 }
-                return false;
+                if ($('#warning-text').length) $('#warning-text').remove()
             }
-            if ($('#warning-text').length) $('#warning-text').remove()
-        }
-        return true;
-    }
-    $('.sp-location-list').on('shown.bs.modal', function () {
-        const scrollBox = $(this).find('div[class="col-8 modal-height-500"]');
-        const bdiv = (scrollBox.offset() && scrollBox.offset().top) || 0;
-        scrollBox.scrollTop(0);
-        const hdiv = divSearch($(this).find('textarea')) ? $(this).find('textarea') : null;
-        const hdheight = hdiv ? hdiv.parents('.timeline-item-content').offset().top : null;
-        if (hdiv && scrollBox.length && scrollBox[0].scrollHeight > 390 && hdheight - bdiv > 390) {
-            scrollBox.scrollTop(hdheight - bdiv);
-        }
-    });
-    function divSearch(div) {
-        if (div.length > 0) {
             return true;
         }
-        return false;
-    }
+        $('.sp-location-list').on('shown.bs.modal', function () {
+            const scrollBox = $(this).find('div[class="col-8 modal-height-500"]');
+            const bdiv = (scrollBox.offset() && scrollBox.offset().top) || 0;
+            scrollBox.scrollTop(0);
+            const hdiv = divSearch($(this).find('textarea')) ? $(this).find('textarea') : null;
+            const hdheight = hdiv ? hdiv.parents('.timeline-item-content').offset().top : null;
+            if (hdiv && scrollBox.length && scrollBox[0].scrollHeight > 390 && hdheight - bdiv > 390) {
+                scrollBox.scrollTop(hdheight - bdiv);
+            }
+        });
+        function divSearch(div) {
+            if (div.length > 0) {
+                return true;
+            }
+            return false;
+        }
 
-    // 退回选择修改审批人流程
-    $('#hideSp').click(function () {
-        $('#sp-list').modal('hide');
-    });
-    $('a[f-target]').click(function () {
-        $($(this).attr('f-target')).modal('show');
-    });
+        // 退回选择修改审批人流程
+        $('#hideSp').click(function () {
+            $('#sp-list').modal('hide');
+        });
+        $('a[f-target]').click(function () {
+            $($(this).attr('f-target')).modal('show');
+        });
 
-    // 多层modal关闭后的滚动bug修复
-    $('#sp-list').on('hidden.bs.modal', function (e) {
-        $(document.body).addClass('modal-open');
-    });
+        // 多层modal关闭后的滚动bug修复
+        $('#sp-list').on('hidden.bs.modal', function (e) {
+            $(document.body).addClass('modal-open');
+        });
 
-    // 展开历史审核记录
-    $('.modal-body #fold-btn').click(function () {
-        const type = $(this).data('target')
-        const auditCard = $(this).parent().parent()
-        if (type === 'show') {
-            $(this).data('target', 'hide')
-            auditCard.find('.fold-card').slideDown('swing', () => {
-                auditCard.find('#end-target').text($(this).data('idx') + '#')
-                auditCard.find('#fold-btn').text('收起历史审核记录')
-            })
-        } else {
-            $(this).data('target', 'show')
-            auditCard.find('.fold-card').slideUp('swing', () => {
-                auditCard.find('#end-target').text('1#')
-                auditCard.find('#fold-btn').text('展开历史审核记录')
-            })
-        }
-    });
-    // 检查上报情况
-    function checkAuditorFrom () {
-        if ($('#auditors li').length === 0) {
-            toast('请先选择审批人,再上报数据', 'error', 'exclamation-circle');
-            return false;
+        // 展开历史审核记录
+        $('.modal-body #fold-btn').click(function () {
+            const type = $(this).data('target')
+            const auditCard = $(this).parent().parent()
+            if (type === 'show') {
+                $(this).data('target', 'hide')
+                auditCard.find('.fold-card').slideDown('swing', () => {
+                    auditCard.find('#fold-btn').text('收起历史审核记录')
+                })
+            } else {
+                $(this).data('target', 'show')
+                auditCard.find('.fold-card').slideUp('swing', () => {
+                    auditCard.find('#fold-btn').text('展开历史审核记录')
+                })
+            }
+        });
+        // 检查上报情况
+        function checkAuditorFrom() {
+            if ($('#auditors li').length === 0) {
+                toast('请先选择审批人,再上报数据', 'error', 'exclamation-circle');
+                return false;
+            }
+            $('#hide-all').show();
         }
-        $('#hide-all').show();
-    }
-</script>
+    </script>

+ 5 - 9
app/view/revise/modal.ejs

@@ -114,10 +114,11 @@
                 $('#auditor-list').empty()
                 $('#auditor-list').append(auditorsHTML)
                 auditHistory.forEach((auditors, idx) => {
+                    if(idx === auditHistory.length - 1 && auditHistory.length !== 1) {
+                        historyHTML += `<div class="text-right"><a href="javascript: void(0);" id="fold-btn" data-target="show">展开历史审批流程</a></div>`
+                    }
                     historyHTML += `<div class="${idx < auditHistory.length - 1 ? 'fold-card' : ''}">
-                    <div class="text-center text-muted"
-                        ${idx === auditHistory.length - 1 ? 'id="end-target"' : ""}>
-                        ${idx === auditHistory.length - 1 ? 1 : idx + 1}#</div>
+                    <div class="text-center text-muted">${idx + 1}#</div>
                     <ul class="timeline-list list-unstyled mt-2">`
                     auditors.forEach((auditor, index) => {
                         if (index === 0) {
@@ -234,10 +235,7 @@
                         }
                     })
                     historyHTML += '</ul></div>'
-                    if(idx === auditHistory.length - 1 && auditHistory.length !== 1) {
-                        historyHTML += `<div class="text-right"><a href="javascript: void(0);" id="fold-btn" data-target="show"
-                        data-idx="${idx + 1}">展开历史审批流程</a></div>`
-                    }
+
                 })
                 $('#audit-list').empty()
                 $('#audit-list').append(historyHTML)
@@ -278,13 +276,11 @@
         if (type === 'show') {
             $(this).data('target', 'hide')
             auditCard.find('.fold-card').slideDown('swing', () => {
-                auditCard.find('#end-target').text($(this).data('idx') + '#')
                 auditCard.find('#fold-btn').text('收起历史审核记录')
             })
         } else {
             $(this).data('target', 'show')
             auditCard.find('.fold-card').slideUp('swing', () => {
-                auditCard.find('#end-target').text('1#')
                 auditCard.find('#fold-btn').text('展开历史审核记录')
             })
         }

+ 131 - 135
app/view/stage/audit_modal.ejs

@@ -8,12 +8,12 @@
                     <h5 class="modal-title">上报审批</h5>
                 </div>
                 <div class="modal-body">
-                    <div class="dropdown">
+                    <div class="dropdown text-right">
                         <button class="btn btn-outline-primary btn-sm dropdown-toggle" type="button" id="dropdownMenuButton"
                             data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                             添加审批流程
                         </button>
-                        <div class="dropdown-menu" aria-labelledby="dropdownMenuButton" style="width:220px">
+                        <div class="dropdown-menu dropdown-menu-right" aria-labelledby="dropdownMenuButton" style="width:220px">
                             <div class="mb-2 p-2"><input class="form-control form-control-sm" placeholder="姓名/手机 检索"
                                     id="gr-search" autocomplete="off"></div>
                             <dl class="list-unstyled book-list">
@@ -106,137 +106,137 @@
                             </div>
                         </div>
                         <div class="col-8 modal-height-500" style="overflow: auto">
+
                             <% ctx.stage.auditHistory.forEach((auditors, idx) => { %>
-                            <div class="<%- idx < ctx.stage.auditHistory.length - 1 ? 'fold-card' : '' %>">
-                                <div class="text-center text-muted"
-                                    <%- idx === ctx.stage.auditHistory.length - 1 ? `id="end-target"` : "" %>>
-                                    <%- idx === ctx.stage.auditHistory.length - 1 ? 1 : idx+1 %>#</div>
-                                <ul class="timeline-list list-unstyled mt-2">
-                                    <% auditors.forEach((auditor, index) => { %>
-                                    <% if (index === 0) { %>
-                                    <li class="timeline-list-item pb-2">
-                                        <div class="timeline-item-date">
-                                            <%- ctx.helper.formatDate(auditor.begin_time) %>
-                                        </div>
-                                        <div class="timeline-item-tail"></div>
-                                        <div class="timeline-item-icon bg-success text-light">
-                                            <i class="fa fa-caret-down"></i>
-                                        </div>
-                                        <div class="timeline-item-content">
-                                            <div class="card">
-                                                <div class="card-body p-3">
-                                                    <div class="card-text">
-                                                        <p class="mb-1"><span
-                                                                class="h5"><%- ctx.stage.user.name %></span><span
-                                                                class="pull-right text-success"><%- idx !== 0 ? '重新' : '' %>上报审批</span>
-                                                        </p>
-                                                        <p class="text-muted mb-0"><%- ctx.stage.user.role %></p>
+                                <!-- 展开/收起历史流程 -->
+                                <% if(idx === ctx.stage.auditHistory.length - 1 && ctx.stage.auditHistory.length !== 1) { %>
+                                    <div class="text-right">
+                                        <a href="javascript: void(0);" id="fold-btn" data-target="show" >展开历史审批流程</a>
+                                    </div>
+                                <% } %>
+                                <div class="<%- idx < ctx.stage.auditHistory.length - 1 ? 'fold-card' : '' %>">
+                                    <div class="text-center text-muted"><%- idx+1 %>#</div>
+                                    <ul class="timeline-list list-unstyled mt-2">
+                                        <% auditors.forEach((auditor, index) => { %>
+                                        <% if (index === 0) { %>
+                                        <li class="timeline-list-item pb-2">
+                                            <div class="timeline-item-date">
+                                                <%- ctx.helper.formatDate(auditor.begin_time) %>
+                                            </div>
+                                            <div class="timeline-item-tail"></div>
+                                            <div class="timeline-item-icon bg-success text-light">
+                                                <i class="fa fa-caret-down"></i>
+                                            </div>
+                                            <div class="timeline-item-content">
+                                                <div class="card">
+                                                    <div class="card-body p-3">
+                                                        <div class="card-text">
+                                                            <p class="mb-1"><span
+                                                                    class="h5"><%- ctx.stage.user.name %></span><span
+                                                                    class="pull-right text-success"><%- idx !== 0 ? '重新' : '' %>上报审批</span>
+                                                            </p>
+                                                            <p class="text-muted mb-0"><%- ctx.stage.user.role %></p>
+                                                        </div>
                                                     </div>
                                                 </div>
                                             </div>
-                                        </div>
-                                    </li>
-                                    <li class="timeline-list-item pb-2">
-                                        <div class="timeline-item-date">
-                                            <%- ctx.helper.formatDate(auditor.end_time) %>
-                                        </div>
-                                        <% if(index < auditors.length - 1) { %>
-                                        <div class="timeline-item-tail"></div>
-                                        <% } %>
-                                        <% if(auditor.status === auditConst.status.checked) { %>
-                                        <div class="timeline-item-icon bg-success text-light">
-                                            <i class="fa fa-check"></i>
-                                        </div>
-                                        <% } else if(auditor.status === auditConst.status.checkNo || auditor.status === auditConst.status.checkNoPre) {%>
-                                        <div class="timeline-item-icon bg-warning text-light">
-                                            <i class="fa fa-level-up"></i>
-                                        </div>
-                                        <% } else if(auditor.status === auditConst.status.checking) { %>
-                                        <div class="timeline-item-icon bg-warning text-light">
-                                            <i class="fa fa-ellipsis-h"></i>
-                                        </div>
-                                        <% } else {%>
-                                        <div class="timeline-item-icon bg-secondary text-light">
-                                        </div>
-                                        <% } %>
-                                        <div class="timeline-item-content">
-                                            <div class="card">
-                                                <div class="card-body p-3">
-                                                    <div class="card-text">
-                                                        <p class="mb-1"><span class="h5"><%- auditor.name %></span><span
-                                                                class="pull-right <%- auditConst.statusClass[auditor.status] %>"><%- auditConst.statusString[auditor.status] %></span>
-                                                        </p>
-                                                        <p class="text-muted mb-0"><%- auditor.role %></p>
+                                        </li>
+                                        <li class="timeline-list-item pb-2">
+                                            <div class="timeline-item-date">
+                                                <%- ctx.helper.formatDate(auditor.end_time) %>
+                                            </div>
+                                            <% if(index < auditors.length - 1) { %>
+                                            <div class="timeline-item-tail"></div>
+                                            <% } %>
+                                            <% if(auditor.status === auditConst.status.checked) { %>
+                                            <div class="timeline-item-icon bg-success text-light">
+                                                <i class="fa fa-check"></i>
+                                            </div>
+                                            <% } else if(auditor.status === auditConst.status.checkNo || auditor.status === auditConst.status.checkNoPre) {%>
+                                            <div class="timeline-item-icon bg-warning text-light">
+                                                <i class="fa fa-level-up"></i>
+                                            </div>
+                                            <% } else if(auditor.status === auditConst.status.checking) { %>
+                                            <div class="timeline-item-icon bg-warning text-light">
+                                                <i class="fa fa-ellipsis-h"></i>
+                                            </div>
+                                            <% } else {%>
+                                            <div class="timeline-item-icon bg-secondary text-light">
+                                            </div>
+                                            <% } %>
+                                            <div class="timeline-item-content">
+                                                <div class="card">
+                                                    <div class="card-body p-3">
+                                                        <div class="card-text">
+                                                            <p class="mb-1"><span class="h5"><%- auditor.name %></span><span
+                                                                    class="pull-right <%- auditConst.statusClass[auditor.status] %>"><%- auditConst.statusString[auditor.status] %></span>
+                                                            </p>
+                                                            <p class="text-muted mb-0"><%- auditor.role %></p>
+                                                        </div>
                                                     </div>
-                                                </div>
 
-                                                <!--审批意见-->
-                                                <% if (auditor.opinion) { %>
-                                                <div class="card-body p-3 border-top">
-                                                    <p style="margin: 0;"><%- auditor.opinion %></p>
+                                                    <!--审批意见-->
+                                                    <% if (auditor.opinion) { %>
+                                                    <div class="card-body p-3 border-top">
+                                                        <p style="margin: 0;"><%- auditor.opinion %></p>
+                                                    </div>
+                                                    <% } %>
                                                 </div>
-                                                <% } %>
                                             </div>
-                                        </div>
-                                    </li>
-                                    <% } else {%>
-                                    <li class="timeline-list-item pb-2">
-                                        <div class="timeline-item-date">
-                                            <%- ctx.helper.formatDate(auditor.end_time) %>
-                                        </div>
-                                        <% if(index < auditors.length - 1) { %>
-                                        <div class="timeline-item-tail"></div>
-                                        <% } %>
-                                        <% if(auditor.status === auditConst.status.checked) { %>
-                                        <div class="timeline-item-icon bg-success text-light">
-                                            <i class="fa fa-check"></i>
-                                        </div>
-                                        <% } else if(auditor.status === auditConst.status.checkNo || auditor.status === auditConst.status.checkNoPre) {%>
-                                        <div class="timeline-item-icon bg-warning text-light">
-                                            <i class="fa fa-level-up"></i>
-                                        </div>
-                                        <% } else if(auditor.status === auditConst.status.checking) { %>
-                                        <div class="timeline-item-icon bg-warning text-light">
-                                            <i class="fa fa-ellipsis-h"></i>
-                                        </div>
-                                        <% } else { %>
-                                        <div class="timeline-item-icon bg-secondary text-light">
-                                        </div>
-                                        <% } %>
-                                        <div class="timeline-item-content">
-                                            <div class="card">
-                                                <div class="card-body p-3">
-                                                    <div class="card-text">
-                                                        <p class="mb-1"><span class="h5"><%- auditor.name %></span>
-                                                            <span
-                                                                class="pull-right
-                                                                                <%- auditConst.statusClass[auditor.status] %>"><%- auditor.status !== auditConst.status.uncheck ? auditConst.statusString[auditor.status] : ''%>
-                                                                <%- auditor.status === auditConst.status.checkNo ? ctx.stage.user.name : '' %>
-                                                                <%- auditor.status === auditConst.status.checkNoPre ? auditors[index-1].name : '' %>
-                                                            </span>
-                                                        </p>
-                                                        <p class="text-muted mb-0"><%- auditor.role %></p>
+                                        </li>
+                                        <% } else {%>
+                                        <li class="timeline-list-item pb-2">
+                                            <div class="timeline-item-date">
+                                                <%- ctx.helper.formatDate(auditor.end_time) %>
+                                            </div>
+                                            <% if(index < auditors.length - 1) { %>
+                                            <div class="timeline-item-tail"></div>
+                                            <% } %>
+                                            <% if(auditor.status === auditConst.status.checked) { %>
+                                            <div class="timeline-item-icon bg-success text-light">
+                                                <i class="fa fa-check"></i>
+                                            </div>
+                                            <% } else if(auditor.status === auditConst.status.checkNo || auditor.status === auditConst.status.checkNoPre) {%>
+                                            <div class="timeline-item-icon bg-warning text-light">
+                                                <i class="fa fa-level-up"></i>
+                                            </div>
+                                            <% } else if(auditor.status === auditConst.status.checking) { %>
+                                            <div class="timeline-item-icon bg-warning text-light">
+                                                <i class="fa fa-ellipsis-h"></i>
+                                            </div>
+                                            <% } else { %>
+                                            <div class="timeline-item-icon bg-secondary text-light">
+                                            </div>
+                                            <% } %>
+                                            <div class="timeline-item-content">
+                                                <div class="card">
+                                                    <div class="card-body p-3">
+                                                        <div class="card-text">
+                                                            <p class="mb-1"><span class="h5"><%- auditor.name %></span>
+                                                                <span
+                                                                    class="pull-right
+                                                                                    <%- auditConst.statusClass[auditor.status] %>"><%- auditor.status !== auditConst.status.uncheck ? auditConst.statusString[auditor.status] : ''%>
+                                                                    <%- auditor.status === auditConst.status.checkNo ? ctx.stage.user.name : '' %>
+                                                                    <%- auditor.status === auditConst.status.checkNoPre ? auditors[index-1].name : '' %>
+                                                                </span>
+                                                            </p>
+                                                            <p class="text-muted mb-0"><%- auditor.role %></p>
+                                                        </div>
                                                     </div>
+                                                    <!--审批意见-->
+                                                    <% if (auditor.opinion) { %>
+                                                    <div class="card-body p-3 border-top">
+                                                        <p style="margin: 0;"><%- auditor.opinion %></p>
+                                                    </div>
+                                                    <% } %>
                                                 </div>
-                                                <!--审批意见-->
-                                                <% if (auditor.opinion) { %>
-                                                <div class="card-body p-3 border-top">
-                                                    <p style="margin: 0;"><%- auditor.opinion %></p>
-                                                </div>
-                                                <% } %>
                                             </div>
-                                        </div>
-                                    </li>
-                                    <% } %>
-                                    <% }) %>
-                                </ul>
-                            </div>
-                            <!-- 展开/收起历史流程 -->
-                            <% if(idx === ctx.stage.auditHistory.length - 1 && ctx.stage.auditHistory.length !== 1) { %>
-                            <div class="text-right"><a href="javascript: void(0);" id="fold-btn" data-target="show"
-                                    data-idx="<%- idx + 1 %>">展开历史审批流程</a>
-                            </div>
-                            <% } %>
+                                        </li>
+                                        <% } %>
+                                        <% }) %>
+                                    </ul>
+                                </div>
+
                             <% }) %>
                         </div>
                     </div>
@@ -293,10 +293,14 @@
                         </div>
                         <div class="col-8 modal-height-500" style="overflow: auto">
                             <% ctx.stage.auditHistory.forEach((auditors, idx) => { %>
+                                <!-- 展开/收起历史流程 -->
+                            <% if(idx === ctx.stage.auditHistory.length - 1 && ctx.stage.auditHistory.length !== 1) { %>
+                                <div class="text-right">
+                                    <a href="javascript: void(0);" id="fold-btn" data-target="show">展开历史审批流程</a>
+                                </div>
+                                <% } %>
                             <div class="<%- idx < ctx.stage.auditHistory.length - 1 ? 'fold-card' : '' %>">
-                                <div class="text-center text-muted"
-                                    <%- idx === ctx.stage.auditHistory.length - 1 ? `id="end-target"` : "" %>>
-                                    <%- idx === ctx.stage.auditHistory.length - 1 ? 1 : idx+1 %>#</div>
+                                <div class="text-center text-muted"><%- idx+1 %>#</div>
                                 <ul class="timeline-list list-unstyled mt-2">
                                     <% auditors.forEach((auditor, index) => { %>
                                     <% if (index === 0) { %>
@@ -428,11 +432,7 @@
                                     <% }) %>
                                 </ul>
                             </div>
-                            <!-- 展开/收起历史流程 -->
-                            <% if(idx === ctx.stage.auditHistory.length - 1 && ctx.stage.auditHistory.length !== 1) { %>
-                            <div class="text-right"><a href="javascript: void(0);" id="fold-btn" data-target="show"
-                                    data-idx="<%- idx + 1 %>">展开历史审批流程</a></div>
-                            <% } %>
+
                             <% }) %>
                         </div>
                     </div>
@@ -486,9 +486,7 @@
                         <div class="col-8 modal-height-500" style="overflow: auto">
                             <% ctx.stage.auditHistory.forEach((auditors, idx) => { %>
                             <div class="<%- idx < ctx.stage.auditHistory.length - 1 ? 'fold-card' : '' %>">
-                                <div class="text-center text-muted"
-                                    <%- idx === ctx.stage.auditHistory.length - 1 ? `id="end-target"` : "" %>>
-                                    <%- idx === ctx.stage.auditHistory.length - 1 ? 1 : idx+1 %>#</div>
+                                <div class="text-center text-muted"><%- idx+1 %>#</div>
                                 <ul class="timeline-list list-unstyled mt-2">
                                     <% auditors.forEach((auditor, index) => { %>
                                     <% if (index === 0) { %>
@@ -932,13 +930,11 @@
         if (type === 'show') {
             $(this).data('target', 'hide')
             auditCard.find('.fold-card').slideDown('swing', () => {
-                auditCard.find('#end-target').text($(this).data('idx') + '#')
                 auditCard.find('#fold-btn').text('收起历史审核记录')
             })
         } else {
             $(this).data('target', 'show')
             auditCard.find('.fold-card').slideUp('swing', () => {
-                auditCard.find('#end-target').text('1#')
                 auditCard.find('#fold-btn').text('展开历史审核记录')
             })
         }