liting2017 7 gadi atpakaļ
vecāks
revīzija
af7527a2c7

+ 66 - 18
js/component/manageCenter/customer/myClient.jsx

@@ -47,7 +47,7 @@ const PicturesWall = React.createClass({
         return (
             <div className="clearfix">
                 <Upload
-                    action={globalConfig.context + "/api/admin/achievement/uploadPicture"}
+                    action={globalConfig.context + "/api/admin/customer/attachmentUpload"}
                     data={{ 'sign': this.props.pictureSign }}
                     listType="picture-card"
                     fileList={fileList}
@@ -230,7 +230,8 @@ const AchievementList = Form.create()(React.createClass({
 				        	telNum:telNum,
 				        	email:email,
 				        	lastName:lastName,
-		                    orderStatusOption: theArr,                    
+		                    orderStatusOption: theArr, 
+		                    technicalPictureUrl: thedata.sign ? splitUrl(thedata.sign, ',', globalConfig.avatarHost + '/upload') : [],
 	                    });
 					}.bind(this),
 				}).always(function () {
@@ -265,7 +266,7 @@ const AchievementList = Form.create()(React.createClass({
 		},
 	
     //通过ID查询这一条的信息
-    Detailload(deletedIds,record){
+    Detailload(deletedIds,record){    	
     	this.RowClick;
     	$.ajax({
             method: "post",
@@ -276,19 +277,22 @@ const AchievementList = Form.create()(React.createClass({
                 id: deletedIds
             },
             success: function (data) {
-                let thisData = data.data;
-               
+                let thisData = data.data;                
                 if (!thisData) {
                     if (data.error && data.error.length) {
                         message.warning(data.error[0].message);
                     };
                     thisData = {};
                 };
+                
+				let companyArr=[]; 				
+ 				let companyString=thisData.companyIntention;				
+ 				companyArr=companyString.split(",") 				 				
                 this.setState({
                     data: thisData,
                    	followSituation:thisData.followSituation,
             		customerStatus:thisData.customerStatus,
-            		companyIntention:thisData.companyIntention,
+            		companyIntention:companyArr,
             		_followSituation:thisData._followSituation,
             		_customerStatus:thisData._customerStatus,
             		_companyIntention:thisData._companyIntention,
@@ -296,7 +300,7 @@ const AchievementList = Form.create()(React.createClass({
             		customerType:thisData.customerType,
             		companyName:thisData.companyName,
             		adminName:thisData.adminName
-                });
+                });                
                 if (thisData.ownerId) {
                     this.getContactsList(thisData.ownerId);
                 };
@@ -639,8 +643,9 @@ const AchievementList = Form.create()(React.createClass({
             } else {
                 message.warning(data.error[0].message);
             };
-            //this.getNewWoman(this.state.cid)
-            this.setModal7VisibleOk()
+            //this.getNewWoman(this.state.cid)   
+            this.Detailload(this.state.rowId);
+            this.setModal7VisibleOk();
             this.loadData();
         }.bind(this));
 		},
@@ -739,10 +744,19 @@ const AchievementList = Form.create()(React.createClass({
             switch(custype){
             	case "个人客户":customerTypechange=0;break;
             	case "公司客户":customerTypechange=1;break;
-            }  
-            console.log(this.state.kid)
+            }              
             let customerStatus= getcustomerStatueOn(this.state.customerStatus);
-            let followSituation= getfllowSituationOn(this.state.followSituation);         
+            let followSituation= getfllowSituationOn(this.state.followSituation);
+            //图片转换
+            let thetechnicalPictureUrl = [];
+            if (this.state.technicalPictureUrl.length) {
+                let picArr = [];
+                this.state.technicalPictureUrl.map(function (item) {
+                    picArr.push(item.response.data);
+                });
+                thetechnicalPictureUrl = picArr.join(",");
+            };
+          
           
        		$.ajax({
                     method: "POST",
@@ -758,6 +772,7 @@ const AchievementList = Form.create()(React.createClass({
                         customerStatus:values.customerStatus,//跟进客户状态
                         followSituation:values.followSituation,//跟进进度
                         contactInfo:(this.state.conts?this.state.conts:"电话")+"-"+(this.state.nub?this.state.nub:""),
+                        sign:thetechnicalPictureUrl
                     }
                 }).done(function (data) {                	
                     this.setState({
@@ -831,7 +846,14 @@ const AchievementList = Form.create()(React.createClass({
             let followSituations= getfllowSituationOn(values.followSituation);         
          	let becompanyIntentions=getCompanyIntentionOn();
          	let city=getcityArr(values.locationProvince);
-         	
+         	let companyMore = [];
+            if (this.state.companyIntention.length) {
+                let companyList = [];
+                this.state.companyIntention.map(function (item) {
+                    companyList.push(item);
+                });
+                companyMore = companyList.join(",");
+            };
        		$.ajax({
                     method: "POST",
                     dataType: "json",
@@ -847,7 +869,7 @@ const AchievementList = Form.create()(React.createClass({
                         locationProvince:values.locationProvince ,//省份1
                         adress: values.adress,//详细地址1
                         remarks: values.remarks,//备注1
-                        companyIntention:this.state.companyIntention,//公司意向
+                        companyIntention:companyMore,//公司意向
                         followSituation:this.state.followSituation,//最新跟进1
                         customerStatus:this.state.customerStatus,//客户状态1
                         //name: values.name,//客户姓名1                        
@@ -1164,7 +1186,7 @@ const AchievementList = Form.create()(React.createClass({
 	                    		  selectedRowKeys: selectedRowKeys.slice(-1)
 	                				});
    			 				}
-			 				};
+			 				};			 				
 							const hasSelected = this.state.selectedRowKeys.length > 0;
 					        const formItemLayout = {
 					            labelCol: { span: 8 },
@@ -1259,7 +1281,7 @@ const AchievementList = Form.create()(React.createClass({
 		                                <Input />
 		                                )}
 		                        </FormItem>
-		                        <FormItem className="half-item"
+		                       {/* <FormItem className="half-item"
 		                            {...formItemLayout}
 		                            label="意向服务" >
 		                               <Select placeholder="选择服务类型" value={getCompanyIntention(this.state.companyIntention)} onChange={(e) => {
@@ -1271,7 +1293,7 @@ const AchievementList = Form.create()(React.createClass({
 		                                    }
 		                                </Select>
 		                               
-		                        </FormItem>	                       
+		                        </FormItem>	 */}                      
 				                    <FormItem className="half-item"
 		                            {...formItemLayout}
 		                            label="地区" >
@@ -1333,6 +1355,32 @@ const AchievementList = Form.create()(React.createClass({
 		                                </Select>
 		                                )}
 		                        </FormItem>
+		                        <div className="clearfix" >	
+			                        <FormItem className="half-item" style={{marginLeft:'80px'}}
+				                         labelCol={{ span: 4 }}
+				                        wrapperCol={{ span: 18 }}
+				                        label="意向服务" > 				                       
+										   <Select 
+				                                multiple	
+				                                style={{width:'600px'}}
+				                                placeholder="选择服务类型"                               
+				                                filterOption={(input, option) => { return option.props.children.indexOf(input) >= 0 }}
+				                                value={this.state.companyIntention}
+				                                onChange={(pids) => {
+				                                    this.state.companyIntention = pids;
+				                                    this.setState({
+				                                        companyIntention: this.state.companyIntention
+				                                    })
+				                                }}
+				                            >
+				                                {
+			                                        intentionalService.map(function (item) {
+			                                            return <Select.Option key={item.value} >{item.key}</Select.Option>
+			                                        })
+			                                    }
+				                            </Select>					
+				                    </FormItem>
+			                    </div>
 		                        <div  className="clearfix">		                        
 					                      <FormItem
 						                        labelCol={{ span: 4 }}
@@ -1932,7 +1980,7 @@ const AchievementList = Form.create()(React.createClass({
 									                        wrapperCol={{ span: 18 }}
 									                        label="技术图片" >
 									                        <PicturesWall
-									                            pictureSign="achievement_technical_picture"
+									                            pictureSign="customer_sys_file"
 									                            fileList={this.getTechnicalPictureUrl}
 									                            pictureUrl={this.state.technicalPictureUrl} />
 									                        <p>图片建议:图片要清晰。</p>

+ 77 - 24
js/component/manageCenter/customer/myClientDesc.jsx

@@ -103,6 +103,9 @@ const PicturesWall = React.createClass({
         this.setState({ fileList });
         this.props.fileList(fileList);
     },
+    serviceChange(value) {        	
+			  console.log(`selected ${value}`);
+	},
     componentWillReceiveProps(nextProps) {
         this.state.fileList = nextProps.pictureUrl;
     },
@@ -355,14 +358,20 @@ const AchievementDetailShow = Form.create()(React.createClass({
         const formItemLayout = {
             labelCol: { span: 8 },
             wrapperCol: { span: 14 },
-        };     
+        }; 
+        const selectOption=[];
+        intentionalService.map(function (item) {
+                    selectOption.push(
+                        <Select.Option key={item.id}>{item.name}</Select.Option>
+                    )                    
+                });
         return (
             <Form horizontal onSubmit={this.handleSubmit} id="demand-form">
                 <Spin spinning={this.state.loading}>
                 	<div className="clearfix">
                 		<FormItem className="half-item"
                             {...formItemLayout}
-                            label="客户类型5555" >
+                            label="客户类型" >
                             <span>{theData._shareType}</span>
                         </FormItem>
                        
@@ -404,7 +413,7 @@ const AchievementDetailShow = Form.create()(React.createClass({
 	                                <Input />
 	                                )}
 	                        </FormItem>        
-                     <FormItem className="half-item"
+                     {/*<FormItem className="half-item"
 	                            {...formItemLayout}
 	                            label="意向服务" >
 	                            {getFieldDecorator('companyIntention', {
@@ -419,7 +428,26 @@ const AchievementDetailShow = Form.create()(React.createClass({
 	                                    }
 	                                </Select>
 	                                )}
-	                        </FormItem>
+	                        </FormItem>*/}
+                    <FormItem className="half-item"
+                        {...formItemLayout}
+                        label="意向服务" >                       
+						   <Select
+                                multiple
+                                style={{ width: '80%' }}
+                                placeholder="选择服务类型"                               
+                                filterOption={(input, option) => { return option.props.children.indexOf(input) >= 0 }}
+                                value={this.state.companyIntention}
+                                onChange={(pids) => {
+                                    this.state.companyIntention = pids;
+                                    this.setState({
+                                        companyIntention: this.state.companyIntention
+                                    })
+                                }}
+                            >
+                                {selectOption}
+                            </Select>						
+                    </FormItem>
                      <FormItem className="half-item"
 	                            {...formItemLayout}
 	                            label="地区" >
@@ -607,6 +635,7 @@ const AchievementDetailForm = Form.create()(React.createClass({
         return {
             loading: false,
             auditStatus: 0,
+            selectOption: [],
             textFileList: [],
             switchValue: false,
             radios: false,
@@ -785,10 +814,20 @@ const AchievementDetailForm = Form.create()(React.createClass({
                 });
                 theMaturityPictureUrl = picArr.join(",");
             };
+            let companyMore = [];
+            if (values.companyIntention.length) {
+                let companyList = [];
+                values.companyIntention.map(function (item) {
+                    companyList.push(item);
+                });
+                companyMore = companyList.join(",");
+            };
+            console.log(values.companyIntention)
             if (!err) {
                 this.setState({
                     loading: true
                 });
+                
                 $.ajax({
                     method: "POST",
                     dataType: "json",
@@ -798,10 +837,10 @@ const AchievementDetailForm = Form.create()(React.createClass({
                         id: this.props.data.id, //编号
                         customerType:values.customerTyp ,//客户信息  1                       
                        // createTime: values.createTime ? values.createTime.format('YYYY-MM-DD') : undefined,//时间 1\                    
-                        companyIntention: this.props.data.companyIntention,
+                       
                         companyName: values.companyName,//公司名称  1
                         companyIndustry: values.companyIndustry,//公司行业  
-                        companyIntention: values.companyIntention,//公司意向1
+                        companyIntention: companyMore,//公司意向1
                         tag: values.tag,
                         locationProvince: values.locationProvince,//省份1
                         adress: values.adress,//详细地址1
@@ -868,7 +907,7 @@ const AchievementDetailForm = Form.create()(React.createClass({
         const formItemLayout = {
             labelCol: { span: 8 },
             wrapperCol: { span: 14 },
-        };
+        };       
         const { RangePicker } = DatePicker;
         return (
             <Form horizontal onSubmit={this.handleSubmit} id="demand-form">
@@ -935,23 +974,7 @@ const AchievementDetailForm = Form.create()(React.createClass({
 	                            })(
 	                                <Input />
 	                                )}
-	                        </FormItem>
-	                        <FormItem className="half-item"
-	                            {...formItemLayout}
-	                            label="意向服务" >
-	                            {getFieldDecorator('companyIntention', {
-	                            	rules: [{ required: true, message: '此项为必填项!' }],
-	                                initialValue: getCompanyIntention(theData.companyIntention)
-	                            })(
-	                               <Select placeholder="选择服务类型" >
-	                                    {
-	                                        intentionalService.map(function (item) {
-	                                            return <Select.Option key={item.value} >{item.key}</Select.Option>
-	                                        })
-	                                    }
-	                                </Select>
-	                                )}
-	                        </FormItem>	                       
+	                        </FormItem>	                     	                        
 			                <FormItem className="half-item"
 	                            {...formItemLayout}
 	                            label="地区" >
@@ -1023,6 +1046,36 @@ const AchievementDetailForm = Form.create()(React.createClass({
                                 </Select>
 	                                )}
 	                        </FormItem>
+	                        <div  className="clearfix" >	
+		                        <FormItem className="half-item" style={{marginLeft:'80px'}}
+			                         labelCol={{ span: 4 }}
+			                        wrapperCol={{ span: 18 }}
+			                        label="意向服务" > 
+			                        {getFieldDecorator('companyIntention', {
+			                            	rules: [{ required: true, message: '此项为必填项!' }],	
+			                            	
+	                                })(
+									   <Select 
+			                                multiple	
+			                                style={{width:'600px'}}
+			                                placeholder="选择服务类型"                               
+			                                filterOption={(input, option) => { return option.props.children.indexOf(input) >= 0 }}
+			                                value={this.state.companyIntention}
+			                                onChange={(pids) => {
+			                                    this.state.companyIntention = pids;
+			                                    this.setState({
+			                                        companyIntention: this.state.companyIntention
+			                                    })
+			                                }}
+			                            >
+			                                {
+		                                        intentionalService.map(function (item) {
+		                                            return <Select.Option key={item.value} >{item.key}</Select.Option>
+		                                        })
+		                                    }
+			                            </Select>)}					
+			                    </FormItem>
+		                    </div>
 	                        <div  className="clearfix">		                        
 				                <FormItem
 			                        labelCol={{ span: 4 }}

+ 8 - 8
js/component/manageCenter/topTab.jsx

@@ -493,14 +493,14 @@ const TopTab = React.createClass({
                 </div>
                 <div className="acc-top-tab">
                     <Row>
-                        <Col style={{ display: window.showUserManage ? 'block' : 'none' }} className={this.props.active === 'userManage' ? 'active' : ''} span={2}><a href={globalConfig.context + "/admin/userManage.html"}>用户管理</a></Col>
-                        <Col style={{ display: window.showCustomer ? 'block' : 'none' }} className={this.props.active === 'myClient' ? 'active' : ''} span={2}><a href={globalConfig.context + "/admin/customer.html" }>客户管理</a></Col>
-                        <Col style={{ display: window.showServices ? 'block' : 'none' }} className={this.props.active === 'services' ? 'active' : ''} span={2}><a href={globalConfig.context + "/admin/servicesManage/contract.html"}>科技服务管理</a></Col>
-                        <Col style={{ display: window.showAchievement ? 'block' : 'none' }} className={this.props.active === 'achievement' ? 'active' : ''} span={2}><a href={globalConfig.context + "/admin/achievement.html"}>科技成果管理</a></Col>                       
-                        <Col style={{ display: window.showDemand ? 'block' : 'none' }} className={this.props.active === 'demand' ? 'active' : ''} span={2}><a href={globalConfig.context + "/admin/demand.html"}>科技需求管理</a></Col>
-                        <Col style={{ display: window.showIdea ? 'block' : 'none' }} className={this.props.active === 'idea' ? 'active' : ''} span={2}><a href={globalConfig.context + "/admin/idea.html"}>科技思想管理</a></Col>
-                        <Col style={{ display: window.showSystem ? 'block' : 'none' }} className={this.props.active === 'userOrder' ? 'active' : ''} span={2}><a href={globalConfig.context + "/admin/userOrder.html"}>用户订单管理</a></Col>
-                        <Col style={{ display: window.showSystem ? 'block' : 'none' }} className={this.props.active === 'system' ? 'active' : ''} span={2}><a href={globalConfig.context + "/admin/set.html"}>系统设置</a></Col>
+                        {/*<Col style={{ display: window.showUserManage ? 'block' : 'none' }} className={this.props.active === 'userManage' ? 'active' : ''} span={2}><a href={globalConfig.context + "/admin/userManage.html"}>用户管理</a></Col>*/}
+                        <Col style={{ display: window.showCustomer ? 'block' : 'none' }} className={this.props.active === 'myClient' ? 'active' : ''} span={3}><a href={globalConfig.context + "/admin/customer.html" }>客户管理</a></Col>
+                        <Col style={{ display: window.showServices ? 'block' : 'none' }} className={this.props.active === 'services' ? 'active' : ''} span={3}><a href={globalConfig.context + "/admin/servicesManage/contract.html"}>科技服务管理</a></Col>
+                        <Col style={{ display: window.showAchievement ? 'block' : 'none' }} className={this.props.active === 'achievement' ? 'active' : ''} span={3}><a href={globalConfig.context + "/admin/achievement.html"}>科技成果管理</a></Col>                       
+                        <Col style={{ display: window.showDemand ? 'block' : 'none' }} className={this.props.active === 'demand' ? 'active' : ''} span={3}><a href={globalConfig.context + "/admin/demand.html"}>科技需求管理</a></Col>
+                        <Col style={{ display: window.showIdea ? 'block' : 'none' }} className={this.props.active === 'idea' ? 'active' : ''} span={3}><a href={globalConfig.context + "/admin/idea.html"}>科技思想管理</a></Col>
+                        <Col style={{ display: window.showSystem ? 'block' : 'none' }} className={this.props.active === 'userOrder' ? 'active' : ''} span={3}><a href={globalConfig.context + "/admin/userOrder.html"}>用户订单管理</a></Col>
+                        <Col style={{ display: window.showSystem ? 'block' : 'none' }} className={this.props.active === 'system' ? 'active' : ''} span={3}><a href={globalConfig.context + "/admin/set.html"}>系统设置</a></Col>
                     </Row>
                 </div>
                 <UserModal showDesc={this.state.userModalShow} closeDesc={this.closeUserModal} />