Commit 7e9869a0 by Denglingling

调整【消耗确认】<FlatList>对应的“keyExtractor”的取值

parent 6df041fe
...@@ -46,12 +46,6 @@ class ConsumDetailsPage extends Component { ...@@ -46,12 +46,6 @@ class ConsumDetailsPage extends Component {
// specification: '3g,Ytg-DG-SZGT', // specification: '3g,Ytg-DG-SZGT',
// serial_number: '2001202001001774', // serial_number: '2001202001001774',
// select: false // select: false
// },{
// "id": "1",
// item_name: '人工髋关节假体-JS-HB ||| T2',
// specification: '3g,Ytg-DG-SZGT',
// serial_number: '2001202001001774',
// select: false
// } // }
], ],
allConOption: [], // 所有数据(未筛选过的) allConOption: [], // 所有数据(未筛选过的)
...@@ -86,7 +80,6 @@ class ConsumDetailsPage extends Component { ...@@ -86,7 +80,6 @@ class ConsumDetailsPage extends Component {
surgery_collect_number: orderId surgery_collect_number: orderId
} }
let detailResult = await requestEquipDetails(global_domain_config, params) let detailResult = await requestEquipDetails(global_domain_config, params)
console.log('detailResult-----',detailResult)
if(detailResult.error_code === 0) { if(detailResult.error_code === 0) {
let {lines} = detailResult.data let {lines} = detailResult.data
// 需要过滤已提过消耗的数据 raised_consume="Y" // 需要过滤已提过消耗的数据 raised_consume="Y"
...@@ -97,15 +90,13 @@ class ConsumDetailsPage extends Component { ...@@ -97,15 +90,13 @@ class ConsumDetailsPage extends Component {
show('当前明细数据为空,请重现选择订单') show('当前明细数据为空,请重现选择订单')
} else { } else {
let {subDetOption} = this.props // 【器械消耗】已存在的明细 let {subDetOption} = this.props // 【器械消耗】已存在的明细
// console.log('subDetOption-----', subDetOption)
subDetOption.length && subDetOption.forEach((item, index) => {
lines.length && lines.forEach((chItem, chInd) => { lines.length && lines.forEach((chItem, chInd) => {
chItem.id = chInd + ''
subDetOption.length && subDetOption.forEach((item) => {
if(chItem.serial_number == item.serial_number) { if(chItem.serial_number == item.serial_number) {
// chItem.sale_price = item.sale_price
chItem.local_add_price = item.local_add_price chItem.local_add_price = item.local_add_price
chItem.select = true chItem.select = true
} }
chItem.id = chInd + ''
}) })
}) })
} }
...@@ -170,13 +161,11 @@ class ConsumDetailsPage extends Component { ...@@ -170,13 +161,11 @@ class ConsumDetailsPage extends Component {
// 取消选择 // 取消选择
handleCelSelCheck(item, index) { handleCelSelCheck(item, index) {
// console.log('取消===cel:', item, index)
this.changeIsSelected(index, false) this.changeIsSelected(index, false)
} }
// 确定选择 // 确定选择
handleSubSelectedCheck(item, index) { handleSubSelectedCheck(item, index) {
// console.log('确定===sub:', item, index)
this.changeIsSelected(index, true) this.changeIsSelected(index, true)
} }
...@@ -190,7 +179,6 @@ class ConsumDetailsPage extends Component { ...@@ -190,7 +179,6 @@ class ConsumDetailsPage extends Component {
this.setState({ this.setState({
conDetaOption conDetaOption
},() => { },() => {
// console.log('conDetaOption---修改-', conDetaOption)
let tempArr = [] let tempArr = []
conDetaOption.forEach(item => { conDetaOption.forEach(item => {
if(item.select) { if(item.select) {
...@@ -205,7 +193,6 @@ class ConsumDetailsPage extends Component { ...@@ -205,7 +193,6 @@ class ConsumDetailsPage extends Component {
// 已选回调函数 // 已选回调函数
detailsCallbak(subOpt) { detailsCallbak(subOpt) {
// console.log('----回调:',subOpt)
let tempOption = [...this.state.conDetaOption] let tempOption = [...this.state.conDetaOption]
// 获取当前已选值 // 获取当前已选值
tempOption = tempOption.map(item => { tempOption = tempOption.map(item => {
...@@ -235,13 +222,11 @@ class ConsumDetailsPage extends Component { ...@@ -235,13 +222,11 @@ class ConsumDetailsPage extends Component {
// 点击 已选 // 点击 已选
handleSubSelected(show) { handleSubSelected(show) {
// console.warn('已选:666!!')
this.handleCloseSelectModal(true) this.handleCloseSelectModal(true)
} }
// 点击 确定耗材 // 点击 确定耗材
handleSubmit() { handleSubmit() {
// console.warn('确定耗材', this.props.navigation.navigate)
this.handleCloseSelectModal(false) this.handleCloseSelectModal(false)
let {localSelectOption} = this.state let {localSelectOption} = this.state
if(!localSelectOption.length) { if(!localSelectOption.length) {
...@@ -268,7 +253,6 @@ class ConsumDetailsPage extends Component { ...@@ -268,7 +253,6 @@ class ConsumDetailsPage extends Component {
<View style={list_common_item.ser_img_box}> <View style={list_common_item.ser_img_box}>
<Image source={require('../../../images/search_icon.png')} style={icon_style}/> <Image source={require('../../../images/search_icon.png')} style={icon_style}/>
</View> </View>
<TouchableOpacity <TouchableOpacity
activeOpacity={.8} activeOpacity={.8}
style={styles.ser_scanit_box} style={styles.ser_scanit_box}
...@@ -276,7 +260,6 @@ class ConsumDetailsPage extends Component { ...@@ -276,7 +260,6 @@ class ConsumDetailsPage extends Component {
> >
<Image source={require('../../../images/scan_2.png')} style={icon_style} /> <Image source={require('../../../images/scan_2.png')} style={icon_style} />
</TouchableOpacity> </TouchableOpacity>
</View> </View>
) )
} }
...@@ -319,7 +302,6 @@ class ConsumDetailsPage extends Component { ...@@ -319,7 +302,6 @@ class ConsumDetailsPage extends Component {
<Image style={icon_style} source={require('../../../images/radio_no.png')} /> <Image style={icon_style} source={require('../../../images/radio_no.png')} />
</TouchableOpacity> </TouchableOpacity>
} }
</View> </View>
<View style={styles.sub_list_rig}> <View style={styles.sub_list_rig}>
<Text style={styles.rig_tit}> <Text style={styles.rig_tit}>
...@@ -354,7 +336,6 @@ class ConsumDetailsPage extends Component { ...@@ -354,7 +336,6 @@ class ConsumDetailsPage extends Component {
<Text style={list_common_item.rig_tip}>{'确定耗材'}</Text> <Text style={list_common_item.rig_tip}>{'确定耗材'}</Text>
</TouchableOpacity> </TouchableOpacity>
</View> </View>
<DetailsModel <DetailsModel
show={ selectShowPopup } show={ selectShowPopup }
closeModal={(show) => this.handleCloseSelectModal(show)} closeModal={(show) => this.handleCloseSelectModal(show)}
...@@ -389,11 +370,8 @@ class ConsumDetailsPage extends Component { ...@@ -389,11 +370,8 @@ class ConsumDetailsPage extends Component {
<HeadBackItem title={title} navigation={navigation} /> <HeadBackItem title={title} navigation={navigation} />
<View style={styles.cu_dl_main}> <View style={styles.cu_dl_main}>
{ this.renderSearchItem() } { this.renderSearchItem() }
{ this.renderContItem() } { this.renderContItem() }
{this.renderLodingItem()} {this.renderLodingItem()}
</View> </View>
{this.renderFooterBtnItem()} {this.renderFooterBtnItem()}
</SafeAreaView> </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