Showing
1 changed file
with
70 additions
and
4 deletions
| @@ -8,7 +8,7 @@ import { | @@ -8,7 +8,7 @@ import { | ||
| 8 | TouchableOpacity, | 8 | TouchableOpacity, |
| 9 | ScrollView, | 9 | ScrollView, |
| 10 | ListView, | 10 | ListView, |
| 11 | - Dimensions, | 11 | + Dimensions |
| 12 | } from "react-native"; | 12 | } from "react-native"; |
| 13 | import { StackNavigator, TabNavigator } from "react-navigation"; | 13 | import { StackNavigator, TabNavigator } from "react-navigation"; |
| 14 | import post from "../../utils/fetch"; | 14 | import post from "../../utils/fetch"; |
| @@ -21,7 +21,7 @@ export default class Import extends Component { | @@ -21,7 +21,7 @@ export default class Import extends Component { | ||
| 21 | componentWillMount() {} | 21 | componentWillMount() {} |
| 22 | 22 | ||
| 23 | componentDidMount() { | 23 | componentDidMount() { |
| 24 | - console.log("导入客户",this.props.navigation.state.params); | 24 | + console.log("导入客户", this.props.navigation.state.params); |
| 25 | } | 25 | } |
| 26 | 26 | ||
| 27 | getListData() { | 27 | getListData() { |
| @@ -30,9 +30,36 @@ export default class Import extends Component { | @@ -30,9 +30,36 @@ export default class Import extends Component { | ||
| 30 | 30 | ||
| 31 | render() { | 31 | render() { |
| 32 | const { navigate } = this.props.navigation; | 32 | const { navigate } = this.props.navigation; |
| 33 | + const customersList = this.props.navigation.state.params.customersList; | ||
| 33 | return ( | 34 | return ( |
| 34 | <View style={styles.container}> | 35 | <View style={styles.container}> |
| 35 | - <Text>导入客户</Text> | 36 | + {/* <Text>导入客户</Text> */} |
| 37 | + <ScrollView style={styles.mainSvcContainer}> | ||
| 38 | + {customersList.map((item, index) => { | ||
| 39 | + return ( | ||
| 40 | + <TouchableOpacity key={index}> | ||
| 41 | + <View /> | ||
| 42 | + <Text>{item.name}</Text> | ||
| 43 | + </TouchableOpacity> | ||
| 44 | + ); | ||
| 45 | + })} | ||
| 46 | + </ScrollView> | ||
| 47 | + <View style={styles.selectBtnContaier}> | ||
| 48 | + <View style={styles.selectBtnContaierLeft}> | ||
| 49 | + <TouchableOpacity style={styles.selectAllContainer}> | ||
| 50 | + <View style={styles.selectAllIcon} /> | ||
| 51 | + <Text style={styles.selectAllText}>全选</Text> | ||
| 52 | + </TouchableOpacity> | ||
| 53 | + <View style={styles.selectedTextContaier}> | ||
| 54 | + <Text>已选中</Text> | ||
| 55 | + <Text>0</Text> | ||
| 56 | + <Text>项</Text> | ||
| 57 | + </View> | ||
| 58 | + </View> | ||
| 59 | + <TouchableOpacity style={styles.importBtnContaier}> | ||
| 60 | + <Text style={styles.importBtnText}>导入</Text> | ||
| 61 | + </TouchableOpacity> | ||
| 62 | + </View> | ||
| 36 | </View> | 63 | </View> |
| 37 | ); | 64 | ); |
| 38 | } | 65 | } |
| @@ -43,6 +70,45 @@ const styles = StyleSheet.create({ | @@ -43,6 +70,45 @@ const styles = StyleSheet.create({ | ||
| 43 | flex: 1, | 70 | flex: 1, |
| 44 | justifyContent: "flex-start", | 71 | justifyContent: "flex-start", |
| 45 | alignItems: "stretch", | 72 | alignItems: "stretch", |
| 46 | - backgroundColor: "#EFEFEF" | 73 | + backgroundColor: "white" |
| 74 | + }, | ||
| 75 | + mainSvcContainer: { | ||
| 76 | + marginBottom: 50, | ||
| 77 | + flex: 1 | ||
| 78 | + }, | ||
| 79 | + selectBtnContaier: { | ||
| 80 | + position: "absolute", | ||
| 81 | + bottom: 0, | ||
| 82 | + backgroundColor: "white", | ||
| 83 | + height: 49, | ||
| 84 | + width: Dimensions.get("window").width, | ||
| 85 | + flexDirection: "row", | ||
| 86 | + justifyContent: "space-between", | ||
| 87 | + alignItems: "center", | ||
| 88 | + flex: 1, | ||
| 89 | + borderColor: "#E4E4E4", | ||
| 90 | + borderStyle: "solid", | ||
| 91 | + borderTopWidth: 1 | ||
| 92 | + }, | ||
| 93 | + selectBtnContaierLeft: { | ||
| 94 | + flexDirection: "row", | ||
| 95 | + }, | ||
| 96 | + selectAllContainer: { | ||
| 97 | + marginLeft: 20, | ||
| 98 | + }, | ||
| 99 | + selectedTextContaier: { | ||
| 100 | + flexDirection: "row", | ||
| 101 | + marginLeft: 20, | ||
| 102 | + }, | ||
| 103 | + importBtnContaier: { | ||
| 104 | + width: 100, | ||
| 105 | + height: 49, | ||
| 106 | + backgroundColor: "#1B9341", | ||
| 107 | + justifyContent: "center", | ||
| 108 | + alignItems: "center", | ||
| 109 | + }, | ||
| 110 | + importBtnText: { | ||
| 111 | + color: "white", | ||
| 112 | + fontSize: 16, | ||
| 47 | } | 113 | } |
| 48 | }); | 114 | }); |
-
Please register or login to post a comment