修复问题
This commit is contained in:
parent
ef883e58a7
commit
be3e067e79
|
@ -493,7 +493,6 @@ export default class acclist extends React.Component {
|
||||||
this.setState({ distdata: tempdata })
|
this.setState({ distdata: tempdata })
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
sessionStorage.setItem('knockGoldData', '')
|
|
||||||
}
|
}
|
||||||
addNewKey() {
|
addNewKey() {
|
||||||
this.props.addNewkey()
|
this.props.addNewkey()
|
||||||
|
@ -679,6 +678,7 @@ export default class acclist extends React.Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
rowItemClick(row, rowIndex) {
|
rowItemClick(row, rowIndex) {
|
||||||
|
debugger
|
||||||
let codeInfo = {
|
let codeInfo = {
|
||||||
//数据模型不可少
|
//数据模型不可少
|
||||||
code_name: row.title,
|
code_name: row.title,
|
||||||
|
@ -707,6 +707,7 @@ export default class acclist extends React.Component {
|
||||||
o.checked = true
|
o.checked = true
|
||||||
return o
|
return o
|
||||||
})
|
})
|
||||||
|
|
||||||
sessionStorage.setItem('productData', JSON.stringify(row.product))
|
sessionStorage.setItem('productData', JSON.stringify(row.product))
|
||||||
this.setState({ tempdata: temp, drawerVisible: true })
|
this.setState({ tempdata: temp, drawerVisible: true })
|
||||||
}
|
}
|
||||||
|
@ -843,14 +844,18 @@ export default class acclist extends React.Component {
|
||||||
sessionStorage.setItem('productsList', JSON.stringify(data))
|
sessionStorage.setItem('productsList', JSON.stringify(data))
|
||||||
/* 区分立减金 */
|
/* 区分立减金 */
|
||||||
if (rowData.type === 2) {
|
if (rowData.type === 2) {
|
||||||
|
let editData = ''
|
||||||
|
if (sessionStorage.getItem('knockGoldData')) {
|
||||||
const temp = JSON.parse(sessionStorage.getItem('knockGoldData'))
|
const temp = JSON.parse(sessionStorage.getItem('knockGoldData'))
|
||||||
const editData = temp.filter(
|
editData = temp.filter(
|
||||||
(item) => item.channel_activity_id === rowData.channel_activity_id
|
(item) =>
|
||||||
|
item.channel_activity_id === rowData.channel_activity_id
|
||||||
)
|
)
|
||||||
|
}
|
||||||
|
|
||||||
this.setState({
|
this.setState({
|
||||||
product_title: '编辑立减金',
|
product_title: '编辑立减金',
|
||||||
productData: editData[0],
|
productData: editData[0] ? editData[0] : rowData.origin,
|
||||||
addIsType: 'addKnockGold'
|
addIsType: 'addKnockGold'
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -153,22 +153,6 @@ export default class acclist extends React.Component {
|
||||||
req.code_batch = req.code_batch ? req.code_batch : []
|
req.code_batch = req.code_batch ? req.code_batch : []
|
||||||
this.setState({ pagetitle: '编辑key' })
|
this.setState({ pagetitle: '编辑key' })
|
||||||
|
|
||||||
/* 转换数据结构 */
|
|
||||||
// req.code_batch.map((item) => {
|
|
||||||
// item.product?.legal?.map((item1) => {
|
|
||||||
// item1.type = 1
|
|
||||||
// item1.only = item1.product_id
|
|
||||||
// item1.upstream = '直连天下'
|
|
||||||
// })
|
|
||||||
// item.product?.reduce?.map((item1) => {
|
|
||||||
// item1.type = 2
|
|
||||||
// item1.only = item1.channel_activity_id
|
|
||||||
// item1.upstream = item.channel === '1' ? '支付宝' : '微信' //上游
|
|
||||||
// item1.origin = item1
|
|
||||||
// })
|
|
||||||
// item.product = [...item.product?.legal, ...item.product?.reduce]
|
|
||||||
// })
|
|
||||||
|
|
||||||
let temp = []
|
let temp = []
|
||||||
for (let i = 0; i < req.code_batch.length; i++) {
|
for (let i = 0; i < req.code_batch.length; i++) {
|
||||||
let code_batch = req.code_batch[i]
|
let code_batch = req.code_batch[i]
|
||||||
|
@ -184,7 +168,7 @@ export default class acclist extends React.Component {
|
||||||
}
|
}
|
||||||
req.code_batch[i].disabled = true
|
req.code_batch[i].disabled = true
|
||||||
req.code_batch[i].checked = true
|
req.code_batch[i].checked = true
|
||||||
code_batch.range = range.toString()
|
req.code_batch.range = range.toString()
|
||||||
temp.push(req.code_batch[i])
|
temp.push(req.code_batch[i])
|
||||||
}
|
}
|
||||||
//获取审批单信息
|
//获取审批单信息
|
||||||
|
@ -227,6 +211,7 @@ export default class acclist extends React.Component {
|
||||||
code_batch.range = range.toString()
|
code_batch.range = range.toString()
|
||||||
temp.push(req.code_batch[i])
|
temp.push(req.code_batch[i])
|
||||||
}
|
}
|
||||||
|
console.log(temp)
|
||||||
|
|
||||||
if (req.payment_direction) {
|
if (req.payment_direction) {
|
||||||
let index = this.state.payment_direction.indexOf(
|
let index = this.state.payment_direction.indexOf(
|
||||||
|
@ -1170,7 +1155,6 @@ export default class acclist extends React.Component {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '兑换码范围',
|
title: '兑换码范围',
|
||||||
|
|
||||||
type: 'normal',
|
type: 'normal',
|
||||||
prop: 'range',
|
prop: 'range',
|
||||||
width: 'auto'
|
width: 'auto'
|
||||||
|
|
Loading…
Reference in New Issue