Browse Source

审批定位modal框判断

laiguoran 5 years ago
parent
commit
47b72ebc80

+ 3 - 3
app/view/change/info_modal.ejs

@@ -363,7 +363,7 @@
 
 <% if (auditStatus === 6) { %>
     <!--审批通过-->
-    <div class="modal fade" id="sp-done" data-backdrop="static">
+    <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="/tender/<%- tender.id %>/change/approval?_csrf=<%= ctx.csrf %>" method="post" id="success-approval">
                 <div class="modal-header">
@@ -510,7 +510,7 @@
         </div>
     </div>
     <!--审批退回-->
-    <div class="modal fade" id="sp-back" data-backdrop="static">
+    <div class="modal fade sp-location-list" id="sp-back" data-backdrop="static">
         <div class="modal-dialog modal-lg" role="document">
             <form class="modal-content" action="/tender/<%- tender.id %>/change/approval?_csrf=<%= ctx.csrf %>" method="post" id="fail-approval">
                 <div class="modal-header">
@@ -730,7 +730,7 @@
 </div>
 
 <script>
-    $('.modal').on('shown.bs.modal', function () {
+    $('.sp-location-list').on('shown.bs.modal', function () {
         const height = $(this)[0].scrollHeight;
         const scrollBox = $(this).find('div[class="col-8 modal-height-500"]');
         const bdiv = (scrollBox.offset() && scrollBox.offset().top) || 0;

+ 3 - 3
app/view/material/audit_modal.ejs

@@ -55,7 +55,7 @@
 <% if (ctx.material.status === auditConst.status.checking) { %>
     <% if (ctx.material.curAuditor && ctx.material.curAuditor.aid === ctx.session.sessionUser.accountId) { %>
         <!--审批通过-->
-        <div class="modal fade" id="sp-done" data-backdrop="static">
+        <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 %>/audit/check" method="post" onsubmit="return auditCheck(0);">
             <div class="modal-header">
@@ -196,7 +196,7 @@
     </div>
 </div>
         <!--审批退回-->
-        <div class="modal fade" id="sp-back" data-backdrop="static">
+        <div class="modal fade sp-location-list" id="sp-back" data-backdrop="static">
     <div class="modal-dialog modal-lg" role="document">
         <form class="modal-content modal-lg" action="<%- preUrl %>/audit/check" method="post" onsubmit="return auditCheck(1);">
             <div class="modal-header">
@@ -867,7 +867,7 @@
 <% } %>
 
 <script>
-    $('.modal').on('shown.bs.modal', function () {
+    $('.sp-location-list').on('shown.bs.modal', function () {
         const height = $(this)[0].scrollHeight;
         const scrollBox = $(this).find('div[class="col-8 modal-height-500"]');
         const bdiv = (scrollBox.offset() && scrollBox.offset().top) || 0;

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

@@ -78,7 +78,7 @@
 <% if (ctx.stage.status === auditConst.status.checking) { %>
     <% if (ctx.stage.curAuditor && ctx.stage.curAuditor.aid === ctx.session.sessionUser.accountId) { %>
         <!--审批通过-->
-        <div class="modal fade" id="sp-done" data-backdrop="static">
+        <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 %>/audit/check" method="post" id="audit-check0">
                     <div class="modal-header">
@@ -236,7 +236,7 @@
             </div>
         </div>
         <!--审批退回-->
-        <div class="modal fade" id="sp-back" data-backdrop="static">
+        <div class="modal fade sp-location-list" id="sp-back" data-backdrop="static">
             <div class="modal-dialog modal-lg" role="document">
                 <form class="modal-content modal-lg" action="<%- preUrl %>/audit/check" method="post" id="audit-check1" >
                     <div class="modal-header">
@@ -1103,7 +1103,7 @@
     </div>
     <% if (ctx.session.sessionUser.accountId === ctx.stage.curAuditor.aid) { %>
         <!--审批通过-->
-        <div class="modal fade" id="sp-done" data-backdrop="static">
+        <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 %>/audit/check" method="post" id="audit-check2">
                     <div class="modal-header">
@@ -1261,7 +1261,7 @@
             </div>
         </div>
         <!--审批退回-->
-        <div class="modal fade" id="sp-back" data-backdrop="static">
+        <div class="modal fade sp-location-list" id="sp-back" data-backdrop="static">
             <div class="modal-dialog modal-lg" role="document">
                 <form class="modal-content" action="<%- preUrl %>/audit/check" method="post" id="audit-check3">
                     <div class="modal-header">
@@ -1595,7 +1595,7 @@
     });
 
     // 定位到审批框高度
-    $('.modal').on('shown.bs.modal', function () {
+    $('.sp-location-list').on('shown.bs.modal', function () {
         const height = $(this)[0].scrollHeight;
         const scrollBox = $(this).find('div[class="col-8 modal-height-500"]');
         const bdiv = (scrollBox.offset() && scrollBox.offset().top) || 0;