Преглед изворни кода

1. 导入Excel问题,小数位数问题
2. 变更概况,页面取值调整

maixinrong пре 5 година
родитељ
комит
8393a58bb0
2 измењених фајлова са 5 додато и 1 уклоњено
  1. 1 0
      app/lib/analysis_excel.js
  2. 4 1
      app/public/js/stage_change.js

+ 1 - 0
app/lib/analysis_excel.js

@@ -249,6 +249,7 @@ class ImportBaseTree {
             pos.add_user = this.ctx.session.sessionUser.accountId;
             this.finalNode.pos.push(pos);
             this.pos.push(pos);
+            pos.sgfh_qty = this.ctx.helper.round(pos.sgfh_qty, this.finalPrecision.value);
             pos.quantity = this.ctx.helper.round(pos.quantity, this.finalPrecision.value);
             return pos;
         }

+ 4 - 1
app/public/js/stage_change.js

@@ -35,6 +35,7 @@ class ChangeAnalysis {
         change.attachments = change.detail.attachments;
         change.bills = change.detail.bills;
         for (const b of change.bills) {
+            console.log(b);
             const aub = change.detail.addUsedBills.find(function (x) {
                 return x.id === b.id;
             });
@@ -54,6 +55,7 @@ class ChangeAnalysis {
                     p.leaf_xmj_code = leafXmj.code;
                     p.leaf_xmj_name = leafXmj.name;
                 }
+                p.f_qty = p.p_qty ? p.p_qty : p.l_qty;
                 b.cur_qty = ZhCalc.add(b.cur_qty, p.qty);
             }
 
@@ -102,6 +104,7 @@ $(document).ready(() => {
             {title: '金额', colSpan: '1', rowSpan: '1', field: 'tp', hAlign: 2, width: 60, formatter: '@', readOnly: true},
             {title: '已变更', colSpan: '1', rowSpan: '1', field: 'used_qty', hAlign: 2, width: 60, type: 'Number', readOnly: true},
             {title: '未变更', colSpan: '1', rowSpan: '1', field: 'valid_qty', hAlign: 2, width: 60, formatter: '@', readOnly: true},
+            {title: '变更部位', colSpan: '1', rowSpan: '1', field: 'bwmx', hAlign: 0, width: 100, formatter: '@', readOnly: true},
         ],
         emptyRows: 0,
         headRows: 1,
@@ -118,7 +121,7 @@ $(document).ready(() => {
             {title: '相关台账|项目节编号', colSpan: '5|1', rowSpan: '1|1', field: 'leaf_xmj_code', hAlign: 0, width: 120, formatter: '@', readOnly: true},
             {title: '|名称', colSpan: '|1', rowSpan: '1', field: 'leaf_xmj_name', hAlign: 0, width: 150, formatter: '@', readOnly: true},
             {title: '|计量单元', colSpan: '|1', rowSpan: '1', field: 'p_name', hAlign: 0, width: 150, type: 'Number', readOnly: true},
-            {title: '|0号台帐数量', colSpan: '|1', rowSpan: '1', field: 'l_qty', hAlign: 2, width: 80, formatter: '@', readOnly: true},
+            {title: '|0号台帐数量', colSpan: '|1', rowSpan: '1', field: 'f_qty', hAlign: 2, width: 80, formatter: '@', readOnly: true},
             {title: '|本期变更数量', colSpan: '|1', rowSpan: '1', field: 'qty', hAlign: 2, width: 80, type: 'Number', readOnly: true},
         ],
         emptyRows: 0,