From 77c7b741c00ea1e400ae308b613bee9cb2a212a2 Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Fri, 29 Jul 2022 08:58:52 +0800
Subject: [PATCH] Merge branch 'master' of http://s16s652780.51mypc.cn:49896/r/zhny_web

---
 src/views/statistics/stock.vue |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/src/views/statistics/stock.vue b/src/views/statistics/stock.vue
index 0c41016..2417182 100644
--- a/src/views/statistics/stock.vue
+++ b/src/views/statistics/stock.vue
@@ -202,6 +202,12 @@
               return prev;
             }
           }, 0);
+          // sums[index] += " 公斤";
+          var x = String(sums[index]).indexOf(".")+1;//得到小数点的位置
+          var y = String(sums[index]).length - x;//小数点的位数
+          if(y>4){
+            sums[index] = sums[index].toFixed(3)
+          }
           sums[index] += " 公斤";
         } else {
           sums[index] = "N/A";

--
Gitblit v1.9.3