Browse Source

上报自检,总额计量,不检查金额计算

MaiXinRong 4 years ago
parent
commit
33e36d2f67
2 changed files with 3 additions and 2 deletions
  1. 1 1
      app/controller/stage_controller.js
  2. 2 1
      app/lib/ledger.js

+ 1 - 1
app/controller/stage_controller.js

@@ -372,7 +372,7 @@ module.exports = app => {
                 projRela.banOver && ctx.tender.info.ledger_check.over && checkData.checkOverRange(['contract_qty', 'qc_qty']);
                 checkData.checkBillsTp([
                     { qty: 'contract_qty', tp: 'contract_tp' }, { qty: 'qc_qty', tp: 'qc_tp' },
-                ], this.ctx.tender.info.decimal);
+                ], this.ctx.tender.info.decimal, x => { return x.is_tp; });
                 ctx.body = { err: 0, msg: '', data: checkData.checkResult };
             } catch (err) {
                 this.log(err);

+ 2 - 1
app/lib/ledger.js

@@ -805,9 +805,10 @@ class checkData {
             }
         }
     }
-    checkBillsTp(field, decimal) {
+    checkBillsTp(field, decimal, filter) {
         for (const b of this.checkBills.nodes) {
             if ((b.children && b.children.length > 0) || !b.check_calc) continue;
+            if (filter && filter(b)) continue;
 
             const checkData = {}, calcData = {};
             for (const f of field) {