Explorar o código

fix: 金额单位转换

Signed-off-by: tangshizhe <48740614+tangshizhe@users.noreply.github.com>
tangshizhe hai 3 meses
pai
achega
b3e6311fcb

+ 2 - 1
src/views/create-order/components/order-detail-submodule/OrderDetailCard.vue

@@ -398,7 +398,8 @@ export default {
     // 格式化数字,保留两位小数
     formatNumber(num, x = 2) {
       if(!num) return 0.00
-      return roundToTwoDecimals(num, x)
+      const newnum = Number(num) / 100;
+      return roundToTwoDecimals(newnum, x)
     },
     orderCoursed(val) {
         if (val == 0) {