MaiXinRong 3 vuotta sitten
vanhempi
commit
88e9fc1e5a
2 muutettua tiedostoa jossa 4 lisäystä ja 1 poistoa
  1. 1 1
      app/controller/stage_controller.js
  2. 3 0
      app/public/js/ledger_audit.js

+ 1 - 1
app/controller/stage_controller.js

@@ -225,7 +225,7 @@ module.exports = app => {
             const ledgerColumn = [
                 'id', 'tender_id', 'ledger_id', 'ledger_pid', 'level', 'order', 'full_path', 'is_leaf',
                 'code', 'b_code', 'name', 'unit', 'unit_price',
-                'quantity', 'total_price', 'memo', 'drawing_code'];
+                'quantity', 'total_price', 'memo', 'drawing_code', 'is_tp'];
             if (this.ctx.session.sessionProject.gxby) ledgerColumn.push('gxby_status', 'gxby_url', 'gxby_limit');
             if (this.ctx.session.sessionProject.dagl) ledgerColumn.push('dagl_status', 'dagl_url', 'dagl_limit');
             if (tender.data.measure_type === measureType.gcl.value) ledgerColumn.push('deal_qty', 'deal_tp');

+ 3 - 0
app/public/js/ledger_audit.js

@@ -39,6 +39,9 @@ $(document).ready(() => {
     } else {
         treeSetting.calcFields = ['deal_tp', 'sgfh_tp', 'sjcl_tp', 'qtcl_tp', 'total_price'];
     }
+    treeSetting.calcFun = function (node) {
+        node.dgn_price = ZhCalc.round(ZhCalc.div(node.total_price, node.dgn_qty1), 2);
+    };
     const ledgerTree = createNewPathTree('fx', treeSetting);
     sjsSettingObj.setFxTreeStyle(ledgerSpreadSetting, sjsSettingObj.FxTreeStyle.jz);
     if (thousandth) sjsSettingObj.setTpThousandthFormat(ledgerSpreadSetting);