yyw提交
This commit is contained in:
parent
863f22dae3
commit
13fc93f8d2
@ -298,7 +298,13 @@ export default {
|
|||||||
val += cost * item.num
|
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(() => {
|
onMounted(() => {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user