Browse Source

中间计量,计算式说明显示调整

MaiXinRong 5 years ago
parent
commit
148bd6e5a5
2 changed files with 8 additions and 8 deletions
  1. 4 4
      app/lib/stage_im.js
  2. 4 4
      app/public/js/stage_im.js

+ 4 - 4
app/lib/stage_im.js

@@ -252,7 +252,7 @@ class StageIm {
         if (im.calc_memo !== undefined && im.calc_memo !== null && im.calc_memo !== '') return;
 
         if (im.leafXmjs && im.leafXmjs.length > 0) {
-            const memo = ['本期计量:' + im.jl + ' ' + im.unit];
+            const memo = ['本期计量:' + (this.ctx.helper.checkZero(im.jl) ? 0 : im.jl) + ' ' + im.unit];
             for (const lx of im.leafXmjs) {
                 for (const p of lx.pos) {
                     memo.push(p.name + ':' + p.jl + ' ' + im.unit);
@@ -607,7 +607,7 @@ class StageIm {
                     im.end_tp = this.ctx.helper.mul(im.end_jl, im.unit_price, tp_decimal);
                     im.end_contract_tp = this.ctx.helper.mul(im.end_contract_jl, im.unit_price, tp_decimal);
                     im.end_qc_tp = this.ctx.helper.mul(im.end_qc_jl, im.unit_price, tp_decimal);
-                    im.calc_memo = '本期计量:' + im.jl + ' ' + im.unit;
+                    im.calc_memo = '本期计量:' + (this.ctx.helper.checkZero(im.jl) ? 0 : im.jl) + ' ' + im.unit;
                     this._checkCustomDetail(im);
                     this.ImData.push(im);
                     if (pp.qc_qty && pp.qc_qty !== 0) {
@@ -619,7 +619,7 @@ class StageIm {
                     }
                 }
             } else {
-                if (this.ctx.helper.checkZero(p.contract_qty) && this.ctx.helper.checkZero(p.qc_qty)) { continue; }
+                if (this.ctx.helper.checkZero(p.gather_qty) && this.ctx.helper.checkZero(p.gather_tp)) { continue; }
 
                 const im = {
                     id: this.ImData.length + 1,
@@ -639,7 +639,7 @@ class StageIm {
                     position: '',
                     lIndex: this.billsTree.getNodeSerialNo(node),
                 };
-                im.calc_memo = '本期计量:' + im.jl + ' ' + im.unit;
+                im.calc_memo = '本期计量:' + (this.ctx.helper.checkZero(im.jl) ? 0 : im.jl) + ' ' + im.unit;
                 this._checkCustomDetail(im);
                 this.ImData.push(im);
                 if (p.qc_qty && p.qc_qty !== 0) {

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

@@ -261,7 +261,7 @@ const stageIm = (function () {
         if (im.calc_memo !== undefined && im.calc_memo !== null && im.calc_memo !== '') return;
 
         if (im.leafXmjs && im.leafXmjs.length > 0) {
-            const memo = ['本期计量:' + im.jl + ' ' + im.unit];
+            const memo = ['本期计量:' + (checkZero(im.jl) ? 0 : im.jl) + ' ' + im.unit];
             for (const lx of im.leafXmjs) {
                 for (const p of lx.pos) {
                     memo.push(p.name + ':' + p.jl + ' ' + im.unit);
@@ -567,7 +567,7 @@ const stageIm = (function () {
                         position: pp.position,
                         lIndex: nodeIndex,
                     };
-                    im.calc_memo = '本期计量:' + im.jl + ' ' + im.unit;
+                    im.calc_memo = '本期计量:' + (checkZero(im.jl) ? 0 : im.jl) + ' ' + im.unit;
                     checkCustomDetail(im);
                     ImData.push(im);
                     if (pp.qc_qty && pp.qc_qty !== 0) {
@@ -579,7 +579,7 @@ const stageIm = (function () {
                     }
                 }
             } else {
-                if ((!p.contract_qty || p.contract_qty === 0) && (!p.qc_qty || p.qc_qty === 0)) { continue }
+                if (checkZero(p.gather_qty) && checkZero(p.gather_tp)) { continue }
 
                 const im = {
                     lid: node.id, code: p.b_code, name: p.name, unit: p.unit, unit_price: p.unit_price, pid: '',
@@ -593,7 +593,7 @@ const stageIm = (function () {
                     position: '',
                     lIndex: gsTree.getNodeIndex(node),
                 };
-                im.calc_memo = '本期计量:' + im.jl + ' ' + im.unit;
+                im.calc_memo = '本期计量:' + (checkZero(im.jl) ? 0 : im.jl) + ' ' + im.unit;
                 checkCustomDetail(im);
                 ImData.push(im);
                 if (p.qc_qty && p.qc_qty !== 0) {