修复 【兑换码管理】加款对话框中,预估当前剩余余额为小数,加款金额为小数时,预估充值后剩余剩余前端会计算的精度有误
This commit is contained in:
parent
c8502af423
commit
dc6a04b0e9
|
@ -58,7 +58,9 @@ export default ({ data, onChangeMoney }) => {
|
||||||
预估当前剩余余额为
|
预估当前剩余余额为
|
||||||
<span className='green'>
|
<span className='green'>
|
||||||
{' '}
|
{' '}
|
||||||
{stateData?.recharge_amount - stateData?.used_amount}{' '}
|
{(stateData?.recharge_amount - stateData?.used_amount).toFixed(
|
||||||
|
2
|
||||||
|
)}{' '}
|
||||||
</span>
|
</span>
|
||||||
元
|
元
|
||||||
</p>
|
</p>
|
||||||
|
@ -122,11 +124,11 @@ export default ({ data, onChangeMoney }) => {
|
||||||
预估充值后剩余余额为
|
预估充值后剩余余额为
|
||||||
<span className='blue'>
|
<span className='blue'>
|
||||||
{' '}
|
{' '}
|
||||||
{Math.floor(
|
{(
|
||||||
(stateData?.recharge_amount - stateData?.used_amount) * 100
|
((stateData?.recharge_amount - stateData?.used_amount) * 100) /
|
||||||
) /
|
|
||||||
100 +
|
100 +
|
||||||
(stateData?.addNew ? stateData.addNew - 0 : 0)}{' '}
|
(stateData?.addNew ? stateData.addNew - 0 : 0)
|
||||||
|
).toFixed(2)}{' '}
|
||||||
</span>
|
</span>
|
||||||
元
|
元
|
||||||
</p>
|
</p>
|
||||||
|
|
Loading…
Reference in New Issue