yyw提交

This commit is contained in:
DESKTOP-8FGKA8Q\chunfen 2025-12-19 17:09:34 +08:00
parent 863f22dae3
commit 13fc93f8d2

View File

@ -298,7 +298,13 @@ export default {
val += cost * item.num
}
})
data.itemInfo.goods_cost = (val / 100).toFixed(2)
data.itemInfo.goods_cost = toTwoDecimals(val)
}
function toTwoDecimals(num) {
let truncated = Math.floor(num)
let result = truncated / 100
return result.toFixed(2)
}
onMounted(() => {