This commit is contained in:
wangsongsole 2022-06-16 18:39:13 +08:00
parent c64c3a9fbd
commit 0cf86dff04
4 changed files with 17 additions and 29 deletions

View File

@ -407,16 +407,14 @@ export default class acclist extends React.Component {
setTimeout(() => {
let data = null
let temp = null
let concatData = null
let concatData = []
/* 处理商品 */
if (this.state.addIsType === 'addProduct') {
data = JSON.parse(sessionStorage.getItem('productData')).filter(
(item) => item.type !== 2
)
concatData = JSON.parse(
sessionStorage.getItem('knockGoldData')
).filter((item) => item.type !== 1)
concatData = this.state.tempdata.filter((item) => item.type !== 1)
temp = _.map(data, (item) => {
let index = this.state.tempdata.findIndex((o) => {
@ -436,9 +434,9 @@ export default class acclist extends React.Component {
data = JSON.parse(sessionStorage.getItem('knockGoldData')).filter(
(item) => item.type !== 1
)
concatData = JSON.parse(sessionStorage.getItem('productData')).filter(
(item) => item.type !== 2
)
concatData = this.state.tempdata.filter((item) => item.type !== 2)
temp = _.map(data, (item) => {
let index = this.state.tempdata.findIndex((o) => {
return o.channel_activity_id === item.channel_activity_id

View File

@ -688,16 +688,14 @@ export default class exchangedit extends React.Component {
setTimeout(() => {
let data = null
let temp = null
let concatData = null
let concatData = []
/* 处理商品 */
if (this.state.addIsType === 'addProduct') {
data = JSON.parse(sessionStorage.getItem('productData')).filter(
(item) => item.type !== 2
)
concatData = JSON.parse(
sessionStorage.getItem('knockGoldData')
).filter((item) => item.type !== 1)
concatData = this.state.tempdata.filter((item) => item.type !== 1)
temp = _.map(data, (item) => {
let index = this.state.tempdata.findIndex((o) => {
@ -718,9 +716,7 @@ export default class exchangedit extends React.Component {
(item) => item.type !== 1
)
concatData = JSON.parse(sessionStorage.getItem('productData')).filter(
(item) => item.type !== 2
)
concatData = this.state.tempdata.filter((item) => item.type !== 2)
temp = _.map(data, (item) => {
let index = this.state.tempdata.findIndex((o) => {
@ -767,6 +763,7 @@ export default class exchangedit extends React.Component {
})
}
let newArray = deWeightThree(temp.concat(concatData), 'only')
console.log(newArray)
//select数据
let arr = []
let rank = []

View File

@ -300,15 +300,13 @@ export default class acclist extends React.Component {
setTimeout(() => {
let data = null
let temp = null
let concatData = null
let concatData = []
/* 处理商品 */
if (this.state.addIsType === 'addProduct') {
data = JSON.parse(sessionStorage.getItem('productData')).filter(
(item) => item.type !== 2
)
concatData = JSON.parse(
sessionStorage.getItem('knockGoldData')
).filter((item) => item.type !== 1)
concatData = this.state.tempdata.filter((item) => item.type !== 1)
temp = _.map(data, (item) => {
let index = this.state.tempdata.findIndex((o) => {
@ -329,9 +327,9 @@ export default class acclist extends React.Component {
data = JSON.parse(sessionStorage.getItem('knockGoldData')).filter(
(item) => item.type !== 1
)
concatData = JSON.parse(sessionStorage.getItem('productData')).filter(
(item) => item.type !== 2
)
concatData = this.state.tempdata.filter((item) => item.type !== 2)
temp = _.map(data, (item) => {
let index = this.state.tempdata.findIndex((o) => {
return o.channel_activity_id === item.channel_activity_id

View File

@ -416,16 +416,13 @@ export default class acclist extends React.Component {
setTimeout(() => {
let data = null
let temp = null
let concatData = null
let concatData = []
/* 处理商品 */
if (this.state.addIsType === 'addProduct') {
data = JSON.parse(sessionStorage.getItem('productData')).filter(
(item) => item.type !== 2
)
concatData = JSON.parse(
sessionStorage.getItem('knockGoldData')
).filter((item) => item.type !== 1)
concatData = this.state.tempdata.filter((item) => item.type !== 1)
temp = _.map(data, (item) => {
let index = this.state.tempdata.findIndex((o) => {
return o.product_id == item.product_id
@ -444,9 +441,7 @@ export default class acclist extends React.Component {
data = JSON.parse(sessionStorage.getItem('knockGoldData')).filter(
(item) => item.type !== 1
)
concatData = JSON.parse(sessionStorage.getItem('productData')).filter(
(item) => item.type !== 2
)
concatData = this.state.tempdata.filter((item) => item.type !== 2)
temp = _.map(data, (item) => {
let index = this.state.tempdata.findIndex((o) => {
return o.channel_activity_id === item.channel_activity_id