Commit 9c9fbe5d by Denglingling

调整自助下单,获取供应商的请求参数等

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