liting2017 6 years ago
parent
commit
ce2ce37351

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

@@ -467,6 +467,7 @@ const FollowDetail = React.createClass({
 				/>
 				<BusName 
 					businessId={this.state.businessId}
+					mid={this.props.followData.id}
 					busModul={this.state.busModul}
 					closeBus={this.closeBus}
 				/>

+ 32 - 22
js/component/manageCenter/customer/NEW/intentionCustomer/followDetail/businessName.jsx

@@ -26,7 +26,7 @@ const BusName = React.createClass({
 					};
 					thedata = {};
 				};
-				if(data.data&&data.data.list){
+				if(data.data && data.data.list) {
 					for(let i = 0; i < data.data.list.length; i++) {
 						let thisdata = data.data.list[i];
 						listArr.push({
@@ -45,31 +45,37 @@ const BusName = React.createClass({
 			});
 		}.bind(this));
 	},
-	getLockedProject(ids){
+	getLockedProject(ids) {
 		this.setState({
-			loading:true
+			loading: true
 		})
 		$.ajax({
 			method: "get",
 			dataType: "json",
 			url: globalConfig.context + '/api/admin/customer/getLockedProject',
-			data:{
-				uid:ids
+			data: {
+				uid: ids
 			},
-			success:function(data){
-				let theData=data.data
-				if(!theData){
-					if(data.err&&data.err.length){
+			success: function(data) {
+				let theData = data.data,
+					businessProjectName = [];
+				if(!theData) {
+					if(data.err && data.err.length) {
 						message.warning(data.error[0].message);
 					}
+				} else {
+					theData.map(item => {
+						businessProjectName.push(item.businessProjectName)
+					})
+					let busStr = businessProjectName.join(' -- ');
+					this.setState({
+						businessData: busStr
+					})
 				}
-				this.setState({
-					businessData:theData.businessProjectName
-				})
 			}.bind(this)
-		}).always(function(){
+		}).always(function() {
 			this.setState({
-				loading:false
+				loading: false
 			})
 		}.bind(this));
 	},
@@ -82,17 +88,21 @@ const BusName = React.createClass({
 		this.setState({
 			busModul: false
 		})
-		this.props.closeBus(null,false,false)
+		this.props.closeBus(null, false, false)
 	},
 	selFn() {
+		if(!this.state.contactType) {
+			message.warning('未选定项目!')
+			return false;
+		};
 		this.setState({
 			busModul: false
 		});
-		let idData={};
-		idData.id=this.state.contactType;
-		this.state.projectData.map(item=>{
-			if(this.state.contactType==item.id){
-				idData.name=item.name
+		let idData = {};
+		idData.id = this.state.contactType;
+		this.state.projectData.map(item => {
+			if(this.state.contactType == item.id) {
+				idData.name = item.name
 			}
 		})
 		this.props.closeBus(idData, false, true);
@@ -103,7 +113,7 @@ const BusName = React.createClass({
 				busModul: true,
 				loading: false
 			})
-			this.getLockedProject(nextProps.businessId);
+			this.getLockedProject(nextProps.mid);
 			this.loadData(nextProps.businessId);
 		};
 	},
@@ -116,7 +126,7 @@ const BusName = React.createClass({
 				span: 18
 			},
 		};
-		const projectData = this.state.projectData ||[];
+		const projectData = this.state.projectData || [];
 		return(
 			<Modal	
 			      className="customeDetails"

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

@@ -105,7 +105,7 @@ const Basic = React.createClass({
 				let citys = thisData.city;
 				let Areas = thisData.area;
 				ProvinceCityArr.push(ProvinceS, citys, Areas);
-				let month = thisData.dateOfBirthYear ? thisData.dateOfBirthYear + '/' + thisData.dateOfBirthMonth : false;
+				let month = thisData.dateOfBirthYear ? thisData.dateOfBirthYear + '/' + thisData.dateOfBirthMonth : undefined;
 				this.setState({
 					InformationId: thisData.id,
 					InformationUid: thisData.uid,
@@ -366,7 +366,7 @@ const Basic = React.createClass({
 		                           {...formItemLayout}
 		                           label="出生日期"
 	                          > 
-	                              {!this.state.yearMonth?<MonthPicker placeholder="选择出生年月" value={this.state.yearMonth||null} onChange={(time) => {this.setState({yearMonth: time});}}/>	   	 
+	                              {!this.state.yearMonth?<MonthPicker placeholder="选择出生年月" value={this.state.yearMonth} onChange={(time) => {this.setState({yearMonth: time});}}/>	   	 
 		                          :<MonthPicker value={moment(this.state.yearMonth, monthFormat)} format={monthFormat} onChange={(time) => {this.setState({yearMonth: time});}}/>
 		                    	}
 		                    </FormItem>

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

@@ -190,6 +190,7 @@ const Visit = React.createClass({
 			    	followData={this.state.followData}
 			    	visitModul={this.state.visitModul}
 			    	closeDesc={this.closeDesc}
+			    	mid={this.props.data.id}
 			    />
 			</div>	
 		)

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

@@ -392,6 +392,7 @@ const VisitDetail = React.createClass({
 					businessId={this.state.businessId}
 					busModul={this.state.busModul}
 					closeBus={this.closeBus}
+					mid={this.props.mid}
 				/>
 			</div>
 		)

+ 18 - 18
js/component/manageCenter/customer/content.jsx

@@ -30,15 +30,15 @@ class Content extends Component {
     }
     getKey(key) {
         switch (key) {    
-        	//我的单位客户
-            case 'myOrganization':
-                require.ensure([], () => {
-                    const MyClient = require('./customerData/myClient').default;
-                    this.setState({
-                        component: <MyClient ApiUrl={''}/>                      
-                    });
-                });
-                break;
+//      	//我的单位客户
+//          case 'myOrganization':
+//              require.ensure([], () => {
+//                  const MyClient = require('./customerData/myClient').default;
+//                  this.setState({
+//                      component: <MyClient ApiUrl={''}/>                      
+//                  });
+//              });
+//              break;
 //         // 单位客户查询
 //          case 'organizationQuery':
 //              require.ensure([], () => {
@@ -49,15 +49,15 @@ class Content extends Component {
 //        	    });
 //        	    break;
           	//我的个人客户
-          	case 'myPersonal':
-                require.ensure([], () => {
-                    const IndividualCustomer = require('./individualCustomer/individualCustomer').default;
-                    this.setState({
-                        component: <IndividualCustomer ApiUrl={''}/>                      
-                      
-                    });
-                });
-                break; 
+//        	case 'myPersonal':
+//              require.ensure([], () => {
+//                  const IndividualCustomer = require('./individualCustomer/individualCustomer').default;
+//                  this.setState({
+//                      component: <IndividualCustomer ApiUrl={''}/>                      
+//                    
+//                  });
+//              });
+//              break; 
             //我的被拒绝客户
             case 'myReject':
                 require.ensure([], () => {