Browse Source

其它台账附件设置

laiguoran 4 years ago
parent
commit
69fe4e2f68
2 changed files with 7 additions and 4 deletions
  1. 4 3
      app/controller/stage_extra_controller.js
  2. 3 1
      app/view/stage_extra/bonus_modal.ejs

+ 4 - 3
app/controller/stage_extra_controller.js

@@ -28,7 +28,7 @@ module.exports = app => {
 
         /**
          * 甲供材料(Get)
-         * 
+         *
          * @param {Object} ctx - egg全局变量
          */
         async jgcl (ctx) {
@@ -85,14 +85,15 @@ module.exports = app => {
 
         /**
          * 奖罚金(Get)
-         * 
+         *
          * @param {Object} ctx - egg全局变量
          */
         async bonus (ctx) {
             try {
                 const renderData = {
                     jsFiles: this.app.jsFiles.common.concat(this.app.jsFiles.stageExtra.bonus),
-                    auditConst: auditConst,
+                    auditConst,
+                    stage: ctx.stage,
                 };
                 await this.layout('stage_extra/bonus.ejs', renderData, 'stage_extra/bonus_modal.ejs');
             } catch (err) {

+ 3 - 1
app/view/stage_extra/bonus_modal.ejs

@@ -6,10 +6,12 @@
                 <h5 class="modal-title">附件</h5>
             </div>
             <div class="modal-body">
+                <% if (ctx.stage.filePermission) { %>
                 <div class="form-group" id="upload-file-panel">
                     <label for="formGroupExampleInput">大小限制:30MB,支持<span data-toggle="tooltip" data-placement="bottom" title="doc,docx,xls,xlsx,ppt,pptx,pdf">office等文档格式</span>、<span data-toggle="tooltip" data-placement="bottom" title="jpg,png,bmp">图片格式</span>、<span data-toggle="tooltip" data-placement="bottom" title="rar,zip">压缩包格式</span></label>
                     <input type="file" class="" id="upload-file" multiple>
                 </div>
+                <% } %>
                 <div class="modal-height-500" style="overflow:auto;">
                     <table class="table table-sm table-bordered" style="word-break:break-all; table-layout: fixed">
                         <thead>
@@ -31,4 +33,4 @@
             </div>
         </div>
     </div>
-</div>
+</div>