1) 增加key批次复制
This commit is contained in:
parent
6d0bc162f4
commit
3e20513d93
|
@ -252,7 +252,6 @@ export default class acclist extends React.Component {
|
||||||
|
|
||||||
//复制
|
//复制
|
||||||
if (batch_id > 0 || copyOpearo == 2) {
|
if (batch_id > 0 || copyOpearo == 2) {
|
||||||
// this.setState({isEdit:true})
|
|
||||||
getKeyBatchDetail(batch_id).then((res) => {
|
getKeyBatchDetail(batch_id).then((res) => {
|
||||||
handelResponse(
|
handelResponse(
|
||||||
res,
|
res,
|
||||||
|
@ -269,7 +268,6 @@ export default class acclist extends React.Component {
|
||||||
this.getProductFunction(req.direct_reseller_id);
|
this.getProductFunction(req.direct_reseller_id);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
let model = {
|
let model = {
|
||||||
title: req.plan_title,
|
title: req.plan_title,
|
||||||
style: req.style,
|
style: req.style,
|
||||||
|
@ -277,14 +275,12 @@ export default class acclist extends React.Component {
|
||||||
allow_repetition: req.allow_repetition,
|
allow_repetition: req.allow_repetition,
|
||||||
allow_loss: req.allow_loss,
|
allow_loss: req.allow_loss,
|
||||||
merge_stock: req.merge_stock,
|
merge_stock: req.merge_stock,
|
||||||
code_batch: req.code_batch,
|
|
||||||
batch_name: `${req.batch_name}_${++req.copy_count}`,
|
batch_name: `${req.batch_name}_${++req.copy_count}`,
|
||||||
};
|
};
|
||||||
this.setState({ keyType: req.bind_object });
|
|
||||||
this.setState({ model: model });
|
// 兑换码
|
||||||
this.setState({ endtime: req.end_time });
|
if (req.bind_object[0] === 1) {
|
||||||
this.setState({ begintime: req.begin_time });
|
model.code_batch = req.code_batch;
|
||||||
this.setState({ keyCodeId: req.id });
|
|
||||||
let list = _.map(req.code_batch, (item) => {
|
let list = _.map(req.code_batch, (item) => {
|
||||||
item.product = item.product.map((item1) => {
|
item.product = item.product.map((item1) => {
|
||||||
let obj = {};
|
let obj = {};
|
||||||
|
@ -360,6 +356,21 @@ export default class acclist extends React.Component {
|
||||||
return item;
|
return item;
|
||||||
});
|
});
|
||||||
this.setState({ distdata: list });
|
this.setState({ distdata: list });
|
||||||
|
} else {
|
||||||
|
// 优惠券
|
||||||
|
let temp = _.map(req.coupon, (o) => {
|
||||||
|
o.checked = true;
|
||||||
|
return o;
|
||||||
|
});
|
||||||
|
model.coupon = temp;
|
||||||
|
this.setState({ couponData: temp });
|
||||||
|
}
|
||||||
|
|
||||||
|
this.setState({ keyType: req.bind_object[0] });
|
||||||
|
this.setState({ model: model });
|
||||||
|
this.setState({ endtime: req.end_time });
|
||||||
|
this.setState({ begintime: req.begin_time });
|
||||||
|
this.setState({ keyCodeId: req.id });
|
||||||
},
|
},
|
||||||
(err) => {}
|
(err) => {}
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in New Issue