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
9c9fbe5d
authored
Jan 16, 2021
by
Denglingling
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
调整自助下单,获取供应商的请求参数等
parent
4b7600ee
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
166 deletions
app/containers/login/LoginPage.js
app/containers/quickOrder/QuickOrderPage.js
app/containers/selfOrder/SelfOrderPage.js
app/containers/selfOrder/module/ChooseProductPage.js
app/containers/login/LoginPage.js
View file @
9c9fbe5d
...
@@ -45,7 +45,7 @@ class LoginPage extends Component{
...
@@ -45,7 +45,7 @@ class LoginPage extends Component{
subTitList
:
[
'登录'
,
'登录中...'
],
subTitList
:
[
'登录'
,
'登录中...'
],
isSubLoding
:
false
,
isSubLoding
:
false
,
isShowDomain
:
false
,
// 域名填写
isShowDomain
:
false
,
// 域名填写
version_apk
:
'
v1.2.1
'
version_apk
:
'
V1.2.2
'
}
}
}
}
...
@@ -324,18 +324,12 @@ const styles = StyleSheet.create({
...
@@ -324,18 +324,12 @@ const styles = StyleSheet.create({
right
:
0
right
:
0
},
},
login_inner
:
{
login_inner
:
{
// flex: 1,
// position: 'relative',
// alignSelf: 'stretch',
width
:
Width
(),
width
:
Width
(),
height
:
Height
(),
height
:
Height
(),
paddingLeft
:
pxSize
(
33
),
paddingLeft
:
pxSize
(
33
),
paddingRight
:
pxSize
(
33
)
paddingRight
:
pxSize
(
33
)
// height: null
},
},
login_head
:
{
login_head
:
{
// flex: 1,
// height: pxHeight(264),
height
:
'22%'
,
height
:
'22%'
,
display
:
'flex'
,
display
:
'flex'
,
flexDirection
:
'column'
,
flexDirection
:
'column'
,
...
@@ -356,7 +350,6 @@ const styles = StyleSheet.create({
...
@@ -356,7 +350,6 @@ const styles = StyleSheet.create({
login_content
:
{
login_content
:
{
backgroundColor
:
'#FFF'
,
backgroundColor
:
'#FFF'
,
borderRadius
:
10
,
borderRadius
:
10
,
// height: '49%',
height
:
pxSize
(
390
),
height
:
pxSize
(
390
),
width
:
pxSize
(
348
),
width
:
pxSize
(
348
),
paddingHorizontal
:
'8%'
,
paddingHorizontal
:
'8%'
,
...
@@ -389,11 +382,8 @@ const styles = StyleSheet.create({
...
@@ -389,11 +382,8 @@ const styles = StyleSheet.create({
fontSize
:
third_text_size
,
fontSize
:
third_text_size
,
height
:
38
,
height
:
38
,
fontFamily
:
font_family_regular
fontFamily
:
font_family_regular
// lineHeight: 22,
},
},
cont_footer
:
{
cont_footer
:
{
// borderRadius: 50
// justifyContent: 'center',
justifyContent
:
'flex-end'
,
justifyContent
:
'flex-end'
,
flex
:
1
flex
:
1
},
},
...
@@ -433,15 +423,11 @@ const styles = StyleSheet.create({
...
@@ -433,15 +423,11 @@ const styles = StyleSheet.create({
fontFamily
:
font_family_regular
fontFamily
:
font_family_regular
},
},
login_footer
:
{
login_footer
:
{
// height: '20%',
// height: pxHeight(220),
flex
:
1
,
flex
:
1
,
justifyContent
:
'flex-start'
,
justifyContent
:
'flex-start'
,
alignItems
:
'center'
alignItems
:
'center'
},
},
fo_box
:
{
fo_box
:
{
// width: '30%',
// height: '30%'
width
:
pxSize
(
110
),
width
:
pxSize
(
110
),
height
:
pxSize
(
30
),
height
:
pxSize
(
30
),
marginTop
:
42
marginTop
:
42
...
@@ -452,7 +438,6 @@ const styles = StyleSheet.create({
...
@@ -452,7 +438,6 @@ const styles = StyleSheet.create({
paddingTop
:
4
paddingTop
:
4
},
},
footer_img
:
{
footer_img
:
{
// flex: 1
resizeMode
:
'contain'
,
resizeMode
:
'contain'
,
width
:
'100%'
,
width
:
'100%'
,
height
:
'100%'
height
:
'100%'
...
...
app/containers/quickOrder/QuickOrderPage.js
View file @
9c9fbe5d
...
@@ -594,38 +594,6 @@ class EquipConsuPage extends Component {
...
@@ -594,38 +594,6 @@ class EquipConsuPage extends Component {
},()
=>
{
},()
=>
{
self
.
changeCanSub
()
self
.
changeCanSub
()
})
})
// this.setState({
// listOptionData: listOptionData.map((chItem, index) => {
// if(chItem.title === itemTitle) {
// chItem.name = item.name
// chItem.value = item.value
// if(itemTitle === '组织') {
// self.clearInitNameAndValue(1)
// }
// if(itemTitle === '客户名称') {
// self.clearInitNameAndValue(2)
// }
// if (itemTitle === '主治医生') {
// if(item.name === '其他') {
// chItem.showInput = true
// } else {
// chItem.showInput = false
// chItem.inputValue = ''
// }
// self.clearInitNameAndValue(5)
// }
// if(itemTitle === '手术类型') {
// self.clearInitNameAndValue(6)
// }
// if (itemTitle === '手术模板') {
// listOptionData[10].value = item.desc
// }
// }
// return chItem
// })
// }, () => {
// self.changeCanSub()
// })
}
}
// 关闭弹窗
// 关闭弹窗
...
...
app/containers/selfOrder/SelfOrderPage.js
View file @
9c9fbe5d
...
@@ -427,7 +427,7 @@ class SelfOrderPage extends Component {
...
@@ -427,7 +427,7 @@ class SelfOrderPage extends Component {
let
that
=
this
let
that
=
this
this
.
setState
({
this
.
setState
({
listOptionData
:
listOptionData
.
map
((
item
,
index
)
=>
{
listOptionData
:
listOptionData
.
map
((
item
,
index
)
=>
{
if
(
index
>
curIndex
&&
index
<
9
)
{
if
(
index
>
curIndex
&&
index
<
6
)
{
item
.
name
=
localOtherObj
.
name
item
.
name
=
localOtherObj
.
name
item
.
value
=
localOtherObj
.
value
item
.
value
=
localOtherObj
.
value
if
(
listOptionData
[
1
].
value
&&
item
.
title
==
'客户名称'
)
{
if
(
listOptionData
[
1
].
value
&&
item
.
title
==
'客户名称'
)
{
...
@@ -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 @
9c9fbe5d
...
@@ -103,7 +103,7 @@ class ChooseProductPage extends Component {
...
@@ -103,7 +103,7 @@ class ChooseProductPage extends Component {
let
params
=
{
let
params
=
{
access_token
:
token
,
access_token
:
token
,
org_code
:
cur_org_code
,
org_code
:
cur_org_code
,
supplier_type
:
'MANUFACTURER'
,
// 供应商
supplier_type
:
'MANUFACTURER
,M&O
'
,
// 供应商
filter_flag
:
'Y'
,
// 过滤标识
filter_flag
:
'Y'
,
// 过滤标识
}
}
console
.
log
(
'params='
,
params
)
console
.
log
(
'params='
,
params
)
...
@@ -371,8 +371,6 @@ class ChooseProductPage extends Component {
...
@@ -371,8 +371,6 @@ class ChooseProductPage extends Component {
top_sel_sum
+=
leItem
[
LocalVariable
.
SELECTED_QUQNTITY
]
top_sel_sum
+=
leItem
[
LocalVariable
.
SELECTED_QUQNTITY
]
})
})
topProcOptionList
[
topActiveIndex
][
LocalVariable
.
SELECTED_QUQNTITY
]
=
top_sel_sum
topProcOptionList
[
topActiveIndex
][
LocalVariable
.
SELECTED_QUQNTITY
]
=
top_sel_sum
// console.log('topProcOptionList---', topProcOptionList)
this
.
setState
({
this
.
setState
({
topProcOptionList
topProcOptionList
})
})
...
@@ -429,9 +427,6 @@ class ChooseProductPage extends Component {
...
@@ -429,9 +427,6 @@ class ChooseProductPage extends Component {
// 点击已选
// 点击已选
handleSubSelected
()
{
handleSubSelected
()
{
let
{
selectShowPopup
}
=
this
.
state
let
{
selectShowPopup
}
=
this
.
state
// if (this.getAllCountQuantity() !== 0 && this.getCurCountSum() !== 0) {
// this.handleCloseSelectModal(!selectShowPopup)
// }
if
(
this
.
getAllCountQuantity
()
!==
0
)
{
if
(
this
.
getAllCountQuantity
()
!==
0
)
{
this
.
handleCloseSelectModal
(
!
selectShowPopup
)
this
.
handleCloseSelectModal
(
!
selectShowPopup
)
}
}
...
@@ -446,12 +441,6 @@ class ChooseProductPage extends Component {
...
@@ -446,12 +441,6 @@ class ChooseProductPage extends Component {
// 改变弹窗后的回调
// 改变弹窗后的回调
handleChangeCallBack
(
options
,
clearFlag
)
{
handleChangeCallBack
(
options
,
clearFlag
)
{
let
{
topProcOptionList
,
topActiveIndex
}
=
this
.
state
let
{
topProcOptionList
,
topActiveIndex
}
=
this
.
state
// console.log('🐯 改变后的回调 🐯=====', options)
// console.log('🐯 改变后的回调 🐯=====', topProcOptionList)
// if (clearFlag) {
// } else {}
let
localSurgicalOpts
=
options
[
0
][
LocalVariable
.
SELECTED_DATA_ARR
]
let
localSurgicalOpts
=
options
[
0
][
LocalVariable
.
SELECTED_DATA_ARR
]
let
localNailOpts
=
options
[
1
][
LocalVariable
.
SELECTED_DATA_ARR
]
let
localNailOpts
=
options
[
1
][
LocalVariable
.
SELECTED_DATA_ARR
]
let
localQuipmentOpts
=
options
[
2
][
LocalVariable
.
SELECTED_DATA_ARR
]
let
localQuipmentOpts
=
options
[
2
][
LocalVariable
.
SELECTED_DATA_ARR
]
...
@@ -551,7 +540,6 @@ class ChooseProductPage extends Component {
...
@@ -551,7 +540,6 @@ class ChooseProductPage extends Component {
}
}
})
})
// console.log('👌👌👌 改变后的回调 👌=====', topProcOptionList)
this
.
setState
({
this
.
setState
({
topProcOptionList
:
topProcOptionList
topProcOptionList
:
topProcOptionList
})
})
...
@@ -681,7 +669,6 @@ class ChooseProductPage extends Component {
...
@@ -681,7 +669,6 @@ class ChooseProductPage extends Component {
cardStyleItemTitAct
=
{
styles
.
cont_left_tit_act
}
cardStyleItemTitAct
=
{
styles
.
cont_left_tit_act
}
cardStyleNotIconTit
=
{
styles
.
cont_left_noicon
}
cardStyleNotIconTit
=
{
styles
.
cont_left_noicon
}
cardStyleItemIcon
=
{
styles
.
cont_left_img_box
}
cardStyleItemIcon
=
{
styles
.
cont_left_img_box
}
// cardListOptions={leftOptionList}
cardListOptions
=
{
curLeftOptions
}
cardListOptions
=
{
curLeftOptions
}
cardItemTitle
=
{
cur_title
}
cardItemTitle
=
{
cur_title
}
cardItemIcon
=
{
cur_icon
}
cardItemIcon
=
{
cur_icon
}
...
@@ -739,9 +726,6 @@ class ChooseProductPage extends Component {
...
@@ -739,9 +726,6 @@ class ChooseProductPage extends Component {
let
leftOptionList
=
top_item
.
leftOptionList
let
leftOptionList
=
top_item
.
leftOptionList
leftOptionList
.
map
(
left_item
=>
{
leftOptionList
.
map
(
left_item
=>
{
if
(
left_item
[
LocalVariable
.
SELECTED_QUQNTITY
]
>
0
)
{
if
(
left_item
[
LocalVariable
.
SELECTED_QUQNTITY
]
>
0
)
{
// console.log('left_item[LocalVariable.SELECTED_DATA_ARR]---', left_item[LocalVariable.SELECTED_DATA_ARR])
// console.log('left_item[LocalVariable.SELECTED_DATA_ARR]---', left_item[LocalVariable.SELECTED_QUQNTITY])
// console.log('left_item[LocalVariable.SELECTED_DATA_ARR]---', left_item)
let
cur_line_obj
=
{
let
cur_line_obj
=
{
supplier_code
:
top_item
.
supplier_code
,
supplier_code
:
top_item
.
supplier_code
,
supplier_name
:
top_item
.
supplier_name
,
supplier_name
:
top_item
.
supplier_name
,
...
@@ -760,7 +744,6 @@ class ChooseProductPage extends Component {
...
@@ -760,7 +744,6 @@ class ChooseProductPage extends Component {
break
break
}
}
}
}
// console.log('cur_sel_options---', cur_sel_options)
if
(
!
localNotSign
)
{
if
(
!
localNotSign
)
{
// 耗材
// 耗材
cur_line_obj
.
category_code
=
cur_sel_options
[
cur_sel_options
.
length
-
1
].
category_code
cur_line_obj
.
category_code
=
cur_sel_options
[
cur_sel_options
.
length
-
1
].
category_code
...
@@ -774,107 +757,16 @@ class ChooseProductPage extends Component {
...
@@ -774,107 +757,16 @@ class ChooseProductPage extends Component {
})
})
}
}
cur_sel_options
[
cur_sel_options
.
length
-
1
][
LocalVariable
.
SELECTED_DATA_ARR
].
push
(
cur_line_obj
)
cur_sel_options
[
cur_sel_options
.
length
-
1
][
LocalVariable
.
SELECTED_DATA_ARR
].
push
(
cur_line_obj
)
// let cur_has_sign = []
// cur_has_sign = cur_sel_options[cur_sel_options.length - 1][LocalVariable.SELECTED_DATA_ARR].filter(filt_obj => filt_obj.supplier_code === cur_line_obj.supplier_code)
// console.log('🏠==cur_has_sign===',cur_has_sign)
// if (cur_has_sign.length > 0) {
// cur_sel_options[cur_sel_options.length - 1][LocalVariable.SELECTED_DATA_ARR].forEach(function (sel_arr) {
// if (sel_arr.supplier_code === cur_line_obj.supplier_code) {
// sel_arr[LocalVariable.SELECTED_QUQNTITY] += cur_line_obj[LocalVariable.SELECTED_QUQNTITY]
// let has_line_sign = []
// let hasDetails = false
// let hasItemCode = false
// let curHasInd = []
// has_line_sign = sel_arr[LocalVariable.CHILDREN_LINE_NAME].filter((line_item, line_ind) => {
// if (line_item.details) {
// // if (line_item.details && line_item.category_code === cur_line_obj[LocalVariable.CHILDREN_LINE_NAME][0].category_code) {
// let cur_fil_arr = cur_line_obj[LocalVariable.CHILDREN_LINE_NAME].filter(fi_obj => fi_obj.category_code === line_item.category_code)
// if(cur_fil_arr && cur_fil_arr.length > 0){
// hasDetails = true
// curHasInd.push(line_ind)
// return line_item
// }
// // hasDetails = true
// // curHasInd.push(line_ind)
// // return line_item
// } else if(!line_item.details){
// // } else if(!line_item.details && line_item.item_code === cur_line_obj[LocalVariable.CHILDREN_LINE_NAME][0].item_code){
// let cur_fil_arr = cur_line_obj[LocalVariable.CHILDREN_LINE_NAME].filter(fi_obj => fi_obj.item_code === line_item.item_code)
// if(cur_fil_arr && cur_fil_arr.length > 0){
// hasItemCode = true
// curHasInd.push(line_ind)
// return line_item
// }
// // hasItemCode = true
// // curHasInd.push(line_ind)
// // return line_item
// }
// })
// if (has_line_sign.length === 0) {
// // console.log('add➕🏠=====',has_line_sign, has_line_sign.length)
// // console.log('add➕🏠=====',sel_arr[LocalVariable.CHILDREN_LINE_NAME])
// // console.log('add➕🏠=====',cur_line_obj.supplier_name,cur_line_obj[LocalVariable.CHILDREN_LINE_NAME])
// sel_arr[LocalVariable.CHILDREN_LINE_NAME].push(...cur_line_obj[LocalVariable.CHILDREN_LINE_NAME])
// }
// else {
// // console.log('add➕🏠=====',curHasInd)
// // console.log('add➕🏠=====',hasDetails)
// // console.log('add➕🏠=====',hasItemCode)
// // let deIndArr = []
// // sel_arr[LocalVariable.CHILDREN_LINE_NAME].forEach((ch_line, ch_ind) => {
// // if(hasDetails && ch_line){
// // }
// // })
// // if(hasDetails || hasItemCode){
// // for(let i of curHasInd){
// // sel_arr[LocalVariable.CHILDREN_LINE_NAME].splice(i, 1)
// // }
// // sel_arr[LocalVariable.CHILDREN_LINE_NAME].push(...cur_line_obj[LocalVariable.CHILDREN_LINE_NAME])
// // // sel_arr[LocalVariable.CHILDREN_LINE_NAME].splice(curHasInd, 1)
// // // sel_arr[LocalVariable.CHILDREN_LINE_NAME].push(...cur_line_obj[LocalVariable.CHILDREN_LINE_NAME])
// // // sel_arr[LocalVariable.CHILDREN_LINE_NAME][curHasInd] = cur_line_obj[LocalVariable.CHILDREN_LINE_NAME]
// // }
// }
// // console.log('🏠=====',has_line_sign)
// // console.log('🏠=====',cur_line_obj)
// // console.log('🏠=====',sel_arr)
// }
// })
// } else {
// cur_sel_options[cur_sel_options.length - 1][LocalVariable.SELECTED_DATA_ARR].push(cur_line_obj)
// }
}
}
}
}
})
})
}
}
})
})
// console.log('传递🚢======', topProcOptionList)
// console.log('传递🚢======', topActiveIndex)
// console.log('传递🚢======', cur_sel_options)
// console.log('传递🚢======', cur_sel_options[cur_sel_options.length - 1][LocalVariable.SELECTED_DATA_ARR])
let
cur_hc_arr
=
[],
cur_obj
=
{}
let
cur_hc_arr
=
[],
cur_obj
=
{}
cur_hc_arr
=
cloneObject
(
cur_hc_opts
)
cur_hc_arr
=
cloneObject
(
cur_hc_opts
)
if
(
cur_sel_options
[
cur_sel_options
.
length
-
1
][
LocalVariable
.
SELECTED_DATA_ARR
].
length
>
0
)
{
if
(
cur_sel_options
[
cur_sel_options
.
length
-
1
][
LocalVariable
.
SELECTED_DATA_ARR
].
length
>
0
)
{
cur_sel_options
[
cur_sel_options
.
length
-
1
][
LocalVariable
.
SELECTED_DATA_ARR
].
forEach
((
hc_item
,
hc_ind
)
=>
{
cur_sel_options
[
cur_sel_options
.
length
-
1
][
LocalVariable
.
SELECTED_DATA_ARR
].
forEach
((
hc_item
,
hc_ind
)
=>
{
// console.log('if===', cur_obj)
// console.log('if===', cur_hc_arr)
let
curHasSup
=
cur_hc_arr
.
filter
(
su_obj
=>
su_obj
.
supplier_code
===
hc_item
.
supplier_code
)
let
curHasSup
=
cur_hc_arr
.
filter
(
su_obj
=>
su_obj
.
supplier_code
===
hc_item
.
supplier_code
)
if
(
curHasSup
.
length
===
0
){
if
(
curHasSup
.
length
===
0
){
cur_hc_arr
.
push
(
hc_item
)
cur_hc_arr
.
push
(
hc_item
)
...
@@ -902,11 +794,8 @@ class ChooseProductPage extends Component {
...
@@ -902,11 +794,8 @@ class ChooseProductPage extends Component {
})
})
cur_sel_options
[
cur_sel_options
.
length
-
1
][
LocalVariable
.
SELECTED_DATA_ARR
]
=
cur_hc_arr
cur_sel_options
[
cur_sel_options
.
length
-
1
][
LocalVariable
.
SELECTED_DATA_ARR
]
=
cur_hc_arr
}
}
// console.log('传递🚢======', cur_hc_arr)
}
}
return
(
return
(
<
View
style
=
{
list_common_item
.
sub_box
}
>
<
View
style
=
{
list_common_item
.
sub_box
}
>
<
View
style
=
{
list_common_item
.
sub_two_btn
}
>
<
View
style
=
{
list_common_item
.
sub_two_btn
}
>
...
@@ -955,6 +844,7 @@ class ChooseProductPage extends Component {
...
@@ -955,6 +844,7 @@ class ChooseProductPage extends Component {
render
()
{
render
()
{
let
{
navigation
}
=
this
.
props
let
{
navigation
}
=
this
.
props
let
{
title
}
=
navigation
.
state
.
params
let
{
title
}
=
navigation
.
state
.
params
let
{
topProcOptionList
}
=
this
.
state
return
(
return
(
<
View
style
=
{
styles
.
choo_container
}
>
<
View
style
=
{
styles
.
choo_container
}
>
<
StatusBarView
<
StatusBarView
...
@@ -966,8 +856,8 @@ class ChooseProductPage extends Component {
...
@@ -966,8 +856,8 @@ class ChooseProductPage extends Component {
<
HeadBackItem
title
=
{
title
}
navigation
=
{
navigation
}
callback
=
{()
=>
this
.
handleGoBack
()}
/
>
<
HeadBackItem
title
=
{
title
}
navigation
=
{
navigation
}
callback
=
{()
=>
this
.
handleGoBack
()}
/
>
<
View
style
=
{
styles
.
choo_main
}
>
<
View
style
=
{
styles
.
choo_main
}
>
{
/* {this.renderSearchItem()} */
}
{
/* {this.renderSearchItem()} */
}
{
t
his
.
renderTopProItem
()
}
{
t
opProcOptionList
&&
topProcOptionList
.
length
>
0
?
this
.
renderTopProItem
()
:
null
}
{
t
his
.
renderContItem
()
}
{
t
opProcOptionList
&&
topProcOptionList
.
length
>
0
?
this
.
renderContItem
()
:
null
}
<
/View
>
<
/View
>
{
this
.
renderFooterBtnItem
()}
{
this
.
renderFooterBtnItem
()}
<
/SafeAreaView
>
<
/SafeAreaView
>
...
...
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