修正 复制兑换码后,被复制的兑换码数据没有回显。
This commit is contained in:
parent
a56e94825c
commit
27cb9e8518
|
@ -152,14 +152,23 @@ export default class acclist extends React.Component {
|
|||
this.setState({ isEdit: true })
|
||||
}
|
||||
|
||||
req.code_batch = req.code_batch ? req.code_batch : []
|
||||
req.code_batch = req.code_batch || []
|
||||
this.setState({
|
||||
pagetitle: '复制兑换码',
|
||||
plan_id: req.plan_id,
|
||||
key_status: req.status
|
||||
})
|
||||
|
||||
let list = _.map(req.code_batch, (item) => {
|
||||
const cloneData = _.cloneDeep(req.code_batch)
|
||||
req.code_batch.map((item) => {
|
||||
if (item.id === copy_code_id) {
|
||||
const data = _.cloneDeep(item)
|
||||
data.id = new Date().getTime()
|
||||
cloneData.push(data)
|
||||
}
|
||||
})
|
||||
|
||||
let list = _.map(cloneData, (item) => {
|
||||
item.product = item.product.map((item1) => {
|
||||
let obj = {}
|
||||
if (item1.type === 1) {
|
||||
|
@ -202,6 +211,7 @@ export default class acclist extends React.Component {
|
|||
|
||||
return obj
|
||||
})
|
||||
|
||||
let pr = {}
|
||||
pr.range = item.range
|
||||
pr.restrict = item.restrict
|
||||
|
|
Loading…
Reference in New Issue