Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
zhangzhonghua
/
BoneHouse_Business_APP
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
13aa8048
authored
Apr 21, 2022
by
lhc
Committed by
peii
May 26, 2022
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
fix: bug
(cherry picked from commit
79de63e3
)
parent
161e6c20
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
155 additions
and
99 deletions
android/keystores/key.jks
app/containers/selfOrder/module/ChooseProductPage.js
app/containers/selfOrder/module/SearchPage.js
src/pages/settlement/index.tsx
android/keystores/key.jks
View file @
13aa8048
No preview for this file type
app/containers/selfOrder/module/ChooseProductPage.js
View file @
13aa8048
...
...
@@ -866,91 +866,92 @@ class ChooseProductPage extends Component {
// 返回搜索元素
renderSearchItem
()
{
const
{
navigation
}
=
this
.
props
const
{
leftActiveIndex
,
filterData
,
authorizations
,
topProcOptionList
}
=
this
.
state
const
{
authorizations
,
topProcOptionList
,
topActiveIndex
}
=
this
.
state
let
cur_org_code
=
''
if
(
navigation
.
state
.
params
.
selfData
)
{
cur_org_code
=
navigation
.
state
.
params
.
selfData
.
org_code
}
if
(
leftActiveIndex
)
{
return
(
<
TouchableOpacity
onPress
=
{()
=>
{
navigation
.
navigate
(
'SearchPage'
,
{
title
:
`选择产品`
,
topProcOptionList
,
title
:
'搜索'
,
setTopProcOptionListCallBack
:
setTopProcOptionList
=>
{
console
.
log
(
'click'
)
setTopProcOptionList
.
then
(
topProcOptionList
=>
{
console
.
log
(
'addSuccess'
)
this
.
setState
(
{
topProcOptionList
:
[...
topProcOptionList
],
},
// () => {
// console.log('goback')
// this.props.navigation.goBack()
// },
)
})
},
selfData
:
{
org_code
:
cur_org_code
,
authorizations
,
},
})
}}
>
<
View
style
=
{
list_common_item
.
ser_cont
}
>
<
View
style
=
{
list_common_item
.
ser_text_input
}
><
/View
>
<
View
style
=
{
list_common_item
.
ser_img_box
}
>
<
Image
source
=
{
require
(
'../../../images/search_icon.png'
)}
style
=
{
icon_style
}
/
>
<
/View
>
<
/View
>
<
/TouchableOpacity
>
)
}
else
{
return
(
<
View
>
<
TouchableOpacity
onPress
=
{()
=>
{
navigation
.
navigate
(
'SearchPage'
,
{
title
:
`选择产品`
,
topProcOptionList
,
title
:
'搜索'
,
setTopProcOptionListCallBack
:
setTopProcOptionList
=>
{
console
.
log
(
'click'
)
setTopProcOptionList
.
then
(
topProcOptionList
=>
{
console
.
log
(
'addSuccess'
)
this
.
setState
(
{
topProcOptionList
:
[...
topProcOptionList
],
},
// () => {
// console.log('goback')
// this.props.navigation.goBack()
// },
)
})
},
selfData
:
{
org_code
:
cur_org_code
,
authorizations
,
},
// if (leftActiveIndex) {
return
(
<
TouchableOpacity
onPress
=
{()
=>
{
navigation
.
navigate
(
'SearchPage'
,
{
title
:
`选择产品`
,
topProcOptionList
,
topActiveIndex
,
title
:
'搜索'
,
setTopProcOptionListCallBack
:
setTopProcOptionList
=>
{
console
.
log
(
'click'
)
setTopProcOptionList
.
then
(
topProcOptionList
=>
{
console
.
log
(
'addSuccess'
)
this
.
setState
(
{
topProcOptionList
:
[...
topProcOptionList
],
},
// () => {
// console.log('goback')
// this.props.navigation.goBack()
// },
)
})
}}
>
<
View
style
=
{
list_common_item
.
ser_cont
}
>
<
View
style
=
{
list_common_item
.
ser_text_input
}
><
/View
>
<
View
style
=
{
list_common_item
.
ser_img_box
}
>
<
Image
source
=
{
require
(
'../../../images/search_icon.png'
)}
style
=
{
icon_style
}
/
>
<
/View
>
<
/View
>
<
/TouchableOpacity
>
<
ChooseFilter
filterData
=
{
filterData
}
onCallback
=
{
this
.
fillterCallback
.
bind
(
this
)}
/
>
},
selfData
:
{
org_code
:
cur_org_code
,
authorizations
,
},
})
}}
>
<
View
style
=
{
list_common_item
.
ser_cont
}
>
<
View
style
=
{
list_common_item
.
ser_text_input
}
><
/View
>
<
View
style
=
{
list_common_item
.
ser_img_box
}
>
<
Image
source
=
{
require
(
'../../../images/search_icon.png'
)}
style
=
{
icon_style
}
/
>
<
/View
>
<
/View
>
)
}
<
/TouchableOpacity
>
)
// } else {
// return (
// <View>
// <TouchableOpacity
// onPress={() => {
// navigation.navigate('SearchPage', {
// title: `选择产品`,
// topProcOptionList,
// title: '搜索',
// setTopProcOptionListCallBack: setTopProcOptionList => {
// console.log('click')
// setTopProcOptionList.then(topProcOptionList => {
// console.log('addSuccess')
// this.setState(
// {
// topProcOptionList: [...topProcOptionList],
// },
// // () => {
// // console.log('goback')
// // this.props.navigation.goBack()
// // },
// )
// })
// },
// selfData: {
// org_code: cur_org_code,
// authorizations,
// },
// })
// }}
// >
// <View style={list_common_item.ser_cont}>
// <View style={list_common_item.ser_text_input}></View>
// <View style={list_common_item.ser_img_box}>
// <Image source={require('../../../images/search_icon.png')} style={icon_style} />
// </View>
// </View>
// </TouchableOpacity>
// <ChooseFilter filterData={filterData} onCallback={this.fillterCallback.bind(this)} />
// </View>
// )
// }
}
// 返回顶部厂家
...
...
app/containers/selfOrder/module/SearchPage.js
View file @
13aa8048
...
...
@@ -18,14 +18,13 @@ import LocalVariable from '../../common/LocalVariable'
import
{
reqGlobalSearch
,
reqSingleConsumSearch
,
reqProCategorySearch
}
from
'../../../action/SelfAction'
import
ChooseCardList
from
'../../common/listDataComponent/ChooseCardList'
import
{
connect
}
from
'react-redux'
import
{
cloneObject
}
from
'../../../utils/Utils'
// import ChooseCardList from '../../common/listDataComponent/ChooseCardList';
import
LoadingModel
from
'../../common/listDataComponent/LoadingModel'
import
{
Width
}
from
'../../../base/BaseStyle'
import
debounce
from
'debounce'
class
SearchPage
extends
Component
{
constructor
(
props
)
{
super
(
props
)
this
.
state
=
{
defalutLeftItem
:
[
{
...
...
@@ -50,20 +49,65 @@ class SearchPage extends Component {
},
],
searchValue
:
''
,
dataList
:
[],
topActiveIndex
:
0
,
data
:
{
item
:
[],
total
:
0
,
},
page
:
1
,
}
this
.
inputSearchValue
=
debounce
(
this
.
inputSearchValue
.
bind
(
this
),
1000
)
//
this.inputSearchValue = debounce(this.inputSearchValue.bind(this), 1000)
}
componentDidMount
()
{
this
.
getSearchData
()
const
{
navigation
}
=
this
.
props
console
.
log
(
'navigation'
,
navigation
)
const
{
topActiveIndex
}
=
navigation
.
state
.
params
this
.
setState
({
topActiveIndex
,
})
// this.getSearchData()
}
initData
()
{
this
.
setState
(
{
data
:
{
item
:
[],
total
:
0
,
},
page
:
1
,
},
()
=>
{
this
.
getSearchData
()
},
)
}
// 上拉刷新
onMomentumScrollEnd
=
event
=>
{
const
offSetY
=
event
.
nativeEvent
.
contentOffset
.
y
// 获取滑动的距离
const
contentSizeHeight
=
event
.
nativeEvent
.
contentSize
.
height
// scrollView contentSize 高度
const
oriageScrollHeight
=
event
.
nativeEvent
.
layoutMeasurement
.
height
// scrollView高度
const
{
page
,
data
}
=
this
.
state
if
(
offSetY
+
oriageScrollHeight
>=
contentSizeHeight
-
400
)
{
if
(
data
.
item
.
length
<
data
.
total
)
{
this
.
setState
(
{
page
:
page
+
1
,
},
()
=>
{
this
.
getSearchData
()
},
)
}
}
}
// 获取搜索数据
async
getSearchData
()
{
const
{
navigation
,
global_domain_config
,
token
}
=
this
.
props
const
{
topActiveIndex
,
searchValue
}
=
this
.
state
const
{
topActiveIndex
,
searchValue
,
page
,
data
}
=
this
.
state
const
{
selfData
,
topProcOptionList
}
=
navigation
.
state
.
params
const
{
authorizations
}
=
selfData
...
...
@@ -77,14 +121,18 @@ class SearchPage extends Component {
manufacturerCode
:
topProcOptionList
[
topActiveIndex
].
supplier_code
,
productLineCategory
,
keyword
:
encodeURIComponent
(
searchValue
),
page
Size
:
9999
,
page
,
}
this
.
refs
.
LoadingModel
.
show
()
const
single_all_search
=
await
reqGlobalSearch
(
global_domain_config
,
JSON
.
parse
(
JSON
.
stringify
(
params
)))
this
.
refs
.
LoadingModel
.
hide
()
console
.
log
(
'single_all_search'
,
single_all_search
)
const
oldData
=
data
.
item
this
.
setState
({
dataList
:
single_all_search
?.
data
?.
item
?
single_all_search
?.
data
?.
item
:
[],
data
:
{
...
single_all_search
?.
data
,
item
:
[...
oldData
,
...
single_all_search
?.
data
.
item
],
},
})
}
...
...
@@ -260,7 +308,10 @@ class SearchPage extends Component {
}
}),
}
this
.
props
.
navigation
.
goBack
()
// this.props.navigation.goBack()
this
.
setState
({
topProcOptionList
,
})
return
Promise
.
resolve
(
topProcOptionList
)
}
...
...
@@ -321,7 +372,7 @@ class SearchPage extends Component {
topActiveIndex
,
},
()
=>
{
this
.
getSearch
Data
()
this
.
init
Data
()
},
)
}
...
...
@@ -331,11 +382,11 @@ class SearchPage extends Component {
render
()
{
const
{
navigation
}
=
this
.
props
const
{
title
,
topProcOptionList
}
=
navigation
.
state
.
params
const
{
data
List
,
topActiveIndex
}
=
this
.
state
const
{
data
,
topActiveIndex
}
=
this
.
state
const
cur_icon
=
'supplier_icon'
console
.
log
(
'dataList'
,
data
List
)
console
.
log
(
'dataList'
,
data
.
item
)
return
(
<
SafeAreaView
style
=
{
safe_view
}
>
<
HeadBackItem
title
=
{
title
}
navigation
=
{
navigation
}
/
>
...
...
@@ -348,7 +399,7 @@ class SearchPage extends Component {
<
View
style
=
{
list_common_item
.
ser_btn
}
>
<
TouchableOpacity
onPress
=
{()
=>
{
this
.
getSearch
Data
()
this
.
init
Data
()
}}
>
<
Text
style
=
{
list_common_item
.
ser_text_btn
}
>
搜索
<
/Text
>
...
...
@@ -375,17 +426,21 @@ class SearchPage extends Component {
cardShowDefIcon
=
{
true
}
/
>
<
ScrollView
showsVerticalScrollIndicator
=
{
false
}
>
{
data
List
.
length
>
0
?
(
<
ScrollView
showsVerticalScrollIndicator
=
{
false
}
onScrollEndDrag
=
{
this
.
onMomentumScrollEnd
}
>
{
data
.
item
.
length
>
0
&&
(
<
FlatList
keyExtractor
=
{
item
=>
item
.
id
}
data
=
{
data
List
}
data
=
{
data
.
item
}
extraData
=
{
this
.
state
}
renderItem
=
{({
item
,
index
})
=>
this
.
renderContColumnItem
(
item
,
index
)}
/
>
)
:
(
<
PicListNoData
/>
)}
{
data
.
item
.
length
===
data
.
total
&&
data
?.
item
?.
length
>
0
&&
(
<
View
>
<
Text
style
=
{{
textAlign
:
'center'
,
lineHeight
:
40
}}
>
没有更多数据了
<
/Text
>
<
/View
>
)}
{
!
data
?.
item
?.
length
&&
<
PicListNoData
/>
}
<
/ScrollView
>
<
LoadingModel
ref
=
"LoadingModel"
/>
<
/SafeAreaView
>
...
...
src/pages/settlement/index.tsx
View file @
13aa8048
...
...
@@ -83,7 +83,7 @@ class Settlement extends React.Component<IProps, IState> {
args
=
filterData
}
args
.
header_status
=
'
ENTERED
'
args
.
header_status
=
'
SETTLING
'
const
params
=
R
.
filter
(
isNotBlank
)({
...
args
,
...
pagination
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment