Browse Source

成本分配表小数位问题

jbb 2 years ago
parent
commit
8fd90beb3f

+ 15 - 3
src/views/cost-allocation-total/modal/fabInQuaModal.vue

@@ -62,19 +62,31 @@ export default {
           title: '转入数量',
           dataIndex: 'number',
           width: 120,
-          className: 'replacecolor'
+          className: 'replacecolor',
+          customRender: (text, record, index) => {
+            var re =  Number(text).toFixed(2)
+            return re
+         }
         },
         {
           title: '单位成本',
           dataIndex: 'unitCost',
           width: 120,
-          className: 'replacecolor'
+          className: 'replacecolor',
+           customRender: (text, record, index) => {
+            var re =  Number(text).toFixed(3)
+            return re
+         }
         },
         {
           title: '总成本',
           dataIndex: 'cost',
           width: 120,
-          className: 'replacecolor'
+          className: 'replacecolor',
+           customRender: (text, record, index) => {
+            var re =  Number(text).toFixed(2)
+            return re
+         }
         }
       ],
       data: [],

+ 15 - 3
src/views/cost-allocation-total/modal/ingInQuaModal.vue

@@ -56,19 +56,31 @@ export default {
           title: '转入数量',
           dataIndex: 'number',
           width: 120,
-          className: 'replacecolor'
+          className: 'replacecolor',
+          customRender: (text, record, index) => {
+            var re =  Number(text).toFixed(2)
+            return re
+         }
         },
         {
           title: '单位成本',
           dataIndex: 'unitCost',
           width: 120,
-          className: 'replacecolor'
+          className: 'replacecolor',
+          customRender: (text, record, index) => {
+            var re =  Number(text).toFixed(3)
+            return re
+         }
         },
         {
           title: '总成本',
           dataIndex: 'cost',
           width: 120,
-          className: 'replacecolor'
+          className: 'replacecolor',
+          customRender: (text, record, index) => {
+            var re =  Number(text).toFixed(2)
+            return re
+         }
         }
       ],
       data: [],