Commit 74ee86e9 by Denglingling

调整自助下单-选择产品模块(本地模拟数据,以及部分交互)

parent ce9edb33
...@@ -354,59 +354,81 @@ class ProductModel extends Component { ...@@ -354,59 +354,81 @@ class ProductModel extends Component {
// 修改列表计算后数据 // 修改列表计算后数据
handleCalCallBack(item, index){ handleCalCallBack(item, index){
// console.log('回调=====', item, index) console.log('回调=====', item, index)
let {topProcOptionList, topActiveIndex} = this.state let {topProcOptionList, topActiveIndex} = this.state
let defauIndex = index let defauIndex = index
// SUB_LINE_NAME = 'childrenLineData' // 测试 item.superIndex // SUB_LINE_NAME = 'childrenLineData' // 测试 item.superIndex
defauIndex = item.superIndex defauIndex = item.superIndex
// console.log('--当前已选数据 ===',topProcOptionList, topActiveIndex) console.log('--当前已选数据 ===',topProcOptionList, topActiveIndex)
if(SELECTED_DATA_ARR && topProcOptionList[topActiveIndex][SELECTED_DATA_ARR]) { if(SELECTED_DATA_ARR && topProcOptionList[topActiveIndex][SELECTED_DATA_ARR]) {
let allCountQuantity = 0 // 初始化 let allCountQuantity = 0 // 初始化
topProcOptionList.map(function(listItem, listIndex) { topProcOptionList.map(function(listItem, listIndex) {
if(listIndex === topActiveIndex){ if(listIndex === topActiveIndex){
let deleFlag = false
let deleInd = null if(topActiveIndex === 1 || topActiveIndex === 3 || topActiveIndex === 2){
// 初始化 三级 //钉盒 零散器械
listItem[SELECTED_DATA_ARR][defauIndex][DEFAULT_QUANTITY] = 0 //初始化 中类
listItem[SELECTED_DATA_ARR][defauIndex]['childrenLineData'].forEach(function(chIt, chInd) { let deleFlag = false
if(_.isEqual(chIt, item)){ let deleInd = null
chIt = item listItem[SELECTED_QUQNTITY] = 0
if(chIt[DEFAULT_QUANTITY] === 0){ listItem[SELECTED_DATA_ARR].forEach(function(seDa, seInd) {
if(!seDa[DEFAULT_QUANTITY]){
seDa[DEFAULT_QUANTITY] = 0
}
if(seDa[DEFAULT_QUANTITY] === 0){
deleFlag = true deleFlag = true
deleInd = chInd deleInd = seInd
} }
listItem[SELECTED_QUQNTITY] += Number(seDa[DEFAULT_QUANTITY])
})
if(deleFlag) {
listItem[SELECTED_DATA_ARR].splice(deleInd, 1)
} }
if(!chIt[DEFAULT_QUANTITY]){ }else {
chIt[DEFAULT_QUANTITY] = 0 let deleFlag = false
} let deleInd = null
listItem[SELECTED_DATA_ARR][defauIndex][DEFAULT_QUANTITY] += Number(chIt[DEFAULT_QUANTITY]) // 初始化 三级
}) listItem[SELECTED_DATA_ARR][defauIndex][DEFAULT_QUANTITY] = 0
if(deleFlag) { listItem[SELECTED_DATA_ARR][defauIndex]['childrenLineData'].forEach(function(chIt, chInd) {
listItem[SELECTED_DATA_ARR][defauIndex]['childrenLineData'].splice(deleInd, 1) if(_.isEqual(chIt, item)){
} chIt = item
// 初始化 中类 if(chIt[DEFAULT_QUANTITY] === 0){
listItem[SELECTED_QUQNTITY] = 0 deleFlag = true
listItem[SELECTED_DATA_ARR].forEach(function(seDa) { deleInd = chInd
if(!seDa[DEFAULT_QUANTITY]){
seDa[DEFAULT_QUANTITY] = 0
}
listItem[SELECTED_QUQNTITY] += Number(seDa[DEFAULT_QUANTITY])
})
// 已选数量赋值之前默认数据
let curObj = listItem[SELECTED_DATA_ARR][defauIndex]
// console.log('curObj----', curObj)
if(listIndex < 4){
if(curObj.id){
listItem[DEFAULT_SECOND_DATA].forEach(function(deIt) {
if(deIt.id === curObj.id){ // 本地测试'id'为唯一值
deIt = curObj
} }
}) }
if(!chIt[DEFAULT_QUANTITY]){
chIt[DEFAULT_QUANTITY] = 0
}
listItem[SELECTED_DATA_ARR][defauIndex][DEFAULT_QUANTITY] += Number(chIt[DEFAULT_QUANTITY])
})
if(deleFlag) {
listItem[SELECTED_DATA_ARR][defauIndex]['childrenLineData'].splice(deleInd, 1)
}
// 初始化 中类
listItem[SELECTED_QUQNTITY] = 0
listItem[SELECTED_DATA_ARR].forEach(function(seDa) {
if(!seDa[DEFAULT_QUANTITY]){
seDa[DEFAULT_QUANTITY] = 0
}
listItem[SELECTED_QUQNTITY] += Number(seDa[DEFAULT_QUANTITY])
})
// 已选数量赋值之前默认数据
let curObj = listItem[SELECTED_DATA_ARR][defauIndex]
// console.log('curObj----', curObj)
if(listIndex < 4){
if(curObj.id){
listItem[DEFAULT_SECOND_DATA].forEach(function(deIt) {
if(deIt.id === curObj.id){ // 本地测试'id'为唯一值
deIt = curObj
}
})
}
} }
} }
} }
if(!listItem[SELECTED_QUQNTITY]){ if(!listItem[SELECTED_QUQNTITY]){
listItem[SELECTED_QUQNTITY] = 0 listItem[SELECTED_QUQNTITY] = 0
...@@ -492,12 +514,17 @@ class ProductModel extends Component { ...@@ -492,12 +514,17 @@ class ProductModel extends Component {
renderContItem() { renderContItem() {
let {topProcOptionList, topActiveIndex} = this.state let {topProcOptionList, topActiveIndex} = this.state
let curData = topProcOptionList[topActiveIndex] let curData = topProcOptionList[topActiveIndex]
// console.log('已选展示信息 === curData---', topProcOptionList, topActiveIndex, curData) // console.log('已选展示信息 === curData---', topProcOptionList)
// console.log('已选展示信息 === curData---', topActiveIndex)
// console.log('已选展示信息 === curData---', curData)
let localBottomContData = [] let localBottomContData = []
if(curData && curData[SELECTED_DATA_ARR]){ if(curData && curData[SELECTED_DATA_ARR]){
// localBottomContData = curData[SELECTED_DATA_ARR] // localBottomContData = curData[SELECTED_DATA_ARR]
curData[SELECTED_DATA_ARR].forEach(function(sedItem) { curData[SELECTED_DATA_ARR].forEach(function(sedItem) {
if(sedItem[CHILD_DATA_NAME]){ if(topActiveIndex === 1 || topActiveIndex === 2 || topActiveIndex === 3){
//钉盒 零散器械
localBottomContData.push(sedItem)
}else if(sedItem[CHILD_DATA_NAME]){
localBottomContData.push(...sedItem[CHILD_DATA_NAME]) localBottomContData.push(...sedItem[CHILD_DATA_NAME])
} }
}) })
...@@ -525,6 +552,20 @@ class ProductModel extends Component { ...@@ -525,6 +552,20 @@ class ProductModel extends Component {
// 返回每一列元素 // 返回每一列元素
renderContColumnItem(item, index) { renderContColumnItem(item, index) {
let {topActiveIndex} = this.state let {topActiveIndex} = this.state
let curTitText='', curTipTextOne='', curTipTextTwo=''
if(topActiveIndex === 1 || topActiveIndex === 2 || topActiveIndex === 3){
//钉盒 零散器械
curTitText = 'title'
curTipTextOne = 'tip1'
curTipTextTwo = 'tip2'
if(topActiveIndex === 2){
curTipTextOne = 'lineTip'
curTipTextTwo = ''
}
}else {
curTitText = 'superTit'
curTipTextOne = 'superTip'
}
return ( return (
<TouchableOpacity <TouchableOpacity
activeOpacity={1} activeOpacity={1}
...@@ -535,8 +576,9 @@ class ProductModel extends Component { ...@@ -535,8 +576,9 @@ class ProductModel extends Component {
listIndex={index} listIndex={index}
calField={DEFAULT_QUANTITY} calField={DEFAULT_QUANTITY}
subCalCallBack={(item,index) => this.handleCalCallBack(item,index)} subCalCallBack={(item,index) => this.handleCalCallBack(item,index)}
titText={'superTit'} titText={curTitText}
tipTextOne={'superTip'} tipTextOne={curTipTextOne}
tipTextTwo={curTipTextTwo}
// listImgIcon={'superImg'} // listImgIcon={'superImg'}
listPicType={'SQUARE'} listPicType={'SQUARE'}
listStyleImg={styles.list_icon} listStyleImg={styles.list_icon}
...@@ -607,7 +649,7 @@ class ProductModel extends Component { ...@@ -607,7 +649,7 @@ class ProductModel extends Component {
onRequestClose={() => this.closeModal()}> onRequestClose={() => this.closeModal()}>
<SafeAreaView style={safe_view}> <SafeAreaView style={safe_view}>
<TouchableOpacity style={styles.container} activeOpacity={1} <TouchableOpacity style={styles.container} activeOpacity={1}
// onPress={() => this.closeModal()} onPress={() => this.closeModal()}
> >
{this.renderDialog()} {this.renderDialog()}
</TouchableOpacity> </TouchableOpacity>
...@@ -642,7 +684,7 @@ const styles = StyleSheet.create({ ...@@ -642,7 +684,7 @@ const styles = StyleSheet.create({
backgroundColor: '#ffffff', backgroundColor: '#ffffff',
borderTopLeftRadius: 12, borderTopLeftRadius: 12,
borderTopRightRadius: 12, borderTopRightRadius: 12,
height: pxHeight(580), height: pxHeight(680),
// maxHeight: pxHeight(580), // maxHeight: pxHeight(580),
// minHeight: pxHeight(360) // minHeight: pxHeight(360)
}, },
......
...@@ -38,7 +38,8 @@ class ChooseCardList extends Component { ...@@ -38,7 +38,8 @@ class ChooseCardList extends Component {
cardCountName: PropTypes.string, // 显示计数字段 cardCountName: PropTypes.string, // 显示计数字段
cardStyleType: PropTypes.object, // 计数样式 cardStyleType: PropTypes.string, // 计数可选样式
cardCouStyle: PropTypes.object, // 指定计数样式
// cardCountArray: PropTypes.array, // 已选数组 // cardCountArray: PropTypes.array, // 已选数组
...@@ -78,15 +79,13 @@ class ChooseCardList extends Component { ...@@ -78,15 +79,13 @@ class ChooseCardList extends Component {
render() { render() {
let {cardScrollEnabled, cardHorizontal, cardShowsHorizontalScrollIndicator, cardShowsVerticalScrollIndicator, cardStyleBox, cardStyleScroll, cardListOptions, cardItemTitle, cardItemIcon, cardImgName, cardItemName, let {cardScrollEnabled, cardHorizontal, cardShowsHorizontalScrollIndicator, cardShowsVerticalScrollIndicator, cardStyleBox, cardStyleScroll, cardListOptions, cardItemTitle, cardItemIcon, cardImgName, cardItemName,
cardStyleListItem, cardStyleListItemAct, cardStyleItemIcon, cardStyleItemTit, cardStyleNotIconTit, cardStyleItemTitAct, cardCallBack, curActIndex, cardIsCount, cardCountName, cardStyleCount, cardStyleType, ...props} = this.props cardStyleListItem, cardStyleListItemAct, cardStyleItemIcon, cardStyleItemTit, cardStyleNotIconTit, cardStyleItemTitAct, cardCallBack, curActIndex, cardIsCount, cardCountName, cardStyleCount, cardStyleType, cardCouStyle, ...props} = this.props
let {countStyleType} = this.state let {countStyleType} = this.state
let localTestImageUrls = localMockData.localTestImageUrls // 本地测试数据 let localTestImageUrls = localMockData.localTestImageUrls // 本地测试数据
cardListOptions[cardImgName] = localTestImageUrls // 本地测试 cardListOptions[cardImgName] = localTestImageUrls // 本地测试
return ( return (
<View style={[styles.card_container, cardStyleBox]}> <View style={[styles.card_container, cardStyleBox]}>
<ScrollView <ScrollView
...@@ -96,8 +95,11 @@ class ChooseCardList extends Component { ...@@ -96,8 +95,11 @@ class ChooseCardList extends Component {
showsVerticalScrollIndicator={!!cardShowsVerticalScrollIndicator} showsVerticalScrollIndicator={!!cardShowsVerticalScrollIndicator}
style={[styles.card_scroll_box,cardStyleScroll]} style={[styles.card_scroll_box,cardStyleScroll]}
> >
{ cardListOptions.map((item, index) => { cardListOptions.map((item, index) => {
<View style={styles.card_list_box}> if(typeof item[cardItemIcon] === 'string'){
item[cardItemIcon] = {uri: item[cardItemIcon]}
}
return <View style={styles.card_list_box}>
<TouchableOpacity <TouchableOpacity
activeOpacity={.8} activeOpacity={.8}
style={styles.list_touch_cont} style={styles.list_touch_cont}
...@@ -109,15 +111,16 @@ class ChooseCardList extends Component { ...@@ -109,15 +111,16 @@ class ChooseCardList extends Component {
</View> : null } </View> : null }
<Text numberOfLines={2} style={[styles.list_item_tit, cardStyleItemTit, item[cardItemIcon] ? '' : cardStyleNotIconTit, index == curActIndex ? [styles.list_tit_act, cardStyleItemTitAct] : '']}> <Text numberOfLines={2} style={[styles.list_item_tit, cardStyleItemTit, item[cardItemIcon] ? '' : cardStyleNotIconTit, index == curActIndex ? [styles.list_tit_act, cardStyleItemTitAct] : '']}>
{item[cardItemTitle]} {item[cardItemTitle]}
{ (item[cardCountName] && countStyleType[0] === cardStyleType) ? <Text style={styles.sum_def}>({item[cardCountName]})</Text> : null } { (item[cardCountName] && countStyleType[0] === cardStyleType) ? <Text style={[styles.sum_def, cardCouStyle]}>({item[cardCountName]})</Text> : null }
</Text> </Text>
</View> </View>
</TouchableOpacity> </TouchableOpacity>
{ (item[cardCountName] && countStyleType[1] === cardStyleType) ? <View style={styles.card_def_count}> { (item[cardCountName] && countStyleType[1] === cardStyleType) ? <View style={[styles.card_def_count, cardCouStyle]}>
<Text style={styles.def_count_txt}>{item[cardCountName]}</Text> <Text style={styles.def_count_txt}>{item[cardCountName]}</Text>
</View> : null} </View> : null}
</View> </View>
)
})
} }
</ScrollView> </ScrollView>
...@@ -142,7 +145,8 @@ const styles = StyleSheet.create({ ...@@ -142,7 +145,8 @@ const styles = StyleSheet.create({
marginRight: 14, marginRight: 14,
borderBottomWidth: 4, borderBottomWidth: 4,
borderBottomColor: home_background_color, borderBottomColor: home_background_color,
minWidth: 60 minWidth: 60,
maxWidth: 80
}, },
list_inner_act: { list_inner_act: {
borderBottomWidth: 2, borderBottomWidth: 2,
......
...@@ -34,6 +34,8 @@ class PicTitDetaiCalcu extends Component { ...@@ -34,6 +34,8 @@ class PicTitDetaiCalcu extends Component {
listCardActIndex: PropTypes.number, // 父级index = 展示index listCardActIndex: PropTypes.number, // 父级index = 展示index
listStyleClearBtn: PropTypes.object, listStyleClearBtn: PropTypes.object,
clearCallBack: PropTypes.func, // 清空图标回调函数 clearCallBack: PropTypes.func, // 清空图标回调函数
onlyShowNum: PropTypes.bool, // 只展示数字
onlyShowSelect: PropTypes.bool, // 只能单选
} }
constructor(props) { constructor(props) {
...@@ -48,6 +50,12 @@ class PicTitDetaiCalcu extends Component { ...@@ -48,6 +50,12 @@ class PicTitDetaiCalcu extends Component {
// handelClearCheck(item, index) { // handelClearCheck(item, index) {
// reduceCallBack(item, index) // reduceCallBack(item, index)
// } // }
// 单选点击
handelSelectCheck(item, index){
item.select = !!!item.select
this.props.subCalCallBack(item, index)
}
/** /**
* 点击加减 * 点击加减
...@@ -82,7 +90,8 @@ class PicTitDetaiCalcu extends Component { ...@@ -82,7 +90,8 @@ class PicTitDetaiCalcu extends Component {
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, listImgIcon, listStyleImg, showClearIcon, showClearIndex, listCardActIndex, listStyleClearBtn, clearCallBack} = this.props titText, tipTextStr, tipTextOne, tipTextTwo, listImgIcon, listStyleImg, showClearIcon, showClearIndex, listCardActIndex,
listStyleClearBtn, clearCallBack, onlyShowNum, onlyShowSelect, tipTextStrTit, tipTextOneTit, tipTextTwoTit} = this.props
let {listPicTypeArr, picStyleArr} = this.state let {listPicTypeArr, picStyleArr} = this.state
let picOthStyle = '' let picOthStyle = ''
if(listPicTypeArr.indexOf(listPicType) > -1){ if(listPicTypeArr.indexOf(listPicType) > -1){
...@@ -93,8 +102,13 @@ class PicTitDetaiCalcu extends Component { ...@@ -93,8 +102,13 @@ class PicTitDetaiCalcu extends Component {
if(!valIsZero) { if(!valIsZero) {
calIcon = require('../../../images/plur_big_act.png') calIcon = require('../../../images/plur_big_act.png')
} }
let defSelIcon = require('../../../images/radio_no.png')
if(onlyShowSelect && listItem.select){
defSelIcon = require('../../../images/radio_yes.png')
}
console.log('每一列----',listItem[listImgIcon], listItem[listImgIcon] instanceof Array) // console.log('每一列----',listItem[listImgIcon], listItem[listImgIcon] instanceof Array)
return ( return (
...@@ -164,7 +178,7 @@ class PicTitDetaiCalcu extends Component { ...@@ -164,7 +178,7 @@ class PicTitDetaiCalcu extends Component {
</View> : null } </View> : null }
<View style={styles.ri_text_box}> <View style={styles.ri_text_box}>
<TouchableOpacity <TouchableOpacity
activeOpacity={.8} activeOpacity={titCallBack ? .8 : 1}
onPress={() => {titCallBack ? titCallBack(listItem, listIndex) : {}}} onPress={() => {titCallBack ? titCallBack(listItem, listIndex) : {}}}
style={styles.oth_box} style={styles.oth_box}
> >
...@@ -188,8 +202,9 @@ class PicTitDetaiCalcu extends Component { ...@@ -188,8 +202,9 @@ class PicTitDetaiCalcu extends Component {
<Image source={require('../../../images/close_icon.png')} style={icon_style}></Image> <Image source={require('../../../images/close_icon.png')} style={icon_style}></Image>
</View> </View>
</TouchableOpacity> </TouchableOpacity>
</View> : <View style={styles.ri_num_box}> </View> :
{ listItem[calField] !== 0 ? <View style={[styles.ri_num_box, onlyShowNum ? styles.show_num_box : null]}>
{ (listItem[calField] !== 0 && !onlyShowNum && !onlyShowSelect) ?
<TouchableOpacity <TouchableOpacity
activeOpacity={.9} activeOpacity={.9}
style={[styles.btn_inner, listStyleCalBtn]} style={[styles.btn_inner, listStyleCalBtn]}
...@@ -199,8 +214,8 @@ class PicTitDetaiCalcu extends Component { ...@@ -199,8 +214,8 @@ class PicTitDetaiCalcu extends Component {
<Image source={require('../../../images/less_icon_big.png')} style={icon_style}></Image> <Image source={require('../../../images/less_icon_big.png')} style={icon_style}></Image>
</View> </View>
</TouchableOpacity> : null } </TouchableOpacity> : null }
{ listItem[calField] !== 0 ? <Text style={styles.thr_num}>{ listItem[calField] }</Text> : null} { (listItem[calField] !== 0 && !onlyShowSelect) ? <Text style={[styles.thr_num, onlyShowNum ? styles.show_num : null]}>{ listItem[calField] }</Text> : null}
<TouchableOpacity { (!onlyShowNum && !onlyShowSelect) ? <TouchableOpacity
activeOpacity={.9} activeOpacity={.9}
style={[styles.btn_inner, listStyleCalBtn]} style={[styles.btn_inner, listStyleCalBtn]}
onPress={() => this.handelCalculation(listItem, listIndex, true)} onPress={() => this.handelCalculation(listItem, listIndex, true)}
...@@ -208,9 +223,19 @@ class PicTitDetaiCalcu extends Component { ...@@ -208,9 +223,19 @@ class PicTitDetaiCalcu extends Component {
<View style={[styles.thr_num_btn, styles.thr_btn_right]}> <View style={[styles.thr_num_btn, styles.thr_btn_right]}>
<Image source={calIcon} style={icon_style}></Image> <Image source={calIcon} style={icon_style}></Image>
</View> </View>
</TouchableOpacity> </TouchableOpacity> : null}
</View>
{ onlyShowSelect ? <TouchableOpacity
activeOpacity={.9}
style={[styles.btn_sel_inner]}
onPress={() => this.handelSelectCheck(listItem, listIndex)}
>
<View style={[styles.thr_sel_btn]}>
<Image source={defSelIcon} style={icon_style}></Image>
</View>
</TouchableOpacity> : null
}
</View>
} }
</View> </View>
...@@ -270,7 +295,12 @@ const styles = StyleSheet.create({ ...@@ -270,7 +295,12 @@ const styles = StyleSheet.create({
width: pxSize(24), width: pxSize(24),
height: pxSize(30) height: pxSize(30)
}, },
thr_sel_btn: {
width: pxSize(22),
height: pxSize(22)
},
btn_inner: {}, btn_inner: {},
btn_sel_inner:{},
btn_cle_box:{ btn_cle_box:{
marginRight: 6, marginRight: 6,
// backgroundColor: 'red', // backgroundColor: 'red',
...@@ -290,6 +320,9 @@ const styles = StyleSheet.create({ ...@@ -290,6 +320,9 @@ const styles = StyleSheet.create({
marginLeft: 6, marginLeft: 6,
backgroundColor: home_background_color backgroundColor: home_background_color
}, },
show_num_box: {
backgroundColor: null
},
thr_btn_left: {}, thr_btn_left: {},
thr_btn_right: {}, thr_btn_right: {},
thr_num: { thr_num: {
...@@ -299,6 +332,9 @@ const styles = StyleSheet.create({ ...@@ -299,6 +332,9 @@ const styles = StyleSheet.create({
fontSize: 14, fontSize: 14,
color: first_text_color color: first_text_color
}, },
show_num: {
fontSize: 18
}
}) })
export default PicTitDetaiCalcu; export default PicTitDetaiCalcu;
\ No newline at end of file
...@@ -560,41 +560,72 @@ class EquipConsuPage extends Component { ...@@ -560,41 +560,72 @@ class EquipConsuPage extends Component {
handleCallBack(item, itemTitle) { handleCallBack(item, itemTitle) {
let { listOptionData} = this.state let { listOptionData} = this.state
let self = this let self = this
this.setState({ listOptionData.map(function(chItem, index){
currentItem: item, if(chItem.title === itemTitle) {
}) chItem.name = item.name
this.setState({ chItem.value = item.value
listOptionData: listOptionData.map((chItem, index) => { if(itemTitle === '组织') {
if(chItem.title === itemTitle) { self.clearInitNameAndValue(1)
chItem.name = item.name }
chItem.value = item.value if(itemTitle === '客户名称') {
if(itemTitle === '组织') { self.clearInitNameAndValue(2)
self.clearInitNameAndValue(1) }
} if (itemTitle === '主治医生') {
if(itemTitle === '客户名称') { if(item.name === '其他') {
self.clearInitNameAndValue(2) chItem.showInput = true
} } else {
if (itemTitle === '主治医生') { chItem.showInput = false
if(item.name === '其他') { chItem.inputValue = ''
chItem.showInput = true
} else {
chItem.showInput = false
chItem.inputValue = ''
}
self.clearInitNameAndValue(5)
}
if(itemTitle === '手术类型') {
self.clearInitNameAndValue(6)
} }
if (itemTitle === '手术模板') { self.clearInitNameAndValue(5)
listOptionData[10].value = item.desc
}
} }
return chItem if(itemTitle === '手术类型') {
}) self.clearInitNameAndValue(6)
}, () => { }
if (itemTitle === '手术模板') {
listOptionData[10].value = item.desc
}
}
})
this.setState({
currentItem: item,
listOptionData: listOptionData
},() => {
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()
// })
} }
// 关闭弹窗 // 关闭弹窗
...@@ -700,7 +731,7 @@ class EquipConsuPage extends Component { ...@@ -700,7 +731,7 @@ class EquipConsuPage extends Component {
} }
// 客户名称 点击 // 客户名称 点击
handleCustomerCheck() { handleCustomerCheck() {
let { state, props } = this let { state } = this
let self = this let self = this
if(this.judgeOrgIsNull()) { if(this.judgeOrgIsNull()) {
self.setState({ self.setState({
......
...@@ -67,9 +67,18 @@ class ChooseProductPage extends Component { ...@@ -67,9 +67,18 @@ class ChooseProductPage extends Component {
componentDidMount() { componentDidMount() {
// console.log('本地测试数据====localMockData===', localMockData) // console.log('本地测试数据====localMockData===', localMockData)
let {topProcOptionList} = this.state
topProcOptionList = cloneObject(localMockData.localTopProcOption)
topProcOptionList.forEach(function (topObj) {
topObj[SELECTED_QUQNTITY] = 0
topObj['leftOptionList'] = cloneObject(localMockData.localLeftOption)
})
// 赋值本地测试数据 // 赋值本地测试数据
this.setState({ this.setState({
topProcOptionList: cloneObject(localMockData.localTopProcOption), topProcOptionList: topProcOptionList,
leftOptionList: cloneObject(localMockData.localLeftOption) leftOptionList: cloneObject(localMockData.localLeftOption)
}) })
} }
...@@ -78,7 +87,8 @@ class ChooseProductPage extends Component { ...@@ -78,7 +87,8 @@ class ChooseProductPage extends Component {
handleTopNav(item, index) { handleTopNav(item, index) {
// console.log('top产品--',item, index) // console.log('top产品--',item, index)
this.setState({ this.setState({
topActiveIndex: index topActiveIndex: index,
// leftOptionList: cloneObject(localMockData.localLeftOption)
}) })
} }
...@@ -102,14 +112,19 @@ class ChooseProductPage extends Component { ...@@ -102,14 +112,19 @@ class ChooseProductPage extends Component {
// 计算三级回调函数 // 计算三级回调函数
handleChangeThird(childData, superIndex){ handleChangeThird(childData, superIndex){
let {leftActiveIndex, leftOptionList} = this.state let {leftActiveIndex, leftOptionList, topProcOptionList, topActiveIndex} = this.state
// console.log("计算三级的回调函数",childData, superIndex, leftActiveIndex) // console.log("计算三级的回调函数",childData, superIndex, leftActiveIndex)
// console.log(leftOptionList) // console.log(leftOptionList)
topProcOptionList[topActiveIndex].leftOptionList[leftActiveIndex][SELECTED_QUQNTITY] = 0
topProcOptionList[topActiveIndex].leftOptionList[leftActiveIndex][SELECTED_DATA_ARR] = []
// 初始化 // 初始化
leftOptionList[leftActiveIndex][SELECTED_QUQNTITY] = 0 leftOptionList[leftActiveIndex][SELECTED_QUQNTITY] = 0
leftOptionList[leftActiveIndex][SELECTED_DATA_ARR] = [] leftOptionList[leftActiveIndex][SELECTED_DATA_ARR] = []
let top_sel_sum = 0
leftOptionList.map(function(leItem, leIndex) { leftOptionList.map(function(leItem, leIndex) {
if(!leItem[SELECTED_QUQNTITY]){ if(!leItem[SELECTED_QUQNTITY]){
...@@ -159,17 +174,81 @@ class ChooseProductPage extends Component { ...@@ -159,17 +174,81 @@ class ChooseProductPage extends Component {
}) })
} }
} }
// top_sel_sum += leItem[SELECTED_QUQNTITY]
})
// topProcOptionList[topActiveIndex] = top_sel_sum
topProcOptionList[topActiveIndex].leftOptionList.map(function(leItem, leIndex) {
if(!leItem[SELECTED_QUQNTITY]){
leItem[SELECTED_QUQNTITY] = 0
}
if(!leItem[SELECTED_DATA_ARR]){
leItem[SELECTED_DATA_ARR] = []
}
if(leIndex === leftActiveIndex) {
if(leItem[DEFAULT_SECOND_DATA].length && leItem[DEFAULT_SECOND_DATA][superIndex] && childData.length){
let sumCount = 0
childData.map((chDa, chInd) => {
if(!chDa[DEFAULT_FIELD]){
chDa[DEFAULT_FIELD] = 0
}
sumCount += chDa[DEFAULT_FIELD]
})
let chDa = leItem[DEFAULT_SECOND_DATA][superIndex]
let curObj = {
superId: chDa['id'], // 本地测试
superIndex: superIndex, // 本地测试
superTit: leItem['title'], // 本地测试
superImg: chDa['imgIcon'], // 本地测试
superTip: `${chDa['title'] }x${sumCount}`, // 本地测试
curTitle: chDa['title'], // 本地测试
version: 0,
lineOptions: childData,
[DEFAULT_FIELD]: sumCount
}
// 初始化
leItem[DEFAULT_SECOND_DATA][superIndex][CHILD_DATA_NAME] = []
leItem[DEFAULT_SECOND_DATA][superIndex][CHILD_DATA_NAME].push(curObj)
leItem[DEFAULT_SECOND_DATA][superIndex][DEFAULT_FIELD] = sumCount
}
// 初始化
leItem[SELECTED_QUQNTITY] = 0
leItem[SELECTED_DATA_ARR] = []
if(leItem[DEFAULT_SECOND_DATA].length){ // 本地测试 localSecondData DEFAULT_SECOND_DATA
leItem[DEFAULT_SECOND_DATA].forEach(function(chItem) {
if(chItem[DEFAULT_FIELD] > 0){
leItem[SELECTED_QUQNTITY] += Number(chItem[DEFAULT_FIELD])
leItem[SELECTED_DATA_ARR].push(chItem)
}
})
}
}
// top_sel_sum += leItem[SELECTED_QUQNTITY]
}) })
// console.log('计算三级之后数据---', leftOptionList)
// console.log('计算三级之后数据---', topProcOptionList, top_sel_sum)
this.setState({ this.setState({
leftOptionList leftOptionList,
topProcOptionList
}) })
} }
// 计算中级数量回调 // 计算中级数量回调
handleChangeCount(count, coutFieName) { handleChangeCount(count, coutFieName) {
let {leftActiveIndex, leftOptionList, defaultThridShow} = this.state let {leftActiveIndex, leftOptionList, topProcOptionList, topActiveIndex,defaultThridShow} = this.state
// console.log('计算中级数量回调===', count, leftActiveIndex, defaultThridShow, coutFieName) // console.log('计算中级数量回调===', count, leftActiveIndex, defaultThridShow, coutFieName)
topProcOptionList[topActiveIndex].leftOptionList[leftActiveIndex][SELECTED_QUQNTITY] = 0
topProcOptionList[topActiveIndex].leftOptionList[leftActiveIndex][SELECTED_DATA_ARR] = []
leftOptionList[leftActiveIndex][SELECTED_QUQNTITY] = 0 leftOptionList[leftActiveIndex][SELECTED_QUQNTITY] = 0
leftOptionList[leftActiveIndex][SELECTED_DATA_ARR] = [] leftOptionList[leftActiveIndex][SELECTED_DATA_ARR] = []
...@@ -192,9 +271,30 @@ class ChooseProductPage extends Component { ...@@ -192,9 +271,30 @@ class ChooseProductPage extends Component {
} }
} }
}) })
topProcOptionList[topActiveIndex].leftOptionList.map(function(leItem, leIndex) {
if(!leItem[SELECTED_QUQNTITY]){
leItem[SELECTED_QUQNTITY] = 0
}
if(!leItem[SELECTED_DATA_ARR]){
leItem[SELECTED_DATA_ARR] = []
}
if(leIndex === leftActiveIndex) {
// 当前选择项
leItem[SELECTED_QUQNTITY] = count
if(leItem[DEFAULT_SECOND_DATA].length){ // 本地测试 localSecondData DEFAULT_SECOND_DATA
leItem[DEFAULT_SECOND_DATA].forEach(function(chItem) {
if(chItem[coutFieName]){
leItem[SELECTED_DATA_ARR].push(chItem)
}
})
}
}
})
// console.log('计算中级之后---', leftOptionList) // console.log('计算中级之后---', leftOptionList)
this.setState({ this.setState({
leftOptionList leftOptionList,
topProcOptionList
}) })
} }
...@@ -208,14 +308,19 @@ class ChooseProductPage extends Component { ...@@ -208,14 +308,19 @@ class ChooseProductPage extends Component {
// 计算所有已选数量 // 计算所有已选数量
getAllCountQuantity() { getAllCountQuantity() {
let {leftOptionList} = this.state let {leftOptionList, topProcOptionList, topActiveIndex} = this.state
let allCountQuantity = 0 let allCountQuantity = 0
leftOptionList.map(leItem => { if(!topProcOptionList.length){
return allCountQuantity
}
topProcOptionList[topActiveIndex].leftOptionList.map(leItem => {
// leftOptionList.map(leItem => {
if(!leItem[SELECTED_QUQNTITY]){ if(!leItem[SELECTED_QUQNTITY]){
leItem[SELECTED_QUQNTITY] = 0 leItem[SELECTED_QUQNTITY] = 0
} }
allCountQuantity += leItem[SELECTED_QUQNTITY] allCountQuantity += leItem[SELECTED_QUQNTITY]
}) })
console.log('allCountQuantity---', allCountQuantity)
return allCountQuantity return allCountQuantity
} }
...@@ -238,8 +343,11 @@ class ChooseProductPage extends Component { ...@@ -238,8 +343,11 @@ class ChooseProductPage extends Component {
// 已选修改回调 // 已选修改回调
handleSelectCallBack(options) { handleSelectCallBack(options) {
// console.log('--已选修改回调--', options) // console.log('--已选修改回调--', options)
let {topProcOptionList, topActiveIndex} = this.state
topProcOptionList[topActiveIndex].leftOptionList = options
this.setState({ this.setState({
leftOptionList: options // leftOptionList: options,
topProcOptionList
}) })
} }
...@@ -262,6 +370,11 @@ class ChooseProductPage extends Component { ...@@ -262,6 +370,11 @@ class ChooseProductPage extends Component {
// 返回顶部产品元素 // 返回顶部产品元素
renderTopProItem() { renderTopProItem() {
let {topProcOptionList, topActiveIndex} = this.state let {topProcOptionList, topActiveIndex} = this.state
console.log('返回顶部产品元素---', topProcOptionList)
if(topProcOptionList.length > 0){
topProcOptionList[topActiveIndex][SELECTED_QUQNTITY]= this.getAllCountQuantity()
}
return ( return (
<ChooseCardList <ChooseCardList
cardStyleBox={styles.top_box} cardStyleBox={styles.top_box}
...@@ -278,13 +391,24 @@ class ChooseProductPage extends Component { ...@@ -278,13 +391,24 @@ class ChooseProductPage extends Component {
cardItemIcon={'iconImg'} cardItemIcon={'iconImg'}
curActIndex={topActiveIndex} curActIndex={topActiveIndex}
cardCallBack={(item, index) => this.handleTopNav(item, index)} cardCallBack={(item, index) => this.handleTopNav(item, index)}
cardCountName={SELECTED_QUQNTITY}
cardStyleType={'GRAPHICS'}
cardCouStyle={styles.top_cot_num}
/> />
) )
} }
// 返回底部左侧元素 // 返回底部左侧元素
renderContLeftItem() { renderContLeftItem() {
let {leftActiveIndex, leftOptionList} = this.state let {leftActiveIndex, leftOptionList, topProcOptionList, topActiveIndex} = this.state
let curLeftOptions = []
let curLeftActIndex = 0
// curLeftOptions = leftOptionList
// curLeftActIndex = leftActiveIndex
if(topProcOptionList.length > 0){
curLeftOptions = topProcOptionList[topActiveIndex].leftOptionList
}
curLeftActIndex = leftActiveIndex
return ( return (
<ChooseCardList <ChooseCardList
cardStyleBox={styles.cont_left_box} cardStyleBox={styles.cont_left_box}
...@@ -297,7 +421,8 @@ class ChooseProductPage extends Component { ...@@ -297,7 +421,8 @@ 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={leftOptionList}
cardListOptions={curLeftOptions}
cardItemTitle={'title'} cardItemTitle={'title'}
cardItemIcon={'iconImg'} cardItemIcon={'iconImg'}
curActIndex={leftActiveIndex} curActIndex={leftActiveIndex}
...@@ -310,11 +435,18 @@ class ChooseProductPage extends Component { ...@@ -310,11 +435,18 @@ class ChooseProductPage extends Component {
// 返回右侧二级元素 // 返回右侧二级元素
renderContItem() { renderContItem() {
let { leftOptionList, leftActiveIndex, defaultThridShow } = this.state let { leftOptionList, leftActiveIndex, defaultThridShow, topProcOptionList, topActiveIndex } = this.state
let curRigSecoOption = [] let curRigSecoOption = []
if(leftOptionList[leftActiveIndex]){ let curSuperLeftOption = []
curRigSecoOption = leftOptionList[leftActiveIndex][DEFAULT_SECOND_DATA] // 本地数据 // if(leftOptionList[leftActiveIndex]){
// curRigSecoOption = leftOptionList[leftActiveIndex][DEFAULT_SECOND_DATA] // 本地数据
// curSuperLeftOption = leftOptionList[leftActiveIndex]
// }
if(topProcOptionList[topActiveIndex] && topProcOptionList[topActiveIndex].leftOptionList){
curRigSecoOption = topProcOptionList[topActiveIndex].leftOptionList[leftActiveIndex][DEFAULT_SECOND_DATA] // 本地数据
curSuperLeftOption = topProcOptionList[topActiveIndex].leftOptionList[leftActiveIndex]
} }
// console.log('-返回右侧二级元素--curRigSecoOption', curRigSecoOption) // console.log('-返回右侧二级元素--curRigSecoOption', curRigSecoOption)
...@@ -331,7 +463,8 @@ class ChooseProductPage extends Component { ...@@ -331,7 +463,8 @@ class ChooseProductPage extends Component {
superCallBack={(count, coutFieName) => this.handleChangeCount(count, coutFieName)} superCallBack={(count, coutFieName) => this.handleChangeCount(count, coutFieName)}
superReduceBack={() => this.handleSubSelected()} superReduceBack={() => this.handleSubSelected()}
thirdCallBack={(childData, superIndex) => this.handleChangeThird(childData, superIndex)} thirdCallBack={(childData, superIndex) => this.handleChangeThird(childData, superIndex)}
superLeftData={leftOptionList[leftActiveIndex]} // superLeftData={leftOptionList[leftActiveIndex]}
superLeftData={curSuperLeftOption}
/> />
</View> </View>
) )
...@@ -339,9 +472,14 @@ class ChooseProductPage extends Component { ...@@ -339,9 +472,14 @@ class ChooseProductPage extends Component {
// 返回底部按钮 // 返回底部按钮
renderFooterBtnItem() { renderFooterBtnItem() {
let {selectShowPopup, leftOptionList} = this.state let {selectShowPopup, leftOptionList, topProcOptionList, topActiveIndex} = this.state
let allCountQuantity = this.getAllCountQuantity() let allCountQuantity = this.getAllCountQuantity()
// console.log('左侧数据----', leftOptionList) console.log('左侧数据----', leftOptionList)
let cur_sel_options = []
// cur_sel_options = leftOptionList
if(topProcOptionList.length > 0){
cur_sel_options = topProcOptionList[topActiveIndex].leftOptionList
}
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}>
...@@ -365,7 +503,8 @@ class ChooseProductPage extends Component { ...@@ -365,7 +503,8 @@ class ChooseProductPage extends Component {
show={ selectShowPopup } show={ selectShowPopup }
closeModal={(show) => this.handleCloseSelectModal(show)} closeModal={(show) => this.handleCloseSelectModal(show)}
closeSubmit={() => this.handleSubmit()} closeSubmit={() => this.handleSubmit()}
modelOption={leftOptionList} modelOption={cur_sel_options}
// modelOption={leftOptionList}
modelCallBack={(options) => this.handleSelectCallBack(options)} modelCallBack={(options) => this.handleSelectCallBack(options)}
/> />
</View> </View>
...@@ -382,7 +521,7 @@ class ChooseProductPage extends Component { ...@@ -382,7 +521,7 @@ class ChooseProductPage extends Component {
backgroundColor={promary_color} backgroundColor={promary_color}
barStyle = 'light-content' barStyle = 'light-content'
/> />
<SafeAreaView style={safe_view}> <View style={safe_view}>
<HeadBackItem title={title} navigation={navigation} /> <HeadBackItem title={title} navigation={navigation} />
<View style={styles.choo_main}> <View style={styles.choo_main}>
{/* {this.renderSearchItem()} */} {/* {this.renderSearchItem()} */}
...@@ -390,7 +529,7 @@ class ChooseProductPage extends Component { ...@@ -390,7 +529,7 @@ class ChooseProductPage extends Component {
{this.renderContItem()} {this.renderContItem()}
</View> </View>
{this.renderFooterBtnItem()} {this.renderFooterBtnItem()}
</SafeAreaView> </View>
</View> </View>
); );
} }
...@@ -423,6 +562,9 @@ const styles = StyleSheet.create({ ...@@ -423,6 +562,9 @@ const styles = StyleSheet.create({
// top_img_box: {}, // top_img_box: {},
top_tit: {}, top_tit: {},
top_tit_act: {}, top_tit_act: {},
top_cot_num:{
right: 8
},
cont_bom_box: { cont_bom_box: {
position: 'relative', position: 'relative',
flex: 1 flex: 1
......
...@@ -47,7 +47,9 @@ class EditThirdLevelPage extends Component { ...@@ -47,7 +47,9 @@ class EditThirdLevelPage extends Component {
super(props); super(props);
this.state = { this.state = {
topProcOptionList: [], topProcOptionList: [],
topActiveIndex: 0 topActiveIndex: 0,
onlyShow: false, // 只展示
onlySignSelect: false, // 单选
} }
} }
...@@ -55,21 +57,62 @@ class EditThirdLevelPage extends Component { ...@@ -55,21 +57,62 @@ class EditThirdLevelPage extends Component {
let {params} = this.props.navigation.state let {params} = this.props.navigation.state
let that = this let that = this
// console.log('本地测试数据====localMockData===', localMockData) // console.log('本地测试数据====localMockData===', localMockData)
// console.log('父组件传递的值==', params) console.log('父组件传递的值==', params)
// 赋值测试数据 // 赋值测试数据
this.setState({ let curOptions = []
topProcOptionList: cloneObject(localMockData.localThridOption) if(params.superData.leftIndex === 1){
}, () => { // 钉盒
that.setAllSelectData() curOptions = cloneObject(localMockData.localThridOption_dh)
}) this.setState({
onlyShow: params.superData.thirdShow,
topProcOptionList: curOptions
})
}else if(params.superData.leftIndex === 2) {
// 器械包
curOptions = cloneObject(localMockData.localThridOption_qxb)
if(curOptions.length > 0){
curOptions.forEach(function(curIt) {
curIt.select = false // 初始化
})
}
this.setState({
onlySignSelect: params.superData.thirdSign,
topProcOptionList: curOptions
})
}else {
curOptions = cloneObject(localMockData.localThridOption)
this.setState({
topProcOptionList: curOptions
}, () => {
that.setAllSelectData()
})
}
} }
// 修改列表计算后数据 // 修改列表计算后数据
handleCalCallBack(item, index, dataName){ handleCalCallBack(item, index, dataName){
let {topProcOptionList, topActiveIndex} = this.state let {topProcOptionList, topActiveIndex} = this.state
let {params} = this.props.navigation.state
let that = this let that = this
// console.log('修改列表计算后数据',item, index, dataName) console.log('修改列表计算后数据',item, index, dataName)
if(dataName && topProcOptionList[topActiveIndex][dataName]) { console.log('修改列表计算后数据',topActiveIndex, topProcOptionList)
console.log('父组件传递的值==', params.superData.leftIndex)
if(params.superData.leftIndex === 2){
topProcOptionList.map(function(topItem, topInd) {
if(topInd === index){
topItem = item
}else {
topItem.select = false // 初始化
}
})
that.setState({
topProcOptionList
})
console.log('设置当前所有已选值---', topProcOptionList)
}else if(dataName && topProcOptionList[topActiveIndex][dataName]){
topProcOptionList.map(function(listItem, listIndex) { topProcOptionList.map(function(listItem, listIndex) {
if(listIndex === topActiveIndex){ if(listIndex === topActiveIndex){
listItem[dataName][index] = item listItem[dataName][index] = item
...@@ -98,7 +141,7 @@ class EditThirdLevelPage extends Component { ...@@ -98,7 +141,7 @@ class EditThirdLevelPage extends Component {
}) })
} }
}) })
// console.log('设置当前所有已选值---', topProcOptionList) console.log('设置当前所有已选值---', topProcOptionList)
this.setState({ this.setState({
topProcOptionList topProcOptionList
}) })
...@@ -149,26 +192,36 @@ class EditThirdLevelPage extends Component { ...@@ -149,26 +192,36 @@ class EditThirdLevelPage extends Component {
// 返回底部主要元素 // 返回底部主要元素
renderContItem() { renderContItem() {
let {topProcOptionList, topActiveIndex} = this.state let {topProcOptionList, topActiveIndex, onlyShow} = this.state
let curData = topProcOptionList[topActiveIndex] let {params} = this.props.navigation.state
let curData = []
// 本地测试数据 // 本地测试数据
let localThridContData = [] let localThridContData = []
let iconImg = '' let imgIconArr = ''
if(params.superData.leftIndex === 1){
curData = topProcOptionList
}else if(params.superData.leftIndex === 2){
localThridContData = topProcOptionList
}else{
curData = topProcOptionList[topActiveIndex]
}
if(curData && curData[DEFAULT_SECOND_DATA]) { if(curData && curData[DEFAULT_SECOND_DATA]) {
localThridContData = curData[DEFAULT_SECOND_DATA] localThridContData = curData[DEFAULT_SECOND_DATA]
} }
if(curData && curData.iconImg){ if(curData && curData.imgIconArr){
iconImg = curData.iconImg imgIconArr = curData.imgIconArr
} }
// console.log('底部数据==' , localThridContData) console.log('底部数据==' ,curData, localThridContData, topProcOptionList)
return( return(
<View style={styles.edit_cont}> <View style={styles.edit_cont}>
{ iconImg ? <PictureZoom { imgIconArr ? <PictureZoom
listImageIndex={0} listImageIndex={0}
listImageUrls={iconImg} listImageUrls={imgIconArr}
listStyleImage={styles.thr_head_tit_img} listStyleImage={styles.thr_head_tit_img}
listPicType={'RECTANGLE'} listPicType={'RECTANGLE'}
/> : null } /> : null }
...@@ -190,6 +243,15 @@ class EditThirdLevelPage extends Component { ...@@ -190,6 +243,15 @@ class EditThirdLevelPage extends Component {
// 返回每一列元素 // 返回每一列元素
renderContColumnItem(item, index) { renderContColumnItem(item, index) {
let {onlyShow, onlySignSelect} = this.state
let {params} = this.props.navigation.state
console.log('onlySignSelect', onlySignSelect)
let curImgIcon=''
if(!onlyShow){
curImgIcon = 'imgIconArr'
}
return ( return (
<SafeAreaView style={styles.column_container}> <SafeAreaView style={styles.column_container}>
<PicTitDetaiCalcu <PicTitDetaiCalcu
...@@ -200,9 +262,10 @@ class EditThirdLevelPage extends Component { ...@@ -200,9 +262,10 @@ class EditThirdLevelPage extends Component {
titText={'title'} titText={'title'}
tipTextStr={'tip1'} tipTextStr={'tip1'}
tipTextOne={'tip2'} tipTextOne={'tip2'}
// listImgIcon={'imgIcon'} listImgIcon={curImgIcon}
listImgIcon={'imgIconArr'}
listPicType={'ROUND'} listPicType={'ROUND'}
onlyShowNum={onlyShow}
onlyShowSelect={onlySignSelect}
listStyleBox={styles.list_style_box} listStyleBox={styles.list_style_box}
/> />
</SafeAreaView> </SafeAreaView>
...@@ -212,6 +275,16 @@ class EditThirdLevelPage extends Component { ...@@ -212,6 +275,16 @@ class EditThirdLevelPage extends Component {
render() { render() {
let {navigation} = this.props let {navigation} = this.props
let {title} = navigation.state.params let {title} = navigation.state.params
let {onlyShow, onlySignSelect} = this.state
console.log('onlyShow==', onlyShow)
let curShowTop = true
if(onlyShow){
curShowTop = !onlyShow
}
if(onlySignSelect) {
curShowTop = !onlySignSelect
}
return ( return (
<View style={styles.edit_container}> <View style={styles.edit_container}>
<StatusBarView <StatusBarView
...@@ -222,10 +295,10 @@ class EditThirdLevelPage extends Component { ...@@ -222,10 +295,10 @@ class EditThirdLevelPage extends Component {
<SafeAreaView style={safe_view}> <SafeAreaView style={safe_view}>
<HeadBackItem title={title} navigation={navigation} /> <HeadBackItem title={title} navigation={navigation} />
<View style={styles.edit_main}> <View style={styles.edit_main}>
{this.renderTopProItem()} { curShowTop ? this.renderTopProItem() : null}
{this.renderContItem()} {this.renderContItem()}
</View> </View>
<View style={styles.btom_btn_box}> { !onlyShow ? <View style={styles.btom_btn_box}>
<FooterBtnStyle <FooterBtnStyle
style={styles.sub_btn_pro} style={styles.sub_btn_pro}
activeOpacity={.8} activeOpacity={.8}
...@@ -233,7 +306,7 @@ class EditThirdLevelPage extends Component { ...@@ -233,7 +306,7 @@ class EditThirdLevelPage extends Component {
textStyle= {styles.sub_btn_txt} textStyle= {styles.sub_btn_txt}
onPress={() => this.handleSubmit()} onPress={() => this.handleSubmit()}
/> />
</View> </View> : null}
</SafeAreaView> </SafeAreaView>
</View> </View>
); );
......
...@@ -76,25 +76,52 @@ class ProductRightStyle extends Component { ...@@ -76,25 +76,52 @@ class ProductRightStyle extends Component {
} }
} }
// 大类右侧标题点击事件 // 所有二级数据标题点击事件
TitleClickEvent(item, index) { TitleClickEvent(item, index) {
let {superIndex} = this.props let {superIndex} = this.props
// console.log('右侧标题点击事件 ', superIndex, index, item) console.log('右侧标题点击事件 ', superIndex, index, item)
if(superIndex >= 0 && superIndex < 4) { if(superIndex >= 0 && superIndex < 3) {
let curThirdShow=false, curThirdSign=false
if(superIndex === 1){
curThirdShow = true
}else if(superIndex === 2){
curThirdSign = true
}
this.props.navigation.navigate('EditThirdLevelPage', { this.props.navigation.navigate('EditThirdLevelPage', {
title: '选择产品 - 编辑模板', title: '选择产品 - 编辑模板',
superData:{ superData:{
superItem: item, superItem: item,
superIndex: index superIndex: index,
leftIndex: superIndex,
thirdShow: curThirdShow,
thirdSign: curThirdSign,
}, },
childrenPageCallBack: this.childrenPageCallBack.bind(this) // 传递函数,编辑完成时调用 childrenPageCallBack: this.childrenPageCallBack.bind(this) // 传递函数,编辑完成时调用
}) })
}else if(superIndex === 3){
// 零散器械
this.canPlusOrdReduceOne(item, index)
// this.handleCalCallBack(curData, curIndex, 'rightSecondData', DEFAULT_FIELD)
// this.setState({
// rightSecondData
// })
}else { }else {
// 单选耗材 中级标题点击之后 // 单选耗材 中级标题点击之后
this.changeThrShow(true, item, index) this.changeThrShow(true, item, index)
} }
} }
// 当前直接加1/减1
canPlusOrdReduceOne(item, index){
let {superIndex} = this.props
let {rightSecondData} = this.state
console.log('当前直接加1/减1:',rightSecondData)
console.log('当前直接加1/减1:',superIndex)
console.log('当前直接加1/减1:',item)
console.log('当前直接加1/减1:',index)
}
// 大类加减,小类所有加1/减1 // 大类加减,小类所有加1/减1
handleAllPlusReduce(curData, curIndex, isPlus){ handleAllPlusReduce(curData, curIndex, isPlus){
let {rightSecondData} = this.state let {rightSecondData} = this.state
...@@ -166,53 +193,96 @@ class ProductRightStyle extends Component { ...@@ -166,53 +193,96 @@ class ProductRightStyle extends Component {
// 编辑页面的回调 // 编辑页面的回调
childrenPageCallBack(childData, index) { childrenPageCallBack(childData, index) {
let {rightSecondData} = this.state let {rightSecondData} = this.state
// console.log('编辑页面的回调----', childData, index) let {superIndex} = this.props
console.log('编辑页面的回调----', childData, index, superIndex)
let that = this let that = this
rightSecondData.forEach(function(rsdItem, rsdIndex) { if(superIndex === 8){ // superIndex === 2 器械包有问题
if(!rsdItem[CHILD_DATA_NAME]) { // rightSecondData.forEach(function(rsdItem, rsdIndex) {
rsdItem[CHILD_DATA_NAME] = [] // if(!rsdItem[CHILD_DATA_NAME]) {
} // rsdItem[CHILD_DATA_NAME] = []
if(!rsdItem[DEFAULT_FIELD]) { // }
rsdItem[DEFAULT_FIELD] = 0 // if(!rsdItem[DEFAULT_FIELD]) {
} // rsdItem[DEFAULT_FIELD] = 0
if(rsdIndex === index) { // }
let superTip = '' // if(rsdIndex === index) {
childData.map((chDa, chInd) => { // rsdItem[CHILD_DATA_NAME].push(childData)
let splitStr = ' / ' // rsdItem.lineOptions = childData
if(chInd === childData.length - 1){ // let superTip = '', tipObj = {}
splitStr = '' // // childData.map((chDa) => {
} // // if(chDa.select) {
superTip += `${chDa.title}x${chDa.selectedQuantity}${splitStr}` // // superTip += `${chDa.title}`
}) // // }
let curObj = { // // })
superId: rsdItem['id'], // 本地测试 // rsdItem[CHILD_DATA_NAME].map(chItem => {
superIndex: rsdIndex, // 本地测试 // chItem.forEach(childDa => {
superTit: rsdItem['title'], // 本地测试 // if(childDa.select){
superImg: rsdItem['imgIcon'], // 本地测试 // if(!tipObj[childDa.title]) {
superTip: superTip , // 本地测试 // tipObj[childDa.title] = 1
version: 0, // }else {
lineOptions: childData, // tipObj[childDa.title] += 1
[DEFAULT_FIELD]: 1 // }
// }
// })
// })
// console.log('tipObj',tipObj)
// for(let obj of Object.keys(tipObj)) {
// superTip += `${obj}x${tipObj[obj]}`
// }
// if(superTip){
// rsdItem.lineTip = superTip
// rsdItem[DEFAULT_FIELD] += 1
// }
// that.handleCalCallBack(rsdItem, rsdIndex, 'rightSecondData', DEFAULT_FIELD)
// }
// })
}else {
rightSecondData.forEach(function(rsdItem, rsdIndex) {
if(!rsdItem[CHILD_DATA_NAME]) {
rsdItem[CHILD_DATA_NAME] = []
} }
if(rsdItem[CHILD_DATA_NAME].length !== 0){ if(!rsdItem[DEFAULT_FIELD]) {
curObj.version = rsdItem[CHILD_DATA_NAME].length rsdItem[DEFAULT_FIELD] = 0
} }
let filEquArr = rsdItem[CHILD_DATA_NAME].filter(function(lineItem) { if(rsdIndex === index) {
if(_.isEqual(lineItem.lineOptions, childData)){ let superTip = ''
lineItem[DEFAULT_FIELD] += 1 childData.map((chDa, chInd) => {
return lineItem let splitStr = ' / '
if(chInd === childData.length - 1){
splitStr = ''
}
superTip += `${chDa.title}x${chDa.selectedQuantity}${splitStr}`
})
let curObj = {
superId: rsdItem['id'], // 本地测试
superIndex: rsdIndex, // 本地测试
superTit: rsdItem['title'], // 本地测试
superImg: rsdItem['imgIcon'], // 本地测试
superTip: superTip , // 本地测试
version: 0,
lineOptions: childData,
[DEFAULT_FIELD]: 1
} }
}) if(rsdItem[CHILD_DATA_NAME].length !== 0){
// 本地测试 curObj.version = rsdItem[CHILD_DATA_NAME].length
if(filEquArr.length === 0) { }
rsdItem[CHILD_DATA_NAME].push(curObj) let filEquArr = rsdItem[CHILD_DATA_NAME].filter(function(lineItem) {
if(_.isEqual(lineItem.lineOptions, childData)){
lineItem[DEFAULT_FIELD] += 1
return lineItem
}
})
// 本地测试
if(filEquArr.length === 0) {
rsdItem[CHILD_DATA_NAME].push(curObj)
}
rsdItem[DEFAULT_FIELD] = Number(rsdItem[DEFAULT_FIELD]) + 1
// console.log('回调后的rsdItem====', rsdItem)
that.handleCalCallBack(rsdItem, rsdIndex, 'rightSecondData', DEFAULT_FIELD)
} }
rsdItem[DEFAULT_FIELD] = Number(rsdItem[DEFAULT_FIELD]) + 1 })
// console.log('回调后的rsdItem====', rsdItem) }
that.handleCalCallBack(rsdItem, rsdIndex, 'rightSecondData', DEFAULT_FIELD)
} console.log('回调后的数组====', rightSecondData)
})
// console.log('回调后的数组====', rightSecondData)
this.setState({ this.setState({
rightSecondData rightSecondData
}) })
...@@ -250,7 +320,7 @@ class ProductRightStyle extends Component { ...@@ -250,7 +320,7 @@ class ProductRightStyle extends Component {
// 修改列表计算后数据 - 头/行 // 修改列表计算后数据 - 头/行
handleCalCallBack(item, index, dataName, coutFieName){ handleCalCallBack(item, index, dataName, coutFieName){
// console.log('修改列表计算后数据==',item, index, dataName, coutFieName) console.log('修改列表计算后数据==',item, index, dataName, coutFieName)
if(dataName && this.state[dataName]) { if(dataName && this.state[dataName]) {
let curDataName = this.state[dataName] let curDataName = this.state[dataName]
curDataName[index] = item curDataName[index] = item
...@@ -275,6 +345,31 @@ class ProductRightStyle extends Component { ...@@ -275,6 +345,31 @@ class ProductRightStyle extends Component {
// 返回右侧二级每一列(单选耗材以上) // 返回右侧二级每一列(单选耗材以上)
renderSecondtem(item, index) { renderSecondtem(item, index) {
let {superIndex} = this.props
let curTitCallBack='', curPlusCallBack='', curReduceCallBack=''
if(superIndex === 1){
// 钉盒
curTitCallBack=((item,index) => this.TitleClickEvent(item,index))
curPlusCallBack = ''
curReduceCallBack = ''
}else if(superIndex === 2){
// 器械包
if(item['childQuantity'] > 0) {
// 有数量时,需要点击进入选择
curTitCallBack=((item,index) => this.TitleClickEvent(item,index))
curPlusCallBack = ((item, index) => this.TitleClickEvent(item,index))
curReduceCallBack = (() => this.props.superReduceBack())
}
}else if(superIndex === 3){
// 零散器械
curTitCallBack=''
curPlusCallBack = ''
curReduceCallBack = ''
}else {
curTitCallBack=((item,index) => this.TitleClickEvent(item,index))
curPlusCallBack = ((item, index) => this.TitleClickEvent(item,index))
curReduceCallBack = (() => this.props.superReduceBack())
}
return ( return (
<SafeAreaView style={styles.ri_container}> <SafeAreaView style={styles.ri_container}>
<PicTitDetaiCalcu <PicTitDetaiCalcu
...@@ -282,15 +377,15 @@ class ProductRightStyle extends Component { ...@@ -282,15 +377,15 @@ class ProductRightStyle extends Component {
listIndex={index} listIndex={index}
calField={DEFAULT_FIELD} calField={DEFAULT_FIELD}
subCalCallBack={(item,index) => this.handleCalCallBack(item,index,'rightSecondData', DEFAULT_FIELD)} subCalCallBack={(item,index) => this.handleCalCallBack(item,index,'rightSecondData', DEFAULT_FIELD)}
titCallBack={(item,index) => this.TitleClickEvent(item,index)} titCallBack={curTitCallBack}
titText={'title'} titText={'title'}
tipTextOne={'tip1'} tipTextOne={'tip1'}
tipTextTwo={'tip2'} tipTextTwo={'tip2'}
// listImgIcon={'imgIcon'} // listImgIcon={'imgIcon'}
listImgIcon={'imgIconArr'} listImgIcon={'imgIconArr'}
listPicType={'SQUARE'} listPicType={'SQUARE'}
plusCallBack={(item, index) => this.TitleClickEvent(item,index)} plusCallBack={curPlusCallBack}
reduceCallBack={() => this.props.superReduceBack()} reduceCallBack={curReduceCallBack}
/> />
</SafeAreaView> </SafeAreaView>
) )
...@@ -323,6 +418,7 @@ class ProductRightStyle extends Component { ...@@ -323,6 +418,7 @@ class ProductRightStyle extends Component {
titText={'title'} titText={'title'}
tipTextOne={'tip1'} tipTextOne={'tip1'}
tipTextTwo={'tip2'} tipTextTwo={'tip2'}
listImgIcon={'imgIconArr'}
/> />
</SafeAreaView> </SafeAreaView>
) )
...@@ -357,7 +453,7 @@ class ProductRightStyle extends Component { ...@@ -357,7 +453,7 @@ class ProductRightStyle extends Component {
titCallBack={(item,index) => this.TitleClickEvent(item, index)} titCallBack={(item,index) => this.TitleClickEvent(item, index)}
titText={'title'} titText={'title'}
// listImgIcon={'imgIcon'} // listImgIcon={'imgIcon'}
listImgIcon={'imgIconArr'} // listImgIcon={'imgIconArr'}
tipTextOne={'tip1'} tipTextOne={'tip1'}
tipTextTwo={'tip2'} tipTextTwo={'tip2'}
plusCallBack={(item, index) => this.handleAllPlusReduce(item,index, true)} plusCallBack={(item, index) => this.handleAllPlusReduce(item,index, true)}
...@@ -415,12 +511,12 @@ class ProductRightStyle extends Component { ...@@ -415,12 +511,12 @@ class ProductRightStyle extends Component {
<Text style={styles.thr_head_tit}>{ curThridObj.title }</Text> <Text style={styles.thr_head_tit}>{ curThridObj.title }</Text>
</View> </View>
</TouchableOpacity> </TouchableOpacity>
<PictureZoom {/* <PictureZoom
listImageIndex={0} listImageIndex={0}
listImageUrls={curThridObj.image} listImageUrls={curThridObj.image}
listStyleImage={styles.thr_head_tit_img} listStyleImage={styles.thr_head_tit_img}
listPicType={'RECTANGLE'} listPicType={'RECTANGLE'}
/> /> */}
</View> </View>
) )
} }
......
...@@ -6,36 +6,29 @@ ...@@ -6,36 +6,29 @@
const localTopProcOption = [ const localTopProcOption = [
{ {
title: '嘉思特', title: '嘉思特',
iconImg: require('../../../../images/cp_test_1.png') iconImg: 'https://obs-dev.gyjtsx.com/img/logo.5b8eddb3.png'
}, },
{ {
title: '正天', title: '国药集团',
iconImg: require('../../../../images/cp_test_1.png') iconImg: 'https://obs-dev.gyjtsx.com/img/logo.5b8eddb3.png'
}, },
{ {
title: '奥斯迈', title: '山西物流',
iconImg: require('../../../../images/cp_test_1.png') iconImg: 'https://obs-dev.gyjtsx.com/img/logo.5b8eddb3.png'
}, },
{ {
title: '嘉思特44', title: '器械分公司',
iconImg: require('../../../../images/cp_test_1.png') iconImg: 'https://obs-dev.gyjtsx.com/img/logo.5b8eddb3.png'
}, },
{ {
title: '嘉思特55', title: '大博医疗',
iconImg: require('../../../../images/cp_test_1.png') iconImg: 'https://obs-dev.gyjtsx.com/img/logo.5b8eddb3.png'
}, },
{ {
title: '嘉思特66', title: '山东威高',
iconImg: require('../../../../images/cp_test_1.png') iconImg: 'https://obs-dev.gyjtsx.com/img/logo.5b8eddb3.png'
},
{
title: '嘉思特77',
iconImg: require('../../../../images/cp_test_1.png')
},
{
title: '嘉思特88',
iconImg: require('../../../../images/cp_test_1.png')
} }
// require('../../../../images/cp_test_1.png')
] ]
// 多张图片放大 // 多张图片放大
...@@ -52,31 +45,40 @@ const localTestImageUrls = [{ ...@@ -52,31 +45,40 @@ const localTestImageUrls = [{
// 手术模板 -- 大类 // 手术模板 -- 大类
const localSingleSeleHead_1 = [{ const localSingleSeleHead_1 = [{
"id": "0", "id": "0",
title: '手术模板', title: '华森标准PFNA',
imgIcon: require('../../../../images/model_test.png'), imgIcon: require('../../../../images/model_test.png'),
imgIconArr: localTestImageUrls, imgIconArr: localTestImageUrls,
tip1: '创建人:金城武', tip1: '关节',
tip2: '创建时间:2020.03.01', tip2: '主钉 刀片 锁钉,加长尾帽 PFNA器械',
select: false, select: false,
quantity: 0 quantity: 0
}, },
{ {
"id": "1", "id": "1",
title: '内衬Harmony 28/10°OD(P 2', title: '大博右侧联合加压加长',
imgIcon: require('../../../../images/model_test.png'), imgIcon: require('../../../../images/model_test.png'),
imgIconArr: localTestImageUrls, imgIconArr: localTestImageUrls,
tip1: '创建人:金城武', tip1: '创',
tip2: '创建时间:2020.03.01', tip2: '上海丙文医疗器械销售中心',
select: false, select: false,
quantity: 0 quantity: 0
}, },
{ {
"id": "2", "id": "2",
title: '内衬Harmony 28/10°OD(P', title: '爱康右侧GT',
imgIcon: require('../../../../images/model_test.png'), imgIcon: require('../../../../images/model_test.png'),
imgIconArr: localTestImageUrls, imgIconArr: localTestImageUrls,
tip1: '创建人:金城武', tip1: '关节',
tip2: '创建时间:2020.03.01', tip2: '右侧股骨髁8个(1.5-6) 胫骨托 10个(A-G) 垫片 16个(8 10 12 14)膝关节工具股骨侧+胫骨侧共两箱',
select: false,
quantity: 0
},{
"id": "3",
title: '大博肱骨多维左侧',
imgIcon: require('../../../../images/model_test.png'),
imgIconArr: localTestImageUrls,
tip1: '创伤',
tip2: '大博肱骨多维左侧*-器械',
select: false, select: false,
quantity: 0 quantity: 0
}] }]
...@@ -84,31 +86,31 @@ const localSingleSeleHead_1 = [{ ...@@ -84,31 +86,31 @@ const localSingleSeleHead_1 = [{
// 钉盒 -- 大类 // 钉盒 -- 大类
const localSingleSeleHead_2 = [{ const localSingleSeleHead_2 = [{
"id": "0", "id": "0",
title: '钉盒', title: '大骨块成套手术器械包-内附属钉盒',
imgIcon: require('../../../../images/model_test.png'), imgIcon: require('../../../../images/model_test.png'),
imgIconArr: localTestImageUrls, imgIconArr: localTestImageUrls,
tip1: '创建人:金城武', tip1: '',
tip2: '创建时间:2020.03.01', tip2: '',
select: false, select: false,
quantity: 0 quantity: 0
}, },
{ {
"id": "1", "id": "1",
title: '内衬Harmony 28/10°OD(P 2', title: '小骨块成套手术器械包-内附属钉盒',
imgIcon: require('../../../../images/model_test.png'), imgIcon: require('../../../../images/model_test.png'),
imgIconArr: localTestImageUrls, imgIconArr: localTestImageUrls,
tip1: '创建人:金城武', tip1: '',
tip2: '创建时间:2020.03.01', tip2: '',
select: false, select: false,
quantity: 0 quantity: 0
}, },
{ {
"id": "2", "id": "2",
title: '内衬Harmony 28/10°OD(P', title: '上肢锁定钉盒II型',
imgIcon: require('../../../../images/model_test.png'), imgIcon: require('../../../../images/model_test.png'),
imgIconArr: localTestImageUrls, imgIconArr: localTestImageUrls,
tip1: '创建人:金城武', tip1: '',
tip2: '创建时间:2020.03.01', tip2: '',
select: false, select: false,
quantity: 0 quantity: 0
}] }]
...@@ -117,31 +119,32 @@ const localSingleSeleHead_2 = [{ ...@@ -117,31 +119,32 @@ const localSingleSeleHead_2 = [{
// 器械包 -- 大类 // 器械包 -- 大类
const localSingleSeleHead_3 = [{ const localSingleSeleHead_3 = [{
"id": "0", "id": "0",
title: '器械包', title: '上肢器械包',
imgIcon: require('../../../../images/model_test.png'), imgIcon: require('../../../../images/model_test.png'),
imgIconArr: localTestImageUrls, imgIconArr: localTestImageUrls,
tip1: '创建人:金城武', tip1: '12',
tip2: '创建时间:2020.03.01', tip2: '30012020120400001',
select: false, select: false,
quantity: 0 quantity: 0
}, },
{ {
"id": "1", "id": "1",
title: '内衬Harmony 28/10°OD(P 2', title: '下肢器械包',
imgIcon: require('../../../../images/model_test.png'), imgIcon: require('../../../../images/model_test.png'),
imgIconArr: localTestImageUrls, imgIconArr: localTestImageUrls,
tip1: '创建人:金城武', tip1: '12L',
tip2: '创建时间:2020.03.01', tip2: '30012020120400002',
select: false, select: false,
quantity: 0 quantity: 0,
// childQuantity: 2
}, },
{ {
"id": "2", "id": "2",
title: '内衬Harmony 28/10°OD(P', title: '足踝手术器械包',
imgIcon: require('../../../../images/model_test.png'), imgIcon: require('../../../../images/model_test.png'),
imgIconArr: localTestImageUrls, imgIconArr: localTestImageUrls,
tip1: '创建人:金城武', tip1: 'JC',
tip2: '创建时间:2020.03.01', tip2: '3001202008006013',
select: false, select: false,
quantity: 0 quantity: 0
}] }]
...@@ -149,31 +152,31 @@ const localSingleSeleHead_3 = [{ ...@@ -149,31 +152,31 @@ const localSingleSeleHead_3 = [{
// 零散器械 -- 大类 // 零散器械 -- 大类
const localSingleSeleHead_4 = [{ const localSingleSeleHead_4 = [{
"id": "0", "id": "0",
title: '零散器械', title: '下肢锁定器械_导针测深器',
imgIcon: require('../../../../images/model_test.png'), imgIcon: require('../../../../images/model_test.png'),
imgIconArr: localTestImageUrls, imgIconArr: localTestImageUrls,
tip1: '创建人:金城武', tip1: 'L:250.230',
tip2: '创建时间:2020.03.01', tip2: '',
select: false, select: false,
quantity: 0 quantity: 0
}, },
{ {
"id": "1", "id": "1",
title: '内衬Harmony 28/10°OD(P 2', title: 'III型伽玛型髓内钉通用工具_防旋杆',
imgIcon: require('../../../../images/model_test.png'), imgIcon: require('../../../../images/model_test.png'),
imgIconArr: localTestImageUrls, imgIconArr: localTestImageUrls,
tip1: '创建人:金城武', tip1: '',
tip2: '创建时间:2020.03.01', tip2: '',
select: false, select: false,
quantity: 0 quantity: 0
}, },
{ {
"id": "2", "id": "2",
title: '内衬Harmony 28/10°OD(P', title: '空心钉工具包(4.0型)',
imgIcon: require('../../../../images/model_test.png'), imgIcon: require('../../../../images/model_test.png'),
imgIconArr: localTestImageUrls, imgIconArr: localTestImageUrls,
tip1: '创建人:金城武', tip1: '4.0型',
tip2: '创建时间:2020.03.01', tip2: '',
select: false, select: false,
quantity: 0 quantity: 0
}] }]
...@@ -181,81 +184,81 @@ const localSingleSeleHead_4 = [{ ...@@ -181,81 +184,81 @@ const localSingleSeleHead_4 = [{
// 人工髋关节假体等数据 -- 大类 // 人工髋关节假体等数据 -- 大类
const localSingleSeleHead_5 = [{ const localSingleSeleHead_5 = [{
"id": "0", "id": "0",
title: '中置器(PE)', title: '人工髋关节假体',
imgIcon: require('../../../../images/model_test.png'), imgIcon: require('../../../../images/model_test.png'),
imgIconArr: localTestImageUrls, imgIconArr: localTestImageUrls,
tip1: '创建人:金城武', tip1: 'FG 12mm',
tip2: '创建时间:2020.03.01', tip2: '',
select: false, select: false,
quantity: 0 quantity: 0
}, },
{ {
"id": "1", "id": "1",
title: '内衬Harmony---', title: '髋关节假体生物型股骨柄',
imgIcon: require('../../../../images/model_test.png'), imgIcon: require('../../../../images/model_test.png'),
imgIconArr: localTestImageUrls, imgIconArr: localTestImageUrls,
tip1: '创建人:金城武', tip1: 'BG-VIII-2#',
tip2: '创建时间:2020.03.01', tip2: '',
select: false, select: false,
quantity: 0 quantity: 0
}, },
{ {
"id": "2", "id": "2",
title: '内衬Harmony 28/10°OD', title: '金属锁定接骨板系统',
imgIcon: require('../../../../images/model_test.png'), imgIcon: require('../../../../images/model_test.png'),
imgIconArr: localTestImageUrls, imgIconArr: localTestImageUrls,
tip1: '创建人:金城武', tip1: 'RTCLS01 φ5.0×62mm',
tip2: '创建时间:2020.03.01', tip2: '',
select: false, select: false,
quantity: 0 quantity: 0
}, },
{ {
"id": "3", "id": "3",
title: '中置器(PE)4', title: '金属带锁髓内钉',
imgIcon: require('../../../../images/model_test.png'), imgIcon: require('../../../../images/model_test.png'),
imgIconArr: localTestImageUrls, imgIconArr: localTestImageUrls,
tip1: '创建人:金城武', tip1: 'I型 φ10.5×100mm',
tip2: '创建时间:2020.03.01', tip2: '',
select: false, select: false,
quantity: 0 quantity: 0
}, },
{ {
"id": "4", "id": "4",
title: '中置器(PE)5', title: '髓内针',
imgIcon: require('../../../../images/model_test.png'), imgIcon: require('../../../../images/model_test.png'),
imgIconArr: localTestImageUrls, imgIconArr: localTestImageUrls,
tip1: '创建人:金城武', tip1: '圆形弹性针ZYT φ3.0×400mm',
tip2: '创建时间:2020.03.01', tip2: '',
select: false, select: false,
quantity: 0 quantity: 0
}, },
{ {
"id": "5", "id": "5",
title: '中置器(PE)6', title: '人工髋关节假体',
imgIcon: require('../../../../images/model_test.png'), imgIcon: require('../../../../images/model_test.png'),
imgIconArr: localTestImageUrls, imgIconArr: localTestImageUrls,
tip1: '创建人:金城武', tip1: '金属外杯 JS-MB II T 50',
tip2: '创建时间:2020.03.01', tip2: '',
select: false, select: false,
quantity: 0 quantity: 0
}, },
{ {
"id": "6", "id": "6",
title: '中置器(PE)7', title: '金属空心接骨螺钉',
imgIcon: require('../../../../images/model_test.png'), imgIcon: require('../../../../images/model_test.png'),
imgIconArr: localTestImageUrls, imgIconArr: localTestImageUrls,
tip1: '创建人:金城武', tip1: 'CDQ03-P φ7.3×85mm',
tip2: '创建时间:2020.03.01', tip2: '',
select: false, select: false,
quantity: 0 quantity: 0
}, },
{ {
"id": "7", "id": "7",
title: '中置器(PE)8', title: '髓内针',
imgIcon: require('../../../../images/model_test.png'), imgIcon: require('../../../../images/model_test.png'),
imgIconArr: localTestImageUrls, imgIconArr: localTestImageUrls,
tip1: '创建人:金城武', tip1: '圆形弹性针ZYT φ3.0×400mm',
tip2: '创建时间:2020.03.01', tip2: '',
select: false, select: false,
quantity: 0 quantity: 0
} }
...@@ -263,31 +266,31 @@ const localSingleSeleHead_5 = [{ ...@@ -263,31 +266,31 @@ const localSingleSeleHead_5 = [{
const localSingleSeleHead_6= [{ const localSingleSeleHead_6= [{
"id": "0", "id": "0",
title: '膝-中置器(PE)11', title: '膝关节假体股骨髁(A3高屈曲后稳定PS型)JPX-STBP-CZ',
imgIcon: require('../../../../images/model_test.png'), imgIcon: require('../../../../images/model_test.png'),
imgIconArr: localTestImageUrls, imgIconArr: localTestImageUrls,
tip1: '创建人:金城武', tip1: '3001202008007920',
tip2: '创建时间:2020.03.01', tip2: '',
select: false, select: false,
quantity: 0 quantity: 0
}, },
{ {
"id": "1", "id": "1",
title: '膝-中置器(PE)22', title: '膝关节假体胫骨平台(A3GT解剖型)JPX-STBT-CZ',
imgIcon: require('../../../../images/model_test.png'), imgIcon: require('../../../../images/model_test.png'),
imgIconArr: localTestImageUrls, imgIconArr: localTestImageUrls,
tip1: '创建人:金城武', tip1: '3001202008007921',
tip2: '创建时间:2020.03.01', tip2: '',
select: false, select: false,
quantity: 0 quantity: 0
}, },
{ {
"id": "2", "id": "2",
title: '膝-中置器(PE)33', title: '膝关节假体胫骨垫片(A3高屈曲PS型(II型))JPX-STBD',
imgIcon: require('../../../../images/model_test.png'), imgIcon: require('../../../../images/model_test.png'),
imgIconArr: localTestImageUrls, imgIconArr: localTestImageUrls,
tip1: '创建人:金城武', tip1: '3001202008007922',
tip2: '创建时间:2020.03.01', tip2: '',
select: false, select: false,
quantity: 0 quantity: 0
} }
...@@ -295,31 +298,31 @@ const localSingleSeleHead_6= [{ ...@@ -295,31 +298,31 @@ const localSingleSeleHead_6= [{
const localSingleSeleHead_7 = [{ const localSingleSeleHead_7 = [{
"id": "0", "id": "0",
title: '骨-中置器(PE)11', title: '金属锁定接骨板系统-蝶形重建锁定板',
imgIcon: require('../../../../images/model_test.png'), imgIcon: require('../../../../images/model_test.png'),
imgIconArr: localTestImageUrls, imgIconArr: localTestImageUrls,
tip1: '创建人:金城武', tip1: '3001202010016874',
tip2: '创建时间:2020.03.01', tip2: '',
select: false, select: false,
quantity: 0 quantity: 0
}, },
{ {
"id": "1", "id": "1",
title: '骨-中置器(PE)22', title: '金属锁定接骨板系统-蝶形重建锁定板',
imgIcon: require('../../../../images/model_test.png'), imgIcon: require('../../../../images/model_test.png'),
imgIconArr: localTestImageUrls, imgIconArr: localTestImageUrls,
tip1: '创建人:金城武', tip1: '3001202010016875',
tip2: '创建时间:2020.03.01', tip2: '创建时间:2020.03.01',
select: false, select: false,
quantity: 0 quantity: 0
}, },
{ {
"id": "2", "id": "2",
title: '骨-中置器(PE)33', title: '金属锁定接骨板系统-蝶形重建锁定板',
imgIcon: require('../../../../images/model_test.png'), imgIcon: require('../../../../images/model_test.png'),
imgIconArr: localTestImageUrls, imgIconArr: localTestImageUrls,
tip1: '创建人:金城武', tip1: '3001202010016876',
tip2: '创建时间:2020.03.01', tip2: '',
select: false, select: false,
quantity: 0 quantity: 0
} }
...@@ -327,11 +330,20 @@ const localSingleSeleHead_7 = [{ ...@@ -327,11 +330,20 @@ const localSingleSeleHead_7 = [{
const localSingleSeleHead_8 = [{ const localSingleSeleHead_8 = [{
"id": "0", "id": "0",
title: '骨-中置器(PE)11', title: '内衬(生物ML型)',
imgIcon: require('../../../../images/model_test.png'), imgIcon: require('../../../../images/model_test.png'),
imgIconArr: localTestImageUrls, imgIconArr: localTestImageUrls,
tip1: '创建人:金城武', tip1: '3001202008005579',
tip2: '创建时间:2020.03.01', tip2: '',
select: false,
quantity: 0
},{
"id": "1",
title: '内衬(生物ML型)',
imgIcon: require('../../../../images/model_test.png'),
imgIconArr: localTestImageUrls,
tip1: '3001202008005480',
tip2: '',
select: false, select: false,
quantity: 0 quantity: 0
} }
...@@ -379,45 +391,35 @@ const localSingleSeleHead_11 = [{ ...@@ -379,45 +391,35 @@ const localSingleSeleHead_11 = [{
const localSingleRowData = [ const localSingleRowData = [
{ {
"id": "0", "id": "0",
title: '规格:JS-CGO PE 10', title: '金属接骨螺钉HBQ6.0X30',
tip1: '型号:10', tip1: '3001202007000098',
tip2: '物料代码:JUST00000104', tip2: '',
quantity: 0 quantity: 0,
imgIconArr: localTestImageUrls,
}, },
{ {
"id": "1", "id": "1",
title: '规格:JS-CGO PE 11', title: '金属接骨螺钉6.0X26(T)',
tip1: '型号:10', tip1: '3001202010006127',
tip2: '物料代码:JUST00000102', tip2: '',
quantity: 0 quantity: 0,
imgIconArr: localTestImageUrls,
}, },
{ {
"id": "2", "id": "2",
title: '规格:JS-CGO PE 12', title: '金属接骨螺钉6.0X20(T)',
tip1: '型号:10', tip1: '3001202010006120',
tip2: '物料代码:JUST00000107', tip2: '',
quantity: 0 quantity: 0,
imgIconArr: localTestImageUrls,
}, },
{ {
"id": "3", "id": "3",
title: '规格:JS-CGO PE 13', title: '栓子13(PE)',
tip1: '型号:10', tip1: '3001202010006114',
tip2: '物料代码:JUST00000108', tip2: '',
quantity: 0 quantity: 0,
}, imgIconArr: localTestImageUrls,
{
"id": "4",
title: '规格:JS-CGO PE 14',
tip1: '型号:10',
tip2: '物料代码:JUST00000109',
quantity: 0
},
{
"id": "5",
title: '规格:JS-CGO PE 15',
tip1: '型号:10',
tip2: '物料代码:JUST00000110',
quantity: 0
} }
] ]
...@@ -448,29 +450,29 @@ const localLeftOption = [ ...@@ -448,29 +450,29 @@ const localLeftOption = [
localSecondData: localSingleSeleHead_5 localSecondData: localSingleSeleHead_5
}, },
{ {
title: '膝关节假体备份', title: '膝关节假体',
localSecondData: localSingleSeleHead_6 localSecondData: localSingleSeleHead_6
}, },
{ {
title: '骨小梁髋关节假体', title: '金属带锁髓内钉',
localSecondData: localSingleSeleHead_7 localSecondData: localSingleSeleHead_7
}, },
{ {
title: '骨小梁髋22', title: '髋关节假体金属髋臼',
localSecondData: localSingleSeleHead_8 localSecondData: localSingleSeleHead_8
}, },
{ // {
title: '骨小梁33', // title: '骨小梁33',
localSecondData: localSingleSeleHead_9 // localSecondData: localSingleSeleHead_9
}, // },
{ // {
title: '骨小44', // title: '骨小44',
localSecondData: localSingleSeleHead_10 // localSecondData: localSingleSeleHead_10
}, // },
{ // {
title: '关节假体55', // title: '关节假体55',
localSecondData: localSingleSeleHead_11 // localSecondData: localSingleSeleHead_11
}, // },
] ]
...@@ -478,84 +480,35 @@ const localLeftOption = [ ...@@ -478,84 +480,35 @@ const localLeftOption = [
const localThridContData_1 = [ const localThridContData_1 = [
{ {
"id": "0", "id": "0",
title: '耗材11111', title: '金属接骨螺钉HBQ6.0X30',
tip1: '型号:10', tip1: '3001202007000098',
tip2: '物料代码:JUST00000104', tip2: '',
imgIcon: require('../../../../images/model_test.png'), quantity: 0,
imgIconArr: localTestImageUrls, imgIconArr: localTestImageUrls,
quantity: 2
}, },
{ {
"id": "1", "id": "1",
title: '规格:JS-CGO PE 10 11', title: '金属接骨螺钉6.0X26(T)',
tip1: '型号:10', tip1: '3001202010006127',
tip2: '物料代码:JUST00000104', tip2: '',
imgIcon: require('../../../../images/model_test.png'), quantity: 3,
imgIconArr: localTestImageUrls, imgIconArr: localTestImageUrls,
quantity: 1
}, },
{ {
"id": "2", "id": "2",
title: '规格:JS-CGO PE 10 22', title: '金属接骨螺钉6.0X20(T)',
tip1: '型号:10', tip1: '3001202010006120',
tip2: '物料代码:JUST00000104', tip2: '',
imgIcon: require('../../../../images/model_test.png'), quantity: 2,
imgIconArr: localTestImageUrls, imgIconArr: localTestImageUrls,
quantity: 1
}, },
{ {
"id": "3", "id": "3",
title: '规格:JS-CGO PE 10 33', title: '栓子13(PE)',
tip1: '型号:10', tip1: '3001202010006114',
tip2: '物料代码:JUST00000104', tip2: '',
imgIcon: require('../../../../images/model_test.png'), quantity: 0,
imgIconArr: localTestImageUrls,
quantity: 0
},
{
"id": "4",
title: '规格:JS-CGO PE 10 44',
tip1: '型号:10',
tip2: '物料代码:JUST00000104',
imgIcon: require('../../../../images/model_test.png'),
imgIconArr: localTestImageUrls,
quantity: 0
},
{
"id": "5",
title: '规格:JS-CGO PE 10 55',
tip1: '型号:10',
tip2: '物料代码:JUST00000104',
imgIcon: require('../../../../images/model_test.png'),
imgIconArr: localTestImageUrls,
quantity: 0
},
{
"id": "6",
title: '规格:JS-CGO PE 10 55',
tip1: '型号:10',
tip2: '物料代码:JUST00000104',
imgIcon: require('../../../../images/model_test.png'),
imgIconArr: localTestImageUrls,
quantity: 0
},
{
"id": "7",
title: '规格:JS-CGO PE 10 55',
tip1: '型号:10',
tip2: '物料代码:JUST00000104',
imgIcon: require('../../../../images/model_test.png'),
imgIconArr: localTestImageUrls,
quantity: 0
},
{
"id": "8",
title: '规格:JS-CGO PE 10 888',
tip1: '型号:10',
tip2: '物料代码:JUST00000104',
imgIcon: require('../../../../images/model_test.png'),
imgIconArr: localTestImageUrls, imgIconArr: localTestImageUrls,
quantity: 0
} }
] ]
...@@ -563,119 +516,204 @@ const localThridContData_1 = [ ...@@ -563,119 +516,204 @@ const localThridContData_1 = [
const localThridContData_2 = [ const localThridContData_2 = [
{ {
"id": "0", "id": "0",
title: '钉盒11111', title: '大骨块成套手术器械包-内附属钉盒',
tip1: '型号:10',
tip2: '物料代码:JUST00000104',
imgIcon: require('../../../../images/model_test.png'), imgIcon: require('../../../../images/model_test.png'),
imgIconArr: localTestImageUrls, imgIconArr: localTestImageUrls,
quantity: 1 tip1: '',
tip2: '',
select: false,
quantity: 0
}, },
{ {
"id": "1", "id": "1",
title: '规格:JS-CGO PE 10 11', title: '小骨块成套手术器械包-内附属钉盒',
tip1: '型号:10',
tip2: '物料代码:JUST00000104',
imgIcon: require('../../../../images/model_test.png'), imgIcon: require('../../../../images/model_test.png'),
imgIconArr: localTestImageUrls, imgIconArr: localTestImageUrls,
quantity: 0 tip1: '',
tip2: '',
select: false,
quantity: 3
}, },
{ {
"id": "2", "id": "2",
title: '规格:JS-CGO PE 10 22', title: '上肢锁定钉盒II型',
tip1: '型号:10',
tip2: '物料代码:JUST00000104',
imgIcon: require('../../../../images/model_test.png'), imgIcon: require('../../../../images/model_test.png'),
imgIconArr: localTestImageUrls, imgIconArr: localTestImageUrls,
tip1: '',
tip2: '',
select: false,
quantity: 0 quantity: 0
} }
] ]
// 器械包 // 器械包
const localThridContData_3 = [ const localThridContData_3 = [{
{ "id": "0",
"id": "0", title: '上肢器械包',
title: '器械包11111', imgIcon: require('../../../../images/model_test.png'),
tip1: '型号:10', imgIconArr: localTestImageUrls,
tip2: '物料代码:JUST00000104', tip1: '12',
imgIcon: require('../../../../images/model_test.png'), tip2: '30012020120400001',
imgIconArr: localTestImageUrls, select: false,
quantity: 0 quantity: 1
}, },
{ {
"id": "1", "id": "1",
title: '规格:JS-CGO PE 10 11', title: '下肢器械包',
tip1: '型号:10', imgIcon: require('../../../../images/model_test.png'),
tip2: '物料代码:JUST00000104', imgIconArr: localTestImageUrls,
imgIcon: require('../../../../images/model_test.png'), tip1: '12L',
imgIconArr: localTestImageUrls, tip2: '30012020120400002',
quantity: 2 select: false,
}, quantity: 1
{ },
"id": "2", {
title: '规格:JS-CGO PE 10 22', "id": "2",
tip1: '型号:10', title: '足踝手术器械包',
tip2: '物料代码:JUST00000104', imgIcon: require('../../../../images/model_test.png'),
imgIcon: require('../../../../images/model_test.png'), imgIconArr: localTestImageUrls,
imgIconArr: localTestImageUrls, tip1: 'JC',
quantity: 0 tip2: '3001202008006013',
} select: false,
] quantity: 0
}]
// 零散器械 // 零散器械
const localThridContData_4 = [ const localThridContData_4 = [{
{ "id": "0",
"id": "0", title: '下肢锁定器械_导针测深器',
title: '零散器械1111', imgIcon: require('../../../../images/model_test.png'),
tip1: '型号:10', imgIconArr: localTestImageUrls,
tip2: '物料代码:JUST00000104', tip1: 'L:250.230',
imgIcon: require('../../../../images/model_test.png'), tip2: '',
imgIconArr: localTestImageUrls, select: false,
quantity: 0 quantity: 3
}, },
{ {
"id": "1", "id": "1",
title: '规格:JS-CGO PE 10 11', title: 'III型伽玛型髓内钉通用工具_防旋杆',
tip1: '型号:10', imgIcon: require('../../../../images/model_test.png'),
tip2: '物料代码:JUST00000104', imgIconArr: localTestImageUrls,
imgIcon: require('../../../../images/model_test.png'), tip1: '',
imgIconArr: localTestImageUrls, tip2: '',
quantity: 3 select: false,
}, quantity: 0
{ },
"id": "2", {
title: '规格:JS-CGO PE 10 22', "id": "2",
tip1: '型号:10', title: '空心钉工具包(4.0型)',
tip2: '物料代码:JUST00000104', imgIcon: require('../../../../images/model_test.png'),
imgIcon: require('../../../../images/model_test.png'), imgIconArr: localTestImageUrls,
imgIconArr: localTestImageUrls, tip1: '4.0型',
quantity: 0 tip2: '',
} select: false,
] quantity: 0
}]
// 三级编辑数据 - 顶部 // 三级编辑数据 - 顶部
let localThridOption = [ let localThridOption = [
{ {
title: '耗材', title: '耗材',
iconImg: localTestImageUrls, imgIconArr: localTestImageUrls,
localThridContData: localThridContData_1 localThridContData: localThridContData_1
}, },
{ {
title: '钉盒', title: '钉盒',
iconImg: localTestImageUrls, imgIconArr: localTestImageUrls,
localThridContData: localThridContData_2 localThridContData: localThridContData_2
}, },
{ {
title: '器械包', title: '器械包',
iconImg: localTestImageUrls, imgIconArr: localTestImageUrls,
localThridContData: localThridContData_3 localThridContData: localThridContData_3
}, },
{ {
title: '零散器械', title: '零散器械',
iconImg: localTestImageUrls, imgIconArr: localTestImageUrls,
localThridContData: localThridContData_4 localThridContData: localThridContData_4
} }
] ]
// 钉盒数据
const localThridOption_dh = {
imgIconArr: localTestImageUrls,
localThridContData: [{
"id": "0",
title: '锁定螺钉Φ3.5(梅花自攻)',
tip1: 'Φ3.5×22',
tip2: '3001202008006101',
quantity: 2
},{
"id": "1",
title: '锁定螺钉Φ3.5(梅花自攻)',
tip1: 'Φ3.5×24',
tip2: '物料代码:JUST00000104',
quantity: 1
},{
"id": "2",
title: '锁定螺钉Φ3.5(梅花自攻)',
tip1: 'Φ3.5×30',
tip2: '3001202009000062',
quantity: 1
},{
"id": "3",
title: '锁定螺钉Φ3.5(梅花自攻)',
tip1: 'Φ3.5×45',
tip2: '3001202008006101',
quantity: 3
},{
"id": "4",
title: '金属锁定接骨板系统',
tip1: '自攻型规则螺纹锥型锁定钉I型 RTCLS01 φ2.4×16mm',
tip2: '3001202008006121',
quantity: 3
},{
"id": "5",
title: '金属锁定接骨板系统',
tip1: '自攻型规则螺纹锥型锁定钉I型 RTCLS01 φ2.4×16mm',
tip2: '3001202008006120',
quantity: 3
},{
"id": "6",
title: '自攻型规则螺纹锥形锁定钉I型 RTCLS01 φ 2.4×14',
tip1: 'Φ3.5×45',
tip2: '3001202008006122',
quantity: 3
}]
}
// 器械包可选数据
const localThridOption_qxb = [{
"id": "0",
title: '器械包-旧-1',
tip1: '型号:10',
tip2: '物料代码:JUST00000104',
quantity: 2,
imgIconArr: localTestImageUrls,
},{
"id": "1",
title: '器械包-旧-2',
tip1: '型号:10',
tip2: '物料代码:JUST00000104',
quantity: 1,
imgIconArr: localTestImageUrls,
},{
"id": "2",
title: '器械包-新-1',
tip1: '型号:10',
tip2: '物料代码:JUST00000104',
quantity: 1,
imgIconArr: localTestImageUrls,
},{
"id": "3",
title: '器械包-新-2',
tip1: '型号:10',
tip2: '物料代码:JUST00000104',
quantity: 3,
imgIconArr: localTestImageUrls,
}]
// 已选数据 - 底部按钮 测试 // 已选数据 - 底部按钮 测试
const localBottomOption = [ const localBottomOption = [
{ {
...@@ -773,5 +811,7 @@ export default{ ...@@ -773,5 +811,7 @@ export default{
localSingleRowData, localSingleRowData,
localTestImageUrls, localTestImageUrls,
localThridOption, localThridOption,
localThridOption_dh,
localThridOption_qxb,
localBottomOption localBottomOption
} }
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment