Переглянути джерело

feat: 计量台账上传除游客外不限制使用该功能

lanjianrong 4 роки тому
батько
коміт
025e2fe9d9
2 змінених файлів з 19 додано та 16 видалено
  1. 15 15
      app/controller/stage_controller.js
  2. 4 1
      app/view/stage/index.ejs

+ 15 - 15
app/controller/stage_controller.js

@@ -1296,21 +1296,21 @@ module.exports = app => {
          */
         _checkStageCanModifyRe(ctx) {
             // 检查登录用户,是否可操作
-            if (ctx.stage.readOnly) {
-                if (ctx.stage.status === auditConst.status.checked) {
-                    // 当前期状态为完成,且提交人是审核列表中的则可再次上传
-                    if (ctx.stage.user_id === ctx.session.sessionUser.accountId || ctx.stage.auditors.findIndex(auditor => auditor.aid === ctx.session.sessionUser.accountId) !== -1) {
-                        // 再次上传的图片要给个标识,方便给前端进行编辑操作
-                        // ctx.reUploadPermission = true;
-                        return;
-                    }
-
-                    throw '该计量期当前您无权操作';
-
-                } else {
-                    throw '该计量期当前您无权操作';
-                }
-            }
+            // if (ctx.stage.readOnly) {
+            //     if (ctx.stage.status === auditConst.status.checked) {
+            //         // 当前期状态为完成,且提交人是审核列表中的则可再次上传
+            //         if (ctx.stage.user_id === ctx.session.sessionUser.accountId || ctx.stage.auditors.findIndex(auditor => auditor.aid === ctx.session.sessionUser.accountId) !== -1) {
+            //             // 再次上传的图片要给个标识,方便给前端进行编辑操作
+            //             // ctx.reUploadPermission = true;
+            //             return;
+            //         }
+
+            //         throw '该计量期当前您无权操作';
+
+            //     } else {
+            //         throw '该计量期当前您无权操作';
+            //     }
+            // }
             if (ctx.stage.revising) {
                 throw '台账修订中,请勿修改提交期数据';
             }

+ 4 - 1
app/view/stage/index.ejs

@@ -273,7 +273,10 @@
                                     <a href="javascript:void(0);" id="bach-download" class="btn btn-sm btn-primary" type="curr">批量下载</a>
                                     <!--所有附件 翻页-->
                                     <span id="showPage" style="display: none"><a href="javascript:void(0);" class="page-select ml-3" content="pre"><i class="fa fa-chevron-left"></i></a> <span id="currentPage">1</span>/<span id="totalPage">10</span> <a href="javascript:void(0);" class="page-select mr-3" content="next"><i class="fa fa-chevron-right"></i></a></span>
-                                    <% if (!ctx.tender.isTourist && stage.filePermission) { %>
+                                    <!-- <% if (!ctx.tender.isTourist && stage.filePermission) { %>
+                                    <a href="#upload" data-toggle="modal" data-target="#upload"  class="btn btn-sm btn-outline-primary ml-3">上传</a>
+                                    <% } %> -->
+                                    <% if (!ctx.tender.isTourist) { %>
                                     <a href="#upload" data-toggle="modal" data-target="#upload"  class="btn btn-sm btn-outline-primary ml-3">上传</a>
                                     <% } %>
                                 </li>