123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151 |
- import React, { Component } from 'react'
- import {
- StyleSheet,
- View,
- FlatList,
- Text,
- StatusBar,
- TouchableOpacity,
- PixelRatio,
- } from 'react-native'
- import { connect } from 'react-redux'
- import Icon from '../../../components/Iconfont/Iconfont'
- import { NavigationActions, createAction } from '../../../utils'
- @connect(({ theme, mine }) => ({ ...theme, ...mine }))
- class Supplier extends Component {
- constructor(props) {
- super(props)
- this.state = {}
- // console.disableYellowBox = true;
- }
- // 头部
- header() {
- return (
- <View
- style={{
- height: HEADERSTYLE.height,
- paddingTop: HEADERSTYLE.paddingTop + 5,
- backgroundColor: '#fff',
- borderBottomColor: '#eee',
- borderBottomWidth: 1 / PixelRatio.get(),
- }}
- >
- <View
- style={{
- flex: 1,
- justifyContent: 'center',
- }}
- >
- <TouchableOpacity
- style={{ position: 'absolute', left: 10, flexDirection: 'row' }}
- onPress={() => this.props.dispatch(NavigationActions.back())}
- >
- <Icon
- name="icon-icon-fanhui"
- size={20}
- color={'#666'}
- style={{ marginTop: 4 }}
- />
- <Text
- style={{
- fontSize: 14,
- lineHeight: 20,
- color: '#666',
- alignSelf: 'center',
- }}
- >
- 返回
- </Text>
- </TouchableOpacity>
- <Text
- style={{
- alignSelf: 'center',
- fontSize: 18,
- lineHeight: 25,
- letterSpacing: 0.19,
- color: '#333',
- }}
- >
- 供应商
- </Text>
- </View>
- </View>
- )
- }
- SupplierList(item) {
- return (
- <View
- style={{
- marginTop: 10,
- padding: 10,
- backgroundColor: '#FFF',
- }}
- >
- <Text
- style={{
- fontSize: 15,
- lineHeight: 21,
- color: '#333',
- fontWeight: '600',
- }}
- >
- {item.saleOrganizationName || item.saleCustomerName}
- </Text>
- {/* <Text
- style={{ fontSize: 14, lineHeight: 20, color: "#666", marginTop: 5 }}
- > */}
- {/* 电 话:{item.tel} */}
- {/* 电 话: -
- </Text> */}
- <Text
- style={{ fontSize: 14, lineHeight: 20, color: '#666', marginTop: 5 }}
- >
- 产品线:{item.productLineName}
- </Text>
- <Text
- style={{ fontSize: 14, lineHeight: 20, color: '#666', marginTop: 3 }}
- >
- 品 牌:{item.brandName}
- </Text>
- </View>
- )
- }
- render() {
- const { appTheme, SupplierInfo } = this.props
- return (
- <View
- style={[
- styles.container,
- { backgroundColor: appTheme.backgroundColor },
- ]}
- >
- <StatusBar
- animated={true}
- barStyle={appTheme.barStyle}
- backgroundColor={'transparent'}
- translucent={true}
- />
- {this.header()}
- <FlatList
- extraData={this.state.collapsed}
- keyExtractor={(item, key) => item.id + key}
- data={SupplierInfo}
- renderItem={({ item, key }) => this.SupplierList(item, key)}
- />
- </View>
- )
- }
- }
- const styles = StyleSheet.create({
- container: {
- flex: 1,
- },
- })
- export default Supplier
|