liting2017 6 years ago
parent
commit
98f3729aa9

+ 2 - 2
js/component/manageCenter/customer/NEW/intentionCustomer/addIntention.jsx

@@ -88,7 +88,7 @@ const AchievementDetailForm = Form.create()(React.createClass({
             <Form layout="horizontal" onSubmit={this.handleSubmit} id="demand-form">
                 <Spin spinning={this.state.loading}>
                 	<div>
-               	    	<Col style={{color:'red',marginBottom:'10px'}} span={12} offset={6}>注:请录入真实有效的客户信息</Col>
+               	    	<Col style={{color:'red',marginBottom:'10px'}} span={12} offset={6}>注:请录入真实有效的客户信息</Col>
 	                    <div className="clearfix">
 	                    	<FormItem className="mid-item"
 		                            {...formItemLayout}
@@ -255,7 +255,7 @@ const AddPerson = Form.create()(React.createClass({
         <div>
             <Form layout="horizontal" onSubmit={this.handleSubmit} id="demand-form">
                 <Spin spinning={this.state.loading}>
-               	    <Col style={{color:'red',marginBottom:'10px'}} span={12} offset={6}>注:请录入真实有效的客户信息</Col>
+               	    <Col style={{color:'red',marginBottom:'10px'}} span={12} offset={6}>注:请录入真实有效的客户信息</Col>
 	                <div className="clearfix">
                     	<FormItem className="mid-item"
 	                            {...formItemLayout}

+ 1 - 0
js/component/manageCenter/customer/NEW/intentionCustomer/followDetail.jsx

@@ -152,6 +152,7 @@ const FollowDetail = React.createClass({
 			addcontactModul:false,
 			visitModul: false
 		});
+		this.props.closeDesc(false,false)
 	},
 	//获取联系人下拉框
 	getNewWoman(ids) {

+ 0 - 1
js/component/manageCenter/customer/NEW/intentionCustomer/intentionCustomer.jsx

@@ -10,7 +10,6 @@ import { getSocialAttribute, beforeUploadFile } from '@/tools.js';
 import FollowDetail from './followDetail.jsx'
 import IntentionDetail from './intentionDetail/intentionDetail.jsx'
 import './customer.less';
-
 const IntentionCustomer = Form.create()(React.createClass({
 	loadData(pageNo, apiUrl) {
 		this.setState({

+ 0 - 11
js/component/manageCenter/customer/NEW/intentionCustomer/intentionDetail/detail/basicPerson.jsx

@@ -480,17 +480,6 @@ const Basic = React.createClass({
 			                    </FormItem>
 			                </div>
 		                    <div className="clearfix">
-						        <FormItem className="half-item"
-					                {...formItemLayout}
-			                        label="国际化"
-					            > 
-			                   		 <Radio.Group value={this.state.international} onChange={(e) => {
-					                        this.setState({ international:  e.target.value })
-					                    }}>
-					                        <Radio value={0}>否</Radio>
-					                        <Radio value={1}>是</Radio>
-					                  </Radio.Group>
-					             </FormItem>
 		                   		 <FormItem className="half-item" 
 			                            {...formItemLayout}
 			                           label="性别"

+ 15 - 2
js/component/manageCenter/customer/NEW/intentionCustomer/intentionDetail/detail/visit.jsx

@@ -39,11 +39,23 @@ const Visit = React.createClass({
 			}, {
 				title: '联系人',
 				dataIndex: 'contacts',
-				key: 'contacts'
+				key: 'contacts',
+				render:(text,record)=>{
+					return  <div>{record.readOnly?
+								<span>***</span>:
+								<span>{text}</span>}
+							</div>
+				}
 			}, {
 				title: '联系电话',
 				dataIndex: 'contactMobile',
-				key: 'contactMobile'
+				key: 'contactMobile',
+				render:(text,record)=>{
+					return  <div>{record.readOnly?
+								<span>***</span>:
+								<span>{text}</span>}
+							</div>
+				}
 			}, {
 				title: '拜访人',
 				dataIndex: 'adminName',
@@ -117,6 +129,7 @@ const Visit = React.createClass({
 					for(let i = 0; i < data.data.list.length; i++) {
 						let thisdata = data.data.list[i];
 						theArr.push({
+							readOnly:thisdata.readOnly,
 							followId: thisdata.followId,
 							followTime: thisdata.followTime,
 							identifyName: thisdata.identifyName,

+ 12 - 8
js/component/manageCenter/customer/NEW/intentionCustomer/intentionDetail/detail/visitDetail.jsx

@@ -3,7 +3,7 @@ import ajax from 'jquery/src/ajax/xhr.js';
 import $ from 'jquery/src/ajax';
 import {Modal,Form,layout,Radio,Button,Input,Spin,Table,Select,Popconfirm,message} from 'antd';
 import {intentionalService,newFollow,customerStatus} from '@/dataDic.js';
-import {getCompanyIntention} from '@/tools.js';
+import {getCompanyIntention,getContactType} from '@/tools.js';
 const FormItem =Form.Item;
 import BusName from '../../followDetail/businessName.jsx';
 
@@ -310,6 +310,7 @@ const VisitDetail = React.createClass({
 			labelCol: { span: 8 },
 			wrapperCol: { span: 14 },
 		};
+		const followData= this.props.followData || []
 		return(
 			<div>
 				<Modal	
@@ -328,7 +329,7 @@ const VisitDetail = React.createClass({
 			                            labelCol={{ span:4 }}
 										wrapperCol={{ span: 20 }}
 			                            label="拜访方式" >
-			    			   			<Radio.Group value={this.state.contactType} onChange={(e) => {
+			    			   			{!followData.readOnly?<Radio.Group value={this.state.contactType} onChange={(e) => {
 										        this.setState({ contactType: e.target.value }) 
 						                    }}>
 						                        <Radio value={0}>外出</Radio>
@@ -336,7 +337,8 @@ const VisitDetail = React.createClass({
 						                        <Radio value={2}>QQ</Radio>
 						                        <Radio value={3}>微信</Radio>
 						                        <Radio value={4}>邮箱</Radio>
-						                </Radio.Group>
+						                </Radio.Group>:
+						                <span>{getContactType(this.state.contactType)}</span>}
 					                </FormItem>
 					                <div className="clearfix">
 						                <FormItem className="half-item"
@@ -363,12 +365,14 @@ const VisitDetail = React.createClass({
 					                        labelCol={{ span: 4 }}
 							                wrapperCol={{ span: 16 }}
 					                        label="跟进备注" >
-					                            <Input type="textarea" rows={4} value={this.state.result} 
-					                              onChange={(e)=>{this.setState({result:e.target.value})}}/>
+					                           	{!followData.readOnly?<Input type="textarea" rows={4} value={this.state.result} 
+					                              onChange={(e)=>{this.setState({result:e.target.value})}}/>:
+					                              <span>{this.state.result}</span>
+					                            }
 					                    </FormItem>
 					                </div>
 					                <div className="clearfix">
-					                 	<div style={{fontSize:'18px',marginLeft:'100px',marginTop:'15px',marginBottom:'10px'}}>业务意向<Button onClick={this.addNew} style={{marginLeft:'420px',background:'green',color:'#ffffff'}}>添加新业务</Button></div>
+					                 	<div style={{fontSize:'18px',marginLeft:'100px',marginTop:'15px',marginBottom:'10px'}}>业务意向{!followData.readOnly&&<Button onClick={this.addNew} style={{marginLeft:'420px',background:'green',color:'#ffffff'}}>添加新业务</Button>}</div>
 					                 	<div className="clearfix" >
 		                    			    <Spin spinning={this.state.loading}>
 										      <Table 
@@ -381,10 +385,10 @@ const VisitDetail = React.createClass({
 										</div>	 
 					                </div>
 			    			   	</div>
-			    			   	<FormItem wrapperCol={{ span: 12, offset: 6 }}>
+			    			   	{!followData.readOnly&&<FormItem wrapperCol={{ span: 12, offset: 6 }}>
 								    <Button  type="primary" size="large" htmlType="submit" style={{marginRight:'150px',marginTop:'20px'}}>保存</Button>
 						           	<Button  size="large" onClick={this.visitCancel}>取消</Button>
-					   			</FormItem>
+					   			</FormItem>}
 					   		</Spin>
 					    </Form>
 				</Modal> 

+ 1 - 0
js/component/manageCenter/customer/NEW/signCustomer/followDetail.jsx

@@ -111,6 +111,7 @@ const FollowDetail = React.createClass({
 			addcontactModul:false,
 			visitModul: false
 		});
+		this.props.closeDesc(false,false)
 	},
 	//获取联系人下拉框
 	getNewWoman(ids) {

+ 4 - 14
js/component/manageCenter/customer/NEW/signCustomer/intentionDetail/detail/account.jsx

@@ -4,7 +4,7 @@ import ajax from 'jquery/src/ajax/xhr.js';
 import $ from 'jquery/src/ajax';
 const FormItem =Form.Item;
 import {statuslist,lvl,currentMember} from '@/dataDic.js';
-import {getcustomerTyp,getCustomerSource} from '@/tools.js';
+import {getcustomerTyp,getCustomerSource,getStatuslist} from '@/tools.js';
 const Account =React.createClass({
 	httpAccount(record) {
 		this.RowClick;
@@ -114,12 +114,12 @@ const Account =React.createClass({
 	                    <FormItem className="half-item"
 	                            {...formItemLayout}
 	                            label="注册用户名" >
-	                         <Input value={this.state.nickname}  onChange={(e) => { this.setState({ nickname: e.target.value }); }} />        
+	                    	<span>{this.state.nickname}</span>
 	                    </FormItem>
 	                    <FormItem className="half-item"
 	                            {...formItemLayout}
 	                            label="注册邮箱" >
-	                         <Input value={this.state.email}  onChange={(e) => { this.setState({ email: e.target.value }); }} />        
+	                    	<span>{this.state.email}</span>
 	                    </FormItem>
 	                    <div className="clearfix">
 		                    <FormItem className="half-item"
@@ -141,19 +141,9 @@ const Account =React.createClass({
 	                           {...formItemLayout}
 	                           label="账户状态"
 	                         > 
-							    <Select placeholder="账户状态" value={this.state.status}  onChange={(e) => { this.setState({ status: e }); }} >
-                                {
-                                    statuslist.map(function (item) {
-                                        return <Select.Option key={item.value} >{item.key}</Select.Option>
-                                    })
-                                }
-                              </Select>
+		                        <span>{getStatuslist(this.state.status)}</span>   
 	                   		</FormItem>
 	                   	</div>
-			            <div className="clearfix">
-			                <Button className='saveBtn' type="primary" htmlType="submit">保存</Button>  
-                            <Button  type="ghost" onClick={this.detailsModal}>取消</Button>
-			            </div>
     				</Spin>
     			</Form>	
     		</div>

+ 65 - 274
js/component/manageCenter/customer/NEW/signCustomer/intentionDetail/detail/basic.jsx

@@ -3,70 +3,10 @@ import { Radio, Icon, Button, AutoComplete, Cascader, layout, Input, Select, Tab
 import ajax from 'jquery/src/ajax/xhr.js';
 import $ from 'jquery/src/ajax';
 import moment from 'moment';
-import { citySelect, provinceList, areaSelect } from '@/NewDicProvinceList';
+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 PicturesWall = React.createClass({
-	getInitialState() {
-		return {
-			previewVisible: false,
-			previewImage: '',
-			fileList: [],
-		}
-	},
-	handleCancel() {
-		this.setState({
-			previewVisible: false
-		})
-	},
-	handlePreview(file) {
-		this.setState({
-			previewImage: file.url || file.thumbUrl,
-			previewVisible: true,
-		});
-	},
-	handleChange(info) {
-		let fileList = info.fileList;
-		this.setState({
-			fileList
-		});
-		this.props.fileList(fileList);
-	},
-	componentWillReceiveProps(nextProps) {
-		this.state.fileList = nextProps.pictureUrl;
-	},
-	render() {
-		const {
-			previewVisible,
-			previewImage,
-			fileList
-		} = this.state;
-		const uploadButton = (
-			<div>
-                <Icon type="plus" />
-                <div className="ant-upload-text">点击上传</div>
-            </div>
-		);
-		return(
-			<div style={{display:"inline-block"}}>
-                <Upload
-                    action={globalConfig.context + "/api/admin/customer/uploadCustomerImg"}
-                    data={{ 'sign': '' }}
-                    listType="picture-card"
-                    fileList={fileList}
-                    onPreview={this.handlePreview}
-                    onChange={this.handleChange} >
-                    {fileList.length >= 1 ? null : uploadButton}
-                </Upload>
-                <Modal maskClosable={false} visible={previewVisible} footer={null} onCancel={this.handleCancel}>
-                    <img alt="example" style={{ width: '100%' }} src={previewImage} />
-                </Modal>
-            </div>
-		);
-	}
-});
 
 const Basic = React.createClass({
 	getInitialState() {
@@ -92,41 +32,15 @@ const Basic = React.createClass({
 					};
 					thisData = {};
 				};
-				let ProvinceCityArr = [];
-				let ProvinceS = thisData.locationProvince; //getprovince
-				let citys = thisData.locationCity;
-				let Areas = thisData.locationArea;
-				ProvinceCityArr.push(ProvinceS, citys, Areas);
+				let ProvinceS = thisData.locationProvince, //getprovince
+				    citys = thisData.locationCity,
+				    Areas = thisData.locationArea,
+				    ProvinceCity = getProvince(ProvinceS, citys, Areas);
 				this.setState({
-					InformationId: thisData.id,
-					InformationUid: thisData.uid,
-					identifyName: thisData.identifyName,
-					listed: thisData.listed,
-					highTechZone: thisData.highTechZone,
 					orgCodeUrl: thisData.orgCodeUrl ? splitUrl(thisData.orgCodeUrl, ',', globalConfig.avatarHost + '/upload') : [],
 					companyLogoUrl: thisData.companyLogoUrl ? splitUrl(thisData.companyLogoUrl, ',', globalConfig.avatarHost + '/upload') : [],
-					dataInformation: thisData,
-					ProvinceCity: ProvinceCityArr[0]!=null?ProvinceCityArr:undefined,
-					contacts: thisData.contacts,
-					contactMobile: thisData.contactMobile,
-					industry: String(thisData.industry) == 'null' ? undefined : String(thisData.industry),
-					international: thisData.international,
-					societyTag: thisData.societyTag||undefined,
-					introduction: thisData.introduction,
-					postalAddress: thisData.postalAddress,
-					contactsFixedTel: thisData.contactsFixedTel,
-					contactsFax: thisData.contactsFax,
-					registeredCapital: thisData.registeredCapital,
-					enterpriseScale: thisData.enterpriseScale,
-					legalPerson: thisData.legalPerson,
-					legalPersonIdCard: thisData.legalPersonIdCard,
-					legalPersonTel: thisData.legalPersonTel,
-					legalPersonEmail: thisData.legalPersonEmail,
-					businessScope: thisData.businessScope,
-					orgCode: thisData.orgCode,
-					investment: thisData.investment,
-					auditStatus: thisData.auditStatus ? String(thisData.auditStatus) : undefined,
-					businessAudit: thisData.businessAudit
+					ProvinceCity: ProvinceCity,
+					basicData:thisData
 				});
 			}.bind(this),
 		}).always(function() {
@@ -146,105 +60,6 @@ const Basic = React.createClass({
 			companyLogoUrl: e
 		});
 	},
-	//基本信息提交
-	newSubmit(e) {
-		e.preventDefault();
-		if(!this.state.industry) {
-			message.warning('请选择行业');
-			return false;
-		};
-		if(!this.state.societyTag) {
-			message.warning('请选择社会性质');
-			return false;
-		};
-		if(!this.state.ProvinceCity[1]) {
-			message.warning('请选择地区');
-			return false;
-		};
-		if(isNaN(this.state.registeredCapital)) {
-			message.warning('注册资本只能输入数字')
-			return false;
-		};
-		if(isNaN(this.state.enterpriseScale)) {
-			message.warning('单位规模只能输入数字')
-			return false;
-		}
-		this.setState({
-			selectedRowKeys: [],
-		});
-
-		let theorgCodeUrl = [];
-		if(this.state.orgCodeUrl.length) {
-			let picArr = [];
-			this.state.orgCodeUrl.map(function(item) {
-				if(item.response && item.response.data && item.response.data.length) {
-					picArr.push(item.response.data);
-				}
-			});
-			theorgCodeUrl = picArr.join(",");
-		};
-		let thecompanyLogoUrl = [];
-		if(this.state.companyLogoUrl.length) {
-			let picArr = [];
-			this.state.companyLogoUrl.map(function(item) {
-				if(item.response && item.response.data && item.response.data.length) {
-					picArr.push(item.response.data);
-				}
-			});
-			thecompanyLogoUrl = picArr.join(",");
-		};
-
-		this.setState({
-			loading: true
-		});
-		$.ajax({
-			method: "post",
-			dataType: "json",
-			url: globalConfig.context + '/api/admin/customer/updateOrganizationCustomer',
-			data: {
-				id: this.state.InformationId,
-				uid: this.state.InformationUid,
-				societyTag: this.state.societyTag,
-				introduction: this.state.introduction,
-				unitName: this.state.unitName,
-				industry: this.state.industry,
-				locationProvince: (this.state.ProvinceCity)[0], //省-
-				locationCity: (this.state.ProvinceCity)[1], //市
-				locationArea: (this.state.ProvinceCity)[2], //区
-				postalAddress: this.state.postalAddress,
-				contactsFixedTel: this.state.contactsFixedTel,
-				contactsFax: this.state.contactsFax,
-				registeredCapital: this.state.registeredCapital ? this.state.registeredCapital : 0,
-				enterpriseScale: this.state.enterpriseScale ? this.state.enterpriseScale : 0,
-				legalPerson: this.state.legalPerson,
-				legalPersonIdCard: this.state.legalPersonIdCard,
-				legalPersonTel: this.state.legalPersonTel,
-				legalPersonEmail: this.state.legalPersonEmail,
-				highTechZone: this.state.highTechZone,
-				listed: this.state.listed,
-				contacts: this.state.contacts,
-				contactMobile: this.state.contactMobile,
-				international: this.state.international,
-				orgCode: this.state.orgCode,
-				businessScope: this.state.businessScope,
-				introduction: this.state.introduction,
-				companyLogoUrl: thecompanyLogoUrl != 0 ? thecompanyLogoUrl : '',
-				orgCodeUrl: theorgCodeUrl != 0 ? theorgCodeUrl : '',
-				businessAudit: this.state.businessAudit,
-				auditStatus: this.state.auditStatus
-			}
-		}).done(function(data) {
-			this.setState({
-				loading: false
-			});
-			if(!data.error.length) {
-				message.success('保存成功!');
-				this.props.closeDetail(false, true)
-			} else {
-				message.warning(data.error[0].message);
-			}
-		}.bind(this));
-	},
 	//取消
 	detailsModal() {
 		this.props.closeDetail(false, false)
@@ -258,6 +73,7 @@ const Basic = React.createClass({
 		}
 	},
 	render() {
+		const basicData = this.state.basicData || [];
 		return(
 			<div>
 				 <Form layout="horizontal" onSubmit={this.newSubmit} id="demand-form">
@@ -268,7 +84,7 @@ const Basic = React.createClass({
 			                    wrapperCol={{ span: 18 }}
 			                    label="客户名称"
 		                        >
-		                        <span>{this.state.identifyName}</span>
+		                        <span>{basicData.identifyName}</span>
 		                    </FormItem>
 	                    </div>
 	                    <div className="clearfix" style={{paddingLeft:'60px'}}>
@@ -276,135 +92,105 @@ const Basic = React.createClass({
 	                         labelCol={{ span: 4 }}
 	                         wrapperCol={{ span: 18 }}
 	                         label="行业">
-							    <Select placeholder="选择行业" value={this.state.industry}  style={{width:'300px'}}
-							    				onChange={(e)=>{this.setState({industry:e})}}>
-                                      {
-                                        industry.map(function (item) {
-                                            return <Select.Option key={item.value} >{item.key}</Select.Option>
-                                        })
-                                      }
-                                </Select>
-                                <span style={{color:'red',marginLeft:'15px'}}>*</span>
+                                <span>{getIndustry(basicData.industry)}</span>
 	                   		 </FormItem>
 	                   		 <FormItem className="half-item" 
 	                           labelCol={{ span: 4 }}
 	                            wrapperCol={{ span: 18 }}
 	                           label="社会属性"
 	                         > 
-								    <Select placeholder="客户社会属性(必填项)" value={this.state.societyTag}  style={{width:'300px'}}
-							    				onChange={(e)=>{this.setState({societyTag:e})}}>
-                                    {
-                                        socialAttribute.map(function (item) {
-                                            return <Select.Option key={item.value} >{item.key}</Select.Option>
-                                        })
-                                    }
-                                </Select>
-                                <span style={{color:'red',marginLeft:'15px'}}>*</span>
+                                <span>{getSocialAttribute(basicData.societyTag)}</span>
 	                   		 </FormItem>
 	                         <FormItem className="half-item" 
 	                           labelCol={{ span: 4 }}
 	                           wrapperCol={{ span: 18 }}
 	                           label="省-市-区"
 	                          > 
-	                            <Cascader options={areaSelect()}  value={this.state.ProvinceCity} placeholder="选择城市" style={{width:'300px'}}
-									onChange={(e,pre) => { this.setState({ ProvinceCity: e }) }} />
-									<span style={{color:'red',marginLeft:'15px'}}>*</span>
+								<span>{this.state.ProvinceCity}</span>
 		                   </FormItem>
 		                   <FormItem className="half-item"
 			                    	labelCol={{ span: 4 }}
 			                        wrapperCol={{ span: 18 }}
 			                         label="通信地址"
 		                            >
-		                                <Input placeholder="客户通信地址" value={this.state.postalAddress} 
-							    				onChange={(e)=>{this.setState({postalAddress:e.target.value})}}/>
+		                   		<span>{basicData.postalAddress}</span>
 		                    </FormItem>
 		                    <FormItem className="half-item"
 			                    	labelCol={{ span: 4 }}
 			                        wrapperCol={{ span: 18 }}
 			                         label="固定电话"
 		                            >
-		                                <Input placeholder="客户固定电话" value={this.state.contactsFixedTel} 
-							    				onChange={(e)=>{this.setState({contactsFixedTel:e.target.value})}}/>
+		                   			<span>{basicData.contactsFixedTel}</span>
 		                    </FormItem>
 		                    <FormItem className="half-item"
 			                    	labelCol={{ span: 4 }}
 			                        wrapperCol={{ span: 18 }}
 			                        label="客户传真"
 		                            >
-		                                <Input placeholder="客户传真" value={this.state.contactsFax} 
-							    				onChange={(e)=>{this.setState({contactsFax:e.target.value})}}/>
+		                   		<span>{basicData.contactsFax}</span>
 		                    </FormItem>
 		                    <FormItem className="half-item"
 			                    	labelCol={{ span: 4 }}
 			                        wrapperCol={{ span: 18 }}
 			                        label="注册资本"
-		                            >
-		                                <Input placeholder="注册资本" value={this.state.registeredCapital}  maxLength='6'
-							    				onChange={(e)=>{this.setState({registeredCapital:e.target.value})}}/>
+		                            >	
+		                   		   <span>{basicData.registeredCapital}</span>
 		                    </FormItem>
 		                    <FormItem className="half-item"
 			                    	labelCol={{ span: 4 }}
 			                        wrapperCol={{ span: 18 }}
 			                        label="单位规模"
 		                            >
-		                                <Input placeholder="单位规模" value={this.state.enterpriseScale} maxLength='1'
-							    				onChange={(e)=>{this.setState({enterpriseScale:e.target.value})}}/>
+		                   		   <span>{basicData.enterpriseScale}</span>
 		                    </FormItem>
 		                    <FormItem className="half-item"
 			                    	labelCol={{ span: 4 }}
 			                        wrapperCol={{ span: 18 }}
 			                        label="法人名称"
 		                            >
-		                                <Input placeholder="法人名称" value={this.state.legalPerson} 
-							    				onChange={(e)=>{this.setState({legalPerson:e.target.value})}}/>
+		                   		    <span>{basicData.legalPerson}</span>
 		                    </FormItem>
 		                    <FormItem className="half-item"
 			                    	labelCol={{ span: 4 }}
 			                        wrapperCol={{ span: 18 }}
 			                        label="身份证号码"
 		                            >
-		                                <Input placeholder="法人身份证号码" value={this.state.legalPersonIdCard} 
-							    				onChange={(e)=>{this.setState({legalPersonIdCard:e.target.value})}}/>
+		                   		    <span>{basicData.legalPersonIdCard}</span>
 		                    </FormItem>
 		                    <FormItem className="half-item" 
 			                    	labelCol={{ span: 4 }}
 			                        wrapperCol={{ span: 18 }}
 			                        label="主要联系人"
 	                           	 >
-		                            <Input placeholder="主要联系人" value={this.state.contacts} onChange={(e) => {
-				                        this.setState({ contacts:  e.target.value })}}/>
+		                   		    <span>{basicData.contacts}</span>
 		                     </FormItem>
 		                     <FormItem className="half-item" 
 			                    	labelCol={{ span: 4 }}
 			                        wrapperCol={{ span: 18 }}
 			                        label="主要联系人号码"
-	                           	 >
-		                            <Input placeholder="主要联系人号码" value={this.state.contactMobile} onChange={(e) => {
-				                        this.setState({ contactMobile:  e.target.value })}}/>
+	                           	 >	
+		                   		    <span>{basicData.contactMobile}</span>
 		                     </FormItem>
 		                    <FormItem className="half-item"
 			                    	labelCol={{ span: 4 }}
 			                        wrapperCol={{ span: 18 }}
 			                        label="法人电话"
 		                            > 
-		                                <Input placeholder="法人电话" value={this.state.legalPersonTel} 
-							    				onChange={(e)=>{this.setState({legalPersonTel:e.target.value})}}/>
+		                   		    <span>{basicData.legalPersonTel}</span>
 		                    </FormItem>
 		                    <FormItem className="half-item"
 			                    	labelCol={{ span: 4 }}
 			                        wrapperCol={{ span: 18 }}
 			                        label="电子邮箱"
 		                            >
-		                                <Input placeholder="法人电子邮箱" value={this.state.legalPersonEmail} 
-							    				onChange={(e)=>{this.setState({legalPersonEmail:e.target.value})}}/>
+		                   		    <span>{basicData.legalPersonEmail}</span>
 		                    </FormItem>
 				            <FormItem className="half-item"
 			                    	labelCol={{ span: 4 }}
 			                        wrapperCol={{ span: 18 }}
 			                        label="机构代码"
 		                            >
-		                                <Input placeholder="社会同意机构代码" value={this.state.orgCode} 
-							    				onChange={(e)=>{this.setState({orgCode:e.target.value})}}/>
+		                   		    <span>{basicData.orgCode}</span>
 		                    </FormItem>
 				           <div className="clearfix">
 	                   		<FormItem className="half-item"
@@ -412,36 +198,21 @@ const Basic = React.createClass({
 	                            wrapperCol={{ span: 18 }}
 	                            label="高新"
 	                   		    >
-		                   		 <Radio.Group value={this.state.highTechZone} onChange={(e) => {
-				                        this.setState({highTechZone:e.target.value})
-				                    }}>
-				                        <Radio value={0}>否</Radio>
-				                        <Radio value={1}>是</Radio>
-				                  </Radio.Group>
+		                   		<span>{basicData.highTechZone?'是':'否'}</span>
 				            </FormItem>
 	                   	     <FormItem className="half-item"
                    		   		labelCol={{ span: 4 }}
 	                            wrapperCol={{ span: 18 }}
 	                            label="上市"
 	                   		    >
-		                   		 <Radio.Group value={this.state.listed} onChange={(e) => {
-				                        this.setState({listed:e.target.value })
-				                    }}>
-				                        <Radio value={0}>否</Radio>
-				                        <Radio value={1}>是</Radio>
-				                  </Radio.Group>
+		                   		<span>{basicData.listed?'是':'否'}</span>
 						     </FormItem>
 						     <FormItem className="half-item"
                    		   		labelCol={{ span: 4 }}
 	                            wrapperCol={{ span: 18 }}
 	                            label="国际化"
 	                   		    >
-		                   		 <Radio.Group value={this.state.international} onChange={(e) => {
-				                        this.setState({international:e.target.value })
-				                    }}>
-				                        <Radio value={0}>否</Radio>
-				                        <Radio value={1}>是</Radio>
-				                  </Radio.Group>
+		                   		<span>{basicData.international?'是':'否'}</span>
 						     </FormItem>
 						     </div>
 		                    <div className="clearfix pictures">
@@ -449,21 +220,45 @@ const Basic = React.createClass({
 			                        labelCol={{ span: 4 }}
 			                        wrapperCol={{ span: 18 }}
 			                        label="机构证(PIC)" >
-			                        <PicturesWall
-			                            pictureSign="PIC"
-			                            fileList={this.getOrgCodeUrl}
-			                            pictureUrl={this.state.orgCodeUrl} />
-			                            <p>图片建议:图片要清晰。</p>
+			                        <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" > 
-			                        <PicturesWall
-			                            pictureSign="logo"
-			                            fileList={this.getCompanyLogoUrl}
-			                            pictureUrl={this.state.companyLogoUrl} />
-			                            <p>图片建议:图片要清晰。</p>
+			                        <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">
@@ -471,19 +266,15 @@ const Basic = React.createClass({
 		                        labelCol={{ span: 2 }}
 		                        wrapperCol={{ span: 18 }}
 		                        label="业务范围" >
-		                            <Input type="textarea" rows={4} value={this.state.businessScope} 
-							    				onChange={(e)=>{this.setState({businessScope:e.target.value})}}/>
+		                   			<span>{basicData.businessScope}</span>
 			                    </FormItem>
 			                    <FormItem
 			                        labelCol={{ span: 2 }}
 			                        wrapperCol={{ span: 18 }}
 			                        label="单位简介" >
-			                            <Input type="textarea" rows={4}  value={this.state.introduction} 
-							    				onChange={(e)=>{this.setState({introduction:e.target.value})}}/>			                      
+		                   			<span>{basicData.introduction}</span>
 			                    </FormItem>
 		                    </div>
-		                    <Button className="set-submit" type="primary" htmlType="submit" >保存</Button>  
-	                        <Button type="ghost" onClick={this.detailsModal}>取消</Button>
 	                    </div>		                	
 				    </Spin>
 				</Form>		

+ 82 - 317
js/component/manageCenter/customer/NEW/signCustomer/intentionDetail/detail/basicPerson.jsx

@@ -3,72 +3,12 @@ import { Radio, Icon, Button, AutoComplete, Cascader, layout, Input, Select, Tab
 import ajax from 'jquery/src/ajax/xhr.js';
 import $ from 'jquery/src/ajax';
 import moment from 'moment';
-import { citySelect, provinceList, areaSelect } from '@/NewDicProvinceList';
+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 PicturesWall = React.createClass({
-	getInitialState() {
-		return {
-			previewVisible: false,
-			previewImage: '',
-			fileList: [],
-		}
-	},
-	handleCancel() {
-		this.setState({
-			previewVisible: false
-		})
-	},
-	handlePreview(file) {
-		this.setState({
-			previewImage: file.url || file.thumbUrl,
-			previewVisible: true,
-		});
-	},
-	handleChange(info) {
-		let fileList = info.fileList;
-		this.setState({
-			fileList
-		});
-		this.props.fileList(fileList);
-	},
-	componentWillReceiveProps(nextProps) {
-		this.state.fileList = nextProps.pictureUrl;
-	},
-	render() {
-		const {
-			previewVisible,
-			previewImage,
-			fileList
-		} = this.state;
-		const uploadButton = (
-			<div>
-                <Icon type="plus" />
-                <div className="ant-upload-text">点击上传</div>
-            </div>
-		);
-		return(
-			<div style={{display:"inline-block"}}>
-                <Upload
-                    action={globalConfig.context + "/api/admin/customer/uploadCustomerImg"}
-                    data={{ 'sign': '' }}
-                    listType="picture-card"
-                    fileList={fileList}
-                    onPreview={this.handlePreview}
-                    onChange={this.handleChange} >
-                    {fileList.length >= 1 ? null : uploadButton}
-                </Upload>
-                <Modal maskClosable={false} visible={previewVisible} footer={null} onCancel={this.handleCancel}>
-                    <img alt="example" style={{ width: '100%' }} src={previewImage} />
-                </Modal>
-            </div>
-		);
-	}
-});
-
 const Basic = React.createClass({
 	getInitialState() {
 		return {
@@ -100,49 +40,18 @@ const Basic = React.createClass({
 					};
 					thisData = {};
 				};
-				let ProvinceCityArr = [];
-				let ProvinceS = thisData.province; //getprovince
-				let citys = thisData.city;
-				let Areas = thisData.area;
-				ProvinceCityArr.push(ProvinceS, citys, Areas);
-				let month = thisData.dateOfBirthYear ? thisData.dateOfBirthYear + '/' + thisData.dateOfBirthMonth : false;
+				let ProvinceS = thisData.locationProvince, //getprovince
+				    citys = thisData.locationCity,
+				    Areas = thisData.locationArea,
+				    ProvinceCity = getProvince(ProvinceS, citys, Areas),
+					month = thisData.dateOfBirthYear ? thisData.dateOfBirthYear + '/' + thisData.dateOfBirthMonth : '';
 				this.setState({
-					InformationId: thisData.id,
-					InformationUid: thisData.uid,
-					identifyName: thisData.identifyName,
-					listed: thisData.listed,
-					highTechZone: thisData.highTechZone,
 					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') : [],
-					dataInformation: thisData,
-					idNumber: thisData.idNumber,
-					contacts: thisData.contacts,
-					contactMobile: thisData.contactMobile,
-					ProvinceCity: ProvinceCityArr[0]!=null?ProvinceCityArr:undefined,
-					industry: thisData.industry ? String(thisData.industry) : undefined,
-					societyTag: thisData.societyTag||undefined,
-					sex: thisData.sex,
-					yearMonth: month,
-					postalAddress: thisData.postalAddress,
-					fixedTel: thisData.fixedTel,
-					consultationPrice: thisData.consultationPrice,
-					email: thisData.email,
-					qq: thisData.qq,
-					introduction: thisData.introduction,
-					expert: thisData.expert,
-					celebrity: thisData.celebrity,
-					consultant: thisData.consultant,
-					international: thisData.international,
-					investment: thisData.investment,
-					professionalTitle: thisData.professionalTitle,
-					workUnit: thisData.workUnit,
-					education: thisData.education,
-					graduateSchool: thisData.graduateSchool,
-					majorCategory: thisData.majorCategory,
-					qualification: thisData.qualification,
-					businessAudit: thisData.businessAudit,
-					auditStatus: thisData.auditStatus ? String(thisData.auditStatus) : undefined,
+					ProvinceCity: ProvinceCity,
+					month:month,
+					basicData:thisData
 				});
 			}.bind(this),
 		}).always(function() {
@@ -162,133 +71,6 @@ const Basic = React.createClass({
 			companyLogoUrl: e
 		});
 	},
-	//基本信息提交
-	newSubmit(e) {
-		e.preventDefault();
-		if(!this.state.industry) {
-			message.warning('请选择行业');
-			return false;
-		};
-		if(!this.state.societyTag) {
-			message.warning('请选择社会性质');
-			return false;
-		};
-		if(!this.state.ProvinceCity[1]) {
-			message.warning('请选择地区');
-			return false;
-		};
-		var reg = /^[1-9]\d*$|^0$/;
-		if(this.state.consultationPrice) {
-			if(this.state.consultationPrice.length > 6) {
-				message.warning('咨询费用不超过6位数');
-				this.refs.consul.focus();
-				return false;
-			};
-			if(!reg.test(this.state.consultationPrice)) {
-				message.warning('咨询费用只能输入数字');
-				this.refs.consul.focus();
-				return false;
-			}
-		}
-
-		this.state.data = [];
-		this.setState({
-			selectedRowKeys: [],
-		});
-
-		let theorgCodeUrl = [];
-		if(this.state.headPortraitUrl.length) {
-			let picArr = [];
-			this.state.headPortraitUrl.map(function(item) {
-				if(item.response && item.response.data && item.response.data.length) {
-					picArr.push(item.response.data);
-				}
-			});
-			theorgCodeUrl = picArr.join(",");
-		};
-		let thecompanyLogoUrl = [];
-		if(this.state.positiveIdUrl.length) {
-			let picArr = [];
-			this.state.positiveIdUrl.map(function(item) {
-				if(item.response && item.response.data && item.response.data.length) {
-					picArr.push(item.response.data);
-				}
-			});
-			thecompanyLogoUrl = picArr.join(",");
-		};
-		let thecompanyLogoUrls = [];
-		if(this.state.oppositeIdUrl.length) {
-			let picArr = [];
-			this.state.oppositeIdUrl.map(function(item) {
-				if(item.response && item.response.data && item.response.data.length) {
-					picArr.push(item.response.data);
-				}
-			});
-			thecompanyLogoUrls = picArr.join(",");
-		};
-
-		let years = [];
-		let yearMonth = this.state.yearMonth != undefined ? new Date(this.state.yearMonth).toLocaleDateString() : '';
-		years = yearMonth.split('/');
-		this.setState({
-			loading: true
-		});
-		$.ajax({
-			method: "post",
-			dataType: "json",
-			url: globalConfig.context + '/api/admin/customer/updatePersonalCustomer',
-			data: {
-				id: this.state.InformationId,
-				uid: this.state.InformationUid,
-				societyTag: this.state.societyTag,
-				identifyName: this.state.identifyName,
-				industry: this.state.industry,
-				dateOfBirthYear: years[0], //出生年
-				dateOfBirthMonth: years[1], //出生月
-				province: (this.state.ProvinceCity)[0], //省-
-				city: (this.state.ProvinceCity)[1], //市
-				area: (this.state.ProvinceCity)[2], //区
-				sex: this.state.sex,
-				expert: this.state.expert,
-				celebrity: this.state.celebrity,
-				consultant: this.state.consultant,
-				international: this.state.international,
-				fixedTel: this.state.fixedTel,
-				consultationPrice: this.state.consultationPrice ? this.state.consultationPrice : 0,
-				qq: this.state.qq,
-				contacts: this.state.contacts,
-				contactMobile: this.state.contactMobile,
-				idNumber: this.state.idNumber,
-				email: this.state.email,
-				isMember: this.state.isMember,
-				postalAddress: this.state.postalAddress,
-				introduction: this.state.introduction,
-				positiveIdUrl: thecompanyLogoUrl.length != 0 ? thecompanyLogoUrl : '',
-				oppositeIdUrl: thecompanyLogoUrls != 0 ? thecompanyLogoUrls : '',
-				headPortraitUrl: theorgCodeUrl != 0 ? theorgCodeUrl : '',
-				investment: this.state.investment,
-				professionalTitle: this.state.professionalTitle,
-				workUnit: this.state.workUnit,
-				education: this.state.education,
-				graduateSchool: this.state.graduateSchool,
-				majorCategory: this.state.majorCategory,
-				qualification: this.state.qualification,
-				businessAudit: this.state.businessAudit,
-				auditStatus: this.state.auditStatus,
-			}
-		}).done(function(data) {
-			this.setState({
-				loading: false
-			});
-			if(!data.error.length) {
-				message.success('保存成功!');
-				this.props.closeDetail(false, true)
-			} else {
-				message.warning(data.error[0].message);
-			}
-		}.bind(this));
-
-	},
 	//取消
 	detailsModal() {
 		this.props.closeDetail(false, false)
@@ -311,10 +93,6 @@ const Basic = React.createClass({
 		}
 	},
 	render() {
-		const {
-			RangePicker,
-			MonthPicker
-		} = DatePicker;
 		const formItemLayout = {
 			labelCol: {
 				span: 8
@@ -323,6 +101,7 @@ const Basic = React.createClass({
 				span: 14
 			},
 		};
+		const basicData = this.state.basicData ||[];
 		return(
 			<div>
 				 <Form layout="horizontal" onSubmit={this.newSubmit} id="demand-form">
@@ -332,175 +111,125 @@ const Basic = React.createClass({
 			                     {...formItemLayout}
 			                    label="客户姓名"
 		                        >
-	                    	 <span>{this.state.identifyName}</span>
+	                    	 <span>{basicData.identifyName}</span>
 		                    </FormItem>
 	                    </div>
 	                    <div className="clearfix" >
 	                    	<FormItem className="half-item" 
 	                          {...formItemLayout}
 	                         label="行业">
-							    <Select placeholder="选择行业" value={this.state.industry}  style={{width:'300px'}}
-							    				onChange={(e)=>{this.setState({industry:e})}}>
-                                      {
-                                        industry.map(function (item) {
-                                            return <Select.Option key={item.value} >{item.key}</Select.Option>
-                                        })
-                                      }
-                                </Select>
-                                <span style={{color:'red',marginLeft:'15px'}}>*</span>
+                                <span>{getIndustry(basicData.industry)}</span>
 	                   		 </FormItem>
 	                   		 <FormItem className="half-item" 
 	                            {...formItemLayout}
 	                           label="社会属性"
 	                           > 
-								    <Select placeholder="客户社会属性" value={this.state.societyTag}  style={{width:'300px'}}
-							    				onChange={(e)=>{this.setState({societyTag:e})}}> 
-                                     {
-                                        socialAttribute.map(function (item) {
-                                            return <Select.Option key={item.value} >{item.key}</Select.Option>
-                                        })
-                                    }
-                                </Select>  
-                                <span style={{color:'red',marginLeft:'15px'}}>*</span>
+                                <span>{getSocialAttribute(basicData.societyTag)}</span>
 	                   		 </FormItem>
 	                   		 <FormItem className="half-item" 
 	                            {...formItemLayout}
 	                           label="省-市-区"
 	                          > 
-	                            <Cascader options={areaSelect()}  value={this.state.ProvinceCity} placeholder="选择城市" style={{width:'300px'}}
-									onChange={(e,pre) => { this.setState({ ProvinceCity: e }) }} />
-									<span style={{color:'red',marginLeft:'15px'}}>*</span>
+								<span>{this.state.ProvinceCity}</span>
 		                    </FormItem>
 	                   		 <FormItem className="half-item" 
 		                           {...formItemLayout}
 		                           label="出生日期"
 	                          > 
-	                              {!this.state.yearMonth?<MonthPicker placeholder="选择出生年月" value={this.state.yearMonth||null} onChange={(time) => {this.setState({yearMonth: time});}}/>	   	 
-		                          :<MonthPicker value={moment(this.state.yearMonth, monthFormat)} format={monthFormat} onChange={(time) => {this.setState({yearMonth: time});}}/>
-		                    	}
+								<span>{this.state.month}</span>
 		                    </FormItem>
 		                     <FormItem className="half-item" 
 			                    	 {...formItemLayout}
 			                        label="身份证号码"
 	                           	 >
-		                            <Input placeholder="身份证号码" value={this.state.idNumber} onChange={(e) => {
-				                        this.setState({ idNumber:  e.target.value })}}/>
+								<span>{basicData.idNumber}</span>
 		                     </FormItem>
 							<FormItem className="half-item" 
 			                    	 {...formItemLayout}
 			                        label="主要联系人"
 	                           	 >
-		                            <Input placeholder="主要联系人" value={this.state.contacts} onChange={(e) => {
-				                        this.setState({ contacts:  e.target.value })}}/>
+								<span>{basicData.contacts}</span>
 		                    </FormItem>
 		                    <FormItem className="half-item" 
 			                    	 {...formItemLayout}
 			                        label="主要联系人号码"
 	                           	 >
-		                            <Input placeholder="主要联系人号码" value={this.state.contactMobile} onChange={(e) => {
-				                        this.setState({ contactMobile:  e.target.value })}}/>
+								<span>{basicData.contactMobile}</span>
 		                    </FormItem>
 		                    <div className="clearfix">
 			                    <FormItem className="half-item" 
 				                    	 {...formItemLayout}
 				                        label="职称名字"
 		                           	 >
-			                            <Input placeholder="职称名字" value={this.state.professionalTitle} onChange={(e) => {
-					                        this.setState({ professionalTitle:  e.target.value })}}/>
+									<span>{basicData.professionalTitle}</span>
 			                    </FormItem>
 			                    <FormItem className="half-item" 
 				                    	 {...formItemLayout}
 				                        label="就业单位"
 		                           	 >
-			                            <Input placeholder="就业单位" value={this.state.workUnit} onChange={(e) => {
-					                        this.setState({ workUnit:  e.target.value })}}/>
+									<span>{basicData.workUnit}</span>
 			                    </FormItem>
 			                    <FormItem className="half-item" 
 				                    	 {...formItemLayout}
 				                        label="学历"
 		                           	 >
-			                            <Input placeholder="学历" value={this.state.education} onChange={(e) => {
-					                        this.setState({ education:  e.target.value })}}/>
+									<span>{basicData.education}</span>
 			                    </FormItem>
 			                    <FormItem className="half-item" 
 				                    	 {...formItemLayout}
 				                        label="毕业院校"
 		                           	 >
-			                            <Input placeholder="学历" value={this.state.graduateSchool} onChange={(e) => {
-					                        this.setState({ graduateSchool:  e.target.value })}}/>
+									<span>{basicData.graduateSchool}</span>
 			                    </FormItem>
 			                    <FormItem className="half-item" 
 				                    	 {...formItemLayout}
 				                        label="专业类别"
 		                           	 >
-			                            <Input placeholder="专业类别" value={this.state.majorCategory} onChange={(e) => {
-					                        this.setState({ majorCategory:  e.target.value })}}/>
+									<span>{basicData.majorCategory}</span>
 			                    </FormItem>
 			                    <FormItem className="half-item" 
 				                    	 {...formItemLayout}
 				                        label="职业资格"
 		                           	 >
-			                            <Input placeholder="职业资格" value={this.state.qualification} onChange={(e) => {
-					                        this.setState({ qualification:  e.target.value })}}/>
+									<span>{basicData.qualification}</span>
 			                    </FormItem>
 			                    <FormItem className="half-item"
 				                    	 {...formItemLayout}
 				                         label="通信地址"
 			                            >
-			                                <Input placeholder="客户通信地址" value={this.state.postalAddress} 
-										onChange={(e,pre) => { this.setState({ postalAddress: e.target.value }) }}/>
+									<span>{basicData.postalAddress}</span>
 			                    </FormItem>
 			                    <FormItem className="half-item"
 				                    	 {...formItemLayout}
 				                         label="固定电话"
 			                            >
-			                                <Input placeholder="客户固定电话" value={this.state.fixedTel} 
-										onChange={(e) => { this.setState({ fixedTel: e.target.value }) }}/>
+									<span>{basicData.fixedTel}</span>
 			                    </FormItem>
 			                    <FormItem className="half-item"
 				                    	 {...formItemLayout}
 				                         label="客户QQ"
 			                            >
-			                                <Input placeholder="客户QQ" value={this.state.qq} 
-										onChange={(e) => { this.setState({ qq: e.target.value })}}/>
+									<span>{basicData.qq}</span>
 			                    </FormItem>
 			                    <FormItem className="half-item"
 				                    	 {...formItemLayout}
 				                         label="电子邮箱"
 			                            >
-			                                <Input placeholder="客户电子邮箱" value={this.state.email} 
-										onChange={(e) => {this.setState({email: e.target.value })}}/>
+									<span>{basicData.email}</span>
 			                    </FormItem>
 			                    <FormItem className="half-item"
 				                    	 {...formItemLayout}
 				                         label="咨询费用"
 			                            >
-			                                <Input ref='consul' placeholder="请输入咨询费用" value={this.state.consultationPrice} 
-										onChange={(e) => {this.setState({consultationPrice: e.target.value })}}/>
+									<span>{basicData.consultationPrice}</span>
 			                    </FormItem>
 			                </div>
 		                    <div className="clearfix">
-						        <FormItem className="half-item"
-					                {...formItemLayout}
-			                        label="国际化"
-					            > 
-			                   		 <Radio.Group value={this.state.international} onChange={(e) => {
-					                        this.setState({ international:  e.target.value })
-					                    }}>
-					                        <Radio value={0}>否</Radio>
-					                        <Radio value={1}>是</Radio>
-					                  </Radio.Group>
-					             </FormItem>
 		                   		 <FormItem className="half-item" 
 			                            {...formItemLayout}
 			                           label="性别"
 			                         > 
-			                   		 <Radio.Group value={this.state.sex} onChange={(e) => {
-					                        this.setState({sex:e.target.value})
-					                    }}>
-					                        <Radio value={'男'}>男</Radio>
-					                        <Radio value={'女'}>女</Radio>
-					                  </Radio.Group>
+									<span>{basicData.sex}</span>
 		                   		 </FormItem>
 	                   		 </div>
 		                    <div className='clearfix'>
@@ -508,8 +237,7 @@ const Basic = React.createClass({
 			                        labelCol={{ span:4 }}
 			                        wrapperCol={{ span: 18 }}
 			                        label="客户简介" >
-			                            <Input type="textarea" rows={4} value={this.state.introduction} 
-									onChange={(e,pre) => { this.setState({ introduction: e.target.value })}}/>
+									<span>{basicData.introduction}</span>
 			                    </FormItem>
 		                    </div>
 		                    <div className="clearfix pictures">
@@ -517,32 +245,69 @@ const Basic = React.createClass({
 			                        labelCol={{ span: 8 }}
 			                        wrapperCol={{ span: 10 }}
 			                        label="身份证正面" >
-			                        <PicturesWall
-			                            fileList={this.getPositiveIdUrl}
-			                            pictureUrl={this.state.positiveIdUrl} />
-			                            <p>建议:图片要清晰。</p>
+			                        <div className="clearfix">
+			                            <Upload className="demandDetailShow-upload"
+			                                listType="picture-card"
+			                                fileList={this.state.positiveIdUrl}                               
+			                                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 style={{display:'inline-block',width:'350px',marginTop:'20px'}}
 			                        labelCol={{ span: 8 }}
 			                        wrapperCol={{ span: 10 }}
 			                        label="身份证反面" > 
-			                        <PicturesWall
-			                            fileList={this.getOppositeIdUrl}
-			                            pictureUrl={this.state.oppositeIdUrl} />
-			                            <p>建议:图片要清晰。</p>
+			                        <div className="clearfix">
+			                            <Upload className="demandDetailShow-upload"
+			                                listType="picture-card"
+			                                fileList={this.state.oppositeIdUrl}                               
+			                                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 style={{display:'inline-block' ,width:'350px',marginTop:'20px'}}
 			                        labelCol={{ span: 8 }}
 			                        wrapperCol={{ span: 10 }}
 			                        label="客户照片" > 
-			                        <PicturesWall
-			                            fileList={this.getHeadPortraitUrl}
-			                            pictureUrl={this.state.headPortraitUrl} />
-			                            <p>建议:图片要清晰。</p>
+			                        <div className="clearfix">
+			                            <Upload className="demandDetailShow-upload"
+			                                listType="picture-card"
+			                                fileList={this.state.headPortraitUrl}                               
+			                                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> 
-		                    <Button className="setSubmit" type="primary" htmlType="submit">保存</Button>  
-	                        <Button type="ghost" onClick={this.detailsModal}>取消</Button>
 	                    </div>		                	
 				    </Spin>
 				</Form>		

+ 15 - 2
js/component/manageCenter/customer/NEW/signCustomer/intentionDetail/detail/visit.jsx

@@ -39,11 +39,23 @@ const Visit = React.createClass({
 			}, {
 				title: '联系人',
 				dataIndex: 'contacts',
-				key: 'contacts'
+				key: 'contacts',
+				render:(text,record)=>{
+					return  <div>{record.readOnly?
+								<span>***</span>:
+								<span>{text}</span>}
+							</div>
+				}
 			}, {
 				title: '联系电话',
 				dataIndex: 'contactMobile',
-				key: 'contactMobile'
+				key: 'contactMobile',
+				render:(text,record)=>{
+					return  <div>{record.readOnly?
+								<span>***</span>:
+								<span>{text}</span>}
+							</div>
+				}
 			}, {
 				title: '拜访人',
 				dataIndex: 'adminName',
@@ -117,6 +129,7 @@ const Visit = React.createClass({
 					for(let i = 0; i < data.data.list.length; i++) {
 						let thisdata = data.data.list[i];
 						theArr.push({
+							readOnly:thisdata.readOnly,
 							followId: thisdata.followId,
 							followTime: thisdata.followTime,
 							identifyName: thisdata.identifyName,

+ 12 - 32
js/component/manageCenter/customer/NEW/signCustomer/intentionDetail/detail/visitDetail.jsx

@@ -3,7 +3,7 @@ import ajax from 'jquery/src/ajax/xhr.js';
 import $ from 'jquery/src/ajax';
 import {Modal,Form,layout,Radio,Button,Input,Spin,Table,Select,Popconfirm,message} from 'antd';
 import {intentionalService,newFollow,customerStatus} from '@/dataDic.js';
-import {getCompanyIntention,getfllowSituation,getcustomerStatue} from '@/tools.js';
+import {getCompanyIntention,getfllowSituation,getcustomerStatue,getContactType} from '@/tools.js';
 const FormItem =Form.Item;
 
 const VisitDetail = React.createClass({
@@ -70,30 +70,6 @@ const VisitDetail = React.createClass({
 			],
 		}
 	},
-	//选择子项目
-	businessFn(record,index){
-		if(!record.businessGlossoryId){
-			message.warn('请先选择业务名称!');
-			return;
-		}
-		this.setState({
-			businessId:record.businessGlossoryId,
-			busModul:true,
-			index:index,
-			addcontactModul:false
-		})
-	},
-	closeBus(data,e,s){
-		this.state.addcontactModul=e;
-		this.state.busModul=false;
-		if(s){
-			this.state.data[this.state.index].businessName=data;
-			this.setState({
-				busModul:false,
-				data:this.state.data
-			})
-		}
-	},
 	//进入修改拜访记录  
 	visitModify(e) {
 		this.setState({
@@ -129,7 +105,6 @@ const VisitDetail = React.createClass({
 						remarks: thisdata.remarks,
 					});
 				};
-				console.log(theArr)
 				this.setState({
 					followIds: thedata.followId,
 					contacts: thedata.contacts,
@@ -245,6 +220,7 @@ const VisitDetail = React.createClass({
 			labelCol: { span: 8 },
 			wrapperCol: { span: 14 },
 		};
+		const followData= this.props.followData || []
 		return(
 			<div>
 				<Modal	
@@ -263,7 +239,7 @@ const VisitDetail = React.createClass({
 			                            labelCol={{ span:4 }}
 										wrapperCol={{ span: 20 }}
 			                            label="拜访方式" >
-			    			   			<Radio.Group value={this.state.contactType} onChange={(e) => {
+			    			   			{!followData.readOnly?<Radio.Group value={this.state.contactType} onChange={(e) => {
 										        this.setState({ contactType: e.target.value }) 
 						                    }}>
 						                        <Radio value={0}>外出</Radio>
@@ -271,7 +247,9 @@ const VisitDetail = React.createClass({
 						                        <Radio value={2}>QQ</Radio>
 						                        <Radio value={3}>微信</Radio>
 						                        <Radio value={4}>邮箱</Radio>
-						                </Radio.Group>
+						                </Radio.Group>:
+						                <span>{getContactType(this.state.contactType)}</span>
+						                }
 					                </FormItem>
 					                <div className="clearfix">
 						                <FormItem className="half-item"
@@ -298,8 +276,10 @@ const VisitDetail = React.createClass({
 					                        labelCol={{ span: 4 }}
 							                wrapperCol={{ span: 16 }}
 					                        label="跟进备注" >
-					                            <Input type="textarea" rows={4} value={this.state.result} 
-					                              onChange={(e)=>{this.setState({result:e.target.value})}}/>
+					                            {!followData.readOnly?<Input type="textarea" rows={4} value={this.state.result} 
+					                              onChange={(e)=>{this.setState({result:e.target.value})}}/>:
+					                              <span>{this.state.result}</span>
+					                            }
 					                    </FormItem>
 					                </div>
 					                <div className="clearfix">
@@ -316,10 +296,10 @@ const VisitDetail = React.createClass({
 										</div>	 
 					                </div>
 			    			   	</div>
-			    			   	<FormItem wrapperCol={{ span: 12, offset: 6 }}>
+			    			   	{!followData.readOnly&&	<FormItem wrapperCol={{ span: 12, offset: 6 }}>
 								    <Button  type="primary" size="large" htmlType="submit" style={{marginRight:'150px',marginTop:'20px'}}>保存</Button>
 						           	<Button  size="large" onClick={this.visitCancel}>取消</Button>
-					   			</FormItem>
+					   			</FormItem>}
 					   		</Spin>
 					    </Form>
 				</Modal>