Bladeren bron

清单补0

zhangweicheng 5 jaren geleden
bovenliggende
commit
2195447a4c

+ 5 - 0
web/building_saas/standard_interface/export/base.js

@@ -204,6 +204,11 @@ const INTERFACE_EXPORT_BASE = (() => {
       } else if (data.type === TYPE.BOOL && !['true', 'false'].includes(String(data.value))) {
         data.value = DEFAULT_VALUE[TYPE.BOOL];
       }
+
+      //自动补0
+      if (data.toFix) {
+        data.value = scMathUtil.roundToString(data.value,data.toFix)
+      }
     }
     return rst;
   }

+ 6 - 3
web/building_saas/standard_interface/export/guangdong_zhongshan.js

@@ -1033,7 +1033,8 @@ INTERFACE_EXPORT = (() => {
             {
               name: "Num",
               value: data.quantity,
-              type:TYPE.DECIMAL
+              type: TYPE.DECIMAL,
+              toFix:3
             },
             {
               name: "QtyFormula",
@@ -1042,7 +1043,8 @@ INTERFACE_EXPORT = (() => {
             {
               name: "Price",
               value: 0,//data.feesIndex && data.feesIndex.common ? data.feesIndex.common.tenderUnitFee : "",
-              type:TYPE.DECIMAL
+              type: TYPE.DECIMAL,
+              toFix:2
             },
             {
               name: "Rate",
@@ -1051,7 +1053,8 @@ INTERFACE_EXPORT = (() => {
             {
               name: "Sum",
               value: 0,//data.feesIndex && data.feesIndex.common ? data.feesIndex.common.tenderTotalFee : "",
-              type:TYPE.DECIMAL
+              type: TYPE.DECIMAL,
+              toFix:2
             },
             {
               name: "ChapterKind",