Browse Source

保留两位小数

howie 3 năm trước cách đây
mục cha
commit
6d8939a830
1 tập tin đã thay đổi với 2 bổ sung2 xóa
  1. 2 2
      src/views/supply/policy/components/retail_form.vue

+ 2 - 2
src/views/supply/policy/components/retail_form.vue

@@ -223,7 +223,7 @@
         >
           <template slot-scope="scope">
             {{
-              ((scope.row.price - scope.row.discAmount)*((scope.row.rebateRate * scope.row.qty) * 100)/100).toFixed(2) || 0
+              ((scope.row.price - scope.row.discAmount)*((scope.row.rebateRate * scope.row.qty) * 100)/100 || 0 ).toFixed(2)
             }}
           </template>
         </el-table-column>
@@ -298,7 +298,7 @@
               {{ (((scope.row.price * scope.row.qty) * 100 - ((scope.row.price * scope.row.qty * (scope.row.rebateRate * 100)) / 100) * 100 - ((scope.row.qty * (scope.row.discAmount * 100)) / 100) * 100) / 100).toFixed(2) }}
             </template>
             <template v-else>
-              {{ scope.row.price*scope.row.qty }}
+              {{ (scope.row.price*scope.row.qty ).toFixed(2)}}
             </template>
           </template>
         </el-table-column>