diff --git a/src/pages/exchangecode/edit/edit.js b/src/pages/exchangecode/edit/edit.js index cdd12e2b..4571e0ce 100644 --- a/src/pages/exchangecode/edit/edit.js +++ b/src/pages/exchangecode/edit/edit.js @@ -117,6 +117,7 @@ export default class exchangedit extends React.Component { company_name: req.company_name, receive_email: req.receive_email } + this.setState({ reseller: resller_obj }) /* 转换数据结构 */ @@ -132,6 +133,25 @@ export default class exchangedit extends React.Component { item1.upstream = String(item1.channel) === '1' ? '支付宝' : '微信' //上游 item1.origin = item1 + item1.product_type_text = '立减金' + item1.contract_price = item1.price + item1.create_time = item1.create_time + item1.official_price = item1.reduce_amount + item1.channel_activity_id = item1.channel_activity_id + item1.product_name = item1.batch_goods_name + item1.quantity = item1.stock + item1.stock = Math.trunc( + item1.all_budget / item1.reduce_amount - + item1.used_amount / item1.reduce_amount + ) + item1.usage = Math.trunc( + item1.all_budget / item1.reduce_amount - + (item1.all_budget - item1.used_amount) / item1.reduce_amount + ) + item1.effectDate = + item1.time_limit.effect_time.start_time + + ' 至 ' + + item1.time_limit.effect_time.end_time //有效时间 }) req.update_product = [ ...req.update_product.legal,