Преглед на файлове

成本分配表小数位问题

jbb преди 2 години
родител
ревизия
8fd90beb3f
променени са 2 файла, в които са добавени 30 реда и са изтрити 6 реда
  1. 15 3
      src/views/cost-allocation-total/modal/fabInQuaModal.vue
  2. 15 3
      src/views/cost-allocation-total/modal/ingInQuaModal.vue

+ 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: [],