|
@@ -125,14 +125,20 @@ const Expert = React.createClass({
|
|
|
let month = thisData.dateOfBirthYear
|
|
|
? thisData.dateOfBirthYear + '/' + thisData.dateOfBirthMonth
|
|
|
: undefined;
|
|
|
+ let authenticationState='';
|
|
|
+ if(thisData.expertAudit=='3'){
|
|
|
+ authenticationState=thisData.expert+''
|
|
|
+ }
|
|
|
this.setState({
|
|
|
InformationId: thisData.id,
|
|
|
InformationUid: thisData.uid,
|
|
|
- expertAudit:thisData.expertAudit,
|
|
|
- type:thisData.type, //0-个人认证 1-企业认证
|
|
|
- authType:thisData.authType||'1', //认证类型 0-专家认证 1-顾问认证
|
|
|
- authMessage:thisData.authMessage||'消息不真实',
|
|
|
- authState:thisData.authState||'0', //认证状态 0-未认证 1-认证审核中 2-认证失败 3-已认证
|
|
|
+ expertAudit:thisData.expertAudit,
|
|
|
+ authentication:thisData.authentication,
|
|
|
+ authenticationState:authenticationState,
|
|
|
+ type:thisData.type, //0-个人认证 1-企业认证
|
|
|
+ expert:thisData.expert, //认证类型 0-未认证专家顾问 1-专家认证 2-顾问认证
|
|
|
+ authMessage:thisData.authMessage||'消息不真实',
|
|
|
+ expertAudit:thisData.expertAudit, //认证状态 0-未认证 1-认证审核中 2-已认证 3-认证失败
|
|
|
headPortraitUrl: thisData.headPortraitUrl //专家照片
|
|
|
? splitUrl(thisData.headPortraitUrl, ',', globalConfig.avatarHost + '/upload')
|
|
|
: [],
|
|
@@ -153,7 +159,7 @@ const Expert = React.createClass({
|
|
|
professionalTitle: thisData.professionalTitle||'',
|
|
|
qualification: thisData.qualification||'',
|
|
|
majorCategory: thisData.majorCategory||'',
|
|
|
- adviserType: thisData.adviserType||'',
|
|
|
+ adviserType: thisData.consultantType||'',
|
|
|
headPortraitUrlCopy: thisData.headPortraitUrl,
|
|
|
adviserUrlCopy: thisData.adviserUrl,
|
|
|
positiveIdUrlCopy: thisData.positiveIdUrl,
|
|
@@ -226,7 +232,7 @@ const Expert = React.createClass({
|
|
|
let years = [];
|
|
|
let yearMonth =
|
|
|
this.state.yearMonth != undefined ? new Date(this.state.yearMonth).toLocaleDateString() : '';
|
|
|
- years = yearMonth.split('/');
|
|
|
+ years = yearMonth.split('/');
|
|
|
this.setState({
|
|
|
loading: true
|
|
|
});
|
|
@@ -235,7 +241,6 @@ const Expert = React.createClass({
|
|
|
id: this.state.InformationId,
|
|
|
uid: this.state.InformationUid,
|
|
|
type:this.state.type,
|
|
|
- authType:'',
|
|
|
societyTag: values.societyTag,
|
|
|
identifyName: values.identifyName,
|
|
|
industry: values.industry,
|
|
@@ -245,6 +250,8 @@ const Expert = React.createClass({
|
|
|
city:(values.ProvinceCity)[1], //市
|
|
|
area:(values.ProvinceCity)[2], //区
|
|
|
sex: values.sex,
|
|
|
+ expert:'0',
|
|
|
+ authentication:this.state.authentication,
|
|
|
mobile: values.mobile,
|
|
|
fixedTel: values.fixedTel,
|
|
|
qq: values.qq,
|
|
@@ -252,19 +259,10 @@ const Expert = React.createClass({
|
|
|
email: values.email,
|
|
|
postalAddress: values.postalAddress,
|
|
|
introduction: values.introduction,
|
|
|
- headPortraitUrl:this.state.headPortraitUrlCopy||'',
|
|
|
- positiveIdUrl:this.state.positiveIdUrlCopy||'',
|
|
|
- adviserUrl:this.state.adviserUrlCopy||'',
|
|
|
- oppositeIdUrl:this.state.oppositeIdUrlCopy||'',
|
|
|
- workUnit:this.state.workUnit||'',
|
|
|
- graduateSchool:this.state.graduateSchool||'',
|
|
|
- professionalTitle:this.state.professionalTitle||'',
|
|
|
- qualification:this.state.qualification||'',
|
|
|
- majorCategory:this.state.majorCategory||'',
|
|
|
- adviserType:this.state.adviserType||''
|
|
|
+ expertAudit:this.state.expertAudit,
|
|
|
}
|
|
|
if(this.state.authenticationState=='0'){
|
|
|
- dataList.authType='0',
|
|
|
+ dataList.expert='1',
|
|
|
dataList.workUnit=values.workUnit;
|
|
|
dataList.professionalTitle=values.professionalTitle;
|
|
|
dataList.qualification=values.qualification;
|
|
@@ -274,9 +272,9 @@ const Expert = React.createClass({
|
|
|
dataList.positiveIdUrl=thecompanyLogoUrl.length != 0 ? thecompanyLogoUrl : '';
|
|
|
dataList.oppositeIdUrl=thecompanyLogoUrls.length != 0 ? thecompanyLogoUrls : '';
|
|
|
}else if(this.state.authenticationState=='1'){
|
|
|
- dataList.authType='1';
|
|
|
- dataList.adviserType=values.adviserType;//顾问类型
|
|
|
- dataList.adviserUrl=adviserPic; //顾问照片
|
|
|
+ dataList.expert='2';
|
|
|
+ dataList.consultantType=values.adviserType;//顾问类型
|
|
|
+ dataList.headPortraitUrl=theorgCodeUrl.length != 0 ? theorgCodeUrl : ''; //顾问照片
|
|
|
dataList.positiveIdUrl=thecompanyLogoUrl.length != 0 ? thecompanyLogoUrl : '';
|
|
|
dataList.oppositeIdUrl=thecompanyLogoUrls.length != 0 ? thecompanyLogoUrls : '';
|
|
|
}
|
|
@@ -291,7 +289,13 @@ const Expert = React.createClass({
|
|
|
loading: false
|
|
|
});
|
|
|
if (!data.error.length) {
|
|
|
- message.success(this.state.expertAudit<1?'认证审核提交成功,请等待审核结果!':'保存成功');
|
|
|
+ //认证状态判定说明
|
|
|
+ if(this.state.authentication){
|
|
|
+ message.success(this.state.expertAudit=='0'||this.state.expertAudit=='3'?'认证审核提交成功,请耐心等待。':'保存')
|
|
|
+ }else{
|
|
|
+ message.success('个人认证成功。')
|
|
|
+ }
|
|
|
+
|
|
|
this.loadInformation();
|
|
|
} else {
|
|
|
message.warning(data.error[0].message);
|
|
@@ -303,11 +307,18 @@ const Expert = React.createClass({
|
|
|
e.preventDefault();
|
|
|
this.props.form.validateFields((err, values) => {
|
|
|
if(!err){
|
|
|
- if(this.state.expertAudit!='0'&&this.state.authenticationState==undefined){
|
|
|
- this.newSubmit(values)
|
|
|
+ if(this.state.authenticationState==undefined){
|
|
|
+ if(!this.state.authentication){
|
|
|
+ this.setState({
|
|
|
+ visible: true,
|
|
|
+ values :values
|
|
|
+ });
|
|
|
+ }else{
|
|
|
+ this.newSubmit(values)
|
|
|
+ }
|
|
|
}else{
|
|
|
if(this.state.authenticationState=='1'){
|
|
|
- if(!(this.state.adviserUrl.length)){
|
|
|
+ if(!(this.state.headPortraitUrl.length)){
|
|
|
message.warning('请上传顾问照片!')
|
|
|
return;
|
|
|
}
|
|
@@ -481,7 +492,7 @@ const Expert = React.createClass({
|
|
|
})(<Input type="textarea" rows={4} maxLength={512} placeholder="输入个人简介"/>)}
|
|
|
</FormItem>
|
|
|
</div>
|
|
|
- {this.state.authState=='0'||this.state.authState=="2"&&this.state.type=='0'?
|
|
|
+ {(this.state.expert=='0'||this.state.expert=='3'||this.state.expert==null)&&this.state.type!=null?
|
|
|
<div>
|
|
|
<div className="clearfix btnGrounp">
|
|
|
<Radio.Group
|
|
@@ -526,20 +537,6 @@ const Expert = React.createClass({
|
|
|
rules: [ { required: true, message: '此项为必填项!' } ],
|
|
|
})(<Input placeholder="输入职称" maxLength={32}/>)}
|
|
|
</FormItem>
|
|
|
- <div className="clearfix">
|
|
|
- <FormItem
|
|
|
- className="picWidth"
|
|
|
- labelCol={{ span: 9 }}
|
|
|
- wrapperCol={{ span: 10 }}
|
|
|
- label={<div style={{marginRight:10}}><strong style={{color:"#f00"}}>*</strong><span>专家照片 : </span></div> }
|
|
|
- >
|
|
|
- <PicturesWall
|
|
|
- fileList={this.getHeadPortraitUrl}
|
|
|
- pictureUrl={this.state.headPortraitUrl}
|
|
|
- />
|
|
|
- <p>建议:图片要清晰。</p>
|
|
|
- </FormItem>
|
|
|
- </div>
|
|
|
</div>:this.state.authenticationState=='1'?
|
|
|
<div>
|
|
|
<FormItem className="half-item" {...formItemLayout} label="顾问类型">
|
|
@@ -554,22 +551,22 @@ const Expert = React.createClass({
|
|
|
</Select>
|
|
|
)}
|
|
|
</FormItem>
|
|
|
+ </div>:''}
|
|
|
+ {this.state.authenticationState=='1'||this.state.authenticationState=='0'?<div className="clearfix pictures">
|
|
|
<div className="clearfix">
|
|
|
<FormItem
|
|
|
className="picWidth"
|
|
|
labelCol={{ span: 9 }}
|
|
|
- wrapperCol={{ span: 8 }}
|
|
|
- label={<div style={{marginRight:10}}><strong style={{color:"#f00"}}>*</strong><span>顾问照片 : </span></div> }
|
|
|
+ wrapperCol={{ span: 10 }}
|
|
|
+ label={<div style={{marginRight:10}}><strong style={{color:"#f00"}}>*</strong><span>{this.state.authenticationState=='0'?'专家照片 : ':'顾问照片 : ' } </span></div> }
|
|
|
>
|
|
|
<PicturesWall
|
|
|
- fileList={(e)=>{this.setState({adviserUrl:e})}}
|
|
|
- pictureUrl={this.state.adviserUrl}
|
|
|
+ fileList={this.getHeadPortraitUrl}
|
|
|
+ pictureUrl={this.state.headPortraitUrl}
|
|
|
/>
|
|
|
- <p>建议:图片要清晰。</p>
|
|
|
+ <p>建议:图片要清晰1。</p>
|
|
|
</FormItem>
|
|
|
</div>
|
|
|
- </div>:''}
|
|
|
- {this.state.authenticationState=='1'||this.state.authenticationState=='0'?<div className="clearfix pictures">
|
|
|
<FormItem
|
|
|
className="picWidth"
|
|
|
labelCol={{ span: 9 }}
|
|
@@ -589,9 +586,9 @@ const Expert = React.createClass({
|
|
|
<p>建议:图片要清晰。</p>
|
|
|
</FormItem>
|
|
|
</div>:''}
|
|
|
- </div>:this.state.authState=='3'||this.state.authState=='1'&&this.state.authType=='0'?
|
|
|
+ </div>:(this.state.expertAudit=='2'||this.state.expertAudit=='1')&&this.state.expert!='0'?
|
|
|
<div>
|
|
|
- <div className="authState">{this.state.authType=='0'?'专家认证':'顾问认证'}<span>({getAuthState(this.state.authState)})</span></div>
|
|
|
+ <div className="authState">{this.state.expert=='1'?'专家认证':'顾问认证'}<span>({getAuthState(this.state.expertAudit)})</span></div>
|
|
|
<FormItem className="half-item" {...formItemLayout} label="毕业院校">
|
|
|
<span>{theData.graduateSchool}</span>
|
|
|
</FormItem>
|
|
@@ -626,7 +623,7 @@ const Expert = React.createClass({
|
|
|
</Modal>
|
|
|
</FormItem>
|
|
|
</div>
|
|
|
- <FormItem labelCol={{ span: 3 }} wrapperCol={{ span: 10 }} label="身份证正面">
|
|
|
+ <FormItem className="picWidth" labelCol={{ span: 9 }} wrapperCol={{ span: 10 }} label="身份证正面">
|
|
|
<div className="clearfix">
|
|
|
<Upload className="demandDetailShow-upload"
|
|
|
listType="picture-card"
|
|
@@ -645,7 +642,7 @@ const Expert = React.createClass({
|
|
|
</Modal>
|
|
|
</div>
|
|
|
</FormItem>
|
|
|
- <FormItem labelCol={{ span:3 }} wrapperCol={{ span: 10 }} label="身份证反面">
|
|
|
+ <FormItem className="picWidth" labelCol={{ span:9 }} wrapperCol={{ span: 10 }} label="身份证反面">
|
|
|
<div className="clearfix">
|
|
|
<Upload className="demandDetailShow-upload"
|
|
|
listType="picture-card"
|
|
@@ -664,17 +661,17 @@ const Expert = React.createClass({
|
|
|
</Modal>
|
|
|
</div>
|
|
|
</FormItem>
|
|
|
- </div>:this.state.authState=='3'||this.state.authState=='1'&&this.state.authType=='1'?
|
|
|
+ </div>:(this.state.expertAudit=='2'||this.state.expertAudit=='1')&&this.state.expert=='2'?
|
|
|
<div className="clearfix">
|
|
|
- <div className="authState">{this.state.authType=='0'?'专家认证':'顾问认证'}<span>({getAuthState(this.state.authState)})</span></div>
|
|
|
+ <div className="authState">{this.state.expert=='1'?'专家认证':'顾问认证'}<span>({getAuthState(this.state.expertAudit)})</span></div>
|
|
|
<FormItem className="half-item" {...formItemLayout} label="顾问类型">
|
|
|
- <span>{getAdviserType(theData.adviserType)}</span>
|
|
|
+ <span>{getAdviserType(theData.consultantType)}</span>
|
|
|
</FormItem>
|
|
|
<div className="clearfix">
|
|
|
<FormItem labelCol={{ span: 3 }} wrapperCol={{ span: 13 }} label="顾问照片">
|
|
|
<Upload className="demandDetailShow-upload"
|
|
|
listType="picture-card"
|
|
|
- fileList={this.state.adviserUrl}
|
|
|
+ fileList={this.state.headPortraitUrl}
|
|
|
onPreview={(file) => {
|
|
|
this.setState({
|
|
|
previewImage: file.url || file.thumbUrl,
|
|
@@ -689,44 +686,46 @@ const Expert = React.createClass({
|
|
|
</Modal>
|
|
|
</FormItem>
|
|
|
</div>
|
|
|
- <FormItem labelCol={{ span: 3 }} wrapperCol={{ span: 10 }} label="身份证正面">
|
|
|
- <div className="clearfix">
|
|
|
- <Upload className="demandDetailShow-upload"
|
|
|
- listType="picture-card"
|
|
|
- fileList={this.state.positiveIdUrl}
|
|
|
- onPreview={(file) => {
|
|
|
- this.setState({
|
|
|
- previewImage: file.url || file.thumbUrl,
|
|
|
- previewVisible: true,
|
|
|
- });
|
|
|
- }} >
|
|
|
- </Upload>
|
|
|
- <Modal maskClosable={false} footer={null}
|
|
|
- visible={this.state.previewVisible}
|
|
|
- onCancel={() => { this.setState({ previewVisible: false }) }}>
|
|
|
- <img alt="" style={{ width: '100%' }} src={this.state.previewImage || ''} />
|
|
|
- </Modal>
|
|
|
- </div>
|
|
|
- </FormItem>
|
|
|
- <FormItem labelCol={{ span:3 }} wrapperCol={{ span: 10 }} label="身份证反面">
|
|
|
- <div className="clearfix">
|
|
|
- <Upload className="demandDetailShow-upload"
|
|
|
- listType="picture-card"
|
|
|
- fileList={this.state.oppositeIdUrl}
|
|
|
- onPreview={(file) => {
|
|
|
- this.setState({
|
|
|
- previewImage: file.url || file.thumbUrl,
|
|
|
- previewVisible: true,
|
|
|
- });
|
|
|
- }} >
|
|
|
- </Upload>
|
|
|
- <Modal maskClosable={false} footer={null}
|
|
|
- visible={this.state.previewVisible}
|
|
|
- onCancel={() => { this.setState({ previewVisible: false }) }}>
|
|
|
- <img alt="" style={{ width: '100%' }} src={this.state.previewImage || ''} />
|
|
|
- </Modal>
|
|
|
- </div>
|
|
|
- </FormItem>
|
|
|
+ <div>
|
|
|
+ <FormItem className="picWidth" labelCol={{ span: 9 }} wrapperCol={{ span: 10 }} label="身份证正面">
|
|
|
+ <div className="clearfix">
|
|
|
+ <Upload className="demandDetailShow-upload"
|
|
|
+ listType="picture-card"
|
|
|
+ fileList={this.state.positiveIdUrl}
|
|
|
+ onPreview={(file) => {
|
|
|
+ this.setState({
|
|
|
+ previewImage: file.url || file.thumbUrl,
|
|
|
+ previewVisible: true,
|
|
|
+ });
|
|
|
+ }} >
|
|
|
+ </Upload>
|
|
|
+ <Modal maskClosable={false} footer={null}
|
|
|
+ visible={this.state.previewVisible}
|
|
|
+ onCancel={() => { this.setState({ previewVisible: false }) }}>
|
|
|
+ <img alt="" style={{ width: '100%' }} src={this.state.previewImage || ''} />
|
|
|
+ </Modal>
|
|
|
+ </div>
|
|
|
+ </FormItem>
|
|
|
+ <FormItem className="picWidth" labelCol={{ span:9 }} wrapperCol={{ span: 10 }} label="身份证反面">
|
|
|
+ <div className="clearfix">
|
|
|
+ <Upload className="demandDetailShow-upload"
|
|
|
+ listType="picture-card"
|
|
|
+ fileList={this.state.oppositeIdUrl}
|
|
|
+ onPreview={(file) => {
|
|
|
+ this.setState({
|
|
|
+ previewImage: file.url || file.thumbUrl,
|
|
|
+ previewVisible: true,
|
|
|
+ });
|
|
|
+ }} >
|
|
|
+ </Upload>
|
|
|
+ <Modal maskClosable={false} footer={null}
|
|
|
+ visible={this.state.previewVisible}
|
|
|
+ onCancel={() => { this.setState({ previewVisible: false }) }}>
|
|
|
+ <img alt="" style={{ width: '100%' }} src={this.state.previewImage || ''} />
|
|
|
+ </Modal>
|
|
|
+ </div>
|
|
|
+ </FormItem>
|
|
|
+ </div>
|
|
|
</div>:''}
|
|
|
<div className="clearfix">
|
|
|
<Row style={{ marginBottom: 20 }} >
|
|
@@ -742,7 +741,7 @@ const Expert = React.createClass({
|
|
|
<Modal visible={this.state.visible} onOk={this.handleOk} onCancel={this.handleCancel}>
|
|
|
{this.state.authenticationState=='0'&&<p>是否申请专家认证?注意:认证成功后,您的信息将在本平台展示。</p>}
|
|
|
{this.state.authenticationState=='1'&&<p>是否申请顾问认证?注意:认证成功后,您的信息将在本平台展示。</p>}
|
|
|
- {this.state.type!='1'&&this.state.type!='0'?<p>是否申请个人认证?</p>:''}
|
|
|
+ {!this.state.authentication?<p>是否申请个人认证?</p>:''}
|
|
|
</Modal>
|
|
|
</div>
|
|
|
);
|