Browse Source

1. 台账修订,排序
2. 修订内容,只读

MaiXinRong 5 years ago
parent
commit
b5e11aad61
3 changed files with 4 additions and 3 deletions
  1. 2 1
      app/service/revise_pos.js
  2. 1 1
      app/view/revise/history.ejs
  3. 1 1
      app/view/revise/info.ejs

+ 2 - 1
app/service/revise_pos.js

@@ -27,7 +27,8 @@ module.exports = app => {
                 '  FROM ' + this.tableName + ' p ' +
                 '  LEFT JOIN ' + this.ctx.service.stage.tableName + ' s' +
                 '  ON add_stage = s.id'
-                + this.ctx.helper.whereSql(condition, 'p');
+                + this.ctx.helper.whereSql(condition, 'p') +
+                '  ORDER By p.porder ASC';
             return await this.db.query(sql);
         }
 

+ 1 - 1
app/view/revise/history.ejs

@@ -75,7 +75,7 @@
                             </div>
                             <div class="form-group">
                                 <label >修订内容<b class="text-danger">*</b></label>
-                                <textarea id="content" class="form-control" value="编写错漏5" rows="12"><%- revise.content %></textarea>
+                                <textarea id="content" class="form-control" value="编写错漏5" rows="12" readonly=""><%- revise.content %></textarea>
                             </div>
                             <div class="form-group">
                                 <label >审批完成</label>

+ 1 - 1
app/view/revise/info.ejs

@@ -121,7 +121,7 @@
                             </div>
                             <div class="form-group">
                                 <label >修订内容<b class="text-danger">*</b></label>
-                                <textarea class="form-control" id="content" value="<%- revise.content %>" rows="12"><%- revise.content %></textarea>
+                                <textarea class="form-control" id="content" value="<%- revise.content %>" rows="12" <% if (readOnly) { %> readonly="" <% } %>><%- revise.content %></textarea>
                             </div>
                         </div>
                     </div>