content: import React from 'react';
  import company from './company.png';
  import Panel from 'react-bootstrap/lib/Panel';
  
  const styles = {
    root: {
      position: 'relative',
      marginBottom: 10,
      borderTop: 'none',
      borderLeft: 'none',
      borderRight: 'none',
      height: 110,
    },
    img: {
      position: 'absolute',
      left: 20,
      top: 20,
      width: 40,
      height: 40,
    },
    info: {
      position: 'absolute',
      left: 75,
      top: 17,
      height: 40,
    },
    title: {
      color: '#1a1a1a',
      fontSize: 16
    },
    code: {
      float: 'left',
      fontSize: 12,
      color: '#808080'
    },
    reason: {
      position: 'relative',
      float: 'left',
      left: 20,
      fontSize: 12,
      color: '#808080'
    },
    detail: {
      position: 'absolute',
      left: 75,
      top: 70,
      margin: 0,
      padding: 0,
      listStyle: 'none'
    },
    item: {
      display: 'inline-block',
      marginRight: 70,
      fontSize: 13,
      color: '#666'
    },
    itemInfo: {
      color: '#1a1a1a'
    }
  };
  
  export default class Info extends React.Component {
    static propTypes = {
      customInfo: React.PropTypes.object,
    };
  
    constructor(props) {
      super(props);
    }
  
    componentDidMount() {
    }
  
    render() {
      const customInfo = this.props.customInfo || {};
      const {code, industry, name, region, link_man: linkman, customer_manager: customerManager, type, recommend_reason: recommendReason} = customInfo.basicInfo || {};
      const reason = recommendReason === undefined ? false : true;
      return (
        <Panel style={styles.root}>
          <div>
            <img style={styles.img} src={company} alt=""/>
            <div style={styles.info}>
              <div style={styles.title}>{name}</div>
              <div style={styles.code}>客户编码： {code}</div>
              {reason && <div style={styles.reason}>推荐原因： {recommendReason}</div>}
            </div>
          </div>
          <ul style={styles.detail}>
            <li style={styles.item}>
              <span>客户类型：</span>
              <span style={styles.itemInfo}>{type}</span>
            </li>
            <li style={styles.item}>
              <span>{customerManager ? '客户经理' : '联系人'}：</span>
              <span style={styles.itemInfo}>{customerManager || linkman}</span>
            </li>
            <li style={styles.item}>
              <span>省市：</span>
              <span style={styles.itemInfo}>{region}</span>
            </li>
            <li style={styles.item}>
              <span>行业：</span>
              <span style={styles.itemInfo}>{industry}</span>
            </li>
          </ul>
        </Panel>
      );
    }
  }
  