diff --git a/src/pages/exchangecode/edit/edit.js b/src/pages/exchangecode/edit/edit.js index 604c948f..a6a8efce 100644 --- a/src/pages/exchangecode/edit/edit.js +++ b/src/pages/exchangecode/edit/edit.js @@ -337,6 +337,13 @@ export default class exchangedit extends React.Component { channel_activity_id: item.entity.channel_activity_id, product_name: item.entity.batch_goods_name, quantity: item.entity.stock, + stock: + item.entity.all_budget / item.entity.reduce_amount - + item.entity.used_amount / item.entity.reduce_amount, + usage: + item.entity.all_budget / item.entity.reduce_amount - + (item.entity.all_budget - item.entity.used_amount) / + item.entity.reduce_amount, effectDate: item.entity.time_limit.effect_time.start_time + ' 至 ' + @@ -728,6 +735,10 @@ export default class exchangedit extends React.Component { newObj.quantity = item.quantity ? item.quantity : Math.trunc(item.all_budget / item.reduce_amount) //总库 + newObj.stock = item.quantity + ? item.quantity + : Math.trunc(item.all_budget / item.reduce_amount) //剩余 + newObj.usage = 0 //已使用 newObj.origin = item.origin ? item.origin : item newObj.id = item.goods_id ? item.goods_id : item.id return newObj