Commit 28295252 by lhc Committed by peii

fix: 修复全局搜索后生成订单没加入商品的问题

(cherry picked from commit 89e379a7)
parent d1514eb6
This diff could not be displayed because it is too large.
...@@ -22,6 +22,7 @@ import { connect } from 'react-redux' ...@@ -22,6 +22,7 @@ import { connect } from 'react-redux'
import LoadingModel from '../../common/listDataComponent/LoadingModel' import LoadingModel from '../../common/listDataComponent/LoadingModel'
import { Width } from '../../../base/BaseStyle' import { Width } from '../../../base/BaseStyle'
import { show } from '../../../utils/Utils' import { show } from '../../../utils/Utils'
import * as R from 'ramda'
class SearchPage extends Component { class SearchPage extends Component {
constructor(props) { constructor(props) {
super(props) super(props)
...@@ -302,6 +303,13 @@ class SearchPage extends Component { ...@@ -302,6 +303,13 @@ class SearchPage extends Component {
[LocalVariable.SELECTED_QUQNTITY]: topProcOptionList[topActiveIndex][LocalVariable.SELECTED_QUQNTITY] + 1, [LocalVariable.SELECTED_QUQNTITY]: topProcOptionList[topActiveIndex][LocalVariable.SELECTED_QUQNTITY] + 1,
leftOptionList: leftOptionList.map(ele => { leftOptionList: leftOptionList.map(ele => {
const childrenLineData = this.getChildrenLineData(ele.localSecondData) const childrenLineData = this.getChildrenLineData(ele.localSecondData)
if (!ele[LocalVariable.SELECTED_DATA_ARR]) {
ele[LocalVariable.SELECTED_DATA_ARR] = []
}
const selectData = R.filter(R.compose(R.lt(0), R.prop(LocalVariable.QUANTITY_FIELD)))(
ele[LocalVariable.LOCAL_SECOND_DATA],
)
ele.selectedArr = selectData
console.log('selectedDataArr', childrenLineData) console.log('selectedDataArr', childrenLineData)
return { return {
...ele, ...ele,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment