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
7a33255d
authored
Jan 03, 2021
by
Denglingling
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
调整自助下单,已经缓存图片
parent
7f71a364
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
204 additions
and
32 deletions
app/containers/common/ProductModel.js
app/containers/common/listDataComponent/PicTitDetaiCalcu.js
app/containers/common/listDataComponent/PictureZoom.js
app/containers/selfOrder/SelfOrderPage.js
app/containers/selfOrder/module/ChooseProductPage.js
app/containers/common/ProductModel.js
View file @
7a33255d
...
@@ -758,7 +758,7 @@ class ProductModel extends Component {
...
@@ -758,7 +758,7 @@ class ProductModel extends Component {
})
})
}
}
//
console.log('底部🉐️=====', localBottomContData)
console
.
log
(
'底部🉐️====='
,
localBottomContData
)
// localBottomContData = [{
// localBottomContData = [{
// supplier_short_name: "嘉思特华剑医疗器材(天津)有限公司", // 测试
// supplier_short_name: "嘉思特华剑医疗器材(天津)有限公司", // 测试
// supplier_code: "SU00000369", // 测试
// supplier_code: "SU00000369", // 测试
...
@@ -795,24 +795,54 @@ class ProductModel extends Component {
...
@@ -795,24 +795,54 @@ class ProductModel extends Component {
renderContColumnItem
(
item
,
index
)
{
renderContColumnItem
(
item
,
index
)
{
let
{
topActiveIndex
,
leftActiveIndex
}
=
this
.
state
let
{
topActiveIndex
,
leftActiveIndex
}
=
this
.
state
let
{
global_domain_config
}
=
this
.
props
let
{
global_domain_config
}
=
this
.
props
let
curTit
=
''
,
curTip
One
=
''
,
curTipTwo
=
''
,
curTipOneTit
=
''
,
curTipTwoTit
=
''
,
cur
Icon
=
''
let
curTit
=
''
,
curTip
Str
=
''
,
curTipOne
=
''
,
curTipTwo
=
''
,
curTxtTit
=
''
,
curTipStrTit
=
''
,
curTipOneTit
=
''
,
curTipTwoTit
=
''
,
curImg
Icon
=
''
let
curListMaxNum
=
''
let
curListMaxNum
=
''
if
(
topActiveIndex
===
0
)
{
if
(
topActiveIndex
===
0
)
{
curTit
=
'superTit'
curTit
=
'superTit'
curTipOne
=
'superTip'
curTipOne
=
'superTip'
}
else
if
(
topActiveIndex
===
1
||
topActiveIndex
===
2
||
topActiveIndex
===
3
)
{
curTxtTit
=
'套包名'
curTipOneTit
=
'详情'
}
else
if
(
topActiveIndex
===
1
){
curTit
=
'item_name'
curTit
=
'item_name'
curTipStr
=
'general_name'
curTipOne
=
'specification'
curTipOne
=
'specification'
curTipTwo
=
'item_code'
curTxtTit
=
'物料名称'
curTipStrTit
=
'通用名称'
curTipOneTit
=
'规格型号'
curTipOneTit
=
'规格型号'
curTipTwoTit
=
'物料代码'
curImgIcon
=
'photos'
curIcon
=
'photos'
}
else
if
(
topActiveIndex
===
2
){
if
(
topActiveIndex
===
2
)
{
curTit
=
'item_name'
curTipStr
=
'general_name'
curTxtTit
=
'物料名称'
curTipStrTit
=
'通用名称'
curListMaxNum
=
1
curListMaxNum
=
1
}
}
else
if
(
topActiveIndex
===
3
){
}
else
{
curTit
=
'manufacturer_product_code'
curTipStr
=
'item_name'
curTipOne
=
'general_name'
curTipTwo
=
'specification'
curTxtTit
=
'厂家产品代码'
curTipStrTit
=
'物料名称'
curTipOneTit
=
'通用名称'
curTipTwoTit
=
'规格型号'
}
// else if (topActiveIndex === 1 || topActiveIndex === 2 || topActiveIndex === 3) {
// curTit = 'item_name'
// curTipOne = 'specification'
// curTipTwo = 'item_code'
// curTxtTit='物料名称'
// curTipOneTit = '规格型号'
// curTipTwoTit = '物料代码'
// curImgIcon = 'photos'
// if (topActiveIndex === 2) {
// curListMaxNum = 1
// }
// }
else
{
curTit
=
LocalVariable
.
SUPER_TITLE_NAME
curTit
=
LocalVariable
.
SUPER_TITLE_NAME
curTipOne
=
LocalVariable
.
SUPER_TITLE_TIP
curTipOne
=
LocalVariable
.
SUPER_TITLE_TIP
curTxtTit
=
'耗材名'
curTipOneTit
=
'详情'
}
}
// let cur_supplier_icon = ["files/20201224/截屏2020-12-24 上午11.11.20_1608779494102.11.20.png"]
// let cur_supplier_icon = ["files/20201224/截屏2020-12-24 上午11.11.20_1608779494102.11.20.png"]
...
@@ -834,6 +864,8 @@ class ProductModel extends Component {
...
@@ -834,6 +864,8 @@ class ProductModel extends Component {
}
}
}
}
console
.
log
(
'哈👌==='
,
bttom_options
)
return
(
return
(
<
TouchableOpacity
<
TouchableOpacity
...
@@ -869,8 +901,11 @@ class ProductModel extends Component {
...
@@ -869,8 +901,11 @@ class ProductModel extends Component {
calField
=
{
LocalVariable
.
QUANTITY_FIELD
}
calField
=
{
LocalVariable
.
QUANTITY_FIELD
}
subCalCallBack
=
{(
ch_item
,
ch_index
)
=>
this
.
handleCalCallBack
(
ch_item
,
ch_index
,
index
)}
subCalCallBack
=
{(
ch_item
,
ch_index
)
=>
this
.
handleCalCallBack
(
ch_item
,
ch_index
,
index
)}
titText
=
{
curTit
}
titText
=
{
curTit
}
tipTextStr
=
{
curTipStr
}
tipTextOne
=
{
curTipOne
}
tipTextOne
=
{
curTipOne
}
tipTextTwo
=
{
curTipTwo
}
tipTextTwo
=
{
curTipTwo
}
titTextTit
=
{
curTxtTit
}
tipTextStrTit
=
{
curTipStrTit
}
tipTextOneTit
=
{
curTipOneTit
}
tipTextOneTit
=
{
curTipOneTit
}
tipTextTwoTit
=
{
curTipTwoTit
}
tipTextTwoTit
=
{
curTipTwoTit
}
listPicType
=
{
'SQUARE'
}
listPicType
=
{
'SQUARE'
}
...
...
app/containers/common/listDataComponent/PicTitDetaiCalcu.js
View file @
7a33255d
...
@@ -123,6 +123,11 @@ class PicTitDetaiCalcu extends Component {
...
@@ -123,6 +123,11 @@ class PicTitDetaiCalcu extends Component {
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
]
}
}
}
// console.log('cur_photos--', cur_photos)
console
.
log
(
'cur_photos--'
,
tipTextOneTit
)
console
.
log
(
'cur_photos--'
,
listItem
)
console
.
log
(
'cur_photos--'
,
tipTextOne
)
return
(
return
(
<
View
style
=
{[
styles
.
ri_inner
,
listStyleBox
]}
>
<
View
style
=
{[
styles
.
ri_inner
,
listStyleBox
]}
>
{(
listImgIcon
&&
cur_photos
.
length
>
0
)
?
{(
listImgIcon
&&
cur_photos
.
length
>
0
)
?
...
@@ -244,18 +249,29 @@ const styles = StyleSheet.create({
...
@@ -244,18 +249,29 @@ const styles = StyleSheet.create({
},
},
te_ot_str
:
{
te_ot_str
:
{
fontFamily
:
font_family_semibold
,
fontFamily
:
font_family_semibold
,
color
:
'#0CB4E8'
,
// color: '#0CB4E8',
// color: '#02a5ab'
// color: 'rgba(58, 58, 58, 100)'
// color: 'rgba(58, 58, 58, 100)'
color
:
text_default_color
//
color: text_default_color
// color: text_return_color
// color: text_return_color
},
},
te_ot_one
:{
te_ot_one
:{
color
:
first_text_color
color
:
'#1B40B5'
,
// color: '#003BF5',
// color: text_return_color
// color: first_text_color
},
},
te_ot_two
:{
te_ot_two
:{
color
:
first_text_color
color
:
'#1B40B5'
,
// color: '#3B4C82',
// color: '#0080FF',
// color: text_return_color
},
},
te_ot_thr
:{
te_ot_thr
:{
color
:
first_text_color
color
:
'#3B4C82'
,
// color: '#0CB4E8',
// color: text_return_color
},
},
oth_img_box
:
{
oth_img_box
:
{
width
:
pxSize
(
58
),
width
:
pxSize
(
58
),
...
...
app/containers/common/listDataComponent/PictureZoom.js
View file @
7a33255d
...
@@ -21,7 +21,74 @@ class PictureZoom extends Component {
...
@@ -21,7 +21,74 @@ class PictureZoom extends Component {
this
.
state
=
{
this
.
state
=
{
picZoomIsShow
:
false
,
picZoomIsShow
:
false
,
listPicTypeArr
:
[
'ROUND'
,
'SQUARE'
,
'RECTANGLE'
],
listPicTypeArr
:
[
'ROUND'
,
'SQUARE'
,
'RECTANGLE'
],
picStyleArr
:
[
'round_pic'
,
'square_pic'
,
'rectan_pic'
]
picStyleArr
:
[
'round_pic'
,
'square_pic'
,
'rectan_pic'
],
curImgFail
:
false
,
curImgUrl
:
''
}
}
componentDidMount
()
{
// console.log('进====')
let
{
listImageUrls
,
listImageIndex
}
=
this
.
props
let
{
curImgUrl
,
curImgFail
}
=
this
.
state
let
that
=
this
if
(
!
listImageUrls
[
listImageIndex
].
url
)
{
that
.
setState
({
curImgUrl
:
require
(
'../../../images/not_img.png'
),
curImgFail
:
false
})
}
else
{
that
.
setState
({
curImgUrl
:
{
uri
:
listImageUrls
[
listImageIndex
].
url
},
curImgFail
:
true
},
()
=>
{
// console.log('curImgUrl---', curImgUrl)
// console.log('curImgUrl---', listImageUrls[listImageIndex].url )
// console.log('curImgUrl---', that.state.curImgUrl )
Image
.
prefetch
(
that
.
state
.
curImgUrl
.
uri
).
then
((
result
)
=>
{
// console.log('缓存图片:',result)
}).
catch
((
error
)
=>
{
console
.
log
(
'缓存图片--err:'
,
error
)
that
.
setState
({
curImgUrl
:
require
(
'../../../images/not_img.png'
),
curImgFail
:
false
})
})
})
}
}
componentWillReceiveProps
(
nextProps
){
console
.
log
(
'改变'
,
nextProps
)
// let { listImageUrls, listImageIndex } = this.nextProps
let
{
listImageUrls
,
listImageIndex
}
=
this
.
props
let
{
curImgUrl
,
curImgFail
}
=
this
.
state
let
that
=
this
// console.log('改变', listImageUrls)
if
(
nextProps
.
listImageUrls
){
if
(
!
nextProps
.
listImageUrls
[
listImageIndex
].
url
)
{
that
.
setState
({
curImgUrl
:
require
(
'../../../images/not_img.png'
),
curImgFail
:
false
})
}
else
{
that
.
setState
({
curImgUrl
:
{
uri
:
nextProps
.
listImageUrls
[
listImageIndex
].
url
},
curImgFail
:
true
},
()
=>
{
// console.log('curImgUrl---', curImgUrl)
// console.log('curImgUrl---', nextProps.listImageUrls[listImageIndex].url )
// console.log('curImgUrl---', that.state.curImgUrl )
Image
.
prefetch
(
that
.
state
.
curImgUrl
.
uri
).
then
((
result
)
=>
{
// console.log('缓存图片:',result)
}).
catch
((
error
)
=>
{
that
.
setState
({
curImgUrl
:
require
(
'../../../images/not_img.png'
),
curImgFail
:
false
})
})
})
}
}
}
}
}
...
@@ -60,34 +127,87 @@ class PictureZoom extends Component {
...
@@ -60,34 +127,87 @@ class PictureZoom extends Component {
render
()
{
render
()
{
let
{
listImageUrls
,
listImageIndex
,
listStyleImage
,
listPicType
}
=
this
.
props
let
{
listImageUrls
,
listImageIndex
,
listStyleImage
,
listPicType
}
=
this
.
props
let
{
picZoomIsShow
,
listPicTypeArr
,
picStyleArr
}
=
this
.
state
let
{
picZoomIsShow
,
listPicTypeArr
,
picStyleArr
,
curImgFail
,
curImgUrl
}
=
this
.
state
let
picOthStyle
=
''
let
picOthStyle
=
''
let
that
=
this
if
(
listPicTypeArr
.
indexOf
(
listPicType
)
>
-
1
)
{
if
(
listPicTypeArr
.
indexOf
(
listPicType
)
>
-
1
)
{
picOthStyle
=
picStyleArr
[
listPicTypeArr
.
indexOf
(
listPicType
)]
picOthStyle
=
picStyleArr
[
listPicTypeArr
.
indexOf
(
listPicType
)]
}
}
let
canShow
=
true
let
cur_defalut
=
{
uri
:
listImageUrls
[
listImageIndex
].
url
}
// curImgUrl = { uri: listImageUrls[listImageIndex].url }
if
(
!
listImageUrls
[
listImageIndex
].
url
)
{
// if (!listImageUrls[listImageIndex].url) {
cur_defalut
=
require
(
'../../../images/not_img.png'
)
// // curImgUrl = require('../../../images/not_img.png')
canShow
=
false
// // curImgFail = false
}
// that.setState({
// curImgUrl: require('../../../images/not_img.png'),
// curImgFail: false
// })
// }
// if(curImgUrl.uri){
// Image.prefetch(curImgUrl.uri).then((result) => {
// console.log('lw---lh:',result)
// console.log('curImgUrl==:',curImgUrl)
// }).catch((error) => {
// console.log('lw---lh--err:',error)
// // curImgUrl = require('../../../images/not_img.png')
// // curImgFail = false
// that.setState({
// curImgUrl: require('../../../images/not_img.png'),
// curImgFail: false
// }, () => {
// console.log('curImgUrl==:',curImgUrl, curImgFail)
// })
// })
// }
// let canShow = true
// let cur_defalut = { uri: listImageUrls[listImageIndex].url }
// if (!listImageUrls[listImageIndex].url) {
// cur_defalut = require('../../../images/not_img.png')
// canShow = false
// }
// if(cur_defalut.uri){
// Image.prefetch(cur_defalut.uri).then((result) => {
// console.log('lw---lh:',result)
// console.log('cur_defalut==:',cur_defalut)
// }).catch((error) => {
// console.log('lw---lh--err:',error)
// cur_defalut = require('../../../images/not_img.png')
// canShow = false
// console.log('cur_defalut==:',cur_defalut, canShow)
// })
// // Image.getSize(cur_defalut.uri, (width, height) => {
// // console.log('lw---lh:',width, height)
// // },err => {
// // console.log('lw---lh--!!==err:',err)
// // cur_defalut = require('../../../images/not_img.png')
// // canShow = false
// // })
// }
return
(
return
(
<
View
style
=
{[
styles
.
container
]}
>
<
View
style
=
{[
styles
.
container
]}
>
<
TouchableOpacity
<
TouchableOpacity
activeOpacity
=
{
.
8
}
activeOpacity
=
{
curImgUrl
.
uri
?
.
8
:
1
}
style
=
{[
styles
.
list_item_img
,
styles
[
picOthStyle
],
listStyleImage
]}
style
=
{[
styles
.
list_item_img
,
styles
[
picOthStyle
],
listStyleImage
]}
onPress
=
{
()
=>
this
.
handleShowZoomPic
(
true
)
}
onPress
=
{
curImgUrl
.
uri
?
()
=>
this
.
handleShowZoomPic
(
true
)
:
null
}
>
>
<
Image
<
Image
defaultSource
=
{
require
(
'../../../images/not_img.png'
)}
source
=
{
curImgUrl
}
// source={{uri: listImageUrls[listImageIndex].url}}
source
=
{
cur_defalut
}
style
=
{
icon_style
}
style
=
{
icon_style
}
resizeMode
=
"cover"
/>
resizeMode
=
"cover"
defaultSource
=
{
require
(
'../../../images/not_img.png'
)}
/
>
<
/TouchableOpacity
>
<
/TouchableOpacity
>
{
{
c
anShow
?
c
urImgFail
?
<
Modal
<
Modal
visible
=
{
picZoomIsShow
}
visible
=
{
picZoomIsShow
}
animationType
=
{
"slide"
}
animationType
=
{
"slide"
}
...
...
app/containers/selfOrder/SelfOrderPage.js
View file @
7a33255d
...
@@ -487,9 +487,9 @@ class SelfOrderPage extends Component {
...
@@ -487,9 +487,9 @@ class SelfOrderPage extends Component {
if
(
itemTitle
===
'组织'
)
{
if
(
itemTitle
===
'组织'
)
{
that
.
clearInitNameAndValue
(
1
)
that
.
clearInitNameAndValue
(
1
)
}
}
if
(
itemTitle
===
'客户名称'
)
{
//
if (itemTitle === '客户名称') {
that
.
clearInitNameAndValue
(
2
)
//
that.clearInitNameAndValue(2)
}
//
}
if
(
itemTitle
===
'主治医生'
)
{
if
(
itemTitle
===
'主治医生'
)
{
if
(
item
.
name
===
'其他'
)
{
if
(
item
.
name
===
'其他'
)
{
chItem
.
showInput
=
true
chItem
.
showInput
=
true
...
...
app/containers/selfOrder/module/ChooseProductPage.js
View file @
7a33255d
...
@@ -223,7 +223,8 @@ class ChooseProductPage extends Component {
...
@@ -223,7 +223,8 @@ class ChooseProductPage extends Component {
}
}
}
else
if
(
leftIndex
===
3
)
{
}
else
if
(
leftIndex
===
3
)
{
let
params
=
{
let
params
=
{
access_token
:
token
access_token
:
token
,
manufacturer_code
:
topItem
.
supplier_code
}
}
console
.
log
(
'params='
,
params
)
console
.
log
(
'params='
,
params
)
let
scat_head_search
=
await
reqScatEquipmentSearch
(
global_domain_config
,
params
)
let
scat_head_search
=
await
reqScatEquipmentSearch
(
global_domain_config
,
params
)
...
...
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