浏览代码

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

MaiXinRong 4 年之前
父节点
当前提交
33e36d2f67
共有 2 个文件被更改,包括 3 次插入2 次删除
  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']);
                 projRela.banOver && ctx.tender.info.ledger_check.over && checkData.checkOverRange(['contract_qty', 'qc_qty']);
                 checkData.checkBillsTp([
                 checkData.checkBillsTp([
                     { qty: 'contract_qty', tp: 'contract_tp' }, { qty: 'qc_qty', tp: 'qc_tp' },
                     { 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 };
                 ctx.body = { err: 0, msg: '', data: checkData.checkResult };
             } catch (err) {
             } catch (err) {
                 this.log(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) {
         for (const b of this.checkBills.nodes) {
             if ((b.children && b.children.length > 0) || !b.check_calc) continue;
             if ((b.children && b.children.length > 0) || !b.check_calc) continue;
+            if (filter && filter(b)) continue;
 
 
             const checkData = {}, calcData = {};
             const checkData = {}, calcData = {};
             for (const f of field) {
             for (const f of field) {