liting2017 6 years ago
parent
commit
5ec505687b

+ 10 - 5
js/component/account/demand/demandDetaiel.jsx

@@ -58,15 +58,20 @@ const DemandDetail = Form.create()(React.createClass({
                         message.warning(data.error[0].message);
                     };
                     thisData = {};
-				};
+                };
+                let publishPagesArr = [];
+                thisData.publishPages.map(item=>{
+					publishPagesArr.push(item.publishPage)
+                })
 				// let ProvinceCityArr = [];
 				// let ProvinceS = thisData.locationProvince; //getprovince
 				// let citys = thisData.locationCity;
 				// let Areas = thisData.locationArea;
-				// ProvinceCityArr.push(ProvinceS, citys, Areas);
+                // ProvinceCityArr.push(ProvinceS, citys, Areas);
                 this.setState({
 					//ProvinceCity:ProvinceCityArr,
-					id:thisData.id,
+                    id:thisData.id,
+                    publishPagesArr:publishPagesArr,
 					data: thisData,
 					isHot:thisData.isHot,
 					isUrgent:thisData.isUrgent,
@@ -234,13 +239,13 @@ const DemandDetail = Form.create()(React.createClass({
 					</FormItem>
 					<div>
 						<FormItem className="half-item" {...formItemLayout} label="发布状态">
-							<span>{getReleaseStateList(theData.releaseState)}</span>
+							<span>{getReleaseStateList(theData.auditStatus)}</span>
 						</FormItem>
 					</div>
                     <div>
                         <FormItem className="half-item" labelCol={{ span: 6 }}
 							wrapperCol={{ span: 18 }} label="发布位置">
-                                <span>{getReleasePositionList(theData.publishPages)}</span>
+                                <span>{getReleasePositionList(this.state.publishPagesArr)}</span>
 						</FormItem>
                     </div>
                     <div className="clearfix">

+ 16 - 11
js/component/account/demand/demandForm.jsx

@@ -113,6 +113,10 @@ const DemandDetailForm = Form.create()(React.createClass({
                     };
                     thisData = {};
 				};
+				let publishPagesArr = [];
+				thisData.publishPages.map(item=>{
+					publishPagesArr.push(item.publishPage)
+				})
 				// let ProvinceCityArr = [];
 				// let ProvinceS = thisData.locationProvince; //getprovince
 				// let citys = thisData.locationCity;
@@ -122,6 +126,7 @@ const DemandDetailForm = Form.create()(React.createClass({
 					//ProvinceCity:ProvinceCityArr,
 					id:thisData.id,
 					data: thisData,
+					publishPagesArr:publishPagesArr,
 					isHot:thisData.isHot,
 					isUrgent:thisData.isUrgent,
 					status:thisData.status,
@@ -164,7 +169,7 @@ const DemandDetailForm = Form.create()(React.createClass({
                     method: "post",
                     dataType: "json",
                     // crossDomain: false,
-                    url: this.props.data.id ? globalConfig.context + '/api/user/demand/update' : globalConfig.context + '/api/user/demand/apply',
+                    url: this.props.data.id ? globalConfig.context + '/api/user/demand/updateDemand' : globalConfig.context + '/api/user/demand/apply',
                     data: {
                         id: this.props.data.id,
                         name: values.name,
@@ -181,7 +186,7 @@ const DemandDetailForm = Form.create()(React.createClass({
                         status: this.state.status,
 						isUrgent: this.state.isUrgent,
 						isHot:this.state.isHot,
-						publishPages:JSON.stringify(values.publishPages),
+						publishPages:values.publishPages,
 						researchType:values.researchType
                     }
                 }).done(function (data) {
@@ -286,7 +291,7 @@ const DemandDetailForm = Form.create()(React.createClass({
 						<FormItem className="half-item" {...formItemLayout} label="需求类型">
 							{getFieldDecorator('demandType', {
 									rules: [ { required: true, message: '此项为必填项!' } ],
-									initialValue:theData.demandType
+									initialValue:(theData.demandType?theData.demandType.toString():undefined)
 							})(
 								<Select style={{ width: 160 }} placeholder="请选择需求类型"
 									>
@@ -387,7 +392,7 @@ const DemandDetailForm = Form.create()(React.createClass({
 						<FormItem className="half-item" {...formItemLayout} label="发布状态">
 							{getFieldDecorator('auditStatus', {
 								rules: [ { required: false } ],
-								initialValue: theData.auditStatus
+								initialValue: (theData.auditStatus?theData.auditStatus.toString():undefined)
 							})(
 								<Select placeholder="选择发布状态" style={{ width: 160 }} >
 									<Select.Option value="0" >草稿</Select.Option>
@@ -410,16 +415,16 @@ const DemandDetailForm = Form.create()(React.createClass({
 							wrapperCol={{ span: 18 }} label="发布位置">
 							{getFieldDecorator('publishPages', {
 								rules: [ { required: false } ],
-								initialValue: theData.publishPages
+								initialValue: this.state.publishPagesArr
 							})(
 								<Checkbox.Group>
 									<Row>
-										<Col span={6}><Checkbox value="0">网站首页</Checkbox></Col>
-										<Col span={6}><Checkbox value="1">网站需求主页</Checkbox></Col>
-										<Col span={6}><Checkbox value="2">网站需求搜索页</Checkbox></Col>
-										<Col span={6}><Checkbox value="3">APP首页</Checkbox></Col>
-										<Col span={6}><Checkbox value="4">APP需求首页</Checkbox></Col>
-										<Col span={6}><Checkbox value="5">APP需求搜索页</Checkbox></Col>
+										<Col span={6}><Checkbox value="web_index">网站首页</Checkbox></Col>
+										<Col span={6}><Checkbox value="web_demand_main">网站需求主页</Checkbox></Col>
+										<Col span={6}><Checkbox value="web_demand_list">网站需求搜索页</Checkbox></Col>
+										<Col span={6}><Checkbox value="app_index">APP首页</Checkbox></Col>
+										<Col span={6}><Checkbox value="app_demand_main">APP需求首页</Checkbox></Col>
+										<Col span={6}><Checkbox value="app_demand_list">APP需求搜索页</Checkbox></Col>
 									</Row>
 								</Checkbox.Group>
 							)}

+ 5 - 8
js/component/account/demand/techDemand.jsx

@@ -46,9 +46,13 @@ const DemandList = React.createClass({
                             status:thisdata.status  //需求状态
                         });
                     };
-                }
+                };
                 this.state.pagination.current = data.data.pageNo;
                 this.state.pagination.total = data.data.totalCount;
+                if(data.data&&data.data.list&&!data.data.list.length){
+					this.state.pagination.current=0
+					this.state.pagination.total=0
+				};
                 this.setState({
                     dataSource: theArr,
                     pagination: this.state.pagination
@@ -258,13 +262,6 @@ const DemandList = React.createClass({
         };
         const hasSelected = this.state.selectedRowKeys.length > 0;
         const { RangePicker } = DatePicker;
-        this.state.dataSource=[
-            {key:1,serialNumber:1,id:1,auditStatus:'0'},
-            {key:2,serialNumber:2,id:24,auditStatus:'1'},
-            {key:3,serialNumber:3,id:23,auditStatus:'2'},
-            {key:4,serialNumber:4,id:22,auditStatus:'3'},
-            {key:5,serialNumber:5,id:21,auditStatus:'4'},
-        ]
         return (
             <div className="user-content" >
                 <div className="content-title">

+ 21 - 6
js/component/account/index/leftMenu.jsx

@@ -1,5 +1,5 @@
 import React from 'react';
-import { Menu, Icon, Layout } from 'antd';
+import { Menu, Icon, Layout,message } from 'antd';
 import '@/account/leftTab.less';
 const SubMenu = Menu.SubMenu;
 const MenuItemGroup = Menu.ItemGroup;
@@ -10,7 +10,6 @@ import { menu } from '@/account/menu';
 import logo from 'img/acc-logo.png';
 const { Sider } = Layout;
 
-
 const LeftTab = React.createClass({
 	getInitialState() {
 		return {
@@ -22,15 +21,15 @@ const LeftTab = React.createClass({
 	},
 	loadData() {
 		$.ajax({
-			method: 'post',
+			method: 'get',
 			dataType: 'json',
-			url: globalConfig.context + '/api/admin/customer/abc',
+			url: globalConfig.context + '/api/user/homePage',
 			data: {}
 		}).done(
 			function(data) {
-				if (!data.data.error.length) {
+				if (!data.error.length) {
 					this.setState({
-						state: data.data.aa
+						type: data.data.type
 					});
 				} else {
 					message.warning(data.error[0].message);
@@ -103,6 +102,22 @@ const LeftTab = React.createClass({
 		}
 	},
 	render() {
+		let menuList = [];
+		let menuNO = menu[1].children;
+		menuNO.map(item=>{
+			if(this.state.type=='0'){
+				if(item.name!="企业资料"){
+					menuList.push(item)
+				}
+			}else if(this.state.type=='1'){
+				if(item.name!="个人资料"){
+					menuList.push(item)
+				}
+			}else{
+				menuList.push(item)
+			}
+		})
+		menu[1].children=menuList;
 		return (
 			<div>
 				<div className="acc-index">

+ 2 - 2
js/component/account/index/normal.jsx

@@ -133,7 +133,7 @@ const Content = React.createClass({
                         <Collection />
                     </div>
                 </div>
-                <Modal maskClosable={false}
+                {/* <Modal maskClosable={false}
                     title="实名认证提示"
                     visible={this.state.visible}
                     onCancel={() => {
@@ -152,7 +152,7 @@ const Content = React.createClass({
                                 window.open(this.state.type == 1 ? globalConfig.context + "/user/groupCertify.html" : globalConfig.context + "/user/certify.html")
                             }}>马上去</Button>
                     </div>
-                </Modal>
+                </Modal> */}
             </Spin>
         )
     }

+ 1 - 1
js/component/account/menu.jsx

@@ -18,7 +18,7 @@ module.exports = {
           icon: 'setting',
           children: [
             { name: '账号管理', url: 'account' },
-            { name: '单位资料', url: 'unit' },
+            { name: '企业资料', url: 'unit' },
             { name: '个人资料', url: 'personal' },
             { name: '常用联系人', url: 'contacts' },
           ]

+ 5 - 11
js/component/account/setAccount/account.jsx

@@ -20,9 +20,6 @@ class Account extends React.Component {
 			loading: false,
 			visible: false,
 			editState: false,
-			name: 'liting',
-			followTime: '2010/09/18',
-			contactMobile: '18320747565'
 		};
 	}
 	loadData() {
@@ -40,9 +37,7 @@ class Account extends React.Component {
 						message.warning(data.error[0].message);
 					}
 				} else {
-					console.log(data.data.createTime)
-					let time = new Date('Y-m-d',data.data.createTime);
-					console.log(time)
+					
 					this.setState({
 						uid:data.data.uid,
 						username: data.data.username, //用户注册名
@@ -156,11 +151,10 @@ class Account extends React.Component {
 			method: 'POST',
 			dataType: 'json',
 			crossDomain: false,
-			url: globalConfig.context + '/api/user/mobile',
+			url: globalConfig.context + '/api/user/updateUserBase',
 			data: {
-				uid: this.state.uid,
-				name: this.state.name,
-				photo: this.state.photo,
+				identifyName: this.state.identifyName,
+				mobile: this.state.mobile,
 				email: this.state.email,
 				nickname: this.state.nickname
 			}
@@ -224,7 +218,7 @@ class Account extends React.Component {
 							<Col span={8}>
 								<FormItem className="half-mid" {...formItemLayout} label="注册账号">
 									<span>{this.state.username}</span>
-									<Button
+									<Button disabled
 										size="default"
 										onClick={this.passFun.bind(this)}
 										type="primary"

+ 4 - 54
js/component/account/setAccount/contacts.jsx

@@ -16,58 +16,8 @@ class Contancts extends React.Component {
 		super(props);
 		this.state = {
 			loading: false,
-			contactData: [
-				{
-					id: '12',
-					edit: false,
-					name: '李霆1',
-					department: '平台事业发展',
-					position: '前端',
-					photo: '18320746285',
-					mobile: '5551456',
-					qq: '265478954',
-					email: '125468@qq.com',
-					remarks: '这是一段文字这是一段文字这是一段文字这是一段文字这是一段文字这是一段文字'
-				},
-				{
-					id: '123',
-					edit: false,
-					name: '李霆2',
-					department: '平台事业发展',
-					position: '前端',
-					photo: '18320746285',
-					mobile: '5551456',
-					qq: '265478954',
-					email: '125468@qq.com',
-					remarks: '这是一段文字这是一段文字这是一段文字这是一段文字这是一段文字这是一段文字'
-				}
-			],
-			oldData: [
-				{
-					id: '12',
-					edit: false,
-					name: '李霆1',
-					department: '平台事业发展',
-					position: '前端',
-					photo: '18320746285',
-					mobile: '5551456',
-					qq: '265478954',
-					email: '125468@qq.com',
-					remarks: '这是一段文字这是一段文字这是一段文字这是一段文字这是一段文字这是一段文字'
-				},
-				{
-					id: '123',
-					edit: false,
-					name: '李霆2',
-					department: '平台事业发展',
-					post: '前端',
-					position: '18320746285',
-					mobile: '5551456',
-					qq: '265478954',
-					email: '125468@qq.com',
-					remarks: '这是一段文字这是一段文字这是一段文字这是一段文字这是一段文字这是一段文字'
-				}
-			]
+			contactData: [],
+			oldData: []
 		};
 	}
 	loadData() {
@@ -137,7 +87,7 @@ class Contancts extends React.Component {
 			message.warning('请填写带 * 号项!');
 			return;
 		}
-		let	api = item.id?'udpateUserContact':'/api/user/addUserContcat';
+		let	api = item.id?'/api/user/udpateUserContact':'/api/user/addUserContcat';
 		this.setState({
 			loading: true
 		});
@@ -226,7 +176,7 @@ class Contancts extends React.Component {
 				<Spin spinning={this.state.loading}>
 					<Row>
 						<Col span={4} offset={1}>
-							<h4>常用联系人</h4>
+							<h4 style={{fontSize:20}}>常用联系人</h4>
 						</Col>
 						<Col span={6} offset={8}>
 							<Button size="large" type="primary" onClick={this.addContact.bind(this)}>

+ 1 - 0
js/component/account/setAccount/contacts.less

@@ -1,4 +1,5 @@
 .contactWrap{
+    transition: all 1s ease-in;
     padding:20px 20px 100px;
     background-color:#ffffff; 
     .card{

+ 44 - 7
js/component/account/setAccount/personal.jsx

@@ -190,6 +190,8 @@ const Personal = React.createClass({
 					qq: thisData.qq,
 					mobile:thisData.mobile,
 					introduction: thisData.introduction,
+					type:thisData.type,
+					authentication:thisData.authentication
 				});
 			}.bind(this)
 		}).always(
@@ -213,7 +215,6 @@ const Personal = React.createClass({
 	},
 	//基本信息提交
 	newSubmit(e) {
-        e.preventDefault();
         if(!this.state.identifyName){
             message.warning("请填写姓名!")
             return;
@@ -226,12 +227,12 @@ const Personal = React.createClass({
 			message.warning('请选择社会性质!');
 			return false;
 		}
-		if (!this.state.ProvinceCity[1]) {
+		if (!this.state.ProvinceCity||!this.state.ProvinceCity.length) {
 			message.warning('请选择地区!');
 			return false;
         }
         
-        if(!this.state.photo){
+        if(!this.state.mobile){
             message.warning("请填写手机号码!")
             return;
         }
@@ -303,6 +304,8 @@ const Personal = React.createClass({
 				positiveIdUrl: thecompanyLogoUrl.length != 0 ? thecompanyLogoUrl : '',
 				oppositeIdUrl: thecompanyLogoUrls.length != 0 ? thecompanyLogoUrls : '',
 				headPortraitUrl: theorgCodeUrl.length != 0 ? theorgCodeUrl : '',
+				authentication:this.state.authentication,
+				type:this.state.type
 			}
 		}).done(
 			function(data) {
@@ -310,14 +313,41 @@ const Personal = React.createClass({
 					loading: false
 				});
 				if (!data.error.length) {
-					message.success('保存成功!');
-					this.loadInformation();
+					if(this.state.type!='0'){
+						message.warning('个人认证成功,1s后回到首页.')
+						setTimeout(()=>{
+							window.location.href = globalConfig.context + "/user/account/index.html";
+						},1000)  
+					}else{
+						message.success('保存成功!');
+						this.loadInformation();
+					}
 				} else {
 					message.warning(data.error[0].message);
 				}
 			}.bind(this)
 		);
 	},
+	subFun(){
+		if(this.state.type=='0'||this.state.type=='1'){
+			this.newSubmit()
+		}else{
+			this.setState({
+				visible:true
+			})
+		}
+	},
+	handleOk(){
+		this.newSubmit();
+		this.setState({
+			visible:false
+		})
+	},
+	handleCancel(){
+		this.setState({
+			visible:false
+		})
+	},
 	getHeadPortraitUrl(e) {
 		this.setState({ headPortraitUrl: e });
 	},
@@ -347,7 +377,7 @@ const Personal = React.createClass({
 					<Spin spinning={this.state.loading}>
 						<Row style={{ marginBottom: 20 }}>
 							<Col offset={2} span={4}>
-								<h4>个人资料</h4>
+								<h4 style={{fontSize:20}}>个人资料</h4>
 							</Col>
 						</Row>
 						<div className="clearfix">
@@ -546,13 +576,20 @@ const Personal = React.createClass({
                         </div>
                         <Row style={{ marginBottom: 20 }}>
                             <Col offset={3} span={4}>
-                                <Button size="large" className="set-submit" type="primary" htmlType="submit">
+                                <Button size="large" className="set-submit" type="primary"  onClick={this.subFun}>
                                     保存
                                 </Button>
                             </Col>
                         </Row>
 					</Spin>
 				</Form>
+				<Modal
+					visible={this.state.visible}
+					onOk={this.handleOk}
+					onCancel={this.handleCancel}
+					>
+						<p>是否申请个人用户认证?</p>
+				</Modal>
 			</div>
 		);
 	}

+ 68 - 31
js/component/account/setAccount/unit.jsx

@@ -152,11 +152,11 @@ const Unit = React.createClass({
 					}
 					thisData = {};
 				}
-				let ProvinceCityArr = [];
-				let ProvinceS = thisData.locationProvince; //getprovince
-				let citys = thisData.locationCity;
-				let Areas = thisData.locationArea;
-				ProvinceCityArr.push(ProvinceS, citys, Areas);
+				// let ProvinceCityArr = [];
+				// let ProvinceS = thisData.locationProvince; //getprovince
+				// let citys = thisData.locationCity;
+				// let Areas = thisData.locationArea;
+				// ProvinceCityArr.push(ProvinceS, citys, Areas);
 				this.setState({
 					InformationId: thisData.id,
 					InformationUid: thisData.uid,
@@ -170,7 +170,7 @@ const Unit = React.createClass({
 						? splitUrl(thisData.companyLogoUrl, ',', globalConfig.avatarHost + '/upload')
 						: [],
 					dataInformation: thisData,
-					ProvinceCity: ProvinceCityArr[0] != null ? ProvinceCityArr : undefined,
+					//ProvinceCity: ProvinceCityArr[0] != null ? ProvinceCityArr : undefined,
 					industry: String(thisData.industry) == 'null' ? undefined : String(thisData.industry),
 					societyTag: thisData.societyTag || undefined,
 					introduction: thisData.introduction,
@@ -183,7 +183,9 @@ const Unit = React.createClass({
 					legalPersonTel: thisData.legalPersonTel,
 					legalPersonEmail: thisData.legalPersonEmail,
 					businessScope: thisData.businessScope,
-					orgCode: thisData.orgCode
+					orgCode: thisData.orgCode,
+					type:thisData.type,
+					authentication:thisData.authentication
 				});
 			}.bind(this)
 		}).always(
@@ -207,7 +209,6 @@ const Unit = React.createClass({
 	},
 	//基本信息提交
 	newSubmit(e) {
-		e.preventDefault();
 		if(!this.state.identifyName){
 			message.warning('请填写单位名称!');
 			return;
@@ -220,10 +221,10 @@ const Unit = React.createClass({
 			message.warning('请选择社会性质!');
 			return false;
 		}
-		if (!this.state.ProvinceCity.length) {
-			message.warning('请选择省-市-区!');
-			return false;
-		}
+		// if (!this.state.ProvinceCity) {
+		// 	message.warning('请选择省-市-区!');
+		// 	return false;
+		// }
 		if (isNaN(this.state.registeredCapital)) {
 			message.warning('注册资本只能输入数字!');
 			return false;
@@ -263,7 +264,7 @@ const Unit = React.createClass({
 		$.ajax({
 			method: 'post',
 			dataType: 'json',
-			url: globalConfig.context + '/api/admin/customer/updateOrganizationCustomer',
+			url: globalConfig.context + '/api/user/updateOrganizationDetail',
 			data: {
 				id: this.state.InformationId,
 				uid: this.state.InformationUid,
@@ -272,9 +273,9 @@ const Unit = React.createClass({
 				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], //区
+				// locationProvince: this.state.ProvinceCity[0], //省-
+				// locationCity: this.state.ProvinceCity[1], //市
+				// locationArea: this.state.ProvinceCity[2], //区
 				postalAddress: this.state.postalAddress,
 				fixedTel: this.state.fixedTel,
 				contactsFax: this.state.contactsFax,
@@ -292,7 +293,9 @@ const Unit = React.createClass({
 				introduction: this.state.introduction,
 				companyLogoUrl: thecompanyLogoUrl != 0 ? thecompanyLogoUrl : '',
 				orgCodeUrl: theorgCodeUrl != 0 ? theorgCodeUrl : '',
-				auditStatus: this.state.auditStatus
+				auditStatus: this.state.auditStatus,
+				authentication:this.state.authentication,
+				type:this.state.type
 			}
 		}).done(
 			function(data) {
@@ -300,14 +303,41 @@ const Unit = React.createClass({
 					loading: false
 				});
 				if (!data.error.length) {
-					message.success('保存成功!');
-					this.loadInformation()
+					if(this.state.type!='1'){
+						message.warning('企业认证成功,1s后回到首页.')
+						setTimeout(()=>{
+							window.location.href = globalConfig.context + "/user/account/index.html";
+						},1000)  
+					}else{
+						message.success('保存成功');
+						this.loadInformation();
+					}
 				} else {
 					message.warning(data.error[0].message);
 				}
 			}.bind(this)
 		);
 	},
+	subFun(){
+		if(this.state.type=='0'||this.state.type=='1'){
+			this.newSubmit()
+		}else{
+			this.setState({
+				visible:true
+			})
+		}
+	},
+	handleOk(){
+		this.newSubmit();
+		this.setState({
+			visible:false
+		})
+	},
+	handleCancel(){
+		this.setState({
+			visible:false
+		})
+	},
 	componentWillMount() {
 		this.loadInformation();
 	},
@@ -321,7 +351,7 @@ const Unit = React.createClass({
 					<Spin spinning={this.state.loading}>
 						<Row style={{ marginBottom: 20 }}>
 							<Col offset={2} span={4}>
-								<h4>单位资料</h4>
+								<h4 style={{fontSize:20}}>企业资料</h4>
 							</Col>
 						</Row>
 						<div className="clearfix" style={{ paddingLeft: '60px' }}>
@@ -329,7 +359,7 @@ const Unit = React.createClass({
 								className="half-item"
 								labelCol={{ span: 4 }}
 								wrapperCol={{ span: 18 }}
-								label="单位名称"
+								label="企业名称"
 							>
 								<Input
 								    style={{width:'90%'}}
@@ -337,7 +367,7 @@ const Unit = React.createClass({
 									onChange={(e) => {
 										this.setState({ identifyName: e.target.value });
 									}}
-									placeholder="请输入单位名称"
+									placeholder="请输入企业名称"
 								/>
 								<span className="color-red"> * </span>
 							</FormItem>
@@ -365,7 +395,7 @@ const Unit = React.createClass({
 								label="社会属性"
 							>
 								<Select
-									placeholder="客户社会属性(必填项)"
+									placeholder="客户社会属性"
 									value={this.state.societyTag}
 									style={{width:'90%'}}
 									onChange={(e) => {
@@ -378,7 +408,7 @@ const Unit = React.createClass({
 								</Select>
 								<span className="color-red"> * </span>
 							</FormItem>
-							<FormItem
+							{/* <FormItem
 								className="half-item"
 								labelCol={{ span: 4 }}
 								wrapperCol={{ span: 18 }}
@@ -394,7 +424,7 @@ const Unit = React.createClass({
 									}}
 								/>
 								<span className="color-red"> * </span>
-							</FormItem>
+							</FormItem> */}
 							<FormItem
 								className="half-item"
 								labelCol={{ span: 4 }}
@@ -456,10 +486,10 @@ const Unit = React.createClass({
 								className="half-item"
 								labelCol={{ span: 4 }}
 								wrapperCol={{ span: 18 }}
-								label="单位规模"
+								label="企业规模"
 							>
 								<Input
-									placeholder="单位规模"
+									placeholder="企业规模"
 									value={this.state.enterpriseScale}
 									maxLength="1"
 									onChange={(e) => {
@@ -579,7 +609,7 @@ const Unit = React.createClass({
 									className="half-item"
 									labelCol={{ span: 4 }}
 									wrapperCol={{ span: 18 }}
-									label="单位logo"
+									label="企业logo"
 								>
 									<PicturesWall
 										pictureSign="logo"
@@ -610,13 +640,13 @@ const Unit = React.createClass({
 									className="half-item"
 									labelCol={{ span: 4 }}
 									wrapperCol={{ span: 18 }}
-									label="单位简介"
+									label="企业简介"
 								>
 									<Input
 										type="textarea"
 										rows={4}
 										value={this.state.introduction}
-										placeholder="请输入单位简介"
+										placeholder="请输入企业简介"
 										onChange={(e) => {
 											this.setState({ introduction: e.target.value });
 										}}
@@ -625,7 +655,7 @@ const Unit = React.createClass({
 							</div>
 							<Row style={{ marginBottom: 20 ,marginTop:10}}>
 								<Col offset={2} span={4}>
-									<Button size="large" className="set-submit" type="primary" htmlType="submit">
+									<Button size="large" className="set-submit" type="primary" onClick={this.subFun} >
 										保存
 									</Button>
 								</Col>
@@ -634,6 +664,13 @@ const Unit = React.createClass({
 						</div>
 					</Spin>
 				</Form>
+				<Modal
+					visible={this.state.visible}
+					onOk={this.handleOk}
+					onCancel={this.handleCancel}
+					>
+						<p>是否申请企业用户认证?</p>
+				</Modal>
 			</div>
 		);
 	}

+ 1 - 1
js/component/account/topTab.jsx

@@ -1,5 +1,5 @@
 import React from 'react';
-import { Row, Col } from 'antd';
+import { Row, Col,message } from 'antd';
 import './topTab.less';
 import ajax from 'jquery/src/ajax/xhr.js'
 import $ from 'jquery/src/ajax';

+ 4 - 0
js/component/adminDemand/DemandExamine.jsx

@@ -56,6 +56,10 @@ const DemandList = React.createClass({
                 }
                 this.state.pagination.current = data.data.pageNo;
                 this.state.pagination.total = data.data.totalCount;
+                if(data.data&&data.data.list&&!data.data.list.length){
+					this.state.pagination.current=0
+					this.state.pagination.total=0
+				}
                 this.setState({
                     dataSource: theArr,
                     pagination: this.state.pagination

+ 2 - 2
js/component/adminDemand/demandForm.jsx

@@ -159,7 +159,7 @@ const DemandDetailForm = Form.create()(React.createClass({
                     method: "POST",
                     dataType: "json",
                     crossDomain: false,
-                    url: this.props.data.id ? globalConfig.context + '/api/user/demand/update' : globalConfig.context + '/api/user/demand/apply',
+                    url: this.props.data.id ? globalConfig.context + '/api/user/demand/updateDemand' : globalConfig.context + '/api/user/demand/apply',
                     data: {
                         id: this.props.data.id,
                         dataCategory: Number(window.userData.type),
@@ -272,7 +272,7 @@ const DemandDetailForm = Form.create()(React.createClass({
 						<FormItem className="half-item" {...formItemLayout} label="需求类型">
 							{getFieldDecorator('demandType', {
 									rules: [ { required: true, message: '此项为必填项!' } ],
-									initialValue:theData.demandType
+									initialValue:(theData.demandType?theData.demandType.tostring():undefined)
 							})(
 								<Select style={{ width: 160 }} placeholder="请选择需求类型"
 									>

+ 4 - 0
js/component/adminDemand/techDemand.jsx

@@ -56,6 +56,10 @@ const DemandList = React.createClass({
                 }
                 this.state.pagination.current = data.data.pageNo;
                 this.state.pagination.total = data.data.totalCount;
+                if(data.data&&data.data.list&&!data.data.list.length){
+					this.state.pagination.current=0
+					this.state.pagination.total=0
+				}
                 this.setState({
                     dataSource: theArr,
                     pagination: this.state.pagination

+ 6 - 6
js/component/dataDic.js

@@ -2184,22 +2184,22 @@ module.exports = {
      //发布位置
      releasePosition:[
         {
-	        value: "0",
+	        value: "web_index",
 	        key: "网站首页"
 	    },{
-	        value: "1",
+	        value: "web_demand_main",
 	        key: "网站需求主页"
 	    }, {
-	        value: "2",
+	        value: "web_demand_list",
 	        key: "网站需求搜索页"
 	    },{
-	        value: "3",
+	        value: "app_index",
 	        key: "APP首页"
 	    },{
-	        value: "4",
+	        value: "app_demand_main",
 	        key: "APP需求首页"
 	    }, {
-	        value: "5",
+	        value: "app_demand_list",
 	        key: "APP需求搜索页"
 	    }
     ]

+ 1 - 1
js/component/tools.js

@@ -1387,7 +1387,7 @@ module.exports = {
         }
      },
      //发布位置;
-     getReleasePositionList:function(e){
+     getReleasePositionList:function(e=[]){
         if (e) {
             let theType = [];
             e.map((item)=>{