Browse Source

修复变更分页不显示bug

laiguoran 3 years ago
parent
commit
447569c41f
1 changed files with 3 additions and 1 deletions
  1. 3 1
      app/service/change.js

+ 3 - 1
app/service/change.js

@@ -320,13 +320,15 @@ module.exports = app => {
                 case 0: // 包含你的所有变更令
                     const sql =
                         'SELECT count(*) AS count FROM ?? AS a WHERE a.tid = ? AND ' +
-                        '(a.uid = ? OR a.cid IN (SELECT b.cid FROM ?? AS b WHERE b.uid = ? AND a.times = b.times GROUP BY b.cid))';
+                        '(a.uid = ? OR (a.status != ? AND a.cid IN (SELECT b.cid FROM ?? AS b WHERE b.uid = ? AND a.times = b.times GROUP BY b.cid)) OR a.status = ? )';
                     const sqlParam = [
                         this.tableName,
                         tenderId,
                         this.ctx.session.sessionUser.accountId,
+                        audit.flow.status.uncheck,
                         this.ctx.service.changeAudit.tableName,
                         this.ctx.session.sessionUser.accountId,
+                        audit.flow.status.checked,
                     ];
                     const result = await this.db.query(sql, sqlParam);
                     return result[0].count;