Commit c547c435 by peii

【BUG】全局搜索bug修复

parent 9724c77e
...@@ -133,9 +133,17 @@ class ChooseProductPage extends Component { ...@@ -133,9 +133,17 @@ class ChooseProductPage extends Component {
handleGoBack() { handleGoBack() {
let { topProcOptionList, originManufacterList } = this.state let { topProcOptionList, originManufacterList } = this.state
let { setSelectProductOpts } = this.props let { setSelectProductOpts } = this.props
setSelectProductOpts(originManufacterList)
console.log('originManufacterList', originManufacterList) const res = R.map(item => {
this.props.navigation.state.params.productCallBack(originManufacterList) const topItem = R.find(R.propEq('supplier_code', item.supplier_code))(topProcOptionList)
if (isNotBlank(topItem)) {
item = R.mergeDeepLeft(topItem, item)
}
return item
})(originManufacterList)
setSelectProductOpts(res)
this.props.navigation.state.params.productCallBack(res)
this.props.navigation.goBack() this.props.navigation.goBack()
} }
......
...@@ -133,6 +133,7 @@ class SearchPage extends Component { ...@@ -133,6 +133,7 @@ class SearchPage extends Component {
this.refs.LoadingModel.hide() this.refs.LoadingModel.hide()
console.log('single_all_search', single_all_search) console.log('single_all_search', single_all_search)
const oldData = data.item const oldData = data.item
this.setState({ this.setState({
data: { data: {
...single_all_search?.data, ...single_all_search?.data,
...@@ -329,6 +330,7 @@ class SearchPage extends Component { ...@@ -329,6 +330,7 @@ class SearchPage extends Component {
show('添加成功') show('添加成功')
}, },
) )
console.log(JSON.stringify(topProcOptionList));
return Promise.resolve(topProcOptionList) return Promise.resolve(topProcOptionList)
} }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @FilePath: /BoneHouse_Business_APP/app/reducers/module/mixConsume.js * @FilePath: /BoneHouse_Business_APP/app/reducers/module/mixConsume.js
* @Author: PEII * @Author: PEII
* @Date: 2022-08-04 17:28:07 * @Date: 2022-08-04 17:28:07
* @LastEditTime: 2022-10-12 15:49:35 * @LastEditTime: 2022-10-21 12:54:50
* @LastEditors: PEII * @LastEditors: PEII
* @Vision: 1.0 * @Vision: 1.0
* @Description: 混单消耗 * @Description: 混单消耗
...@@ -15,7 +15,6 @@ const initState = { ...@@ -15,7 +15,6 @@ const initState = {
} }
export default (state = initState, action) => { export default (state = initState, action) => {
console.log(action)
switch (action.type) { switch (action.type) {
case SET_MIX_CONSUME_ORDERS: case SET_MIX_CONSUME_ORDERS:
return Object.assign({}, state, { return Object.assign({}, state, {
......
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