liting2017 7 years ago
parent
commit
a73a538aef

+ 4 - 2
js/component/manageCenter/customer/customerData/companyCustomer.jsx

@@ -1140,7 +1140,9 @@ const PublicCustomer = Form.create()(React.createClass({
                 let ProvinceS=thisData.locationProvince;  //getprovince
                 let citys=thisData.locationCity;
                 let Areas=thisData.locationArea;
-                 ProvinceCityArr.push(ProvinceS,citys,Areas);
+                ProvinceCityArr.push(ProvinceS,citys,Areas);
+                
+                let cityArea=getprovince(ProvinceS)+'/'+getprovince(citys)+'/'+getprovince(Areas)
                 this.setState({
                 	InformationId:thisData.id,
                 	InformationUid:thisData.uid,
@@ -1151,7 +1153,7 @@ const PublicCustomer = Form.create()(React.createClass({
                 	companyLogoUrl: thisData.companyLogoUrl ? splitUrl(thisData.companyLogoUrl, ',', globalConfig.avatarHost + '/upload') : [],
                 	dataInformation:thisData,
                 	ProvinceCity:ProvinceCityArr,
-                	proviceCityArea:ProvinceS?(getprovince(ProvinceS)+'/'+getprovince(citys)+'/'+getprovince(Areas)):'',
+                	proviceCityArea:ProvinceS?cityArea:'',
                 	industry:String(thisData.industry)=='null'?undefined:String(thisData.industry),
                 });    
             }.bind(this),

+ 17 - 5
js/component/manageCenter/customer/customerData/myClientDesc.jsx

@@ -13,11 +13,23 @@ const AchievementDetailForm = Form.create()(React.createClass({
     },
 
     handleSubmit(e) {
-    	console.log(this.state.societyTag)
+    	if(this.state.companyNamet.length>64){
+    		message.warning('客户名称字数不超过64个')
+    		return false;
+    	};
+    	if(this.state.content.length>32){
+    		message.warning('联系人字数不超过32个')
+    		return false;
+    	};
+    	if(this.state.telnum.length>13){
+    		message.warning('电话号码字数不超过13个')
+    		return false;
+    	};
     	if(this.state.societyTagt==undefined){
     		message.warning('请填写社会属性!')
     		return false;
-    	}
+    	};
+    	
         e.preventDefault();
         this.props.form.validateFields((err, values) => {                                 
             if (!err) {
@@ -96,7 +108,7 @@ const AchievementDetailForm = Form.create()(React.createClass({
                     	<FormItem className="half-item"
 	                            {...formItemLayout}
 	                            label="公司名称" >
-	                         <Input value={this.state.companyNamet} placeholder="公司名称" 
+	                         <Input value={this.state.companyNamet} placeholder="公司名称(64字以内)" 
 	                              onChange={(e) => { this.setState({ companyNamet: e.target.value }); }} required="required"/>
 	                    </FormItem>
                     </div>
@@ -104,7 +116,7 @@ const AchievementDetailForm = Form.create()(React.createClass({
                     	<FormItem className="half-item"
 	                            {...formItemLayout}
 	                            label="联系人" >
-	                              <Input value={this.state.content}  placeholder="联系人"  
+	                              <Input value={this.state.content}  placeholder="联系人" 
 	                                 onChange={(e) => { this.setState({ content: e.target.value }); }} required="required"/>
 	                    </FormItem>
                     </div>
@@ -112,7 +124,7 @@ const AchievementDetailForm = Form.create()(React.createClass({
                     	<FormItem className="half-item"
 	                            {...formItemLayout}
 	                            label="联系电话" >
-	                              <Input value={this.state.telnum} placeholder="联系电话"  
+	                              <Input value={this.state.telnum} placeholder="联系电话" 
 	                                    onChange={(e) => { this.setState({ telnum: e.target.value }); }} required="required"/>
 	                    </FormItem>
                     </div>

+ 8 - 0
js/component/manageCenter/customer/individualCustomer/myClientDesc.jsx

@@ -12,6 +12,14 @@ const AchievementDetailForm = Form.create()(React.createClass({
         };
     },
     handleSubmit(e) {
+    	if(this.state.content.length>64){
+    		message.warning('联系人字数不超过64个')
+    		return false;
+    	};
+    	if(this.state.telnum.length>13){
+    		message.warning('电话号码字数不超过13个')
+    		return false;
+    	};
         e.preventDefault();
         this.props.form.validateFields((err, values) => {                                 
             if (!err) {

+ 12 - 10
js/component/tools.js

@@ -840,29 +840,31 @@ module.exports = {
                 if (item.id == nub) {
                     theType = item.name;
                 };
+                
             });
-            return theType;
-     }else if(nub>34&&nub<=380){
+        }
+    	if(nub>34&&nub<=380){
         	provinceList.map(function (item) {
         		item.cityList.map(function (city) {
-	                if (item.id == nub) {
-                      theType = item.name;
+	                if (city.id == nub) {
+                      theType = city.name;
                    };
 	             });
            });
-            return theType;
-        } else if(nub>380){
+          
+        }
+        if(nub>380){
         	provinceList.map(function (item) {
         		item.cityList.map(function (city) {
         			city.areaList.map(function (areas) {
-		               if (item.id == nub) {
-                   		   theType = item.name;
+		               if (areas.id == nub) {
+                   		   theType = areas.name;
               			}; 
 		            });
-          		 });
-	       		 return theType;
+          		});	
 	        })
         }
+        return theType;
     },
    //我的业务跟进状态
    getStatusFollow:function(e){

+ 1 - 1
package.json

@@ -1,6 +1,6 @@
 {
   "name": "afanti",
-  "version": "1.0.52",
+  "version": "1.0.50",
   "description": "",
   "main": "index.js",
   "scripts": {