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 Basic = React.createClass({ getInitialState() { return { loading: false, orgCodeUrl: [], companyLogoUrl: [], } }, loadInformation(record) { $.ajax({ method: "get", dataType: "json", url: globalConfig.context + '/api/admin/customer/findOrganizationCustomerDetail', 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.locationProvince, //getprovince citys = thisData.locationCity, Areas = thisData.locationArea, ProvinceCity = getProvince(ProvinceS, citys, Areas); this.setState({ orgCodeUrl: thisData.orgCodeUrl ? splitUrl(thisData.orgCodeUrl, ',', globalConfig.avatarHost + '/upload') : [], companyLogoUrl: thisData.companyLogoUrl ? splitUrl(thisData.companyLogoUrl, ',', globalConfig.avatarHost + '/upload') : [], ProvinceCity: ProvinceCity, 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) }, componentWillMount(){ this.loadInformation(this.props.data.id) }, componentWillReceiveProps(nextProps) { if(nextProps.data&&nextProps.basicState){ this.loadInformation(nextProps.data.id) } }, render() { const basicData = this.state.basicData || []; return(
{basicData.identifyName}
{getIndustry(basicData.industry)} {getSocialAttribute(basicData.societyTag)} {this.state.ProvinceCity} {basicData.postalAddress} {basicData.contactsFixedTel} {basicData.contactsFax} {basicData.registeredCapital} {basicData.enterpriseScale} {basicData.legalPerson} {basicData.legalPersonIdCard} {basicData.contacts} {basicData.contactMobile} {basicData.legalPersonTel} {basicData.legalPersonEmail} {basicData.orgCode}
{ 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 }) }}>
{basicData.businessScope} {basicData.introduction}
) } }) export default Basic;