Przeglądaj źródła

修复计量审批流程展示bug及支付审批部分调整

laiguoran 2 lat temu
rodzic
commit
ef79cdd926

+ 1 - 0
app/controller/payment_controller.js

@@ -299,6 +299,7 @@ module.exports = app => {
                 renderData.rptAudit = rptAudit;
                 renderData.content = content;
                 renderData.report_json = report_json;
+                renderData.nextDetail = await ctx.service.paymentDetail.getDataByCondition({ tr_id: ctx.trInfo.id, order: ctx.detail.order + 1 });
                 if ((ctx.detail.status === auditConst.status.uncheck || ctx.detail.status === auditConst.status.checkNo) && ctx.session.sessionUser.accountId === ctx.detail.uid) {
                     // data.accountGroup = accountGroup;
                     // 获取所有项目参与者

+ 7 - 3
app/view/payment/detail.ejs

@@ -16,7 +16,11 @@
                 <span class="text-danger pull-right">报表内容已发生变化,请删除并重新生成详情</span>
                 <% } else { %>
                 <% include ./audit_btn.ejs %>
-                <% if (ctx.detail.status !== auditConst.status.checked && rptAudit) { %>
+                <% if (rptAudit &&
+                        ((ctx.detail.status !== auditConst.status.checkNo && ctx.detail.status !== auditConst.status.checked) ||
+                        (ctx.detail.status === auditConst.status.checked && !nextDetail) ||
+                        (ctx.detail.status === auditConst.status.checkNo && ctx.detail.uid === ctx.session.sessionUser.accountId))
+                ) { %>
                 <a href="#sub-sp5" data-toggle="modal" data-target="#sub-sp5" class="btn btn-sm btn-primary pull-right mr-2">签字意见</a>
                 <% } %>
                 <% } %>
@@ -177,7 +181,7 @@
         auditRptPrintHelper.showPage();
         iniPage();
     });
-    
+
     function _getAdhocDummyCells(srcCell, rstCells) {
         if (typeof srcCell.path === 'string') {
             let paths = srcCell.path.split('!;!');
@@ -190,7 +194,7 @@
                         path: dtlPath,
                         isStamp: true,
                         area: srcCell.area,
-                    };                
+                    };
                     rstCells.push(newStampCell);
                 }
             }

+ 5 - 1
app/view/payment/detail_modal.ejs

@@ -1,4 +1,8 @@
-<% if (ctx.detail.status !== auditConst.status.checked && rptAudit) { %>
+<% if (rptAudit &&
+        ((ctx.detail.status !== auditConst.status.checkNo && ctx.detail.status !== auditConst.status.checked) ||
+        (ctx.detail.status === auditConst.status.checked && !nextDetail) ||
+        (ctx.detail.status === auditConst.status.checkNo && ctx.detail.uid === ctx.session.sessionUser.accountId))
+) { %>
 <!--签字意见-->
 <div class="modal fade" id="sub-sp5" data-backdrop="static">
     <div class="modal-dialog" role="document">

+ 4 - 4
app/view/stage/audit_modal.ejs

@@ -88,7 +88,7 @@
                             <a class="sp-list-item" href="#sub-sp2" data-toggle="modal" data-target="#sub-sp2"
                                id="hideSp">修改审批流程</a>
                             <% } %>
-                            <div class="card mt-3">
+                            <div class="card modal-height-500 mt-3" style="overflow: auto">
                                 <ul class="list-group list-group-flush auditors-list" id="auditors-list">
                                     <% ctx.stage.auditors2.forEach((item, idx) => { %>
                                     <% if (idx === 0) { %>
@@ -275,7 +275,7 @@
                             <a class="sp-list-item" href="#sub-sp2" data-toggle="modal" data-target="#sub-sp2"
                                id="hideSp">修改审批流程</a>
                             <% } %>
-                            <div class="card mt-3">
+                            <div class="card modal-height-500 mt-3" style="overflow: auto">
                                 <ul class="list-group list-group-flush auditors-list">
                                     <% ctx.stage.auditors2.forEach((item, idx) => { %>
                                     <% if (idx === 0) { %>
@@ -469,7 +469,7 @@
                             <a class="sp-list-item" href="#sub-sp2" data-toggle="modal" data-target="#sub-sp2"
                                id="hideSp">修改审批流程</a>
                             <% } %>
-                            <div class="card mt-3">
+                            <div class="card modal-height-500 mt-3" style="overflow: auto">
                                 <ul class="list-group list-group-flush auditors-list">
                                     <% ctx.stage.auditors2.forEach((item, idx) => { %>
                                     <% if (idx === 0) { %>
@@ -830,7 +830,7 @@
             </div>
             <div class="modal-body">
                 <div class="card mt-1">
-                    <div class="modal-height-500" style="overflow: visible">
+                    <div class="modal-height-500" style="overflow: auto">
                         <style>
                             #admin-edit-shenpi thead th {
                                 border-bottom: 0;