Browse Source

合同支付,起扣金额判断问题

MaiXinRong 3 months ago
parent
commit
ab8a8ce77d
2 changed files with 2 additions and 1 deletions
  1. 1 1
      app/service/stage_bonus.js
  2. 1 0
      config/web.js

+ 1 - 1
app/service/stage_bonus.js

@@ -233,7 +233,7 @@ module.exports = app => {
             const stages = stage instanceof Array ? stage : [stage];
             const condition = {};
             condition.sid = stage.length === 1 ? stage[0].id : stages.map(x => { return x.id; }).join(',');
-            const sql = `SELECT SUM(IF(tp > 0, tp, 0)) AS positive_tp, SUM(IF(tp < 0, tp, 0)) AS negative_tp, SUM(IF(b_type = '奖金'), tp, 0) AS reward_tp, SUM(IF(b_type = '罚金'), tp, 0) AS forfeit_tp, SUM(tp) AS sum_tp From ${this.tableName} ` + this.ctx.helper.whereSql(condition);
+            const sql = `SELECT SUM(IF(tp > 0, tp, 0)) AS positive_tp, SUM(IF(tp < 0, tp, 0)) AS negative_tp, SUM(IF(b_type = '奖金', tp, 0) AS reward_tp, SUM(IF(b_type = '罚金', tp, 0)) AS forfeit_tp, SUM(tp) AS sum_tp From ${this.tableName} ` + this.ctx.helper.whereSql(condition);
             return await this.db.queryOne(sql);
         }
     }

+ 1 - 0
config/web.js

@@ -735,6 +735,7 @@ const JsFiles = {
                     '/public/js/shares/tools_att.js',
                     '/public/js/shares/sjs_setting.js',
                     '/public/js/shares/phase_pay_audit.js',
+                    '/public/js/zh_calc.js',
                     '/public/js/phase_pay_detail.js',
                 ],
                 mergeFile: 'phase_pay_detail',