| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261 | 
							- 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(
 
- 			<div>
 
- 				 <Form layout="horizontal" onSubmit={this.newSubmit} id="demand-form">
 
- 	                <Spin spinning={this.state.loading}>
 
- 		               	<div className="clearfix" style={{paddingLeft:'60px'}}>
 
- 	                    	<FormItem className="half-item"
 
- 			                    labelCol={{ span: 4 }}
 
- 			                    wrapperCol={{ span: 18 }}
 
- 			                    label="客户名称"
 
- 		                        >
 
- 		                        <span>{basicData.identifyName}</span>
 
- 		                    </FormItem>
 
- 	                    </div>
 
- 	                    <div className="clearfix" style={{paddingLeft:'60px'}}>
 
- 	                    	<FormItem className="half-item" 
 
- 	                         labelCol={{ span: 4 }}
 
- 	                         wrapperCol={{ span: 18 }}
 
- 	                         label="行业">
 
-                                 <span>{getIndustry(basicData.industry)}</span>
 
- 	                   		 </FormItem>
 
- 	                   		 <FormItem className="half-item" 
 
- 	                           labelCol={{ span: 4 }}
 
- 	                            wrapperCol={{ span: 18 }}
 
- 	                           label="社会属性"
 
- 	                         > 
 
-                                 <span>{getSocialAttribute(basicData.societyTag)}</span>
 
- 	                   		 </FormItem>
 
- 	                         <FormItem className="half-item" 
 
- 	                           labelCol={{ span: 4 }}
 
- 	                           wrapperCol={{ span: 18 }}
 
- 	                           label="省-市-区"
 
- 	                          > 
 
- 								<span>{this.state.ProvinceCity}</span>
 
- 		                   </FormItem>
 
- 		                   <FormItem className="half-item"
 
- 			                    	labelCol={{ span: 4 }}
 
- 			                        wrapperCol={{ span: 18 }}
 
- 			                         label="通信地址"
 
- 		                            >
 
- 		                   		<span>{basicData.postalAddress}</span>
 
- 		                    </FormItem>
 
- 		                    <FormItem className="half-item"
 
- 			                    	labelCol={{ span: 4 }}
 
- 			                        wrapperCol={{ span: 18 }}
 
- 			                         label="固定电话"
 
- 		                            >
 
- 		                   			<span>{basicData.contactsFixedTel}</span>
 
- 		                    </FormItem>
 
- 		                    <FormItem className="half-item"
 
- 			                    	labelCol={{ span: 4 }}
 
- 			                        wrapperCol={{ span: 18 }}
 
- 			                        label="客户传真"
 
- 		                            >
 
- 		                   		<span>{basicData.contactsFax}</span>
 
- 		                    </FormItem>
 
- 		                    <FormItem className="half-item"
 
- 			                    	labelCol={{ span: 4 }}
 
- 			                        wrapperCol={{ span: 18 }}
 
- 			                        label="注册资本"
 
- 		                            >	
 
- 		                   		   <span>{basicData.registeredCapital}</span>
 
- 		                    </FormItem>
 
- 		                    <FormItem className="half-item"
 
- 			                    	labelCol={{ span: 4 }}
 
- 			                        wrapperCol={{ span: 18 }}
 
- 			                        label="单位规模"
 
- 		                            >
 
- 		                   		   <span>{basicData.enterpriseScale}</span>
 
- 		                    </FormItem>
 
- 		                    <FormItem className="half-item"
 
- 			                    	labelCol={{ span: 4 }}
 
- 			                        wrapperCol={{ span: 18 }}
 
- 			                        label="法人名称"
 
- 		                            >
 
- 		                   		    <span>{basicData.legalPerson}</span>
 
- 		                    </FormItem>
 
- 		                    <FormItem className="half-item"
 
- 			                    	labelCol={{ span: 4 }}
 
- 			                        wrapperCol={{ span: 18 }}
 
- 			                        label="身份证号码"
 
- 		                            >
 
- 		                   		    <span>{basicData.legalPersonIdCard}</span>
 
- 		                    </FormItem>
 
- 		                    <FormItem className="half-item" 
 
- 			                    	labelCol={{ span: 4 }}
 
- 			                        wrapperCol={{ span: 18 }}
 
- 			                        label="主要联系人"
 
- 	                           	 >
 
- 		                   		    <span>{basicData.contacts}</span>
 
- 		                     </FormItem>
 
- 		                     <FormItem className="half-item" 
 
- 			                    	labelCol={{ span: 4 }}
 
- 			                        wrapperCol={{ span: 18 }}
 
- 			                        label="主要联系人号码"
 
- 	                           	 >	
 
- 		                   		    <span>{basicData.contactMobile}</span>
 
- 		                     </FormItem>
 
- 		                    <FormItem className="half-item"
 
- 			                    	labelCol={{ span: 4 }}
 
- 			                        wrapperCol={{ span: 18 }}
 
- 			                        label="法人电话"
 
- 		                            > 
 
- 		                   		    <span>{basicData.legalPersonTel}</span>
 
- 		                    </FormItem>
 
- 		                    <FormItem className="half-item"
 
- 			                    	labelCol={{ span: 4 }}
 
- 			                        wrapperCol={{ span: 18 }}
 
- 			                        label="电子邮箱"
 
- 		                            >
 
- 		                   		    <span>{basicData.legalPersonEmail}</span>
 
- 		                    </FormItem>
 
- 				            <FormItem className="half-item"
 
- 			                    	labelCol={{ span: 4 }}
 
- 			                        wrapperCol={{ span: 18 }}
 
- 			                        label="机构代码"
 
- 		                            >
 
- 		                   		    <span>{basicData.orgCode}</span>
 
- 		                    </FormItem>
 
- 		                    <div className="clearfix pictures">
 
- 		                        <FormItem
 
- 			                        labelCol={{ span: 4 }}
 
- 			                        wrapperCol={{ span: 18 }}
 
- 			                        label="机构证(PIC)" >
 
- 			                        <div className="clearfix">
 
- 			                            <Upload className="demandDetailShow-upload"
 
- 			                                listType="picture-card"
 
- 			                                fileList={this.state.orgCodeUrl}                               
 
- 			                                onPreview={(file) => {
 
- 			                                    this.setState({
 
- 			                                        previewImage: file.url || file.thumbUrl,
 
- 			                                        previewVisible: true,
 
- 			                                    });
 
- 			                                }} >
 
- 			                            </Upload>
 
- 			                            <Modal maskClosable={false} footer={null}
 
- 			                                visible={this.state.previewVisible}
 
- 			                                onCancel={() => { this.setState({ previewVisible: false }) }}>
 
- 			                                <img alt="" style={{ width: '100%' }} src={this.state.previewImage || ''} />
 
- 			                            </Modal>
 
- 			                        </div>    
 
- 		                        </FormItem>
 
- 		                        <FormItem
 
- 			                        labelCol={{ span: 4 }}
 
- 			                        wrapperCol={{ span: 18 }}
 
- 			                        label="单位logo" > 
 
- 			                        <div className="clearfix">
 
- 			                            <Upload className="demandDetailShow-upload"
 
- 			                                listType="picture-card"
 
- 			                                fileList={this.state.companyLogoUrl}                               
 
- 			                                onPreview={(file) => {
 
- 			                                    this.setState({
 
- 			                                        previewImage: file.url || file.thumbUrl,
 
- 			                                        previewVisible: true,
 
- 			                                    });
 
- 			                                }} >
 
- 			                            </Upload>
 
- 			                            <Modal maskClosable={false} footer={null}
 
- 			                                visible={this.state.previewVisible}
 
- 			                                onCancel={() => { this.setState({ previewVisible: false }) }}>
 
- 			                                <img alt="" style={{ width: '100%' }} src={this.state.previewImage || ''} />
 
- 			                            </Modal>
 
- 			                        </div>       
 
- 			                    </FormItem>
 
- 			                </div> 
 
- 			                <div className="clearfix">
 
- 			                    <FormItem
 
- 		                        labelCol={{ span: 2 }}
 
- 		                        wrapperCol={{ span: 18 }}
 
- 		                        label="业务范围" >
 
- 		                   			<span>{basicData.businessScope}</span>
 
- 			                    </FormItem>
 
- 			                    <FormItem
 
- 			                        labelCol={{ span: 2 }}
 
- 			                        wrapperCol={{ span: 18 }}
 
- 			                        label="单位简介" >
 
- 		                   			<span>{basicData.introduction}</span>
 
- 			                    </FormItem>
 
- 		                    </div>
 
- 	                    </div>		                	
 
- 				    </Spin>
 
- 				</Form>		
 
- 			</div>
 
- 		)
 
- 	}
 
- })
 
- export default Basic;
 
 
  |