Browse Source

中间计量相关

MaiXinRong 5 years ago
parent
commit
8e9e4c75e2
3 changed files with 5 additions and 5 deletions
  1. 1 1
      app/lib/stage_im.js
  2. 1 1
      app/public/js/stage_im.js
  3. 3 3
      app/service/report_memory.js

+ 1 - 1
app/lib/stage_im.js

@@ -268,7 +268,7 @@ class StageIm {
                         memo.push(p.name + ':' + p.jl + ' ' + b.unit);
                     }
                 } else {
-                    memo.push('清单' + (i + 1) + ':' + b.b_code + ' ' + b.name + ':' + b.jl + ' ' + b.unit);
+                    memo.push('清单' + (i + 1) + ':' + b.b_code + ' ' + b.name + ':' + (this.ctx.helper.checkZero(b.jl) ? 0 : b.jl) + ' ' + b.unit);
                 }
             }
             im.calc_memo = memo.join('\n');

+ 1 - 1
app/public/js/stage_im.js

@@ -277,7 +277,7 @@ const stageIm = (function () {
                         memo.push(p.name + ':' + p.jl + ' ' + b.unit);
                     }
                 } else {
-                    memo.push('清单' + (i+1) + ':' + b.b_code + ' ' + b.name + ':' + b.jl + ' ' + b.unit);
+                    memo.push('清单' + (i+1) + ':' + b.b_code + ' ' + b.name + ':' + (checkZero(b.jl) ? 0 : b.jl) + ' ' + b.unit);
                 }
             }
             im.calc_memo = memo.join('\n');

+ 3 - 3
app/service/report_memory.js

@@ -620,13 +620,13 @@ module.exports = app => {
             }
 
             if (this._checkFieldsExistReg(fields, 'r[0-9]+_tp')) {
-                const validRole = this._getStageValidRole();
+                this._getStageValidRole();
                 const allStagePays = await this.ctx.service.stagePay.getAllDataByCondition({
                     where: {sid: stage.id, stimes: stage.curTimes}
                 });
 
-                for (const [i, role] of validRole.entries()) {
-                    if (i < validRole.length - 1) {
+                for (const [i, role] of this.stageValidRole.entries()) {
+                    if (i < this.stageValidRole.length - 1) {
                         const stagePays = this.ctx.helper._.filter(allStagePays, function (x) {
                             return x.stimes === stage.curTimes && x.sorder === role.dataOrder;
                         });