123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041 |
- /*
- @author:李霆
- @update:2018/05/29
- */
- import React from 'react';
- import {
- Radio,
- Icon,
- Button,
- Cascader,
- Input,
- Select,
- Spin,
- message,
- DatePicker,
- Modal,
- Upload,
- Form,
- Row,
- Col
- } from 'antd';
- import $ from 'jquery/src/ajax';
- import moment from 'moment';
- import './unit.less';
- import { areaSelect } from '@/NewDicProvinceList';
- import { socialAttribute, industry, adviserType, lawType } from '@/dataDic.js';
- import { splitUrl, getAuthState, getAdviserType, getSocialAttribute } from '@/tools.js';
- const FormItem = Form.Item;
- const monthFormat = 'YYYY/MM';
- //图片组件
- const PicturesWall = React.createClass({
- getInitialState() {
- return {
- previewVisible: false,
- previewImage: '',
- fileList: []
- };
- },
- handleCancel() {
- this.setState({
- previewVisible: false
- });
- },
- handlePreview(file) {
- this.setState({
- previewImage: file.url || file.thumbUrl,
- previewVisible: true
- });
- },
- handleChange(info) {
- let fileList = info.fileList;
- this.setState({
- fileList
- });
- this.props.fileList(fileList);
- },
- componentWillReceiveProps(nextProps) {
- this.state.fileList = nextProps.pictureUrl;
- },
- render() {
- const { previewVisible, previewImage, fileList } = this.state;
- const uploadButton = (
- <div>
- <Icon type="plus" />
- <div className="ant-upload-text">点击上传</div>
- </div>
- );
- return (
- <div style={{ display: 'inline-block' }}>
- <Upload
- action={globalConfig.context + '/api/user/uploadPicture'}
- data={{ sign: 'user_picture' }}
- listType="picture-card"
- fileList={fileList}
- onPreview={this.handlePreview}
- onChange={this.handleChange}
- >
- {fileList.length >= 1 ? null : uploadButton}
- </Upload>
- <Modal maskClosable={false} visible={previewVisible} footer={null} onCancel={this.handleCancel}>
- <img alt="example" style={{ width: '100%' }} src={previewImage} />
- </Modal>
- </div>
- );
- }
- });
- const Expert = React.createClass({
- getInitialState() {
- return {
- loading: false,
- orgCodeUrl: [],
- companyLogoUrl: [],
- headPortraitUrl: [],
- lawState: false,
- adviserUrl: [],
- positiveIdUrl: [],
- lawUrl: [],
- oppositeIdUrl: [],
- authenticationState: undefined
- };
- },
- loadInformation(record) {
- this.setState({
- loading: true
- });
- $.ajax({
- method: 'get',
- dataType: 'json',
- crossDomain: false,
- url: globalConfig.context + '/api/user/getUserDetail',
- success: function(data) {
- let thisData = data.data;
- if (!thisData) {
- if (data.error && data.error.length) {
- message.warning(data.error[0].message);
- }
- thisData = {};
- }
- let ProvinceCityArr = [];
- let ProvinceS = thisData.province; //getprovince
- let citys = thisData.city;
- let Areas = thisData.area;
- ProvinceCityArr.push(ProvinceS, citys, Areas);
- let month = thisData.dateOfBirthYear
- ? thisData.dateOfBirthYear + '/' + thisData.dateOfBirthMonth
- : undefined;
- let authenticationState = '';
- if (thisData.auditStatus == '3') {
- authenticationState = (thisData.expert - 1).toString();
- }
- this.setState({
- InformationId: thisData.id,
- InformationUid: thisData.uid,
- authentication: thisData.authentication,
- authenticationState: authenticationState,
- dateOfBirthYear: thisData.dateOfBirthYear,
- dateOfBirthMonth: thisData.dateOfBirthMonth,
- type: thisData.type,
- expert: thisData.expert, //认证类型 0-未认证专家顾问 1-专家认证 2-顾问认证
- authMessage: thisData.auditInfo,
- auditStatus: thisData.auditStatus || '0', //认证状态 0-未认证 1-认证审核中 2-已认证 3-认证失败
- headPortraitUrl: thisData.headPortraitUrl //专家照片
- ? splitUrl(thisData.headPortraitUrl, ',', globalConfig.avatarHost + '/upload')
- : [],
- adviserUrl: thisData.adviserUrl //顾问照片
- ? splitUrl(thisData.adviserUrl, ',', globalConfig.avatarHost + '/upload')
- : [],
- positiveIdUrl: thisData.positiveIdUrl
- ? splitUrl(thisData.positiveIdUrl, ',', globalConfig.avatarHost + '/upload')
- : [],
- oppositeIdUrl: thisData.oppositeIdUrl
- ? splitUrl(thisData.oppositeIdUrl, ',', globalConfig.avatarHost + '/upload')
- : [],
- lawUrl: thisData.consultantCertificateUrl
- ? splitUrl(thisData.consultantCertificateUrl, ',', globalConfig.avatarHost + '/upload')
- : [],
- data: thisData,
- lawState: thisData.consultantType=='4'?true:false,
- ProvinceCity: ProvinceCityArr[0] != null ? ProvinceCityArr : undefined,
- yearMonth: month,
- workUnit: thisData.workUnit || '',
- graduateSchool: thisData.graduateSchool || '',
- professionalTitle: thisData.professionalTitle || '',
- qualification: thisData.qualification || '',
- majorCategory: thisData.majorCategory || '',
- adviserType: thisData.consultantType || '',
- headPortraitUrlCopy: thisData.headPortraitUrl,
- adviserUrlCopy: thisData.adviserUrl,
- positiveIdUrlCopy: thisData.positiveIdUrl,
- oppositeIdUrlCopy: thisData.oppositeIdUrl
- });
- }.bind(this)
- }).always(
- function() {
- this.setState({
- loading: false
- });
- }.bind(this)
- );
- },
- //图片
- getOrgCodeUrl(e) {
- this.setState({
- orgCodeUrl: e
- });
- },
- getCompanyLogoUrl(e) {
- this.setState({
- companyLogoUrl: e
- });
- },
- //基本信息提交
- newSubmit(values = {}) {
- this.state.data = [];
- let theorgCodeUrl = [];
- if (this.state.headPortraitUrl.length) {
- let picArr = [];
- this.state.headPortraitUrl.map(function(item) {
- if (item.response && item.response.data && item.response.data.length) {
- picArr.push(item.response.data);
- }
- });
- theorgCodeUrl = picArr.join(',');
- }
- let thecompanyLogoUrl = [];
- if (this.state.positiveIdUrl.length) {
- let picArr = [];
- this.state.positiveIdUrl.map(function(item) {
- if (item.response && item.response.data && item.response.data.length) {
- picArr.push(item.response.data);
- }
- });
- thecompanyLogoUrl = picArr.join(',');
- }
- let thecompanyLogoUrls = [];
- if (this.state.oppositeIdUrl.length) {
- let picArr = [];
- this.state.oppositeIdUrl.map(function(item) {
- if (item.response && item.response.data && item.response.data.length) {
- picArr.push(item.response.data);
- }
- });
- thecompanyLogoUrls = picArr.join(',');
- }
- //律师证书
- let lawUrls = [];
- if (this.state.lawUrl.length) {
- let picArr = [];
- this.state.lawUrl.map(function(item) {
- if (item.response && item.response.data && item.response.data.length) {
- picArr.push(item.response.data);
- }
- });
- lawUrls = picArr.join(',');
- }
- let years = [];
- years =
- this.state.yearList != undefined
- ? this.state.yearList.split('/')
- : [ this.state.dateOfBirthYear, this.state.dateOfBirthMonth ];
- this.setState({
- loading: true
- });
- let dataList = {};
- dataList = {
- id: this.state.InformationId,
- uid: this.state.InformationUid,
- type: this.state.type,
- societyTag: values.societyTag,
- identifyName: values.identifyName,
- industry: values.industry,
- dateOfBirthYear: years[0] || '', //出生年
- dateOfBirthMonth: years[1] || '', //出生月
- province: values.ProvinceCity[0], //省-
- 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,
- idNumber: values.idNumber,
- email: values.email,
- postalAddress: values.postalAddress,
- introduction: values.introduction,
- auditStatus: this.state.auditStatus || '0'
- };
- if (this.state.authenticationState == '0') {
- dataList.expert = '1';
- dataList.workUnit = values.workUnit;
- dataList.professionalTitle = values.professionalTitle;
- dataList.qualification = values.qualification;
- dataList.majorCategory = values.majorCategory;
- dataList.graduateSchool = values.graduateSchool;
- dataList.headPortraitUrl = theorgCodeUrl.length != 0 ? theorgCodeUrl : '';
- dataList.positiveIdUrl = thecompanyLogoUrl.length != 0 ? thecompanyLogoUrl : '';
- dataList.oppositeIdUrl = thecompanyLogoUrls.length != 0 ? thecompanyLogoUrls : '';
- } else if (this.state.authenticationState == '1') {
- dataList.expert = '2';
- dataList.typicalCase = values.adviserType == '4' ? values.typicalCase : '';
- dataList.workUnit1 = values.adviserType == '4' ? values.workUnit1 : '';
- dataList.honer = values.adviserType == '4' ? values.honer : '';
- dataList.goodAtIndustry = values.adviserType == '4' ? values.goodAtIndustry : '';
- dataList.consultantCertificateUrl = values.adviserType == '4' && lawUrls.length != 0 ? lawUrls : ''; //法律职业资格证
- dataList.consultantType = values.adviserType; //顾问类型
- dataList.headPortraitUrl = theorgCodeUrl.length != 0 ? theorgCodeUrl : ''; //顾问照片
- dataList.positiveIdUrl = thecompanyLogoUrl.length != 0 ? thecompanyLogoUrl : '';
- dataList.oppositeIdUrl = thecompanyLogoUrls.length != 0 ? thecompanyLogoUrls : '';
- }
- $.ajax({
- method: 'post',
- dataType: 'json',
- url: globalConfig.context + '/api/user/updateUserDetail',
- data: dataList
- }).done(
- function(data) {
- this.setState({
- loading: false
- });
- if (!data.error.length) {
- //认证状态判定说明
- message.success(
- (this.state.auditStatus == '0' || this.state.auditStatus == '3') &&
- this.state.headPortraitUrl.length
- ? '认证审核提交成功,请耐心等待。'
- : '保存成功'
- );
- this.loadInformation();
- } else {
- message.warning(data.error[0].message);
- }
- }.bind(this)
- );
- },
- subFun(e) {
- e.preventDefault();
- this.props.form.validateFields((err, values) => {
- if (!err) {
- if (this.state.authenticationState == '0' || this.state.authenticationState == '1') {
- if ((this.state.headPortraitUrl.length)<1) {
- message.warning(this.state.authenticationState == '1' ? '请上传顾问照片!' : '请上传专家照片');
- return;
- }
- if(values.adviserType=='4'&&!(this.state.lawUrl.length)){
- message.warning('请上传您的律师职业资格证!');
- return;
- }
- if(!(this.state.oppositeIdUrl.length)||!(this.state.positiveIdUrl.length)){
- message.warning('请上传您的身份证正反照片!');
- return;
- }
- this.setState({
- visible: true,
- values: values
- });
- } else {
- this.newSubmit(values);
- }
- }
- });
- },
- handleOk() {
- this.newSubmit(this.state.values);
- this.setState({
- visible: false
- });
- },
- handleCancel() {
- this.setState({
- visible: false
- });
- },
- //顾问选择法律顾问
- handleSelectChange(value) {
- if (value == '4') {
- this.setState({
- lawState: true
- });
- } else {
- this.setState({
- lawState: false
- });
- }
- },
- getHeadPortraitUrl(e) {
- this.setState({ headPortraitUrl: e });
- },
- getPositiveIdUrl(e) {
- this.setState({ positiveIdUrl: e });
- },
- getOppositeIdUrl(e) {
- this.setState({ oppositeIdUrl: e });
- },
- componentWillMount() {
- this.loadInformation();
- },
- authenticationChange(e){
- this.setState({
- authenticationState: e.target.value,
- });
- if(this.state.auditStatus=='3'){
- this.loadInformation();
- }
- },
- componentWillReceiveProps(nextProps) {},
- render() {
- const { getFieldDecorator } = this.props.form;
- const { MonthPicker } = DatePicker;
- const formItemLayout = {
- labelCol: {
- span: 6
- },
- wrapperCol: {
- span: 14
- }
- };
- const theData = this.state.data || [];
- return (
- <div className="unit-wrap">
- <Form layout="horizontal" onSubmit={this.subFun} id="demand-form" style={{ width: '80%' }}>
- <Spin spinning={this.state.loading}>
- <Row style={{ marginBottom: 20 }}>
- <Col offset={2} span={4}>
- <h4 style={{ fontSize: 20 }}>个人资料</h4>
- </Col>
- </Row>
- <div className="clearfix">
- {this.state.auditStatus == '0' ? (
- <FormItem className="half-item" {...formItemLayout} label="姓名">
- {getFieldDecorator('identifyName', {
- rules: [ { required: true, message: '此项为必填项!' } ],
- initialValue: theData.identifyName
- })(<Input placeholder="输入姓名" maxLength={128} />)}
- </FormItem>
- ) : (
- <FormItem className="half-item" {...formItemLayout} label="姓名">
- <span>{theData.identifyName}</span>
- </FormItem>
- )}
- <FormItem className="half-item" {...formItemLayout} label="手机号码">
- <span>{theData.mobile}</span>
- </FormItem>
- {this.state.auditStatus == '0' ? (
- <FormItem className="half-item" {...formItemLayout} label="社会属性">
- {getFieldDecorator('societyTag', {
- rules: [ { required: true, message: '此项为必填项!' } ],
- initialValue: theData.societyTag || undefined
- })(
- <Select placeholder="客户社会属性" placeholder="请选择社会属性">
- {socialAttribute.map(function(item) {
- return <Select.Option key={item.value}>{item.key}</Select.Option>;
- })}
- </Select>
- )}
- </FormItem>
- ) : (
- <FormItem className="half-item" {...formItemLayout} label="社会属性">
- <span>{getSocialAttribute(theData.societyTag)}</span>
- </FormItem>
- )}
- <FormItem className="half-item" {...formItemLayout} label="行业">
- {getFieldDecorator('industry', {
- rules: [ { required: true, message: '此项为必填项!' } ],
- initialValue: theData.industry ? theData.industry.toString() : undefined
- })(
- <Select placeholder="选择行业">
- {industry.map(function(item) {
- return <Select.Option key={item.value}>{item.key}</Select.Option>;
- })}
- </Select>
- )}
- </FormItem>
- <FormItem className="half-item" {...formItemLayout} label="性别">
- {getFieldDecorator('sex', {
- initialValue: theData.sex
- })(
- <Radio.Group>
- <Radio value={'男'}>男</Radio>
- <Radio value={'女'}>女</Radio>
- </Radio.Group>
- )}
- </FormItem>
- <FormItem className="half-item" {...formItemLayout} label="出生日期">
- <MonthPicker
- value={this.state.yearMonth ? moment(this.state.yearMonth, monthFormat) : undefined}
- format={monthFormat}
- onChange={(time, times) => {
- this.setState({ yearMonth: time, yearList: times });
- }}
- />
- </FormItem>
- <FormItem className="half-item" {...formItemLayout} label="身份证号码">
- {getFieldDecorator('idNumber', {
- initialValue: theData.idNumber
- })(<Input placeholder="身份证号码" maxLength={20} />)}
- </FormItem>
- </div>
- <div className="clearfix">
- <FormItem className="half-item" {...formItemLayout} label="省-市-区">
- {getFieldDecorator('ProvinceCity', {
- rules: [ { required: true, message: '此项为必填项!' } ],
- initialValue: this.state.ProvinceCity
- })(<Cascader options={areaSelect()} placeholder="选择城市" />)}
- </FormItem>
- <FormItem className="half-item" {...formItemLayout} label="通信地址">
- {getFieldDecorator('postalAddress', {
- initialValue: theData.postalAddress
- })(<Input placeholder="输入通信地址" maxLength={255} />)}
- </FormItem>
- <FormItem className="half-item" {...formItemLayout} label="固定电话">
- {getFieldDecorator('fixedTel', {
- initialValue: theData.fixedTel
- })(<Input placeholder="输入固定电话" maxLength={13} />)}
- </FormItem>
- <FormItem className="half-item" {...formItemLayout} label="QQ">
- {getFieldDecorator('qq', {
- initialValue: theData.qq
- })(<Input placeholder="输入qq" maxLength={16} />)}
- </FormItem>
- <FormItem className="half-item" {...formItemLayout} label="电子邮箱">
- {getFieldDecorator('email', {
- initialValue: theData.email
- })(<Input placeholder="输入电子邮箱" maxLength={128} />)}
- </FormItem>
- </div>
- <div className="clearfix">
- <FormItem labelCol={{ span: 3 }} wrapperCol={{ span: 10 }} label="个人简介">
- {getFieldDecorator('introduction', {
- initialValue: theData.introduction,
- rules: [ { required: true, message: '此项为必填项!' } ]
- })(
- <Input
- type="textarea"
- rows={4}
- maxLength={512}
- placeholder="输入个人简介,比如案例、简介、从业时间、服务企业等"
- />
- )}
- </FormItem>
- </div>
- {(this.state.expert == '0' ||
- this.state.auditStatus == '0' ||
- this.state.expert == null ||
- this.state.auditStatus == '3') &&
- this.state.type != null ? (
- <div>
- <div className="clearfix btnGrounp">
- <Radio.Group
- value={this.state.authenticationState}
- onChange={this.authenticationChange}
- >
- {/* <Radio.Button value="0">专家认证</Radio.Button> */}
- <Radio.Button value="1">顾问认证</Radio.Button>
- </Radio.Group>
- <Button
- type="dashed"
- style={{ marginLeft: 20 }}
- onClick={(e) => {
- this.setState({ authenticationState: undefined });
- }}
- >
- 暂不认证
- </Button>
- <span style={{ marginLeft: 10, color: '#f00' }}>
- {this.state.auditStatus == '3' ? '(认证失败:' + this.state.authMessage + ')' : ''}
- </span>
- </div>
- {this.state.authenticationState == '0' &&
- (this.state.auditStatus == '0' || this.state.auditStatus == '3') ? (
- <div className="patentBody">
- <FormItem className="half-item" {...formItemLayout} label="毕业院校">
- {getFieldDecorator('graduateSchool', {
- initialValue: theData.graduateSchool,
- rules: [ { required: true, message: '此项为必填项!' } ]
- })(<Input placeholder="输入毕业院校全称" maxLength={32} />)}
- </FormItem>
- <FormItem className="half-item" {...formItemLayout} label="专业类别">
- {getFieldDecorator('majorCategory', {
- initialValue: theData.majorCategory,
- rules: [ { required: true, message: '此项为必填项!' } ]
- })(<Input placeholder="输入专业" maxLength={16} />)}
- </FormItem>
- <FormItem className="half-item" {...formItemLayout} label="职业资格">
- {getFieldDecorator('qualification', {
- initialValue: theData.qualification,
- rules: [ { required: true, message: '此项为必填项!' } ]
- })(<Input placeholder="输入职业资格" maxLength={32} />)}
- </FormItem>
- <FormItem className="half-item" {...formItemLayout} label="就职单位">
- {getFieldDecorator('workUnit', {
- initialValue: theData.workUnit,
- rules: [ { required: true, message: '此项为必填项!' } ]
- })(<Input placeholder="输入就职单位全称" maxLength={64} />)}
- </FormItem>
- <FormItem className="half-item" {...formItemLayout} label="职称">
- {getFieldDecorator('professionalTitle', {
- initialValue: theData.professionalTitle,
- rules: [ { required: true, message: '此项为必填项!' } ]
- })(<Input placeholder="输入职称" maxLength={32} />)}
- </FormItem>
- </div>
- ) : this.state.authenticationState == '1' ? (
- <div>
- <FormItem className="half-item" {...formItemLayout} label="顾问类型">
- {getFieldDecorator('adviserType', {
- rules: [ { required: true, message: '此项为必填项!' } ],
- initialValue:
- theData.consultantType || theData.consultantType == '0'
- ? theData.consultantType.toString()
- : undefined
- })(
- <Select
- placeholder="选择类型"
- onChange={this.handleSelectChange.bind(this)}
- >
- {adviserType.map(function(item) {
- return (
- <Select.Option key={item.value}>{item.key}</Select.Option>
- );
- })}
- </Select>
- )}
- </FormItem>
- </div>
- ) : (
- ''
- )}
- {this.state.lawState && this.state.authenticationState == '1' ? (
- <div className="clearfix">
- <div className="clearfix">
- <FormItem className="half-item" {...formItemLayout} label="律师事务所">
- {getFieldDecorator('workUnit1', {
- rules: [ { required: true, message: '此项为必填项!' } ],
- initialValue: theData.workUnit1
- })(<Input placeholder="请填写所在律师事务所全称" />)}
- </FormItem>
- </div>
- <div className="clearfix">
- <FormItem className="half-item" {...formItemLayout} label="职称">
- {getFieldDecorator('honer', {
- initialValue: theData.honer
- })(<Input placeholder="请填写您的职称" />)}
- </FormItem>
- </div>
- <div className="clearfix">
- <FormItem labelCol={{ span: 3 }} wrapperCol={{ span: 10 }} label="擅长行业">
- {getFieldDecorator('goodAtIndustry', {
- initialValue: theData.goodAtIndustry,
- })(
- <Input
- type="textarea"
- rows={4}
- maxLength={10000}
- placeholder="填写您擅长的行业"
- />
- )}
- </FormItem>
- </div>
- <div className="clearfix">
- <FormItem labelCol={{ span: 3 }} wrapperCol={{ span: 10 }} label="典型案例">
- {getFieldDecorator('typicalCase', {
- initialValue: theData.typicalCase,
- rules: [ { required: true, message: '此项为必填项!' } ]
- })(
- <Input
- type="textarea"
- rows={4}
- maxLength={10000}
- placeholder="输入典型案例"
- />
- )}
- </FormItem>
- </div>
- </div>
- ) : (
- ''
- )}
- {this.state.authenticationState == '1' || this.state.authenticationState == '0' ? (
- <div className="clearfix pictures">
- <div className="clearfix">
- <FormItem
- className="half-item"
- className="picWidth"
- labelCol={{ span: 9 }}
- wrapperCol={{ span: 10 }}
- label={
- <span>
- <strong style={{ color: '#f00' }}> * </strong>
- <span>
- {this.state.authenticationState == '0' ? '专家照片' : '顾问照片'}
- </span>
- </span>
- }
- >
- <PicturesWall
- fileList={this.getHeadPortraitUrl}
- pictureUrl={this.state.headPortraitUrl}
- />
- <p>建议:图片要清晰。</p>
- </FormItem>
- {this.state.lawState && this.state.authenticationState == '1' ? (
- <FormItem
- className="half-item"
- className="picWidth"
- labelCol={{ span: 9 }}
- wrapperCol={{ span: 10 }}
- label={
- <span>
- <strong style={{ color: '#f00' }}> * </strong>
- <span>律师职业资格证</span>
- </span>
- }
- >
- <PicturesWall
- fileList={(e) => {
- this.setState({ lawUrl: e });
- }}
- pictureUrl={this.state.lawUrl}
- />
- <p>建议:图片要清晰。</p>
- </FormItem>
- ) : (
- ''
- )}
- </div>
- <FormItem
- className="picWidth"
- labelCol={{ span: 9 }}
- wrapperCol={{ span: 10 }}
- label={
- <span>
- <strong style={{ color: '#f00' }}>*</strong>
- <span>身份证正面</span>
- </span>
- }
- >
- <PicturesWall
- fileList={this.getPositiveIdUrl}
- pictureUrl={this.state.positiveIdUrl}
- />
- <p>建议:图片要清晰。</p>
- </FormItem>
- <FormItem
- className="picWidth"
- labelCol={{ span: 9 }}
- wrapperCol={{ span: 10 }}
- label={
- <span>
- <strong style={{ color: '#f00' }}>*</strong>
- <span>身份证反面</span>
- </span>
- }
- >
- <PicturesWall
- fileList={this.getOppositeIdUrl}
- pictureUrl={this.state.oppositeIdUrl}
- />
- <p>建议:图片要清晰。</p>
- </FormItem>
- </div>
- ) : (
- ''
- )}
- </div>
- ) : (this.state.auditStatus == '2' || this.state.auditStatus == '1') &&
- this.state.expert == '1' ? (
- <div>
- <div className="authState">
- 专家认证<span>({getAuthState(this.state.auditStatus)})</span>
- </div>
- <FormItem className="half-item" {...formItemLayout} label="毕业院校">
- <span>{theData.graduateSchool}</span>
- </FormItem>
- <FormItem className="half-item" {...formItemLayout} label="专业类别">
- <span>{theData.majorCategory}</span>
- </FormItem>
- <FormItem className="half-item" {...formItemLayout} label="职业资格">
- <span>{theData.qualification}</span>
- </FormItem>
- <FormItem className="half-item" {...formItemLayout} label="就职单位">
- <span>{theData.workUnit}</span>
- </FormItem>
- <FormItem className="half-item" {...formItemLayout} label="职称">
- <span>{theData.professionalTitle}</span>
- </FormItem>
- <div className="clearfix">
- <FormItem labelCol={{ span: 3 }} wrapperCol={{ span: 13 }} label="专家照片">
- <Upload
- className="demandDetailShow-upload"
- listType="picture-card"
- fileList={this.state.headPortraitUrl}
- onPreview={(file) => {
- this.setState({
- previewImage: file.url || file.thumbUrl,
- previewVisible: true
- });
- }}
- />
- <Modal
- maskClosable={false}
- footer={null}
- visible={this.state.previewVisible}
- onCancel={() => {
- this.setState({ previewVisible: false });
- }}
- >
- <img alt="" style={{ width: '100%' }} src={this.state.previewImage || ''} />
- </Modal>
- </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
- });
- }}
- />
- <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
- });
- }}
- />
- <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>
- ) : (this.state.auditStatus == '2' || this.state.auditStatus == '1') &&
- this.state.expert == '2' ? (
- <div className="clearfix">
- <div className="authState">
- 顾问认证<span>({getAuthState(this.state.auditStatus)})</span>
- </div>
- <FormItem className="half-item" {...formItemLayout} label="顾问类型">
- <span>{getAdviserType(theData.consultantType)}</span>
- </FormItem>
- {theData.consultantType == '4' ? (
- <div className="clearfix">
- <div className="clearfix">
- <FormItem className="half-item" {...formItemLayout} label="律师事务所">
- <span>{theData.workUnit1}</span>
- </FormItem>
- </div>
- <div className="clearfix">
- <FormItem className="half-item" {...formItemLayout} label="职称">
- <span>{theData.honer}</span>
- </FormItem>
- </div>
- <div className="clearfix">
- <FormItem labelCol={{ span: 3 }} wrapperCol={{ span: 10 }} label="擅长行业">
- <span>{theData.goodAtIndustry}</span>
- </FormItem>
- </div>
- <div className="clearfix">
- <FormItem labelCol={{ span: 3 }} wrapperCol={{ span: 10 }} label="典型案例">
- <span>{theData.typicalCase}</span>
- </FormItem>
- </div>
- </div>
- ) : (
- ''
- )}
- <div className="clearfix">
- <FormItem className="picWidth" labelCol={{ span: 9 }} wrapperCol={{ span: 10 }} label="顾问照片">
- <Upload
- className="demandDetailShow-upload"
- listType="picture-card"
- fileList={this.state.headPortraitUrl}
- onPreview={(file) => {
- this.setState({
- previewImage: file.url || file.thumbUrl,
- previewVisible: true
- });
- }}
- />
- <Modal
- maskClosable={false}
- footer={null}
- visible={this.state.previewVisible}
- onCancel={() => {
- this.setState({ previewVisible: false });
- }}
- >
- <img alt="" style={{ width: '100%' }} src={this.state.previewImage || ''} />
- </Modal>
- </FormItem>
- {theData.consultantType == '4' && (
- <FormItem className="picWidth" labelCol={{ span: 9 }} wrapperCol={{ span: 10 }} label="律师职业资格证">
- <Upload
- className="demandDetailShow-upload"
- listType="picture-card"
- fileList={this.state.lawUrl}
- onPreview={(file) => {
- this.setState({
- previewImage: file.url || file.thumbUrl,
- previewVisible: true
- });
- }}
- />
- <Modal
- maskClosable={false}
- footer={null}
- visible={this.state.previewVisible}
- onCancel={() => {
- this.setState({ previewVisible: false });
- }}
- >
- <img
- alt=""
- style={{ width: '100%' }}
- src={this.state.previewImage || ''}
- />
- </Modal>
- </FormItem>
- )}
- </div>
- <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
- });
- }}
- />
- <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
- });
- }}
- />
- <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 }}>
- <Col offset={3} span={4}>
- <Button size="large" className="set-submit" type="primary" htmlType="submit">
- 保存
- </Button>
- </Col>
- </Row>
- </div>
- </Spin>
- </Form>
- <Modal visible={this.state.visible} onOk={this.handleOk} onCancel={this.handleCancel}>
- {this.state.authenticationState == '0' && <p>是否申请专家认证?注意:认证成功后,您的信息将在本平台展示。</p>}
- {this.state.authenticationState == '1' && <p>是否申请顾问认证?注意:认证成功后,您的信息将在本平台展示。</p>}
- </Modal>
- </div>
- );
- }
- });
- export default Form.create()(Expert);
|