修复问题

This commit is contained in:
wangsongsole 2022-06-02 16:48:08 +08:00
parent ef883e58a7
commit be3e067e79
2 changed files with 13 additions and 24 deletions

View File

@ -493,7 +493,6 @@ export default class acclist extends React.Component {
this.setState({ distdata: tempdata })
}
}
sessionStorage.setItem('knockGoldData', '')
}
addNewKey() {
this.props.addNewkey()
@ -679,6 +678,7 @@ export default class acclist extends React.Component {
}
rowItemClick(row, rowIndex) {
debugger
let codeInfo = {
//数据模型不可少
code_name: row.title,
@ -707,6 +707,7 @@ export default class acclist extends React.Component {
o.checked = true
return o
})
sessionStorage.setItem('productData', JSON.stringify(row.product))
this.setState({ tempdata: temp, drawerVisible: true })
}
@ -843,14 +844,18 @@ export default class acclist extends React.Component {
sessionStorage.setItem('productsList', JSON.stringify(data))
/* 区分立减金 */
if (rowData.type === 2) {
let editData = ''
if (sessionStorage.getItem('knockGoldData')) {
const temp = JSON.parse(sessionStorage.getItem('knockGoldData'))
const editData = temp.filter(
(item) => item.channel_activity_id === rowData.channel_activity_id
editData = temp.filter(
(item) =>
item.channel_activity_id === rowData.channel_activity_id
)
}
this.setState({
product_title: '编辑立减金',
productData: editData[0],
productData: editData[0] ? editData[0] : rowData.origin,
addIsType: 'addKnockGold'
})
} else {

View File

@ -153,22 +153,6 @@ export default class acclist extends React.Component {
req.code_batch = req.code_batch ? req.code_batch : []
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 = []
for (let i = 0; i < req.code_batch.length; 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].checked = true
code_batch.range = range.toString()
req.code_batch.range = range.toString()
temp.push(req.code_batch[i])
}
//获取审批单信息
@ -227,6 +211,7 @@ export default class acclist extends React.Component {
code_batch.range = range.toString()
temp.push(req.code_batch[i])
}
console.log(temp)
if (req.payment_direction) {
let index = this.state.payment_direction.indexOf(
@ -1170,7 +1155,6 @@ export default class acclist extends React.Component {
},
{
title: '兑换码范围',
type: 'normal',
prop: 'range',
width: 'auto'