瀏覽代碼

保留两位小数

howie 3 年之前
父節點
當前提交
f4f6bf870f
共有 1 個文件被更改,包括 2 次插入2 次删除
  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 || 0
+              ((scope.row.price - scope.row.discAmount)*((scope.row.rebateRate * scope.row.qty) * 100)/100).toFixed(2) || 0
             }}
           </template>
         </el-table-column>
@@ -295,7 +295,7 @@
         >
           <template slot-scope="scope">
             <template v-if="scope.row.rebateRate">
-              {{ ((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 }}
+              {{ (((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 }}