修复 【兑换码管理】编辑页面,新增立减金商品,总预算/面额存在小数,提交审核审批通过后,剩余数量会出现小数

This commit is contained in:
wangsongsole 2022-06-15 09:47:30 +08:00
parent e94da02672
commit 11cc15d542
1 changed files with 7 additions and 5 deletions

View File

@ -340,13 +340,15 @@ export default class exchangedit extends React.Component {
channel_activity_id: item.entity.channel_activity_id, channel_activity_id: item.entity.channel_activity_id,
product_name: item.entity.batch_goods_name, product_name: item.entity.batch_goods_name,
quantity: item.entity.stock, quantity: item.entity.stock,
stock: stock: Math.trunc(
item.entity.all_budget / item.entity.reduce_amount - item.entity.all_budget / item.entity.reduce_amount -
item.entity.used_amount / item.entity.reduce_amount, item.entity.used_amount / item.entity.reduce_amount
usage: ),
usage: Math.trunc(
item.entity.all_budget / item.entity.reduce_amount - item.entity.all_budget / item.entity.reduce_amount -
(item.entity.all_budget - item.entity.used_amount) / (item.entity.all_budget - item.entity.used_amount) /
item.entity.reduce_amount, item.entity.reduce_amount
),
effectDate: effectDate:
item.entity.time_limit.effect_time.start_time + item.entity.time_limit.effect_time.start_time +
' 至 ' + ' 至 ' +