Browse Source

还原部分代码

MaiXinRong 6 months ago
parent
commit
1a2936b375
2 changed files with 3 additions and 5 deletions
  1. 3 3
      app/lib/analysis_excel.js
  2. 0 2
      app/service/ledger.js

+ 3 - 3
app/lib/analysis_excel.js

@@ -572,13 +572,13 @@ class AnalysisExcelTree {
             node.code = _.trimEnd(this.ctx.helper.replaceReturn(row[this.colsDef.code]));
             node.name = this.ctx.helper.replaceReturn(row[this.colsDef.name]);
             node.unit = this.ctx.helper.replaceReturn(row[this.colsDef.unit]);
-            node.dgn_qty1 = this.ctx.helper.round(aeUtils.toNumber(row[this.colsDef.dgn_qty1]), 3);
-            node.dgn_qty2 = this.ctx.helper.round(aeUtils.toNumber(row[this.colsDef.dgn_qty2]), 3);
+            node.dgn_qty1 = aeUtils.toNumber(row[this.colsDef.dgn_qty1]);
+            node.dgn_qty2 = aeUtils.toNumber(row[this.colsDef.dgn_qty2]);
             node.deal_tp = this.ctx.helper.round(aeUtils.toNumber(row[this.colsDef.deal_tp]), this.decimal.tp);
             node.total_price = this.ctx.helper.round(aeUtils.toNumber(row[this.colsDef.total_price]), this.decimal.tp);
             node.drawing_code = this.ctx.helper.replaceReturn(row[this.colsDef.drawing_code]);
             node.memo = this.ctx.helper.replaceReturn(row[this.colsDef.memo]);
-            this.ctx.helper.checkDgnQtyPrecision(data);
+            this.ctx.helper.checkDgnQtyPrecision(node);
             return this.cacheTree.addXmjNode(node);
         } catch (error) {
             if (error.stack) {

+ 0 - 2
app/service/ledger.js

@@ -712,8 +712,6 @@ module.exports = app => {
                 id: 'ledger_id', pid: 'ledger_pid', order: 'order', full_path: 'full_path', level: 'level', rootId: -1,
                 calcFields: [ 'total_price' ],
                 calc(node, helper, decimal) {
-                    node.dgn_qty1 = helper.round(node.dgn_qty1, 3);
-                    node.dgn_qty2 = helper.round(node.dgn_qty2, 3);
                     helper.checkDgnQtyPrecision(node);
                     const precision = helper.findPrecision(tender.info.precision, node.unit);
                     node.quantity = helper.round(node.quantity, precision.value);