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
9ea2b23d
authored
Dec 22, 2020
by
Denglingling
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
新增“暂无数据”、默认展示的“无图”、以及对接一部分自助下单接口
parent
ab9a7841
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
189 additions
and
171 deletions
app/action/SelfAction.js
app/containers/common/CellTextStyle.js
app/containers/common/ProductModel.js
app/containers/common/listDataComponent/ChooseCardList.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/selfOrder/module/EditThirdLevelPage.js
app/containers/selfOrder/module/ProductRightStyle.js
app/containers/selfOrder/module/mock/inter_mock.js
app/action/SelfAction.js
View file @
9ea2b23d
...
...
@@ -167,7 +167,7 @@ function requestListDataing() {
}
}
function
requestListDataSuccess
(
data
)
{
export
function
requestListDataSuccess
(
data
)
{
return
{
type
:
SELF_ORDER_LIST_SUCCESS
,
rawData
:
data
...
...
@@ -223,36 +223,36 @@ export function requestSelfSumbit({access_token, ...params}) {
// 选择产品-供应商信息查询接口
export
const
reqPurSupplierSearch
=
async
(
global_domain_config
,
params
)
=>
{
return
local_inter_mock
.
inter_1
//
return local_inter_mock.inter_1
return
await
GetRequest
(
global_domain_config
,
getUrlParams
(
'/order/pur_supplier/search'
,
params
))
}
// 选择产品-产品信息分类查询接口
export
const
reqProCategorySearch
=
async
(
global_domain_config
,
params
)
=>
{
return
local_inter_mock
.
inter_2
//
return local_inter_mock.inter_2
return
await
GetRequest
(
global_domain_config
,
getUrlParams
(
'/order/item/search'
,
params
))
}
// 选择产品-手术模板头查询接口
export
const
reqSurTempHeadSearch
=
async
(
global_domain_config
,
params
)
=>
{
return
local_inter_mock
.
inter_3
//
return local_inter_mock.inter_3
return
await
GetRequest
(
global_domain_config
,
getUrlParams
(
'/surgery/template_header/search'
,
params
))
}
// 选择产品-手术模板行查询接口
export
const
reqSurTempLineSearch
=
async
(
global_domain_config
,
params
)
=>
{
return
local_inter_mock
.
inter_4
//
return local_inter_mock.inter_4
return
await
GetRequest
(
global_domain_config
,
getUrlParams
(
'/surgery/template_line/search'
,
params
))
}
// 选择产品-螺钉盒(器械包)头查询接口
export
const
reqNailEquipHeadSearch
=
async
(
global_domain_config
,
params
)
=>
{
if
(
params
.
category_code
===
'1301'
){
return
local_inter_mock
.
inter_5
}
else
{
return
local_inter_mock
.
inter_55
}
return
await
GetRequest
(
global_domain_config
,
getUrlParams
(
'/inventory/item_package/search'
,
params
))
//
if(params.category_code === '1301'){
//
return local_inter_mock.inter_5
//
}else {
//
return local_inter_mock.inter_55
//
}
return
await
GetRequest
(
global_domain_config
,
getUrlParams
(
'/inventory/item_package
_header
/search'
,
params
))
}
...
...
@@ -272,7 +272,7 @@ export const reqEquipPackageLineSearch = async (global_domain_config, params) =>
// 选择产品-零散器械查询接口
export
const
reqScatEquipmentSearch
=
async
(
global_domain_config
,
params
)
=>
{
return
local_inter_mock
.
inter_8
//
return local_inter_mock.inter_8
return
await
GetRequest
(
global_domain_config
,
getUrlParams
(
'/order/tool/search'
,
params
))
}
...
...
app/containers/common/CellTextStyle.js
View file @
9ea2b23d
...
...
@@ -14,7 +14,8 @@ import {
second_text_size
,
font_family_semibold
,
font_family_regular
,
second_text_color
second_text_color
,
pxSize
}
from
'../../base/BaseStyle'
;
// 星号
...
...
@@ -61,6 +62,15 @@ export function FooterBtnStyle({style, textStyle, title, activeOpacity, ...props
)
}
// 暂无数据
export
function
PicListNoData
({
style
,
textStyle
,
...
props
}){
return
(
<
View
style
=
{[
styles
.
list_no_data
,
style
]}
{...
props
}
>
<
Text
style
=
{[
styles
.
list_no_txt
,
textStyle
]}
>
暂无数据
<
/Text
>
<
/View
>
)
}
const
styles
=
StyleSheet
.
create
({
asterisk_text
:
{
color
:
'#FF0000'
,
...
...
@@ -114,5 +124,23 @@ const styles = StyleSheet.create({
color
:
title_text_color
,
fontSize
:
16
,
fontFamily
:
font_family_semibold
},
list_no_data
:
{
flexDirection
:
'row'
,
justifyContent
:
'center'
,
alignItems
:
'center'
,
paddingTop
:
16
,
paddingBottom
:
12
,
borderBottomWidth
:
1
,
borderColor
:
'rgba(241, 241, 241, 0.87)'
,
marginBottom
:
10
,
paddingHorizontal
:
10
,
paddingVertical
:
6
,
backgroundColor
:
foundation_color
,
height
:
pxSize
(
80
)
},
list_no_txt
:
{
fontSize
:
second_text_size
,
color
:
second_text_color
}
})
\ No newline at end of file
app/containers/common/ProductModel.js
View file @
9ea2b23d
...
...
@@ -555,7 +555,7 @@ class ProductModel extends Component {
curTit
=
'superTit'
curTipOne
=
'superTip'
}
else
if
(
topActiveIndex
===
1
||
topActiveIndex
===
2
||
topActiveIndex
===
3
){
curTit
=
'
general
_name'
curTit
=
'
item
_name'
curTipOne
=
'specification'
curTipTwo
=
'item_code'
curTipOneTit
=
'规格型号'
...
...
@@ -601,6 +601,8 @@ class ProductModel extends Component {
titText
=
{
curTit
}
tipTextOne
=
{
curTipOne
}
tipTextTwo
=
{
curTipTwo
}
tipTextOneTit
=
{
curTipOneTit
}
tipTextTwoTit
=
{
curTipTwoTit
}
// listImgIcon={'superImg'}
listPicType
=
{
'SQUARE'
}
listStyleImg
=
{
styles
.
list_icon
}
...
...
@@ -629,7 +631,7 @@ class ProductModel extends Component {
sel_tip
+=
`
${
proItem
.
category_name
}
x
${
proItem
[
SELECTED_QUQNTITY
]}
`
}
})
//
console.log('弹窗===', topProcOptionList, sel_tip)
console
.
log
(
'弹窗==='
,
topProcOptionList
,
sel_tip
)
return
(
<
View
style
=
{
list_common_item
.
sub_box
}
>
<
View
style
=
{
list_common_item
.
sub_two_btn
}
>
...
...
app/containers/common/listDataComponent/ChooseCardList.js
View file @
9ea2b23d
...
...
@@ -30,34 +30,17 @@ class ChooseCardList extends Component {
cardItemTitle
:
PropTypes
.
string
,
cardItemIcon
:
PropTypes
.
string
,
cardImgName
:
PropTypes
.
string
,
cardItemName
:
PropTypes
.
string
,
cardCallBack
:
PropTypes
.
func
,
curActIndex
:
PropTypes
.
number
,
// 当前已选项index
cardIsCount
:
PropTypes
.
bool
,
// 显示计数
cardCountName
:
PropTypes
.
string
,
// 显示计数字段
cardStyleType
:
PropTypes
.
string
,
// 计数可选样式
cardCouStyle
:
PropTypes
.
object
,
// 指定计数样式
cardShowDefIcon
:
PropTypes
.
bool
,
// 是否显示默认无图
// cardCountArray: PropTypes.array, // 已选数组
// cardListOptions: [
// {
// cardItemTitle: '螺钉盒',
// cardImgName: ['xxx','xxx'],
// cardItemName: [{
// title: '',
// iconImg: '',
// tip1:'',
// tip2:'',
// quantity: 0
// }]
// }
// ]
}
constructor
(
props
)
{
...
...
@@ -69,9 +52,9 @@ class ChooseCardList extends Component {
}
render
()
{
let
{
cardScrollEnabled
,
cardHorizontal
,
cardShowsHorizontalScrollIndicator
,
cardShowsVerticalScrollIndicator
,
cardStyleBox
,
cardStyleScroll
,
cardListOptions
,
cardItemTitle
,
cardItemIcon
,
cardImgName
,
cardItemName
,
cardStyleListItem
,
cardStyleListItemAct
,
cardStyleItemIcon
,
cardStyleItemTit
,
cardStyleNotIconTit
,
cardStyleItemTitAct
,
cardCallBack
,
curActIndex
,
card
IsCount
,
cardCountName
,
cardStyleCount
,
cardStyleType
,
cardCouStyle
,
global_domain_config
}
=
this
.
props
let
{
cardScrollEnabled
,
cardHorizontal
,
cardShowsHorizontalScrollIndicator
,
cardShowsVerticalScrollIndicator
,
cardStyleBox
,
cardStyleScroll
,
cardListOptions
,
cardItemTitle
,
cardItemIcon
,
cardImgName
,
cardStyleListItem
,
cardStyleListItemAct
,
cardStyleItemIcon
,
cardStyleItemTit
,
cardStyleNotIconTit
,
cardStyleItemTitAct
,
cardCallBack
,
curActIndex
,
card
CountName
,
cardStyleType
,
cardCouStyle
,
global_domain_config
,
cardShowDefIcon
}
=
this
.
props
let
{
countStyleType
}
=
this
.
state
...
...
@@ -89,8 +72,15 @@ class ChooseCardList extends Component {
>
{
cardListOptions
.
map
((
item
,
index
)
=>
{
if
(
typeof
item
[
cardItemIcon
]
===
'string'
){
global_domain_config
=
'https://obs-dev.gyjtsx.com'
// 本地测试 ======= 正式需要隐藏
item
[
cardItemIcon
]
=
{
uri
:
global_domain_config
+
item
[
cardItemIcon
]}
// global_domain_config = 'https://obs-dev.gyjtsx.com' // 本地测试
// item[cardItemIcon] = {uri: global_domain_config+item[cardItemIcon]} // 测试
item
[
cardItemIcon
]
=
{
uri
:
global_domain_config
+
'/jeecg-boot/sys/common/view/'
+
item
[
cardItemIcon
]}
// 正式
}
else
if
(
item
[
cardItemIcon
]
instanceof
Array
)
{
// global_domain_config = 'https://obs-dev.gyjtsx.com' // 本地测试
// item[cardItemIcon] = {uri: global_domain_config+item[cardItemIcon][0]} // 测试
item
[
cardItemIcon
]
=
{
uri
:
global_domain_config
+
'/jeecg-boot/sys/common/view/'
+
item
[
cardItemIcon
][
0
]}
// 正式
}
return
<
View
style
=
{
styles
.
card_list_box
}
>
<
TouchableOpacity
...
...
@@ -100,7 +90,13 @@ class ChooseCardList extends Component {
>
<
View
style
=
{[
styles
.
list_item_inner
,
cardStyleListItem
,
index
==
curActIndex
?
[
styles
.
list_inner_act
,
cardStyleListItemAct
]
:
''
]}
>
{
item
[
cardItemIcon
]
?
<
View
style
=
{[
styles
.
item_icon_def
,
cardStyleItemIcon
]}
>
<
Image
source
=
{
item
[
cardItemIcon
]}
style
=
{
icon_style
}
/
>
{
cardShowDefIcon
?
<
Image
defaultSource
=
{
require
(
'../../../images/not_img.png'
)}
source
=
{
item
[
cardItemIcon
]}
style
=
{
icon_style
}
/> : <Image source={item
[
cardItemIcon
]
} style={icon_style}/
>
}
<
/View> : null
}
<
Text
numberOfLines
=
{
2
}
style
=
{[
styles
.
list_item_tit
,
cardStyleItemTit
,
item
[
cardItemIcon
]
?
''
:
cardStyleNotIconTit
,
index
==
curActIndex
?
[
styles
.
list_tit_act
,
cardStyleItemTitAct
]
:
''
]}
>
{
item
[
cardItemTitle
]}
...
...
app/containers/common/listDataComponent/PicTitDetaiCalcu.js
View file @
9ea2b23d
...
...
@@ -38,6 +38,7 @@ class PicTitDetaiCalcu extends Component {
onlyShowNum
:
PropTypes
.
bool
,
// 只展示数字
onlyShowSelect
:
PropTypes
.
bool
,
// 只能单选
listMaxNum
:
PropTypes
.
number
,
// 数量限制最大值
listShowNoData
:
PropTypes
.
bool
,
// 展示暂无数据
}
constructor
(
props
)
{
...
...
@@ -93,8 +94,10 @@ class PicTitDetaiCalcu extends Component {
render
()
{
let
{
listItem
,
listIndex
,
calField
,
listStyleBox
,
listStyleTit
,
listStyleTip
,
listStyleCalBtn
,
listPicType
,
titCallBack
,
titText
,
tipTextStr
,
tipTextOne
,
tipTextTwo
,
listImgIcon
,
listStyleImg
,
showClearIcon
,
showClearIndex
,
listCardActIndex
,
listStyleClearBtn
,
clearCallBack
,
onlyShowNum
,
onlyShowSelect
,
tipTextStrTit
,
tipTextOneTit
,
tipTextTwoTit
,
global_domain_config
,
listMaxNum
}
=
this
.
props
listStyleClearBtn
,
clearCallBack
,
onlyShowNum
,
onlyShowSelect
,
tipTextStrTit
,
tipTextOneTit
,
tipTextTwoTit
,
global_domain_config
,
listMaxNum
,
listShowNoData
}
=
this
.
props
let
{
listPicTypeArr
,
picStyleArr
}
=
this
.
state
let
picOthStyle
=
''
if
(
listPicTypeArr
.
indexOf
(
listPicType
)
>
-
1
)
{
picOthStyle
=
picStyleArr
[
listPicTypeArr
.
indexOf
(
listPicType
)]
...
...
@@ -109,27 +112,30 @@ class PicTitDetaiCalcu extends Component {
defSelIcon
=
require
(
'../../../images/radio_yes.png'
)
}
let
showPlusIcon
=
true
if
(
listMaxNum
&&
listItem
[
calField
]
===
listMaxNum
)
{
if
(
listMaxNum
&&
listItem
[
calField
]
===
listMaxNum
)
{
showPlusIcon
=
false
}
let
cur_photos
=
[]
if
(
listItem
[
listImgIcon
]
instanceof
Array
)
{
global_domain_config
=
'https://obs.uat.sfrx.guke.tech'
// 本地测试
if
(
listItem
[
listImgIcon
]
instanceof
Array
)
{
//
global_domain_config = 'https://obs.uat.sfrx.guke.tech' // 本地测试
listItem
[
listImgIcon
].
map
((
iconIt
)
=>
{
cur_photos
.
push
({
url
:
global_domain_config
+
iconIt
})
// cur_photos.push({ url: global_domain_config + iconIt}) // 测试
cur_photos
.
push
({
url
:
global_domain_config
+
'/jeecg-boot/sys/common/view/'
+
iconIt
})
// 正式
})
}
// console.log('每一列----',
listItem[listImgIcon], listItem[listImgIcon] instanceof Array
)
// console.log('每一列----',
cur_photos
)
return
(
<
View
>
{
listShowNoData
?
<
Text
>
暂无数据
<
/Text>
:
<
View
style
=
{[
styles
.
ri_inner
,
listStyleBox
]}
>
{
/* { listImgIcon ?
<View style={[styles.oth_img_box, styles[picOthStyle], listStyleImg]}>
<Image style={icon_style} source={listItem[listImgIcon]}/>
</View> : null } */
}
{
(
listImgIcon
&&
cur_photos
.
length
>
0
)
?
{
(
listImgIcon
&&
cur_photos
.
length
>
0
)
?
<
PictureZoom
listImageIndex
=
{
0
}
listImageUrls
=
{
cur_photos
}
...
...
@@ -208,57 +214,8 @@ class PicTitDetaiCalcu extends Component {
<
/View
>
}
<
/View
>
// <View>
// { curListArr.map((curListItem, curListIndex) => {
// <View style={[styles.ri_inner, listStyleBox]}>
// { listImgIcon ?
// <View style={[styles.oth_img_box, styles[picOthStyle], listStyleImg]}>
// <Image style={icon_style} source={curListItem.imgIcon}/>
// </View> : null }
// <View style={styles.ri_text_box}>
// <TouchableOpacity
// activeOpacity={.8}
// onPress={() => {titCallBack ? titCallBack(curListItem, listIndex) : {}}}
// style={styles.oth_box}
// >
// <Text numberOfLines={1} style={[styles.thr_ot, listStyleTit]}>
// { curListItem[titText] }
// </Text>
// </TouchableOpacity>
// { curListItem[tipTextStr] ? <Text numberOfLines={1} style={[styles.ri_te_ot, styles.te_ot_str, listStyleTip]}>{curListItem[tipTextStr]}</Text> : null }
// { curListItem[tipTextOne] ? <Text numberOfLines={1} style={[styles.ri_te_ot, listStyleTip]}>{curListItem[tipTextOne]}</Text> : null }
// { curListItem[tipTextTwo] ? <Text numberOfLines={1} style={[styles.ri_te_ot, listStyleTip]}>{curListItem[tipTextTwo]}</Text> : null }
// </View>
// <View style={styles.ri_num_box}>
// { curListItem[calField] !== 0 ?
// <TouchableOpacity
// activeOpacity={.9}
// style={[styles.btn_inner, listStyleCalBtn]}
// onPress={() => this.handelCalculation(curListItem, listIndex)}
// >
// <View style={[styles.thr_num_btn, styles.thr_btn_left]}>
// <Image source={require('../../../images/less_icon_big.png')} style={icon_style}></Image>
// </View>
// </TouchableOpacity> : null }
// { curListItem[calField] !== 0 ? <Text style={styles.thr_num}>{ curListItem[calField] }</Text> : null}
// <TouchableOpacity
// activeOpacity={.9}
// style={[styles.btn_inner, listStyleCalBtn]}
// onPress={() => this.handelCalculation(curListItem, listIndex, true)}
// >
// <View style={[styles.thr_num_btn, styles.thr_btn_right]}>
// <Image source={calIcon} style={icon_style}></Image>
// </View>
// </TouchableOpacity>
// </View>
// </View>
// })
// }
// </View>
}
<
/View
>
);
}
}
...
...
app/containers/common/listDataComponent/PictureZoom.js
View file @
9ea2b23d
...
...
@@ -78,7 +78,8 @@ class PictureZoom extends Component {
<
Image
defaultSource
=
{
require
(
'../../../images/not_img.png'
)}
source
=
{{
uri
:
listImageUrls
[
listImageIndex
].
url
}}
style
=
{
icon_style
}
/
>
style
=
{
icon_style
}
resizeMode
=
"cover"
/>
<
/TouchableOpacity
>
<
Modal
visible
=
{
picZoomIsShow
}
...
...
app/containers/selfOrder/SelfOrderPage.js
View file @
9ea2b23d
...
...
@@ -1195,6 +1195,7 @@ class SelfOrderPage extends Component {
// 选择产品 点击跳转
handleProductCheck
()
{
if
(
this
.
judgeOrgIsNull
()){
let
{
listOptionData
}
=
this
.
state
this
.
props
.
navigation
.
navigate
(
'ChooseProductPage'
,
{
title
:
`选择产品`
,
...
...
@@ -1203,6 +1204,7 @@ class SelfOrderPage extends Component {
}
})
}
}
// 选择产品 回调
productCallBack
(
params
)
{
...
...
app/containers/selfOrder/module/ChooseProductPage.js
View file @
9ea2b23d
...
...
@@ -121,6 +121,9 @@ class ChooseProductPage extends Component {
topProcOptionList
.
forEach
(
function
(
topObj
)
{
topObj
[
'selectedQuantity'
]
=
0
topObj
[
'leftOptionList'
]
=
[]
if
(
!
topObj
[
'supplier_short_name'
]){
topObj
.
supplier_short_name
=
topObj
.
supplier_name
.
substring
(
0
,
3
)
}
})
that
.
setState
({
topProcOptionList
...
...
@@ -138,15 +141,16 @@ class ChooseProductPage extends Component {
console
.
log
(
'top产品--'
,
topItem
,
topIndex
)
let
that
=
this
let
{
token
,
global_domain_config
}
=
that
.
props
let
{
topProcOptionList
,
defalutLeftItem
}
=
this
.
state
that
.
refs
.
LoadingModel
.
show
()
let
params
=
{
access_token
:
token
,
manufacturer_code
:
topItem
.
supplier_code
,
}
console
.
log
(
'params===='
,
params
)
let
pro_scate_search
=
await
reqProCategorySearch
(
global_domain_config
,
params
)
console
.
log
(
'res_2 : '
,
pro_scate_search
)
if
(
pro_scate_search
.
error_code
===
0
)
{
let
{
topProcOptionList
,
defalutLeftItem
}
=
this
.
state
if
(
topItem
[
SELECTED_QUQNTITY
]
===
0
)
{
let
{
data
}
=
pro_scate_search
...
...
@@ -167,6 +171,13 @@ class ChooseProductPage extends Component {
})
}
else
{
topItem
.
leftOptionList
=
defalutLeftItem
topProcOptionList
[
topIndex
]
=
topItem
that
.
setState
({
topActiveIndex
:
topIndex
,
topProcOptionList
:
topProcOptionList
})
that
.
showRrrorTip
(
pro_scate_search
)
}
...
...
@@ -205,16 +216,17 @@ class ChooseProductPage extends Component {
let
params
=
{
access_token
:
token
,
org_code
:
cur_org_code
,
seller_code
:
userInfo
.
user_name
,
//
seller_code: userInfo.user_name,
manufacturer_code
:
topItem
.
supplier_code
,
}
console
.
log
(
'params-'
,
params
)
let
sur_head_search
=
await
reqSurTempHeadSearch
(
global_domain_config
,
params
)
console
.
log
(
'res_3 : '
,
sur_head_search
)
if
(
sur_head_search
.
error_code
===
0
)
{
// // if(leftItem[SELECTED_QUQNTITY] === 0){
// let { data } = sur_head_search
// leftItem.localSecondData = cloneObject(data.surgery_template)
// leftItem.localSecondData = cloneObject(data.surgery_template
_headers
)
// leftItem['localSecondData'].forEach(function (righDa) {
// if (!righDa['quantity']) {
// righDa['quantity'] = 0
...
...
@@ -224,7 +236,7 @@ class ChooseProductPage extends Component {
// })
// topProcOptionList[topActiveIndex].leftOptionList[leftIndex] = cloneObject(leftItem)
topProcOptionList
[
topActiveIndex
].
leftOptionList
[
leftIndex
]
=
that
.
getInitLocalSecondData
(
leftItem
,
sur_head_search
.
data
.
surgery_template
)
topProcOptionList
[
topActiveIndex
].
leftOptionList
[
leftIndex
]
=
that
.
getInitLocalSecondData
(
leftItem
,
sur_head_search
.
data
.
surgery_template
_headers
)
// }
that
.
setState
({
...
...
@@ -245,9 +257,11 @@ class ChooseProductPage extends Component {
}
let
params
=
{
access_token
:
token
,
category_set
:
'INVENTORY'
,
// category_set: 'INVENTORY',
manufacturer_code
:
topItem
.
supplier_code
,
category_code
:
cur_category_code
,
}
console
.
log
(
'params='
,
params
)
let
nail_equip_head_search
=
await
reqNailEquipHeadSearch
(
global_domain_config
,
params
)
console
.
log
(
'res_3 : '
,
nail_equip_head_search
)
if
(
nail_equip_head_search
.
error_code
===
0
)
{
...
...
@@ -328,11 +342,12 @@ class ChooseProductPage extends Component {
leftItem
.
localSecondData
=
cloneObject
(
data
)
leftItem
[
'localSecondData'
].
forEach
(
function
(
righDa
)
{
righDa
[
CHILDREN_LINE_NAME
]
=
[]
if
(
!
righDa
[
'quantity'
])
{
// if (!righDa['quantity']) {
// righDa['quantity'] = 0
// } else {
// righDa['quantity'] = Number(righDa['quantity'])
// }
righDa
[
'quantity'
]
=
0
}
else
{
righDa
[
'quantity'
]
=
Number
(
righDa
[
'quantity'
])
}
})
topProcOptionList
[
topActiveIndex
].
leftOptionList
[
leftIndex
]
=
cloneObject
(
leftItem
)
// }
...
...
@@ -350,11 +365,12 @@ class ChooseProductPage extends Component {
leftItem
.
localSecondData
=
cloneObject
(
data
.
details
)
leftItem
[
'localSecondData'
].
forEach
(
function
(
righDa
)
{
righDa
[
'onlyTwoLevels'
]
=
true
if
(
!
righDa
[
'quantity'
])
{
// if (!righDa['quantity']) {
// righDa['quantity'] = 0
// } else {
// righDa['quantity'] = Number(righDa['quantity'])
// }
righDa
[
'quantity'
]
=
0
}
else
{
righDa
[
'quantity'
]
=
Number
(
righDa
[
'quantity'
])
}
})
topProcOptionList
[
topActiveIndex
].
leftOptionList
[
leftIndex
]
=
cloneObject
(
leftItem
)
// }
...
...
@@ -387,11 +403,13 @@ class ChooseProductPage extends Component {
}
leftItem
.
localSecondData
=
cloneObject
(
resDa
)
leftItem
[
'localSecondData'
].
forEach
(
function
(
righDa
)
{
if
(
!
righDa
[
'quantity'
])
{
// if (!righDa['quantity']) {
// righDa['quantity'] = 0
// } else {
// righDa['quantity'] = Number(righDa['quantity'])
// }
// 默认为0
righDa
[
'quantity'
]
=
0
}
else
{
righDa
[
'quantity'
]
=
Number
(
righDa
[
'quantity'
])
}
})
return
cloneObject
(
leftItem
)
}
...
...
@@ -718,6 +736,7 @@ class ChooseProductPage extends Component {
cardCountName
=
{
SELECTED_QUQNTITY
}
cardStyleType
=
{
'GRAPHICS'
}
cardCouStyle
=
{
styles
.
top_cot_num
}
cardShowDefIcon
=
{
true
}
/
>
)
}
...
...
app/containers/selfOrder/module/EditThirdLevelPage.js
View file @
9ea2b23d
import
React
,
{
Component
}
from
'react'
;
import
{
View
,
StyleSheet
,
SafeAreaView
,
ScrollView
,
FlatList
}
from
'react-native'
;
import
{
View
,
StyleSheet
,
SafeAreaView
,
ScrollView
,
FlatList
,
Text
}
from
'react-native'
;
import
{
connect
}
from
'react-redux'
;
import
HeadBackItem
from
'../../common/HeadBackItem'
;
import
{
home_background_color
,
foundation_color
,
promary_color
,
third_text_color
,
first_text_color
,
second_text_size
,
Width
,
pxSize
,
safe_view
,
font_family_semibold
,
font_family_light
}
from
'../../../base/BaseStyle'
;
import
{
home_background_color
,
foundation_color
,
promary_color
,
third_text_color
,
first_text_color
,
second_text_size
,
Width
,
pxSize
,
safe_view
,
font_family_semibold
,
font_family_light
,
second_text_color
,
placehold_text_color
,
promary_shadow_color
}
from
'../../../base/BaseStyle'
;
import
{
FooterBtnStyle
FooterBtnStyle
,
PicListNoData
}
from
'../../common/CellTextStyle'
;
import
StatusBarView
from
'../../common/StatusBarView'
;
import
ChooseCardList
from
'../../common/listDataComponent/ChooseCardList'
;
...
...
@@ -160,8 +160,10 @@ class EditThirdLevelPage extends Component {
}
else
if
(
leftIndex
===
2
)
{
let
params
=
{
access_token
:
token
,
nail_box_code
:
superItem
.
item_code
,
nail_box_serial_number
:
superItem
.
serial_number
,
inv_code
:
superItem
.
inv_code
,
item_code
:
superItem
.
item_code
,
start_index
:
1
,
limit
:
1000
}
let
equip_line_search
=
await
reqEquipPackageLineSearch
(
global_domain_config
,
params
)
console
.
log
(
'res_line_1 : '
,
equip_line_search
)
...
...
@@ -364,13 +366,15 @@ class EditThirdLevelPage extends Component {
style
=
{
styles
.
edit_scroll_cont
}
showsVerticalScrollIndicator
=
{
false
}
>
{
localThridContData
.
length
>
0
?
<
FlatList
style
=
{
styles
.
edit_list
}
keyExtractor
=
{
item
=>
item
.
id
}
data
=
{
localThridContData
}
extraData
=
{
this
.
state
}
renderItem
=
{({
item
,
index
})
=>
this
.
renderContColumnItem
(
item
,
index
)}
/
>
/> : <PicListNoData /
>
}
<
/ScrollView
>
{
this
.
renderLodingItem
()
}
...
...
@@ -406,13 +410,13 @@ class EditThirdLevelPage extends Component {
// // curImgIcon = ''
// }
curTit
=
'
general
_name'
curTipStr
=
'
specification
'
curTipOne
=
'
item_name
'
curTipTwo
=
'
category_desc
'
curTipStrTit
=
'
规格型号
'
curTipOneTit
=
'
物料名称
'
curTipTwoTit
=
'
描述
'
curTit
=
'
item
_name'
curTipStr
=
'
item_code
'
curTipOne
=
'
specification
'
curTipTwo
=
'
general_name
'
curTipStrTit
=
'
物料代码
'
curTipOneTit
=
'
规格型号
'
curTipTwoTit
=
'
通用名称
'
curCalField
=
'quantity'
curImgIcon
=
'photos'
...
...
app/containers/selfOrder/module/ProductRightStyle.js
View file @
9ea2b23d
...
...
@@ -7,6 +7,7 @@ import { cloneObject } from '../../../utils/Utils';
import
_
from
"lodash"
;
import
{
connect
}
from
'react-redux'
;
import
localMockData
from
'./mock/sen_mock'
;
import
{
PicListNoData
}
from
'../../common/CellTextStyle'
;
const
PropTypes
=
require
(
'prop-types'
);
const
QUANTITY_FIELD
=
'quantity'
// 计算的字段
...
...
@@ -124,16 +125,16 @@ class ProductRightStyle extends Component {
// console.log('本地测试,获取接口数据--', rightSecondData)
// console.log('本地测试,获取接口数据--', superLeftData)
if
(
curData
.
details
&&
curData
.
details
.
length
>
0
)
{
if
(
curData
.
details
&&
curData
.
details
.
length
>
0
)
{
let
sumCount
=
0
curData
[
QUANTITY_FIELD
]
=
0
// 初始化
curData
.
details
.
forEach
(
function
(
line_val
)
{
curData
.
details
.
forEach
(
function
(
line_val
)
{
if
(
!
line_val
[
QUANTITY_FIELD
])
{
line_val
[
QUANTITY_FIELD
]
=
0
}
if
(
isPlus
)
{
if
(
isPlus
)
{
line_val
[
QUANTITY_FIELD
]
+=
1
}
else
if
(
line_val
[
QUANTITY_FIELD
]
>
0
)
{
}
else
if
(
line_val
[
QUANTITY_FIELD
]
>
0
)
{
line_val
[
QUANTITY_FIELD
]
-=
1
}
sumCount
+=
line_val
[
QUANTITY_FIELD
]
...
...
@@ -327,7 +328,7 @@ class ProductRightStyle extends Component {
// 修改当前小类是否展示
changeThrShow
(
show
,
superItem
,
superIndex
)
{
let
{
curThridObj
,
rowSingleData
}
=
this
.
state
let
{
leftIndex
}
=
this
.
props
let
{
leftIndex
}
=
this
.
props
let
that
=
this
// console.log('修改当前小类是否展示----', show, superItem, superIndex)
// console.log('修改当前小类是否展示----', rowSingleData)
...
...
@@ -356,15 +357,15 @@ class ProductRightStyle extends Component {
rowSingleData
:
curRowData
})
}
else
{
}
else
{
// 小类点击标题
if
(
curThridObj
.
superItem
)
{
if
(
curThridObj
.
superItem
)
{
let
curDa
=
curThridObj
.
superItem
let
curInd
=
curThridObj
.
superIndex
curDa
.
details
=
cloneObject
(
rowSingleData
)
curDa
[
QUANTITY_FIELD
]
=
0
curDa
.
details
.
forEach
(
itVal
=>
{
if
(
itVal
[
QUANTITY_FIELD
]
>
0
)
{
if
(
itVal
[
QUANTITY_FIELD
]
>
0
)
{
curDa
[
QUANTITY_FIELD
]
+=
itVal
[
QUANTITY_FIELD
]
}
})
...
...
@@ -415,23 +416,23 @@ class ProductRightStyle extends Component {
renderSecondtem
(
item
,
index
)
{
let
{
leftIndex
}
=
this
.
props
let
curTitCallBack
=
''
,
curPlusCallBack
=
''
,
curReduceCallBack
=
''
let
curTit
=
''
,
curTipOne
=
''
,
curTipTwo
=
''
,
curTipOneTit
=
''
,
curTipTwoTit
=
''
,
curIcon
=
''
let
curTit
=
''
,
curTipStr
=
''
,
curTipOne
=
''
,
curTipTwo
=
''
,
curTipStrTit
=
''
,
curTipOneTit
=
''
,
curTipTwoTit
=
''
,
curIcon
=
''
let
curListMaxNum
=
''
if
(
leftIndex
===
0
)
{
if
(
leftIndex
===
0
)
{
curTit
=
'template_name'
curTipOne
=
'surgery_type_name'
curTipTwo
=
'template_number'
curTipOneTit
=
'手术类型'
curTipTwoTit
=
'模板号'
curIcon
=
'photos'
}
else
if
(
leftIndex
===
1
||
leftIndex
===
2
||
leftIndex
===
3
){
curTit
=
'general_name'
curTipOneTit
=
'手术类型'
curTipTwoTit
=
'模板号'
curIcon
=
'photos'
}
else
if
(
leftIndex
===
1
||
leftIndex
===
2
||
leftIndex
===
3
)
{
curTit
=
'item_name'
curTipStr
=
'item_code'
curTipOne
=
'specification'
curTipTwo
=
'item_code'
curTipOneTit
=
'规格型号'
curTipTwoTit
=
'物料代码'
curIcon
=
'photos'
}
else
{
curTipStrTit
=
'物料代码'
curTipOneTit
=
'规格型号'
curIcon
=
'photos'
}
else
{
// curTit = 'title'
// curTipOne = 'tip1'
// curTipTwo = 'tip2'
...
...
@@ -476,15 +477,17 @@ class ProductRightStyle extends Component {
subCalCallBack
=
{(
item
,
index
)
=>
this
.
handleCalCallBack
(
item
,
index
,
'rightSecondData'
,
QUANTITY_FIELD
)}
titCallBack
=
{
curTitCallBack
}
titText
=
{
curTit
}
tipTextStr
=
{
curTipStr
}
tipTextOne
=
{
curTipOne
}
tipTextTwo
=
{
curTipTwo
}
tipTextStrTit
=
{
curTipStrTit
}
tipTextOneTit
=
{
curTipOneTit
}
tipTextTwoTit
=
{
curTipTwoTit
}
listImgIcon
=
{
curIcon
}
listPicType
=
{
'SQUARE'
}
plusCallBack
=
{
curPlusCallBack
}
reduceCallBack
=
{
curReduceCallBack
}
listMaxNum
=
{
curListMaxNum
}
listMaxNum
=
{
curListMaxNum
}
/
>
<
/SafeAreaView
>
)
...
...
@@ -492,15 +495,20 @@ class ProductRightStyle extends Component {
// 返回右侧元素(单选耗材以上)
renderStencilStyle
()
{
let
{
rightSecondData
}
=
this
.
state
return
(
<
View
style
=
{
styles
.
stencil_cont
}
>
{
rightSecondData
.
length
>
0
?
<
FlatList
style
=
{
styles
.
cont_right_list
}
keyExtractor
=
{
item
=>
item
.
id
}
data
=
{
this
.
state
.
rightSecondData
}
data
=
{
rightSecondData
}
extraData
=
{
this
.
state
}
renderItem
=
{({
item
,
index
})
=>
this
.
renderSecondtem
(
item
,
index
)}
/
>
/> : <PicListNoData /
>
}
<
/View
>
)
}
...
...
@@ -543,23 +551,23 @@ class ProductRightStyle extends Component {
// 单选耗材 -- 大类每一列
renderOtherListItem
(
item
,
index
)
{
let
curTit
=
''
,
curTipOne
=
''
,
curTipTwo
=
''
,
curTipOneTit
=
''
,
curTipTwoTit
=
''
,
curIcon
=
''
let
curSubCalCallBack
=
''
,
curTitCallBack
=
''
,
curPlusCallBack
=
''
,
curReduceCallBack
=
''
if
(
item
[
ONLY_TWO_LEVELS
])
{
let
curTit
=
''
,
curTipOne
=
''
,
curTipTwo
=
''
,
curTipOneTit
=
''
,
curTipTwoTit
=
''
,
curIcon
=
''
let
curSubCalCallBack
=
''
,
curTitCallBack
=
''
,
curPlusCallBack
=
''
,
curReduceCallBack
=
''
if
(
item
[
ONLY_TWO_LEVELS
])
{
// 两级
curTit
=
'general_name'
curTipOne
=
'item_code'
curTipOneTit
=
'物料代码'
curIcon
=
'photos'
}
else
{
curTit
=
'general_name'
curTipOne
=
'item_code'
curTipOneTit
=
'物料代码'
curIcon
=
'photos'
}
else
{
// 三级
curTit
=
'category_name'
curTipOne
=
'category_code'
curTipOneTit
=
'分类编码'
curTit
=
'category_name'
curTipOne
=
'category_code'
curTipOneTit
=
'分类编码'
// curSubCalCallBack= ''
curTitCallBack
=
(
item
,
index
)
=>
this
.
TitleClickEvent
(
item
,
index
)
curPlusCallBack
=
(
item
,
index
)
=>
this
.
handleAllPlusReduce
(
item
,
index
,
true
)
curReduceCallBack
=
(
item
,
index
)
=>
this
.
handleAllPlusReduce
(
item
,
index
)
curTitCallBack
=
(
item
,
index
)
=>
this
.
TitleClickEvent
(
item
,
index
)
curPlusCallBack
=
(
item
,
index
)
=>
this
.
handleAllPlusReduce
(
item
,
index
,
true
)
curReduceCallBack
=
(
item
,
index
)
=>
this
.
handleAllPlusReduce
(
item
,
index
)
}
// console.log('大类===', item)
...
...
app/containers/selfOrder/module/mock/inter_mock.js
View file @
9ea2b23d
const
local_photos
=
[
'
/jeecg-boot/sys/common/view/
files/20200731/%E5%BE%AE%E4%BF%A1%E5%9B%BE%E7%89%87_20200731113857_1596166761793_1596184849964.jpg'
,
'
/jeecg-boot/sys/common/view/
files/20200921/5_1599645385381_1600672374371.jpg'
,
'
/jeecg-boot/sys/common/view/
files/20200921/4_1599645381425_1600672375091.jpg'
,
'
/jeecg-boot/sys/common/view/
files/20200921/3_1599645381259_1600672375488.jpg'
]
const
local_photos
=
[
'files/20200731/%E5%BE%AE%E4%BF%A1%E5%9B%BE%E7%89%87_20200731113857_1596166761793_1596184849964.jpg'
,
'files/20200921/5_1599645385381_1600672374371.jpg'
,
'files/20200921/4_1599645381425_1600672375091.jpg'
,
'files/20200921/3_1599645381259_1600672375488.jpg'
]
// 选择产品-供应商信息查询接口
const
inter_1
=
{
...
...
@@ -85,7 +85,7 @@ const inter_3 = {
"error_msg"
:
"成功"
,
"data"
:
{
//手术模板
"surgery_template"
:
[
"surgery_template
_headers
"
:
[
{
"org_id"
:
""
,
"template_number"
:
"ST20200924001"
,
...
...
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