Browse Source

广西接口清单工程量精度调整

Tony Kang 2 năm trước cách đây
mục cha
commit
ce88dbbebb

+ 20 - 1
web/building_saas/standard_interface/export/guangxi_common.js

@@ -1274,6 +1274,25 @@ INTERFACE_EXPORT = (() => {
 
         }
 
+        function _getDecimal(unit) {
+          let rst = 3;
+          if (tenderProject.property.billsQuantityDecimal) {
+            for (let bdec of tenderProject.property.billsQuantityDecimal) {
+              if (bdec.unit === '其他未列单位') {
+                rst = bdec.decimal;
+                if (unit === null || unit === undefined || unit === '') {
+                  break;
+                }
+              }
+              if (bdec.unit === unit) {
+                rst = bdec.decimal;
+                break;
+              }
+            }
+          }
+          return rst;
+        }
+
         function bill(bNode, level) {
           let data = bNode.data;
           let CostKind = 3;
@@ -1328,7 +1347,7 @@ INTERFACE_EXPORT = (() => {
             name: "Num",
             value: data.quantity,
             type: TYPE.DECIMAL,
-            toFix: 3
+            toFix: _getDecimal(data.unit)
           },
           // {
           //   name: "QtyFormula",