ソースを参照

1. 导入本期合同计量,计算问题
2. 资料归集,排序问题

MaiXinRong 3 週間 前
コミット
bfbf49a2dc
2 ファイル変更3 行追加3 行削除
  1. 1 1
      app/public/js/file_detail.js
  2. 2 2
      app/service/stage_stash.js

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

@@ -464,7 +464,7 @@ $(document).ready(function() {
             });
         }
         _clearAllFileCache() {
-            const nodes = this.filingTree.getNodes();
+            const nodes = this.filingTree.transformToArray(this.filingTree.getNodes());
             for (const node of nodes) {
                 if (node.children && node.children.length > 0) continue;
                 if (node.source_node.files) node.source_node.files.length = 0;

+ 2 - 2
app/service/stage_stash.js

@@ -73,7 +73,7 @@ class loadStageExcelTree {
                 end_contract_qty = this.ctx.helper.add(end_contract_qty, preSb.contract_qty);
             }
             const end_contract_tp = this.ctx.helper.mul(this.ctx.helper.div(end_contract_qty, activeQty), node.total_price, this.decimal.tp);
-            return preSb ? this.ctx.helper.sub(end_contract_tp, preSb.pre_contract_tp) : end_contract_tp;
+            return preSb ? this.ctx.helper.sub(end_contract_tp, preSb.contract_tp) : end_contract_tp;
         } else if (this.info.calc_type === 'up') {
             if (correct) {
                 const preSb = this.preStageBills.find(x => { return x.lid === node.id; });
@@ -84,7 +84,7 @@ class loadStageExcelTree {
                     end_contract_qty = this.ctx.helper.add(end_contract_qty, preSb.contract_qty);
                 }
                 const end_contract_tp = this.ctx.helper.mul(end_contract_qty, node.unit_price, this.decimal.tp);
-                return activeQty === end_contract_qty ? this.ctx.helper.sub(end_contract_tp, preSb.pre_contract_tp) : this.ctx.helper.mul(contract_qty, node.unit_price, this.decimal.tp);
+                return activeQty === end_contract_qty ? this.ctx.helper.sub(end_contract_tp, preSb.contract_tp) : this.ctx.helper.mul(contract_qty, node.unit_price, this.decimal.tp);
             } else {
                 return this.ctx.helper.mul(contract_qty, node.unit_price, this.decimal.tp);
             }