Browse Source

返回路由跳转处理,wap待审页处理

laiguoran 3 years ago
parent
commit
9ee12f11f0
2 changed files with 5 additions and 5 deletions
  1. 3 3
      app/controller/change_controller.js
  2. 2 2
      app/service/change_audit.js

+ 3 - 3
app/controller/change_controller.js

@@ -2024,7 +2024,7 @@ module.exports = app => {
                     auditConst: audit.changeProject,
                     auditConst: audit.changeProject,
                     fileList,
                     fileList,
                     whiteList,
                     whiteList,
-                    returnUrl: this.app._.indexOf(ctx.request.headers.referer, '/tender/' + ctx.tender.id + '/change/project') !== -1 ? ctx.request.headers.referer : null,
+                    returnUrl: this.app._.includes(ctx.request.headers.referer, '/tender/' + ctx.tender.id + '/change/project') ? ctx.request.headers.referer : null,
                     jsFiles: this.app.jsFiles.common.concat(this.app.jsFiles.change.project_information),
                     jsFiles: this.app.jsFiles.common.concat(this.app.jsFiles.change.project_information),
                     preUrl: '/tender/' + ctx.tender.id + '/change/project/' + ctx.change.id + '/information',
                     preUrl: '/tender/' + ctx.tender.id + '/change/project/' + ctx.change.id + '/information',
                 };
                 };
@@ -2611,7 +2611,7 @@ module.exports = app => {
                     auditConst: audit.changeApply,
                     auditConst: audit.changeApply,
                     fileList,
                     fileList,
                     whiteList,
                     whiteList,
-                    returnUrl: this.app._.indexOf(ctx.request.headers.referer, '/tender/' + ctx.tender.id + '/change/apply') !== -1 ? ctx.request.headers.referer : null,
+                    returnUrl: this.app._.includes(ctx.request.headers.referer, '/tender/' + ctx.tender.id + '/change/apply') ? ctx.request.headers.referer : null,
                     jsFiles: this.app.jsFiles.common.concat(this.app.jsFiles.change.apply_information),
                     jsFiles: this.app.jsFiles.common.concat(this.app.jsFiles.change.apply_information),
                     preUrl: '/tender/' + ctx.tender.id + '/change/apply/' + ctx.change.id + '/information',
                     preUrl: '/tender/' + ctx.tender.id + '/change/apply/' + ctx.change.id + '/information',
                 };
                 };
@@ -2647,7 +2647,7 @@ module.exports = app => {
                     changeConst,
                     changeConst,
                     auditConst: audit.changeApply,
                     auditConst: audit.changeApply,
                     fileList,
                     fileList,
-                    returnUrl: this.app._.indexOf(ctx.request.headers.referer, '/tender/' + ctx.tender.id + '/change/apply') !== -1 ? ctx.request.headers.referer : null,
+                    returnUrl: this.app._.includes(ctx.request.headers.referer, '/tender/' + ctx.tender.id + '/change/apply') ? ctx.request.headers.referer : null,
                     jsFiles: this.app.jsFiles.common.concat(this.app.jsFiles.change.apply_information_notice),
                     jsFiles: this.app.jsFiles.common.concat(this.app.jsFiles.change.apply_information_notice),
                     preUrl: '/tender/' + ctx.tender.id + '/change/apply/' + ctx.change.id + '/information/notice',
                     preUrl: '/tender/' + ctx.tender.id + '/change/apply/' + ctx.change.id + '/information/notice',
                 };
                 };

+ 2 - 2
app/service/change_audit.js

@@ -365,9 +365,9 @@ module.exports = app => {
                 '    t.`name`, t.`type`, t.`user_id`, ' +
                 '    t.`name`, t.`type`, t.`user_id`, ' +
                 '    ti.`deal_info`, ti.`decimal` ' +
                 '    ti.`deal_info`, ti.`decimal` ' +
                 '  FROM ?? AS ca, ?? AS c, ?? As t, ?? AS ti ' +
                 '  FROM ?? AS ca, ?? AS c, ?? As t, ?? AS ti ' +
-                '  WHERE ca.`uid` = ? and ca.`status` = ? and c.`status` != ? and c.`status` != ?' +
+                '  WHERE ca.`uid` = ? and ca.`status` = ? and (c.`status` = ? or c.`status` = ?)' +
                 '    and ca.`cid` = c.`cid` and ca.`tid` = t.`id` and ti.`tid` = t.`id`';
                 '    and ca.`cid` = c.`cid` and ca.`tid` = t.`id` and ti.`tid` = t.`id`';
-            const sqlParam = [this.tableName, this.ctx.service.change.tableName, this.ctx.service.tender.tableName, this.ctx.service.tenderInfo.tableName, uid, auditConst.auditStatus.checking, auditConst.status.uncheck, auditConst.status.back];
+            const sqlParam = [this.tableName, this.ctx.service.change.tableName, this.ctx.service.tender.tableName, this.ctx.service.tenderInfo.tableName, uid, auditConst.auditStatus.checking, auditConst.status.checking, auditConst.status.backnew];
             const changes = await this.db.query(sql, sqlParam);
             const changes = await this.db.query(sql, sqlParam);
             for (const c of changes) {
             for (const c of changes) {
                 const preSql = 'SELECT pa.`id`, pa.`account`, pa.`account_group`, pa.`name`, pa.`company`, pa.`role`, pa.`telephone` FROM ?? As ca, ?? As pa ' +
                 const preSql = 'SELECT pa.`id`, pa.`account`, pa.`account_group`, pa.`name`, pa.`company`, pa.`role`, pa.`telephone` FROM ?? As ca, ?? As pa ' +