Browse Source

修复提示bug和审批退回bug

laiguoran 2 years ago
parent
commit
cbaf23d8af
2 changed files with 3 additions and 3 deletions
  1. 2 2
      app/service/payment_detail.js
  2. 1 1
      app/service/payment_detail_audit.js

+ 2 - 2
app/service/payment_detail.js

@@ -206,8 +206,8 @@ module.exports = app => {
 
         async haveNotice2TenderRpt(tr_id, uid) {
             const sql = 'SELECT count(pd.`id`) as count FROM ?? as pd LEFT JOIN ?? as pda' +
-                ' ON pd.`id` = pda.`td_id` WHERE pd.`tr_id` = ? AND (pd.`uid` = ? AND (pd.`status` = ? OR pd.`status` = ?))' +
-                ' OR ((pd.`status` = ? OR pd.`status` = ?) AND pda.aid = ? AND pda.`status` = ?)';
+                ' ON pd.`id` = pda.`td_id` WHERE pd.`tr_id` = ? AND ((pd.`uid` = ? AND (pd.`status` = ? OR pd.`status` = ?))' +
+                ' OR ((pd.`status` = ? OR pd.`status` = ?) AND pda.aid = ? AND pda.`status` = ?))';
             const params = [this.tableName, this.ctx.service.paymentDetailAudit.tableName, tr_id,
                 uid, auditConst.status.uncheck, auditConst.status.checkNo,
                 auditConst.status.checking, auditConst.status.checkNoPre, uid, auditConst.status.checking];

+ 1 - 1
app/service/payment_detail_audit.js

@@ -428,7 +428,7 @@ module.exports = app => {
             if (!audit) {
                 throw '审核数据错误';
             }
-            const sql = 'SELECT `tid`, `tr_id`, `td_id`, `aid`, `order` FROM ?? WHERE `td_id` = ? and `times` = ? GROUP BY `aid` ORDER BY `id` ASC';
+            const sql = 'SELECT `tender_id`, `tr_id`, `td_id`, `aid`, `order` FROM ?? WHERE `td_id` = ? and `times` = ? GROUP BY `aid` ORDER BY `id` ASC';
             const sqlParam = [this.tableName, detailId, times];
             const auditors = await this.db.query(sql, sqlParam);
             let order = 1;