import React from 'react'; import { Radio, Icon, Button, AutoComplete, Cascader, layout, Input, Select, Tabs, Spin, Popconfirm, Popover, Table, Switch, message, DatePicker, Modal, Upload, Form, Row, Col, TimePicker } from 'antd'; import ajax from 'jquery/src/ajax/xhr.js'; import $ from 'jquery/src/ajax'; import moment from 'moment'; import { citySelect, provinceList, areaSelect,getProvince } from '@/NewDicProvinceList'; import { socialAttribute, industry, newFollow, auditStatusL, lvl, currentMember, cityArr, statuslist, customerStatus, intentionalService, sex } from '@/dataDic.js'; import { getCompanyIntention, splitUrl, getIndustry, getStatuslist, getAuditStatus, getContactType, getSocialAttribute, getfllowSituation, beforeUploadFile, getWhether, getcityArr, getcustomerStatue, getfllowSituationOn, getCertification, getcustomerTyp, getLvl, getCurrentMember, getprovince } from '@/tools.js'; const FormItem = Form.Item; const monthFormat = 'YYYY/MM'; //图片组件 const Basic = React.createClass({ getInitialState() { return { loading: false, orgCodeUrl: [], companyLogoUrl: [], headPortraitUrl: [], positiveIdUrl: [], oppositeIdUrl: [] } }, loadInformation(record) { this.setState({ loading: true }); $.ajax({ method: "get", dataType: "json", crossDomain: false, url: globalConfig.context + '/api/admin/customer/findPersonalCustomerDetail', data: { uid: record }, success: function(data) { let thisData = data.data; if(!thisData) { if(data.error && data.error.length) { message.warning(data.error[0].message); }; thisData = {}; }; let ProvinceS = thisData.province, //getprovince citys = thisData.city, Areas = thisData.area, ProvinceCity = getProvince(ProvinceS, citys, Areas), month = thisData.dateOfBirthYear ? thisData.dateOfBirthYear + '/' + thisData.dateOfBirthMonth : ''; this.setState({ headPortraitUrl: thisData.headPortraitUrl ? splitUrl(thisData.headPortraitUrl, ',', globalConfig.avatarHost + '/upload') : [], positiveIdUrl: thisData.positiveIdUrl ? splitUrl(thisData.positiveIdUrl, ',', globalConfig.avatarHost + '/upload') : [], oppositeIdUrl: thisData.oppositeIdUrl ? splitUrl(thisData.oppositeIdUrl, ',', globalConfig.avatarHost + '/upload') : [], ProvinceCity: ProvinceCity, month:month, basicData:thisData }); }.bind(this), }).always(function() { this.setState({ loading: false }); }.bind(this)); }, //图片 getOrgCodeUrl(e) { this.setState({ orgCodeUrl: e }); }, getCompanyLogoUrl(e) { this.setState({ companyLogoUrl: e }); }, //取消 detailsModal() { this.props.closeDetail(false, false) }, getHeadPortraitUrl(e) { this.setState({ headPortraitUrl: e }); }, getPositiveIdUrl(e) { this.setState({ positiveIdUrl: e }); }, getOppositeIdUrl(e) { this.setState({ oppositeIdUrl: e }); }, componentWillMount() { this.loadInformation(this.props.data.id) }, componentWillReceiveProps(nextProps) { if(nextProps.data && nextProps.basicState) { this.loadInformation(nextProps.data.id) } }, render() { const formItemLayout = { labelCol: { span: 8 }, wrapperCol: { span: 14 }, }; const basicData = this.state.basicData ||[]; return(
{basicData.identifyName}
{getIndustry(basicData.industry)} {getSocialAttribute(basicData.societyTag)} {this.state.ProvinceCity} {this.state.month} {basicData.idNumber} {basicData.contacts} {basicData.contactMobile}
{basicData.professionalTitle} {basicData.workUnit} {basicData.education} {basicData.graduateSchool} {basicData.majorCategory} {basicData.qualification} {basicData.postalAddress} {basicData.fixedTel} {basicData.qq} {basicData.email} {basicData.consultationPrice}
{basicData.sex}
{basicData.introduction}
{ this.setState({ previewImage: file.url || file.thumbUrl, previewVisible: true, }); }} > { this.setState({ previewVisible: false }) }}>
{ this.setState({ previewImage: file.url || file.thumbUrl, previewVisible: true, }); }} > { this.setState({ previewVisible: false }) }}>
{ this.setState({ previewImage: file.url || file.thumbUrl, previewVisible: true, }); }} > { this.setState({ previewVisible: false }) }}>
) } }) export default Basic;