import React from 'react';
import { Avatar, Row, Col } from 'antd';
import apis from '../../../services/apis';
import moment from 'moment';
import WxDictSelect from '@/components/SelectButton/WxDictSelect';
import BuildingSelect from '@/components/SelectButton/BuildSelect';
import QueryTable from '@/components/QueryTable';

function costomerDeal(props) {
  const { detail } = props;

  const list = [
    {
      title: '所属项目',
      render: detail.buildingName,
    },
    {
      title: '客户姓名',
      render: detail.name,
    },
    {
      title: '归属渠道',
      render: detail.recommendName
        ? `${detail.recommendName}/${detail.recommendTel}`
        : '--',
    },
    {
      title: '内场接待',
      render: detail.realtyConsultantName ? `${detail.realtyConsultantName}/${detail.realtyConsultantTel}` : '--',
    },
    {
      title: '业绩分成人|占比%',
      render: detail.dividendsName,
    },
    {
      title: '户型',
      render: detail.houseTypeName,
    },
    {
      title: '房号',
      render: detail.houseInfo,
    },
    {
      title: '签约日期',
      render: moment(detail.createDate).format('YYYY-MM-DD HH:mm:ss'),
    },
    {
      title: '成交金额',
      render: detail.price,
    },
    {
      title: '备注',
      render: detail.remark,
    },
  ];

  return (
    <>
      <Row>
        {list.map((x, index) => {
          return (
            <div key={index} style={{ marginBottom: '20px', display: 'flex' }}>
              <Col span={7}>{x.title}:</Col>
              <Col span={17}>{x.render || '--'}</Col>
            </div>
          );
        })}
      </Row>
    </>
  );
}

export default costomerDeal;
