From bc43f038005e7b1181b7ce26dc54e85fc74d56e2 Mon Sep 17 00:00:00 2001 From: xd <844539747@qq.com> Date: Thu, 9 May 2024 17:28:24 +0800 Subject: [PATCH] '123' --- ruoyi-ui/src/api/redBook/redBook.js | 9 +++++++++ ruoyi-ui/src/views/redBook/productSelect.vue | 12 ++---------- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/ruoyi-ui/src/api/redBook/redBook.js b/ruoyi-ui/src/api/redBook/redBook.js index b14bdc5..3174dea 100644 --- a/ruoyi-ui/src/api/redBook/redBook.js +++ b/ruoyi-ui/src/api/redBook/redBook.js @@ -1,5 +1,14 @@ import request from '@/utils/request' +// 金额计算 +export function toDecimal(x){ + let f = parseFloat(x); + if (isNaN(f)) { + return; + } + f = Math.round(x*100)/100; + return f; +} // 获取目录 export function productList(query) { return request({ diff --git a/ruoyi-ui/src/views/redBook/productSelect.vue b/ruoyi-ui/src/views/redBook/productSelect.vue index 26a2d79..09edb43 100644 --- a/ruoyi-ui/src/views/redBook/productSelect.vue +++ b/ruoyi-ui/src/views/redBook/productSelect.vue @@ -95,7 +95,7 @@