liting2017 6 years ago
parent
commit
9a57c32788

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

@@ -42,7 +42,7 @@ const AchievementDetailForm = Form.create()(React.createClass({
                         contacts:values.content,
                         contactMobile:values.telnum,
                         societyTag:values.societyTagt,
-                        customerSource:values.customerSource,
+                        source:values.customerSource,
                         type:'1'
                     }
                 }).done(function (data) { 
@@ -211,7 +211,7 @@ const AddPerson = Form.create()(React.createClass({
                         societyTag:values.societyTagt,
                         name: values.companyNamet, 
                         contactMobile: values.telnums,
-                        customerSource:values.customerSource,
+                        source:values.customerSource,
                         type:'0'
                     }
                 }).done(function (data) { 

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

@@ -221,7 +221,7 @@ const FollowDetail = React.createClass({
 					listArr.push({
 						id: thisdata.businessId,
 						businessName:thisdata.businessProjectId,
-						businessGlossoryId:'',
+						businessGlossoryId:i,
 						businessVarietiesName:thisdata.businessVarietiesName,
 						businessProjectName:thisdata.businessProjectName,
 						followSituation: String(thisdata.followSituation),

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

@@ -63,7 +63,6 @@ const BusName = React.createClass({
 						message.warning(data.error[0].message);
 					}
 				}
-				console.log(theData);
 				this.setState({
 					businessData:theData.businessProjectName
 				})

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

@@ -123,7 +123,6 @@ const Visit = React.createClass({
 							contacts: thisdata.contacts,
 							contactMobile: thisdata.contactMobile,
 							result: thisdata.result,
-							ufbId: thisdata.ufbId,
 							adminName: thisdata.adminName,
 							followSituation: thisdata.followSituation,
 							customerStatus: thisdata.customerStatus,

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

@@ -45,7 +45,7 @@ const VisitDetail = React.createClass({
 								{!record.id?<div>
 									<Button onClick={(e)=>{e.stopPropagation(),this.businessFn(record,index)}} type="small">{record.projectName}</Button>
 								</div>:
-								<span title={text}>{text&&text.length>14?(text.substr(0,14)+'…'):text}</span>
+								<span>{record.businessProjectName}</span>
 								}
 							</div>
 							)
@@ -155,7 +155,7 @@ const VisitDetail = React.createClass({
 					for(let i = 0; i < data.data.userBusinessList.length; i++) {
 						let thisdata = data.data.userBusinessList[i];
 						theArr.push({
-							id: thisdata.businessId,
+							id: thisdata.ufbId,
 							businessName:thisdata.businessProjectId,
 							businessGlossoryId:i,
 							businessVarietiesName:thisdata.businessVarietiesName,
@@ -169,7 +169,7 @@ const VisitDetail = React.createClass({
 				this.setState({
 					followIds: thedata.followId,
 					contacts: thedata.contacts,
-					contactMobiles:thedata.contactMobiles,
+					contactMobile:thedata.contactMobile,
 					uid: thedata.uid,
 					data: theArr,
 					result: thedata.result,
@@ -244,7 +244,7 @@ const VisitDetail = React.createClass({
 			idsList=[];
 		dataList.map((item,index) => {
 			idsList.push({
-				businessId:item.id||'',
+				ufbId:item.id||'',
 				businessProjectId:item.businessName,
 				customerStatus:item.customerStatus,
 				followSituation:item.followSituation,
@@ -355,7 +355,7 @@ const VisitDetail = React.createClass({
 				                            {...formItemLayout}
 				                             label="联系电话"
 				                             >
-						                	<span>{this.state.contactMobiles}</span>
+						                	<span>{this.state.contactMobile}</span>
 						                </FormItem>
 					                </div>
 					                <div className="clearfix">

+ 24 - 42
js/component/manageCenter/customer/NEW/signCustomer/followDetail.jsx

@@ -13,33 +13,19 @@ const FollowDetail = React.createClass({
 			visitModul:false,
 			loading:false,
 			data:[],
-			businessName:'',
 			busModul:false,
-			intentionList:[{
+			intentionList:[
+				{
 					title: '业务名称',
-					dataIndex: 'businessGlossoryId',
+					dataIndex: 'businessVarietiesName',
 					width:120,
-					key: 'businessGlossoryId',
-					render: (text, record, index) => {
-						return (
-							<div>
-                               <span>{getCompanyIntention(text)}</span>
-							</div>
-						)
-					}
+					key: 'businessVarietiesName'
 				},
 				{
 					title: '项目名称',
-					dataIndex: 'businessName',
-					key:'businessName',
-					width:200,
-					render:(text,record,index)=>{
-						return(
-							<div>
-								<span title={text}>{text&&text.length>14?(text.substr(0,14)+'…'):text}</span>
-							</div>
-							)
-						}
+					dataIndex: 'businessProjectName',
+					key:'businessProjectName',
+					width:120
 				},
 				{
 					title: '最新进度',
@@ -192,9 +178,10 @@ const FollowDetail = React.createClass({
 				for(let i = 0; i < data.data.userBusinessList.length; i++) {
 					let thisdata = data.data.userBusinessList[i];
 					listArr.push({
-						id: thisdata.id,
-						businessName:thisdata.businessName,
-						businessGlossoryId: String(thisdata.businessGlossoryId),
+						id: thisdata.businessId,
+						businessName:thisdata.businessProjectId,
+						businessVarietiesName:thisdata.businessVarietiesName,
+						businessProjectName:thisdata.businessProjectName,
 						followSituation: String(thisdata.followSituation),
 						customerStatus: String(thisdata.customerStatus),
 						remarks: thisdata.remarks,
@@ -204,11 +191,7 @@ const FollowDetail = React.createClass({
 					contacts: thedata.contacts,
 					uid: thedata.uid,
 					data: listArr,
-					identifyName: thedata.identifyName,
 					followTime: thedata.followTime,
-					businessGlossoryId: thedata.businessGlossoryId,
-					followSituation: thedata.followSituation,
-					customerStatus: thedata.customerStatus,
 					remarks: thedata.remarks,
 				});
 			}.bind(this),
@@ -246,29 +229,28 @@ const FollowDetail = React.createClass({
 	//详情保存
 	visitSubmit(e){
 		e.preventDefault();
-		let GlossoryId=false;
-		this.state.data.map(function(item) {
-			if(!item.businessGlossoryId||!item.followSituation||!item.customerStatus) {
-				GlossoryId = true
-			}
-		})
 		if(this.state.contactType == undefined) {
 			message.warning('请选择拜访方式')
 			return false;
 		};
-		
 		if(this.state.lastName == undefined) {
 			message.warning('请选择联系人')
 			return false;
 		}
-	
-		if(GlossoryId) {
-			message.warning("业务名称/最新进度/最新状态不能为空!")
-			return false;
-		};
 		this.setState({
 			loading: true
 		});
+		let dataList=this.state.data,
+			idsList=[];
+		dataList.map((item,index) => {
+			idsList.push({
+				businessId:item.id||'',
+				businessProjectId:item.businessName,
+				customerStatus:item.customerStatus,
+				followSituation:item.followSituation,
+				remarks:item.remarks||''
+			})
+		});
 		let contactsId = '';
 		let conts = this.state.lastName;
 		contactsId = this.state.contactsIdArr[conts].id;
@@ -278,7 +260,7 @@ const FollowDetail = React.createClass({
 			dataType: "json",
 			url:  globalConfig.context + '/api/admin/customer/addFollow',
 			data: {
-				userBusinessList: JSON.stringify(this.state.data),
+				userBusinessList: JSON.stringify(idsList),
 				uid: this.state.uid,
 				ocbId: contactsId,
 				contactType: this.state.contactType,
@@ -291,7 +273,7 @@ const FollowDetail = React.createClass({
 			});
 			if(!data.error.length) {
 				message.success('保存成功!');
-				this.props.closeDesc(false,true)
+				this.props.closeDesc(false,true);
 				this.visitCancel();
 			} else {
 				message.warning(data.error[0].message);

+ 0 - 1
js/component/manageCenter/customer/NEW/signCustomer/intentionDetail/detail/visit.jsx

@@ -123,7 +123,6 @@ const Visit = React.createClass({
 							contacts: thisdata.contacts,
 							contactMobile: thisdata.contactMobile,
 							result: thisdata.result,
-							ufbId: thisdata.ufbId,
 							adminName: thisdata.adminName,
 							followSituation: thisdata.followSituation,
 							customerStatus: thisdata.customerStatus,

+ 16 - 29
js/component/manageCenter/customer/NEW/signCustomer/intentionDetail/detail/visitDetail.jsx

@@ -14,31 +14,18 @@ const VisitDetail = React.createClass({
 			loading:false,
 			data:[],
 			//业务意向列表
-			intentionList:[{
+			intentionList:[
+				{
 					title: '业务名称',
-					dataIndex: 'businessGlossoryId',
+					dataIndex: 'businessVarietiesName',
 					width:120,
-					key: 'businessGlossoryId',
-					render: (text, record, index) => {
-						return (
-							<div>
-                               <span>{getCompanyIntention(text)}</span>
-							</div>
-						)
-					}
+					key: 'businessVarietiesName'
 				},
 				{
 					title: '项目名称',
-					dataIndex: 'businessName',
-					key:'businessName',
-					width:200,
-					render:(text,record,index)=>{
-						return(
-							<div>
-								<span title={text}>{text&&text.length>14?(text.substr(0,14)+'…'):text}</span>
-							</div>
-							)
-						}
+					dataIndex: 'businessProjectName',
+					key:'businessProjectName',
+					width:120
 				},
 				{
 					title: '最新进度',
@@ -134,27 +121,27 @@ const VisitDetail = React.createClass({
 				for(let i = 0; i < data.data.userBusinessList.length; i++) {
 					let thisdata = data.data.userBusinessList[i];
 					theArr.push({
-						id: thisdata.id,
-						businessGlossoryId: String(thisdata.businessGlossoryId),
+						id: thisdata.businessId,
+						businessName:thisdata.businessProjectId,
+						businessVarietiesName:thisdata.businessVarietiesName,
+						businessProjectName:thisdata.businessProjectName,
 						followSituation: String(thisdata.followSituation),
 						customerStatus: String(thisdata.customerStatus),
 						remarks: thisdata.remarks,
 					});
 				};
+				console.log(theArr)
 				this.setState({
 					followIds: thedata.followId,
 					contacts: thedata.contacts,
 					uid: thedata.uid,
-					data: theArr,
-					nub: thedata.contactMobile,
+					dataBus: theArr,
 					result: thedata.result,
+					contactMobile:thedata.contactMobile,
 					contactType: parseInt(thedata.contactType),
-					identifyName: thedata.identifyName,
 					followTime: thedata.followTime,
-					businessGlossoryId: thedata.businessGlossoryId,
 					followSituation: thedata.followSituation,
 					customerStatus: thedata.customerStatus,
-					adminName: thedata.adminName,
 				});
 			}.bind(this),
 		}).always(function() {
@@ -304,7 +291,7 @@ const VisitDetail = React.createClass({
 				                            {...formItemLayout}
 				                             label="联系电话"
 				                             >
-						                	<span>{this.state.contactMobiles}</span>
+						                	<span>{this.state.contactMobile}</span>
 						                </FormItem>
 					                </div>
 					                <div className="clearfix">
@@ -324,7 +311,7 @@ const VisitDetail = React.createClass({
 										         rowKey={record => record.id}
 								            	 pagination={false}
 								            	 columns={this.state.intentionList} 
-								            	 dataSource={this.state.data}
+								            	 dataSource={this.state.dataBus}
 								            	 />
 										    </Spin> 
 										</div>	 

+ 14 - 3
js/component/manageCenter/order/myOrder/servicesOrder/addService.jsx

@@ -120,6 +120,7 @@ const NewService = Form.create()(React.createClass({
 			loading: false,
 			visible: false,
 			orgCodeUrl:[],
+			customerArr:[],
 			bussStats:false,
 			checkedKeys: [],
 			lookflowList:[],
@@ -487,14 +488,15 @@ const NewService = Form.create()(React.createClass({
 	},
 	//加载(自动补全)
 	supervisor(e,state){ //客户名称与服务名称自动补全
-		let api=state?'/api/admin/customer/findCustomerByName':'/api/admin/order/getBusinessProjectByName';
+		let api=state?'/api/admin/customer/getCustomerByName':'/api/admin/order/getBusinessProjectByName';
 		$.ajax({
             method: "get",
             dataType: "json",
             crossDomain: false,
             url: globalConfig.context + api,
             data:state?{
-            	name:e
+            	name:e,
+            	type:this.state.customType
             }:{
             	businessName:e
             },
@@ -561,7 +563,7 @@ const NewService = Form.create()(React.createClass({
 	//客户名称自动补全
 	customerChange(e){
 		this.state.autoId='';
-		if(e.length>=1){
+		if(e.length>=2){
 			this.supervisor(e,true); 
 		}	
 		this.setState({
@@ -1122,6 +1124,7 @@ const NewService = Form.create()(React.createClass({
 				customerArr:[],
 				contractType:undefined,
 				bussStats:false,
+				customType:0
 			})
 		}
 	},
@@ -1189,6 +1192,14 @@ const NewService = Form.create()(React.createClass({
 							                    		<span className="mandatory">*</span>
 							                    </FormItem>
 							                </div>}
+							                <FormItem 
+					                            {...formItemLayout}
+					                            label="客户所属类型" > 
+					                            <Radio.Group onChange={(e)=>{this.setState({customType:e.target.value,customerArr:[]})}} value={this.state.customType}>
+											        <Radio value={0}>私有客户</Radio>
+											        <Radio value={1}>已签单客户</Radio>
+											    </Radio.Group>
+							                </FormItem>
 							                <div className="clearfix">
 							                    <FormItem 
 							                            {...formItemLayout}

+ 1 - 1
js/component/manageCenter/order/userMangagement.less

@@ -77,7 +77,7 @@
 .setSave,.operations,.cancel{
     float: left;
 }
-.setSave{margin-right: 10px;margin-left: 150px;}
+.setSave{margin-right: 10px;margin-left: 188px;}
 .toVoid{float: left;margin-right: 10px;}
 .btnSave{text-align: center;margin-top: 10px;overflow: hidden;}
 .ant-calendar-picker{vertical-align: top;margin-top: 11px;}