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
d9584521
authored
Jan 29, 2021
by
Denglingling
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
优化自助下单
parent
fe0a2608
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
58 additions
and
26 deletions
app/containers/common/ProductModel.js
app/containers/common/listDataComponent/ChooseCardList.js
app/containers/common/listDataComponent/PicTitDetaiCalcu.js
app/containers/selfOrder/SelfOrderPage.js
app/containers/selfOrder/module/ChooseProductPage.js
app/containers/common/ProductModel.js
View file @
d9584521
This diff is collapsed.
Click to expand it.
app/containers/common/listDataComponent/ChooseCardList.js
View file @
d9584521
...
@@ -87,7 +87,7 @@ class ChooseCardList extends Component {
...
@@ -87,7 +87,7 @@ class ChooseCardList extends Component {
defaultSource
=
{
require
(
'../../../images/not_img.png'
)}
defaultSource
=
{
require
(
'../../../images/not_img.png'
)}
source
=
{
cur_icon
}
source
=
{
cur_icon
}
style
=
{
icon_style
}
style
=
{
icon_style
}
resizeMode
=
"c
ov
er"
/>
:
<
Image
source
=
{
cur_icon
}
style
=
{
icon_style
}
resizeMode
=
"cover"
/>
resizeMode
=
"c
ent
er"
/>
:
<
Image
source
=
{
cur_icon
}
style
=
{
icon_style
}
resizeMode
=
"cover"
/>
}
}
<
/View> : null
}
<
/View> : null
}
<
Text
numberOfLines
=
{
3
}
style
=
{[
styles
.
list_item_tit
,
cardStyleItemTit
,
cur_icon
?
''
:
cardStyleNotIconTit
,
index
==
curActIndex
?
[
styles
.
list_tit_act
,
cardStyleItemTitAct
]
:
''
]}
>
<
Text
numberOfLines
=
{
3
}
style
=
{[
styles
.
list_item_tit
,
cardStyleItemTit
,
cur_icon
?
''
:
cardStyleNotIconTit
,
index
==
curActIndex
?
[
styles
.
list_tit_act
,
cardStyleItemTitAct
]
:
''
]}
>
...
...
app/containers/common/listDataComponent/PicTitDetaiCalcu.js
View file @
d9584521
import
React
,
{
Component
}
from
'react'
;
import
React
,
{
Component
}
from
'react'
;
import
{
StyleSheet
,
Image
,
Text
,
TouchableOpacity
,
View
}
from
'react-native'
;
import
{
StyleSheet
,
Image
,
Text
,
TouchableOpacity
,
View
}
from
'react-native'
;
import
{
connect
}
from
'react-redux'
;
import
{
connect
}
from
'react-redux'
;
import
{
first_text_color
,
font_family_medium
,
font_family_regular
,
font_family_semibold
,
home_background_color
,
icon_style
,
pxSize
,
second_text_size
,
third_text_color
,
third_text_size
,
list_tit_color
,
list_str_color
,
list_one_color
,
list_thr_color
}
from
'../../../base/BaseStyle'
;
import
{
first_text_color
,
font_family_medium
,
font_family_regular
,
font_family_semibold
,
home_background_color
,
icon_style
,
pxSize
,
second_text_size
,
third_text_color
,
third_text_size
,
list_tit_color
,
list_str_color
,
list_one_color
,
list_thr_color
,
list_one_light_color
}
from
'../../../base/BaseStyle'
;
import
PictureZoom
from
'../../common/listDataComponent/PictureZoom'
;
import
PictureZoom
from
'../../common/listDataComponent/PictureZoom'
;
import
LocalVariable
from
'../LocalVariable'
;
const
PropTypes
=
require
(
'prop-types'
);
const
PropTypes
=
require
(
'prop-types'
);
/**
/**
...
@@ -43,13 +44,16 @@ class PicTitDetaiCalcu extends Component {
...
@@ -43,13 +44,16 @@ class PicTitDetaiCalcu extends Component {
onlyShowNum
:
PropTypes
.
bool
,
// 只展示数字
onlyShowNum
:
PropTypes
.
bool
,
// 只展示数字
onlyShowSelect
:
PropTypes
.
bool
,
// 只能单选
onlyShowSelect
:
PropTypes
.
bool
,
// 只能单选
listMaxNum
:
PropTypes
.
number
,
// 数量限制最大值
listMaxNum
:
PropTypes
.
number
,
// 数量限制最大值
listShowOthOptFlag
:
PropTypes
.
bool
,
// 展示耗材详情
}
}
constructor
(
props
)
{
constructor
(
props
)
{
super
(
props
);
super
(
props
);
this
.
state
=
{
this
.
state
=
{
listPicTypeArr
:
[
'ROUND'
,
'SQUARE'
,
'RECTANGLE'
],
listPicTypeArr
:
[
'ROUND'
,
'SQUARE'
,
'RECTANGLE'
],
picStyleArr
:
[
'round_pic'
,
'square_pic'
,
'rectan_pic'
]
picStyleArr
:
[
'round_pic'
,
'square_pic'
,
'rectan_pic'
],
showOtherFlag
:
true
,
showOtherTitle
:
'点击隐藏具体详情'
}
}
}
}
...
@@ -87,12 +91,22 @@ class PicTitDetaiCalcu extends Component {
...
@@ -87,12 +91,22 @@ class PicTitDetaiCalcu extends Component {
this
.
props
.
subCalCallBack
(
item
,
index
)
this
.
props
.
subCalCallBack
(
item
,
index
)
}
}
// 具体详情
showAllTip
(){
let
{
showOtherFlag
}
=
this
.
state
let
curShowOtherTitle
=
showOtherFlag
?
'点击查看具体详情'
:
'点击隐藏具体详情'
this
.
setState
({
showOtherFlag
:
!
showOtherFlag
,
showOtherTitle
:
curShowOtherTitle
})
}
render
()
{
render
()
{
let
{
listItem
,
listIndex
,
calField
,
listStyleBox
,
listStyleTit
,
listStyleTip
,
listStyleCalBtn
,
listPicType
,
titCallBack
,
let
{
listItem
,
listIndex
,
calField
,
listStyleBox
,
listStyleTit
,
listStyleTip
,
listStyleCalBtn
,
listPicType
,
titCallBack
,
titText
,
tipTextStr
,
tipTextOne
,
tipTextTwo
,
tipTextThr
,
listImgIcon
,
listStyleImg
,
showClearIcon
,
showClearIndex
,
listCardActIndex
,
titText
,
tipTextStr
,
tipTextOne
,
tipTextTwo
,
tipTextThr
,
listImgIcon
,
listStyleImg
,
showClearIcon
,
showClearIndex
,
listCardActIndex
,
listStyleClearBtn
,
clearCallBack
,
onlyShowNum
,
onlyShowSelect
,
titTextTit
,
tipTextStrTit
,
tipTextOneTit
,
tipTextTwoTit
,
tipTextThrTit
,
listStyleClearBtn
,
clearCallBack
,
onlyShowNum
,
onlyShowSelect
,
titTextTit
,
tipTextStrTit
,
tipTextOneTit
,
tipTextTwoTit
,
tipTextThrTit
,
global_domain_config
,
listMaxNum
}
=
this
.
props
global_domain_config
,
listMaxNum
,
listShowOthOptFlag
}
=
this
.
props
let
{
listPicTypeArr
,
picStyleArr
}
=
this
.
state
let
{
listPicTypeArr
,
picStyleArr
,
showOtherFlag
,
showOtherTitle
}
=
this
.
state
let
picOthStyle
=
''
let
picOthStyle
=
''
if
(
listPicTypeArr
.
indexOf
(
listPicType
)
>
-
1
)
{
if
(
listPicTypeArr
.
indexOf
(
listPicType
)
>
-
1
)
{
...
@@ -122,7 +136,6 @@ class PicTitDetaiCalcu extends Component {
...
@@ -122,7 +136,6 @@ class PicTitDetaiCalcu extends Component {
}
else
if
(
typeof
listItem
[
listImgIcon
]
===
'string'
){
}
else
if
(
typeof
listItem
[
listImgIcon
]
===
'string'
){
cur_photos
[
0
]
=
{
url
:
global_domain_config
+
'/jeecg-boot/sys/common/view/'
+
listItem
[
listImgIcon
]
}
cur_photos
[
0
]
=
{
url
:
global_domain_config
+
'/jeecg-boot/sys/common/view/'
+
listItem
[
listImgIcon
]
}
}
}
return
(
return
(
<
View
style
=
{[
styles
.
ri_inner
,
listStyleBox
]}
>
<
View
style
=
{[
styles
.
ri_inner
,
listStyleBox
]}
>
{(
listImgIcon
&&
cur_photos
.
length
>
0
)
?
{(
listImgIcon
&&
cur_photos
.
length
>
0
)
?
...
@@ -139,25 +152,39 @@ class PicTitDetaiCalcu extends Component {
...
@@ -139,25 +152,39 @@ class PicTitDetaiCalcu extends Component {
onPress
=
{()
=>
{
titCallBack
?
titCallBack
(
listItem
,
listIndex
)
:
{}
}}
onPress
=
{()
=>
{
titCallBack
?
titCallBack
(
listItem
,
listIndex
)
:
{}
}}
style
=
{
styles
.
oth_box
}
style
=
{
styles
.
oth_box
}
>
>
<
Text
numberOfLines
=
{
2
}
style
=
{[
styles
.
thr_ot
,
listStyleTit
]}
>
<
Text
numberOfLines
=
{
3
}
style
=
{[
styles
.
thr_ot
,
listStyleTit
]}
>
{
listItem
[
titText
]
?
listItem
[
titText
]
:
''
}
{
listItem
[
titText
]
?
`
${
listIndex
+
1
}
.
${
listItem
[
titText
]}
`
:
''
}
{
!
listItem
[
titText
]
&&
titTextTit
?
`
${
titTextTit
}
: 空
`
:
''
}
{
!
listItem
[
titText
]
&&
titTextTit
?
`
${
listIndex
+
1
}
.
${
titTextTit
}
: 无
`
:
''
}
<
/Text
>
<
/Text
>
{
tipTextStrTit
?
<
Text
numberOfLines
=
{
2
}
style
=
{[
styles
.
ri_te_ot
,
styles
.
te_ot_str
,
listStyleTip
]}
>
{
tipTextStrTit
?
<
Text
numberOfLines
=
{
3
}
style
=
{[
styles
.
ri_te_ot
,
styles
.
te_ot_str
,
listStyleTip
]}
>
{
`
${
tipTextStrTit
}
:`
}
{
listItem
[
tipTextStr
]
?
listItem
[
tipTextStr
]
:
'
空
'
}
{
`
${
tipTextStrTit
}
:`
}
{
listItem
[
tipTextStr
]
?
listItem
[
tipTextStr
]
:
'
无
'
}
<
/Text> : null
}
<
/Text> : null
}
{
tipTextOneTit
?
<
Text
numberOfLines
=
{
2
}
style
=
{[
styles
.
ri_te_ot
,
styles
.
te_ot_one
,
listStyleTip
]}
>
{
tipTextOneTit
?
<
Text
numberOfLines
=
{
3
}
style
=
{[
styles
.
ri_te_ot
,
styles
.
te_ot_one
,
listStyleTip
]}
>
{
/* {tipTextOneTit ? `${tipTextOneTit}:` : ''}{listItem[tipTextOne]} */
}
{
`
${
tipTextOneTit
}
:`
}
{
listItem
[
tipTextOne
]
?
listItem
[
tipTextOne
]
:
'无'
}
{
`
${
tipTextOneTit
}
:`
}
{
listItem
[
tipTextOne
]
?
listItem
[
tipTextOne
]
:
'空'
}
<
/Text> : null
}
<
/Text> : null
}
{
tipTextTwoTit
?
<
Text
numberOfLines
=
{
2
}
style
=
{[
styles
.
ri_te_ot
,
styles
.
te_ot_two
,
listStyleTip
]}
>
{
tipTextTwoTit
?
<
Text
numberOfLines
=
{
3
}
style
=
{[
styles
.
ri_te_ot
,
styles
.
te_ot_two
,
listStyleTip
]}
>
{
/* {tipTextTwoTit ? `${tipTextTwoTit}:` : ''}{listItem[tipTextTwo]} */
}
{
`
${
tipTextTwoTit
}
:`
}
{
listItem
[
tipTextTwo
]
?
listItem
[
tipTextTwo
]
:
'无'
}
{
`
${
tipTextTwoTit
}
:`
}
{
listItem
[
tipTextTwo
]
?
listItem
[
tipTextTwo
]
:
'空'
}
<
/Text> : null
}
<
/Text> : null
}
{
tipTextThrTit
?
<
Text
numberOfLines
=
{
2
}
style
=
{[
styles
.
ri_te_ot
,
styles
.
te_ot_thr
,
listStyleTip
]}
>
{
tipTextThrTit
?
<
Text
numberOfLines
=
{
3
}
style
=
{[
styles
.
ri_te_ot
,
styles
.
te_ot_thr
,
listStyleTip
]}
>
{
/* {tipTextThrTit ? `${tipTextThrTit}:` : ''}{listItem[tipTextThr]} */
}
{
`
${
tipTextThrTit
}
:`
}
{
listItem
[
tipTextThr
]
?
listItem
[
tipTextThr
]
:
'无'
}
{
`
${
tipTextThrTit
}
:`
}
{
listItem
[
tipTextThr
]
?
listItem
[
tipTextThr
]
:
'空'
}
<
/Text> : null
}
<
/Text> : null
}
{
listShowOthOptFlag
&&
listItem
[
LocalVariable
.
SUPER_SEL_ALL_ARR
]
?
<
View
>
<
TouchableOpacity
activeOpacity
=
{.
8
}
onPress
=
{()
=>
this
.
showAllTip
()}
>
<
Text
numberOfLines
=
{
3
}
style
=
{[
styles
.
ri_te_ot
,
styles
.
te_ot_thr
,
listStyleTip
]}
>
{
showOtherTitle
}
<
/Text
>
<
/TouchableOpacity
>
{
showOtherFlag
?
listItem
[
LocalVariable
.
SUPER_SEL_ALL_ARR
].
map
((
item
,
item_index
)
=>
{
return
<
View
>
<
Text
numberOfLines
=
{
3
}
style
=
{[
styles
.
ri_te_ot
,
styles
.
te_ot_one
,
listStyleTip
]}
>
{
item_index
+
1
}.
{
item
.
item_name
}
-
<
Text
style
=
{[
styles
.
ri_te_ot
,
styles
.
te_ot_main
,
listStyleTip
]}
>
{
item
.
manufacturer_product_code
}
-
{
item
.
specification
}
<
/Text> - {item.general_name} x {item
[
LocalVariable.QUANTITY_FIELD
]
}
<
/Text
>
<
/View
>
})
:
null
}
<
/View> : null
}
<
/TouchableOpacity
>
<
/TouchableOpacity
>
<
/View
>
<
/View
>
{
{
...
@@ -254,13 +281,16 @@ const styles = StyleSheet.create({
...
@@ -254,13 +281,16 @@ const styles = StyleSheet.create({
te_ot_thr
:{
te_ot_thr
:{
color
:
list_thr_color
color
:
list_thr_color
},
},
te_ot_main
:
{
color
:
list_one_light_color
},
oth_img_box
:
{
oth_img_box
:
{
width
:
pxSize
(
58
),
width
:
pxSize
(
58
),
height
:
pxSize
(
58
),
height
:
pxSize
(
58
),
justifyContent
:
'center'
,
justifyContent
:
'center'
,
alignItems
:
'center'
,
alignItems
:
'center'
,
marginRight
:
6
,
marginRight
:
3
,
padding
:
6
padding
:
3
},
},
round_pic
:
{
round_pic
:
{
borderColor
:
'rgba(0, 0, 0, 0.12)'
,
borderColor
:
'rgba(0, 0, 0, 0.12)'
,
...
@@ -283,7 +313,7 @@ const styles = StyleSheet.create({
...
@@ -283,7 +313,7 @@ const styles = StyleSheet.create({
btn_inner
:
{},
btn_inner
:
{},
btn_sel_inner
:
{},
btn_sel_inner
:
{},
btn_cle_box
:
{
btn_cle_box
:
{
marginRight
:
6
,
marginRight
:
3
,
paddingHorizontal
:
4
,
paddingHorizontal
:
4
,
paddingVertical
:
4
paddingVertical
:
4
},
},
...
@@ -295,7 +325,7 @@ const styles = StyleSheet.create({
...
@@ -295,7 +325,7 @@ const styles = StyleSheet.create({
ri_num_box
:
{
ri_num_box
:
{
flexDirection
:
'row'
,
flexDirection
:
'row'
,
alignItems
:
'center'
,
alignItems
:
'center'
,
marginLeft
:
6
,
marginLeft
:
3
,
backgroundColor
:
home_background_color
backgroundColor
:
home_background_color
},
},
show_num_box
:
{
show_num_box
:
{
...
...
app/containers/selfOrder/SelfOrderPage.js
View file @
d9584521
...
@@ -618,7 +618,7 @@ class SelfOrderPage extends Component {
...
@@ -618,7 +618,7 @@ class SelfOrderPage extends Component {
if
(
orgResult
.
error_code
==
0
)
{
if
(
orgResult
.
error_code
==
0
)
{
let
{
data
:
{
organizations
}
}
=
orgResult
let
{
data
:
{
organizations
}
}
=
orgResult
let
{
listOptionData
}
=
state
let
{
listOptionData
}
=
state
props
.
requestListDataSuccess
(
organizations
)
//
props.requestListDataSuccess(organizations)
let
filterOpt
=
dedupQuoteArray
(
organizations
,
'org_code'
)
let
filterOpt
=
dedupQuoteArray
(
organizations
,
'org_code'
)
if
(
filterOpt
.
length
===
0
)
{
if
(
filterOpt
.
length
===
0
)
{
show
(
`当前
${
listOptionData
[
1
].
title
}
为空`
)
show
(
`当前
${
listOptionData
[
1
].
title
}
为空`
)
...
@@ -681,7 +681,7 @@ class SelfOrderPage extends Component {
...
@@ -681,7 +681,7 @@ class SelfOrderPage extends Component {
if
(
cusResult
.
error_code
==
0
)
{
if
(
cusResult
.
error_code
==
0
)
{
let
{
data
:
{
customers
}
}
=
cusResult
let
{
data
:
{
customers
}
}
=
cusResult
let
{
listOptionData
}
=
state
let
{
listOptionData
}
=
state
props
.
requestListDataSuccess
(
customers
)
//
props.requestListDataSuccess(customers)
let
filterOpt
=
dedupQuoteArray
(
customers
,
'customer_code'
)
let
filterOpt
=
dedupQuoteArray
(
customers
,
'customer_code'
)
if
(
filterOpt
.
length
===
0
)
{
if
(
filterOpt
.
length
===
0
)
{
show
(
`当前
${
listOptionData
[
2
].
title
}
为空`
)
show
(
`当前
${
listOptionData
[
2
].
title
}
为空`
)
...
...
app/containers/selfOrder/module/ChooseProductPage.js
View file @
d9584521
...
@@ -92,6 +92,8 @@ class ChooseProductPage extends Component {
...
@@ -92,6 +92,8 @@ class ChooseProductPage extends Component {
// 之前选择过值
// 之前选择过值
that
.
setState
({
that
.
setState
({
topProcOptionList
:
local_sele_pro_options
topProcOptionList
:
local_sele_pro_options
},
()
=>
{
that
.
handleTopNav
(
local_sele_pro_options
[
0
],
0
)
})
})
return
return
}
}
...
...
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