Browse Source

待办事项,查询待审批项目,原报未上报时,状态也为2审批,过滤此情况

MaiXinRong 6 years ago
parent
commit
c646754ad2
2 changed files with 2 additions and 2 deletions
  1. 1 1
      app/service/change_audit.js
  2. 1 1
      app/view/dashboard/index.ejs

+ 1 - 1
app/service/change_audit.js

@@ -256,7 +256,7 @@ module.exports = app => {
                 '    c.`code` As `ccode`, c.`name` As `cname`,' +
                 '    t.`name`, t.`type`, t.`user_id` ' +
                 '  FROM ?? AS ca, ?? AS c, ?? As t ' +
-                '  WHERE ca.`uid` = ? and ca.`status` = ?' +
+                '  WHERE ca.`uid` = ? and ca.`status` = ? and ca.`status` = c.`status`' +
                 '    and ca.`cid` = c.`cid` and ca.`tid` = t.`id`';
             const sqlParam = [this.tableName, this.ctx.service.change.tableName, this.ctx.service.tender.tableName, uid, 2];
             return await this.db.query(sql, sqlParam);

+ 1 - 1
app/view/dashboard/index.ejs

@@ -37,7 +37,7 @@
                 <li class="media">
                     <img class="mr-3" src="public/images/avatar.png">
                     <div class="media-body">
-                        <span class="pull-right text-muted"><%- change.sin_time.toLocaleString() %></span>
+                        <span class="pull-right text-muted"><%- (change.sin_time ? change.sin_time.toLocaleString() : '') %></span>
                         <h5 class="mt-0"><%- ctx.session.sessionUser.name %><small class="ml-3 text-muted"><%- change.role %></small></h5>
                         <p>
                             <a href="/tender/<%- change.tid %>"><%- change.name %></a>