Commit 30835c4d by wong.peiyi

APP提报消耗选择明细时非序列不展示,增加生产批号、生产序号、生产日期、过期日期等字段展示

parent 6d18288b
...@@ -11,6 +11,7 @@ import LodingModel from '../../common/LodingModel'; ...@@ -11,6 +11,7 @@ import LodingModel from '../../common/LodingModel';
import { exitLoginStatus } from '../../../action/LoginAction'; import { exitLoginStatus } from '../../../action/LoginAction';
import { OBS_MOBILE_EQU_CON_DISPLAY_PRICE } from '../../../base/BaseConstants'; import { OBS_MOBILE_EQU_CON_DISPLAY_PRICE } from '../../../base/BaseConstants';
import { LOGIN_NO } from '../../../base/ActionTypes'; import { LOGIN_NO } from '../../../base/ActionTypes';
import moment from 'moment';
const CONSUM_SEARCH_VALUE_BAR_CODE = 'CONSUM_SEARCH_VALUE_BAR_CODE'; const CONSUM_SEARCH_VALUE_BAR_CODE = 'CONSUM_SEARCH_VALUE_BAR_CODE';
...@@ -18,7 +19,7 @@ const CONSUM_SEARCH_VALUE_BAR_CODE = 'CONSUM_SEARCH_VALUE_BAR_CODE'; ...@@ -18,7 +19,7 @@ const CONSUM_SEARCH_VALUE_BAR_CODE = 'CONSUM_SEARCH_VALUE_BAR_CODE';
class ConsumDetailsPage extends Component { class ConsumDetailsPage extends Component {
constructor(props) { constructor(props) {
super(props); super(props);
this.state = { this.state = {
searchValue: '', searchValue: '',
conDetaOption: [], conDetaOption: [],
allConOption: [], // 所有数据(未筛选过的) allConOption: [], // 所有数据(未筛选过的)
...@@ -48,7 +49,7 @@ class ConsumDetailsPage extends Component { ...@@ -48,7 +49,7 @@ class ConsumDetailsPage extends Component {
case LOGIN_NO: case LOGIN_NO:
navigation.navigate('LoginPage') navigation.navigate('LoginPage')
break; break;
default: default:
break; break;
} }
} }
...@@ -113,7 +114,7 @@ class ConsumDetailsPage extends Component { ...@@ -113,7 +114,7 @@ class ConsumDetailsPage extends Component {
// 满足搜索条件 // 满足搜索条件
tempArr.push(item) tempArr.push(item)
} }
}) })
} else { } else {
tempArr = [...allConOption] tempArr = [...allConOption]
} }
...@@ -212,7 +213,7 @@ class ConsumDetailsPage extends Component { ...@@ -212,7 +213,7 @@ class ConsumDetailsPage extends Component {
handleSubSelected(show) { handleSubSelected(show) {
this.handleCloseSelectModal(true) this.handleCloseSelectModal(true)
} }
// 点击 确定耗材 // 点击 确定耗材
handleSubmit() { handleSubmit() {
this.handleCloseSelectModal(false) this.handleCloseSelectModal(false)
...@@ -270,7 +271,7 @@ class ConsumDetailsPage extends Component { ...@@ -270,7 +271,7 @@ class ConsumDetailsPage extends Component {
keyExtractor={item => item.id} keyExtractor={item => item.id}
data={this.state.conDetaOption} data={this.state.conDetaOption}
extraData={this.state} extraData={this.state}
renderItem={ ({item, index}) => this.renderSubListItem(item, index) } renderItem={ ({item, index}) => this.renderSubListItem(item, index) }
/> />
</ScrollView> </ScrollView>
) )
...@@ -284,7 +285,7 @@ class ConsumDetailsPage extends Component { ...@@ -284,7 +285,7 @@ class ConsumDetailsPage extends Component {
style={styles.cons_sub_list} style={styles.cons_sub_list}
onPress={() => this.handleSubSelectCheck(index, !item.select)}> onPress={() => this.handleSubSelectCheck(index, !item.select)}>
<View style={styles.sub_list_lef}> <View style={styles.sub_list_lef}>
{ item.select ? { item.select ?
<View <View
style={styles.sub_icon_box} style={styles.sub_icon_box}
// onPress={() => this.handleCelSelCheck(item, index)} // onPress={() => this.handleCelSelCheck(item, index)}
...@@ -300,19 +301,31 @@ class ConsumDetailsPage extends Component { ...@@ -300,19 +301,31 @@ class ConsumDetailsPage extends Component {
</View> </View>
<View style={styles.sub_list_rig}> <View style={styles.sub_list_rig}>
<Text style={styles.rig_tit}> <Text style={styles.rig_tit}>
{index+1}. {item.manufacturer_product_code ? item.manufacturer_product_code : '厂家产品代码无'} {index+1}. {item.manufacturer_product_code || '无厂家产品代码'}
</Text>
<Text style={[styles.rig_ser, styles.te_ot_str]} numberOfLines={1}>
物料名称 {item.item_name || '无'}
</Text>
<Text style={[styles.rig_ser, styles.te_ot_one]} numberOfLines={1}>
通用名称 {item.general_name || '无'}
</Text>
<Text style={[styles.rig_ser, styles.te_ot_one]} numberOfLines={1}>
规格型号:{item.specification || '无'}
</Text>
<Text style={[styles.rig_ser, styles.te_ot_thr]} numberOfLines={1}>
序列号:{item.serial_number_v || item.serial_number || '无'}
</Text> </Text>
<Text style={[styles.rig_ser, styles.te_ot_str]}> <Text style={[styles.rig_ser, styles.te_ot_thr]} numberOfLines={1}>
物料名称 {item.item_name ? item.item_name : '无'} 生产批号:{item.production_batch_number || '无'}
</Text> </Text>
<Text style={[styles.rig_ser, styles.te_ot_one]}> <Text style={[styles.rig_ser, styles.te_ot_thr]} numberOfLines={1}>
通用名称 {item.general_name ? item.general_name : '无'} 生产序号:{item.production_serial_number || '无'}
</Text> </Text>
<Text style={[styles.rig_ser, styles.te_ot_one]}> <Text style={[styles.rig_ser, styles.te_ot_thr]} numberOfLines={1}>
规格型号:{item.specification ? item.specification : '无'} 生产日期:{item.production_date && moment(item.production_date).format('YYYY-MM-DD') || '无'}
</Text> </Text>
<Text style={[styles.rig_ser, styles.te_ot_thr]}> <Text style={[styles.rig_ser, styles.te_ot_thr]} numberOfLines={1}>
序列号:{item.serial_number ? item.serial_number : '无'} 过期日期:{item.expiration_date && moment(item.expiration_date).format('YYYY-MM-DD') || '无'}
</Text> </Text>
</View> </View>
</TouchableOpacity> </TouchableOpacity>
...@@ -363,7 +376,7 @@ class ConsumDetailsPage extends Component { ...@@ -363,7 +376,7 @@ class ConsumDetailsPage extends Component {
render() { render() {
let {navigation} = this.props let {navigation} = this.props
let {title} = navigation.state.params let {title} = navigation.state.params
return ( return (
<View style={styles.cu_dl_container}> <View style={styles.cu_dl_container}>
<StatusBarView <StatusBarView
isReactStackNavigator={true} isReactStackNavigator={true}
...@@ -396,9 +409,9 @@ const styles = StyleSheet.create({ ...@@ -396,9 +409,9 @@ const styles = StyleSheet.create({
}, },
list_cont: { list_cont: {
flex: 1 flex: 1
}, },
item_container: { item_container: {
flex: 1 flex: 1
}, },
cons_cont_scroll: {}, cons_cont_scroll: {},
cons_cont: { cons_cont: {
...@@ -430,7 +443,7 @@ const styles = StyleSheet.create({ ...@@ -430,7 +443,7 @@ const styles = StyleSheet.create({
}, },
rig_ser: { rig_ser: {
fontSize: third_text_size, fontSize: third_text_size,
fontFamily: font_family_regular fontFamily: font_family_regular,
}, },
te_ot_str: { te_ot_str: {
fontFamily: font_family_semibold, fontFamily: font_family_semibold,
...@@ -476,5 +489,5 @@ const mapDispatchToProps = (dispatch) => { ...@@ -476,5 +489,5 @@ const mapDispatchToProps = (dispatch) => {
} }
} }
} }
export default connect(mapStateToProps, mapDispatchToProps)(ConsumDetailsPage); export default connect(mapStateToProps, mapDispatchToProps)(ConsumDetailsPage);
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