Browse Source

fix: 修复计量台账cur_uid、accountList重复定义的bug

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

+ 1 - 1
app/public/js/stage.js

@@ -3057,7 +3057,7 @@ $(document).ready(() => {
     });
     // 上传附件
     $('#upload-file-btn').click(function () {
-        if (curAuditor && curAuditor.aid !== parseInt(cur_uid)) {
+        if (curAuditor && curAuditor.aid !== cur_uid) {
             return toastr.error('无法上传图片!');
         }
         const files = $('#upload-file')[0].files;

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

@@ -678,10 +678,10 @@
 <% if (ctx.session.sessionUser.accountId === ctx.material.user_id && (ctx.material.status === auditConst.status.uncheck || ctx.material.status === auditConst.status.checkNo)) { %>
     <script>
         const accountGroup = JSON.parse('<%- JSON.stringify(accountGroup) %>');
+        const accountList = JSON.parse('<%- JSON.stringify(accountList) %>');
     </script>
 <% } %>
 <script>
-    const cur_uid  = parseInt('<%- ctx.session.sessionUser.accountId %>');
     $('.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;

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

@@ -802,7 +802,7 @@
 <% } %>
 <script>
     const preUrl = '<%- preUrl %>';
-    const cur_uid = parseInt('<%- ctx.session.sessionUser.accountdId %>');
+    const cur_uid = parseInt('<%- ctx.session.sessionUser.accountId %>');
     <% if (ctx.stage && ctx.url !== '/tender/' + ctx.tender.id + '/measure/stage/' + ctx.stage.order) { %>
     const dataChecker = DataChecker({
         checkUrl: '/tender/<%- ctx.tender.id %>/measure/stage/<%- ctx.stage.order %>/check',

+ 0 - 5
app/view/stage/index.ejs

@@ -593,8 +593,3 @@
     const curAuditor = JSON.parse('<%- JSON.stringify(curAuditor) %>');
     const thirdParty = JSON.parse('<%- JSON.stringify(thirdParty) %>');
 </script>
-<% if (ctx.stage.status === auditConst.status.uncheck && ctx.session.sessionUser.accountId === ctx.stage.user_id) {%>
-<script>
-    const accountList = JSON.parse('<%- JSON.stringify(accountList) %>');
-</script>
-<% } %>