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
Show 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 {
defaultSource
=
{
require
(
'../../../images/not_img.png'
)}
source
=
{
cur_icon
}
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
}
<
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
{
StyleSheet
,
Image
,
Text
,
TouchableOpacity
,
View
}
from
'react-native'
;
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
LocalVariable
from
'../LocalVariable'
;
const
PropTypes
=
require
(
'prop-types'
);
/**
...
...
@@ -43,13 +44,16 @@ class PicTitDetaiCalcu extends Component {
onlyShowNum
:
PropTypes
.
bool
,
// 只展示数字
onlyShowSelect
:
PropTypes
.
bool
,
// 只能单选
listMaxNum
:
PropTypes
.
number
,
// 数量限制最大值
listShowOthOptFlag
:
PropTypes
.
bool
,
// 展示耗材详情
}
constructor
(
props
)
{
super
(
props
);
this
.
state
=
{
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 {
this
.
props
.
subCalCallBack
(
item
,
index
)
}
// 具体详情
showAllTip
(){
let
{
showOtherFlag
}
=
this
.
state
let
curShowOtherTitle
=
showOtherFlag
?
'点击查看具体详情'
:
'点击隐藏具体详情'
this
.
setState
({
showOtherFlag
:
!
showOtherFlag
,
showOtherTitle
:
curShowOtherTitle
})
}
render
()
{
let
{
listItem
,
listIndex
,
calField
,
listStyleBox
,
listStyleTit
,
listStyleTip
,
listStyleCalBtn
,
listPicType
,
titCallBack
,
titText
,
tipTextStr
,
tipTextOne
,
tipTextTwo
,
tipTextThr
,
listImgIcon
,
listStyleImg
,
showClearIcon
,
showClearIndex
,
listCardActIndex
,
listStyleClearBtn
,
clearCallBack
,
onlyShowNum
,
onlyShowSelect
,
titTextTit
,
tipTextStrTit
,
tipTextOneTit
,
tipTextTwoTit
,
tipTextThrTit
,
global_domain_config
,
listMaxNum
}
=
this
.
props
let
{
listPicTypeArr
,
picStyleArr
}
=
this
.
state
global_domain_config
,
listMaxNum
,
listShowOthOptFlag
}
=
this
.
props
let
{
listPicTypeArr
,
picStyleArr
,
showOtherFlag
,
showOtherTitle
}
=
this
.
state
let
picOthStyle
=
''
if
(
listPicTypeArr
.
indexOf
(
listPicType
)
>
-
1
)
{
...
...
@@ -122,7 +136,6 @@ class PicTitDetaiCalcu extends Component {
}
else
if
(
typeof
listItem
[
listImgIcon
]
===
'string'
){
cur_photos
[
0
]
=
{
url
:
global_domain_config
+
'/jeecg-boot/sys/common/view/'
+
listItem
[
listImgIcon
]
}
}
return
(
<
View
style
=
{[
styles
.
ri_inner
,
listStyleBox
]}
>
{(
listImgIcon
&&
cur_photos
.
length
>
0
)
?
...
...
@@ -139,25 +152,39 @@ class PicTitDetaiCalcu extends Component {
onPress
=
{()
=>
{
titCallBack
?
titCallBack
(
listItem
,
listIndex
)
:
{}
}}
style
=
{
styles
.
oth_box
}
>
<
Text
numberOfLines
=
{
2
}
style
=
{[
styles
.
thr_ot
,
listStyleTit
]}
>
{
listItem
[
titText
]
?
listItem
[
titText
]
:
''
}
{
!
listItem
[
titText
]
&&
titTextTit
?
`
${
titTextTit
}
: 空
`
:
''
}
<
Text
numberOfLines
=
{
3
}
style
=
{[
styles
.
thr_ot
,
listStyleTit
]}
>
{
listItem
[
titText
]
?
`
${
listIndex
+
1
}
.
${
listItem
[
titText
]}
`
:
''
}
{
!
listItem
[
titText
]
&&
titTextTit
?
`
${
listIndex
+
1
}
.
${
titTextTit
}
: 无
`
:
''
}
<
/Text
>
{
tipTextStrTit
?
<
Text
numberOfLines
=
{
2
}
style
=
{[
styles
.
ri_te_ot
,
styles
.
te_ot_str
,
listStyleTip
]}
>
{
`
${
tipTextStrTit
}
:`
}
{
listItem
[
tipTextStr
]
?
listItem
[
tipTextStr
]
:
'
空
'
}
{
tipTextStrTit
?
<
Text
numberOfLines
=
{
3
}
style
=
{[
styles
.
ri_te_ot
,
styles
.
te_ot_str
,
listStyleTip
]}
>
{
`
${
tipTextStrTit
}
:`
}
{
listItem
[
tipTextStr
]
?
listItem
[
tipTextStr
]
:
'
无
'
}
<
/Text> : null
}
{
tipTextOneTit
?
<
Text
numberOfLines
=
{
2
}
style
=
{[
styles
.
ri_te_ot
,
styles
.
te_ot_one
,
listStyleTip
]}
>
{
/* {tipTextOneTit ? `${tipTextOneTit}:` : ''}{listItem[tipTextOne]} */
}
{
`
${
tipTextOneTit
}
:`
}
{
listItem
[
tipTextOne
]
?
listItem
[
tipTextOne
]
:
'空'
}
{
tipTextOneTit
?
<
Text
numberOfLines
=
{
3
}
style
=
{[
styles
.
ri_te_ot
,
styles
.
te_ot_one
,
listStyleTip
]}
>
{
`
${
tipTextOneTit
}
:`
}
{
listItem
[
tipTextOne
]
?
listItem
[
tipTextOne
]
:
'无'
}
<
/Text> : null
}
{
tipTextTwoTit
?
<
Text
numberOfLines
=
{
2
}
style
=
{[
styles
.
ri_te_ot
,
styles
.
te_ot_two
,
listStyleTip
]}
>
{
/* {tipTextTwoTit ? `${tipTextTwoTit}:` : ''}{listItem[tipTextTwo]} */
}
{
`
${
tipTextTwoTit
}
:`
}
{
listItem
[
tipTextTwo
]
?
listItem
[
tipTextTwo
]
:
'空'
}
{
tipTextTwoTit
?
<
Text
numberOfLines
=
{
3
}
style
=
{[
styles
.
ri_te_ot
,
styles
.
te_ot_two
,
listStyleTip
]}
>
{
`
${
tipTextTwoTit
}
:`
}
{
listItem
[
tipTextTwo
]
?
listItem
[
tipTextTwo
]
:
'无'
}
<
/Text> : null
}
{
tipTextThrTit
?
<
Text
numberOfLines
=
{
2
}
style
=
{[
styles
.
ri_te_ot
,
styles
.
te_ot_thr
,
listStyleTip
]}
>
{
/* {tipTextThrTit ? `${tipTextThrTit}:` : ''}{listItem[tipTextThr]} */
}
{
`
${
tipTextThrTit
}
:`
}
{
listItem
[
tipTextThr
]
?
listItem
[
tipTextThr
]
:
'空'
}
{
tipTextThrTit
?
<
Text
numberOfLines
=
{
3
}
style
=
{[
styles
.
ri_te_ot
,
styles
.
te_ot_thr
,
listStyleTip
]}
>
{
`
${
tipTextThrTit
}
:`
}
{
listItem
[
tipTextThr
]
?
listItem
[
tipTextThr
]
:
'无'
}
<
/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
>
<
/View
>
{
...
...
@@ -254,13 +281,16 @@ const styles = StyleSheet.create({
te_ot_thr
:{
color
:
list_thr_color
},
te_ot_main
:
{
color
:
list_one_light_color
},
oth_img_box
:
{
width
:
pxSize
(
58
),
height
:
pxSize
(
58
),
justifyContent
:
'center'
,
alignItems
:
'center'
,
marginRight
:
6
,
padding
:
6
marginRight
:
3
,
padding
:
3
},
round_pic
:
{
borderColor
:
'rgba(0, 0, 0, 0.12)'
,
...
...
@@ -283,7 +313,7 @@ const styles = StyleSheet.create({
btn_inner
:
{},
btn_sel_inner
:
{},
btn_cle_box
:
{
marginRight
:
6
,
marginRight
:
3
,
paddingHorizontal
:
4
,
paddingVertical
:
4
},
...
...
@@ -295,7 +325,7 @@ const styles = StyleSheet.create({
ri_num_box
:
{
flexDirection
:
'row'
,
alignItems
:
'center'
,
marginLeft
:
6
,
marginLeft
:
3
,
backgroundColor
:
home_background_color
},
show_num_box
:
{
...
...
app/containers/selfOrder/SelfOrderPage.js
View file @
d9584521
...
...
@@ -618,7 +618,7 @@ class SelfOrderPage extends Component {
if
(
orgResult
.
error_code
==
0
)
{
let
{
data
:
{
organizations
}
}
=
orgResult
let
{
listOptionData
}
=
state
props
.
requestListDataSuccess
(
organizations
)
//
props.requestListDataSuccess(organizations)
let
filterOpt
=
dedupQuoteArray
(
organizations
,
'org_code'
)
if
(
filterOpt
.
length
===
0
)
{
show
(
`当前
${
listOptionData
[
1
].
title
}
为空`
)
...
...
@@ -681,7 +681,7 @@ class SelfOrderPage extends Component {
if
(
cusResult
.
error_code
==
0
)
{
let
{
data
:
{
customers
}
}
=
cusResult
let
{
listOptionData
}
=
state
props
.
requestListDataSuccess
(
customers
)
//
props.requestListDataSuccess(customers)
let
filterOpt
=
dedupQuoteArray
(
customers
,
'customer_code'
)
if
(
filterOpt
.
length
===
0
)
{
show
(
`当前
${
listOptionData
[
2
].
title
}
为空`
)
...
...
app/containers/selfOrder/module/ChooseProductPage.js
View file @
d9584521
...
...
@@ -92,6 +92,8 @@ class ChooseProductPage extends Component {
// 之前选择过值
that
.
setState
({
topProcOptionList
:
local_sele_pro_options
},
()
=>
{
that
.
handleTopNav
(
local_sele_pro_options
[
0
],
0
)
})
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