import React, { Component } from 'react';
import { Text, View, TextInput, Button, TouchableOpacity } from 'react-native';
export class Setting extends Component {
constructor(props) {
super(props);
this.state = {
selectGoodTag: 0,
text1:'',
text2:'',
text3:'',
text4:'',
text5:'',
text6:'',
text7:'' };
}
render() {
return (
<TouchableOpacity onPress={() => this.setState({ selectGoodTag: 0 })}>
<View style={{ alignItems:'center', justifyContent:'center', marginTop:20, padding:20 }}>
体系服务
<TouchableOpacity title="VIP专区" onPress={() => this.setState({ selectGoodTag: 1 })}>
<View style={{ alignItems:'center', justifyContent:'center', marginTop:20, padding:20 }}>
VIP专区
{this.state.selectGoodTag === 0 ?
<View style={[{ height: 45, flexDirection: 'row' }]}>
<View style={{ flex: 1, justifyContent: 'center' }}>
厂商指导价
<View style={{ flex: 1, justifyContent: 'center' }}>
<TextInput
style={{ textAlign: 'right', color: '#333', paddingRight: 10 }}
placeholder="请输入厂商指导价"
placeholderTextColor="#ddd"
onChangeText={(text) => {
this.setState({ text1:text });
}}
value={this.state.text1}
underlineColorAndroid="transparent"
/>
<View style={[{ height: 45, flexDirection: 'row' } ]}>
<View style={{ flex: 1, justifyContent: 'center' }}>
市场零售价
<View style={{ flex: 1, justifyContent: 'center' }}>
<TextInput
style={{ textAlign: 'right', color: '#333', paddingRight: 10 }}
placeholder="请输入市场零售价"
placeholderTextColor="#ddd"
onChangeText={(text) => {
this.setState({ text2:text });
}}
value={this.state.text2}
underlineColorAndroid="transparent"
/>
<View style={[{ height: 45, flexDirection: 'row' }, ]}>
<View style={{ flex: 1, justifyContent: 'center' }}>
进货价
<View style={{ flex: 1, justifyContent: 'center' }}>
<TextInput
style={{ textAlign: 'right', color: '#333', paddingRight: 10 }}
placeholder="请输入进货价"
placeholderTextColor="#ddd"
onChangeText={(text) => {
this.setState({ text3:text });
}}
value={this.state.text3}
underlineColorAndroid="transparent"
/>
:
<View style={[{ height: 45, flexDirection: 'row' }, ]}>
<View style={{ flex: 1, justifyContent: 'center' }}>
市场零售价
<View style={{ flex: 1, justifyContent: 'center' }}>
<TextInput
style={{ textAlign: 'right', color: '#333', paddingRight: 10 }}
placeholder="请输入市场零售价"
placeholderTextColor="#ddd"
onChangeText={(text) => {
this.setState({ text4:text });
}}
value={this.state.text4}
underlineColorAndroid="transparent"
/>
<View style={[{ height: 45, flexDirection: 'row' }, ]}>
<View style={{ flex: 1, justifyContent: 'center' }}>
<Text style={{ fontSize: 14 }}>批发价 <Text
style={{ fontSize: 12, color: 'red' }}
>(购买现金)
<View style={{ flex: 1, justifyContent: 'center' }}>
<TextInput
style={{ textAlign: 'right', color: '#333', paddingRight: 10 }}
placeholder="请输入批发价"
placeholderTextColor="#ddd"
onChangeText={(text) => {
this.setState({ text5:text });
}}
value={this.state.text5}
underlineColorAndroid="transparent"
/>
<View style={[{ height: 45, flexDirection: 'row' }, ]}>
<View style={{ flex: 1, justifyContent: 'center' }}>
赠送积分
<View style={{ flex: 1, justifyContent: 'center' }}>
<TextInput
style={{ textAlign: 'right', color: '#333', paddingRight: 10 }}
placeholder="请输入赠送积分"
placeholderTextColor="#ddd"
onChangeText={(text) => {
this.setState({ text6:text });
}}
value={this.state.text6}
underlineColorAndroid="transparent"
/>
}
);
}
}